Interior Door upgrades

Question: I am looking into replacing my doors in my house. The current doors are a little unconventional. the widths are 31.5" what are my options for replacing them? is it possible to take a 1/4 inch off each side on a table saw, sand and re paint a new door or is the hollow nature of interior doors going to pose a problem?
Comment: Please verify the exact dimension of the door slab for us. Don't use decimals. Use 16ths or 32nds of an inch. Make sure that you're measuring the wider of the two faces, as the latch edge may have a bevel for better operational clearance. Sight through the tape measure at a right angle to the door face to eliminate error due to the bullnose on the corners.
Comment: Also provide accurate measurement of the finished opening width. All this may sound pedantic, but it can have an impact on the proposed solution whether we're really talking about 1/2" or if it's only say 5/16".
Answer: This is less an answer than a rambling commentary, so please bear with me.
Isherwood might be on to something about your measuring... you might have plain old 32" doors without realizing it.
But if you don't, and you need to do some surgery, here's a few points:

buy from a real door place... not a big box. You'll be able to pick the price point that gets you an adequate amount of wood in the stiles. (And they're apt to know what they're selling.) Plus, you'll be able to specify unbored and unmortised.
if your existing doors fit well, you could even bring the doors to the aforementioned door place as templates and let them cut/bore/hinge them for a modest fee. On a good day, they'll dispose of them as well.
if you're doing surgery on the doors, think about a power planer. A tablesaw (even one with a beautiful outfeed table) isn't going to be good at cutting the subtle curves you find in existing doors. And I can't imagine cutting tops/bottoms on a tablesaw.
again, if you're all diy and want another excuse to buy tools, get a used midsized router (1-1/2hp; the classic in the category is the porter cable 690; $50-100 on craigslist) and a hinge butt template (P-C 59380 is the grand-daddy of them all; $100-200 on CL, though slightly rare and not terribly fast to re-sell after you're done. Just know what should be in the box, as the missing knobs and doohickeys are nearly impossible to replace.)
I swear I won't assault your wallet by suggesting a boring jig, but the Classic Engineering 10800 boring jig is really nice.

Good luck on the project.
Comment: I second the motion to get yourself a power planer (if nothing else) for this job. I replaced 12 doors in my house, and used a power planer to make the doors fit in my out of square door frames of various sizes (old house). The planer allows you to take 1/4" tapering to 1/8"  (for ex.) if need be.
Answer: Even hollow core doors have solid wood rails around the outside and can be trimmed a bit around the edges. 1/4" should be no problem, but if you're going much further than that take a look at the product specs.
Comment: The problem is that you're going to either remove the hinge mortises and need to redo them, or you're going to shorten the bolt bore, which can cause hardware problems, or both.
Comment: You can pick up a hinge mortise kit to redo them if need be (if you end up eliminating the pre-cut mortises when trimming down the width.) It's really not that much of a chore, and, will probably be cheaper than having to custom order doors.

Interior Door upgrades


On average, how many landings does a student pilot need before their first solo?

Question: On average, how many landings does a student pilot need before their first solo?
I know it depends on individual students, but roughly what is the number?
Or you can just tell me your experience.
Comment: Please know that the number or landings or hours required to solo means almost nothing about you skill as a pilot.  I've see the 45hr wonder kids (who were very proud of that number, btw) ball up airplanes in very stupid ways and the 100hr PPLs go on to have really great expierences with GA.
Comment: My log book says I was at 50 landings, with 23.1 ASEL hours for starting first solo. I got my PPL at 259 landings 80.6 ASEL hours and 26.6 PIC hours (log at time of issuance, so end of the test).
Comment: Not sure what the average is. I had 93 landings logged and 22.7 ASEL hours on the day of my first solo, but I had a few hiccups that delayed my medical cert and my CFI moved away at about 17 hours so had to find a new one to sign me off. Finished PPL by 156 landings and 45.6 ASEL though!
Comment: IIRC it was 33 landings, technically slightly less is you count that the instructor did the first couple.  But that was in a glider (sailplane).  As a general rule, younger pilots will go solo faster - I remember reading that it was along the line of 20 + 2 per year of age over 18.  Also launch method makes a difference - aerotow students tend to go solo in fewer launches/landings that winch students because they tend to have more handling time per launch.

This might be interesting: http://www.scottishglidingcentre.co.uk/cost_to_solo.htm
Comment: For what it's worth given that in 1969 when I soloed attitudes were different I think, but at solo I had 8.5 hours of dual and 35 dual landings.I have this long-term, back-burner project to get my hours to my web page at https://terryliittschwager.com/logbook.php
Comment: I'm at 26 hours and 23 landings and still not soloed. I'm hoping I'm close, I think half of the time I have is on ground operations taking too long on a busy airport.
Answer: My logbook shows 29 landings, with 11 hrs logged in an Aircraft Single Engine Land aircraft (ASEL) when my instructor stepped out and sent me off on my first solo flight.
I think those figures were typical for students at my flight school. It is probably also fairly typical for students at most §141 flight schools, such as mine.
Now, there can be a significant difference between the experience of training under §61 and training at a §141 flight school. The schedule at §141 schools tends to be more fast-paced than what many students might experience doing §61 flight training. Since students must systematically complete the curriculum at §141 schools, a certain minimum level of experience will be in place before a student solos. However, this curriculum also lends itself to a student being ready to solo after a fairly defined period of time. A student training under §61 might take longer to be ready to solo due to a number of factors, including a possibly more relaxed training pace. On the other hand, §61 training can also give an instructor the freedom to solo a student after less time than might be typical.
I don't have any hard data outside of my own experience and what I have observed, but I would guess that a typical §141 student will solo after about 20-40 landings and 10-15 hours. I would guess that a typical §61 student will solo after about 20-60 landings and 10-25 hours.
Comment: Just for reference, I trained at a part 61 school and my numbers are similar, I soloed at 10 hours with about 25 landings. Granted I also got my license at 45 hours (where national average is closer to 70). But my training was spread out over a year (so it wasn't one of those 45 hours in 3 weeks things).
Comment: I generally sent my 61 students up between 10-15hrs.  Why would a 61 a school take longer than a 141?
Comment: @RonBeyer Yeah, thats just it. I think §61 gives more room to allow even earlier solos in some cases. You hear about folks that soloed after 5 hours or so. I doubt that would ever happen under §141.
Comment: Quick question, how do you type the § symbol?
Comment: @kevin: You type ALT, maintain it, and [type 21 on the numerical keypad](http://www.alt-codes.net/). Else you use [charmap](http://symbolcodes.tlt.psu.edu/accents/charmap.html).
Comment: @Kevin What mins said. If you forget those keystrokes, Google `14 CFR 91` and copy the symbol from one of the pages just as you presumably did in your comment ;)
Comment: @acpilot I have little direct experience with §61 training. My observations and anecdotal evidence has led me to understand that some student's more relaxed training schedule leads to more experience before solo or certification.
Comment: I was about double these numbers, but I trained at a busy urban airport with lots of IFR and jet traffic, so you'd expect a CFI to be more cautious than at a non-towered airport where the student has the pattern to him/herself.
Answer: I was trained in the US Navy. My basic flight training was conducted at NAS Corpus Christi in the T-28 Trojan and consisted of 30 actual flights. This was average for a student Naval Aviator. Total actual flight time was 48.9 combined and 40.6 as first pilot. There were a total of 7.3 hours of instrument time, with 1.9 night time hours. Before my solo I had 148 landings.
The average flight time was 1.6 hours with 1.4 as first pilot. Average landings per flight were 5.

The T-28 Trojan was similar in looks to the A1 Skyraider. The Skyraider had a Wright R-3350-26WA radial engine with 2,700 HP. The Trojan had a Wright R-1820-86 Cyclone radial engine developing 1,425 HP. You could torque roll the Trojan!
It was an airplane that, in a sense, was wasted on a new student like me. It was a lot to handle for a new aviator, and at the time I was flying, it was old and often a pilot was faced with emergencies. I remember being airborne listening to an emergency of a solo pilot with smoke in the cockpit. It had a lot of power with its 9 cylinder radial engine.
At full throttle on engine checks at the end of the runway you had to press hard on the brakes, and could find yourself coming off the power as you skidded down the runway. When you released the brakes you had a lot of rudder in compensating for the prop wash hitting the vertical stabilizer. It was customary on your first takeoff not to put in nearly enough rudder. Whoa, that led to some interesting events.
When I finished my indoctrination at Pensacola I was given the choice to fly the new T-34 Turboprop or go to Corpus Christi and fly the T-28. When I saw the engine on that beast I knew exactly which aircraft I wanted to fly. Wish I had enough money to own one.


AVL tree balance property states for the two subtrees of a node, their height can differ at most one. Why can't it be zero?

Question: I was thinking that if they were equal, say they are required to be zero this would be enforce the balance property more effectively. Can anyone explain why 1 is a satisfactory rather than just them being 0?
Comment: If you enforce a balance difference of zero, your tree can't hold an arbitrary number of elements anymore (only $2^k-1$ nodes, I think). For example, how would you arrange your tree when it has only two nodes?
Answer: What matters is that the height  of the tree is limited by $O(\log n)$. As long as you maintain that property your searches will remain efficient.
Forcing the height difference to be zero we get the above property. However we also get the property if we allow the difference to be 1. The crux is that the latter requires a lot less rebalancing to achieve. The average height of a node will very slightly increase due to our more relaxed tree structure but this downside is greatly overshadowed by the reduction in rebalancing operations.


Closed a wallet in Multibit mac and cant find it from application support

Question: First time installed Multibit for mac and had my bitcoins transfered there. I had the software and wallet open for 2-3 days and decided to close the wallet. After closing i couldnt find the wallet in the application support folder. There was nothing related to multibit in that folder. Ive been trying to search .wallet files from the Finder but it comes up empty. Are my bitcoins gone for good?
Comment: related: http://bitcoin.stackexchange.com/questions/10282/cant-find-multibit-wallet-file-after-closing-wallet
Answer: Are you sure you looked in the right folder? The path should be: /User/your username/Application Support/Multibit/xxxx.wallet.
I didn't find my wallet because I made the misstake to looked directly under root: /Library/Application Support/  and got rather stressed but I found the path eventually.
This cataloug is hidden and you have to unhide it with the commando in a terminal window: chflags nohidden /Users/your username/Library/Application Support/
Comment: It is **not** necessary to "unhide" the Library directory.  To open a hidden folder in the finder just open a new finder window (Command-N) and then Shift-Command-G, this will bring up a dialog where you can enter the folder path. You can use "~" as a shortcut for "/Users/your username" thus you can just enter: "~/Library/Application Support". Or just enter "wallet.dat" in Spotlight.


Is Stack Overflow about programming Q&A or IT Q&A?

Question: I thought that Stack Overflow is for programmers and about programming. But now I see there a lot of questions about system administration and even about using Excel formulas. Could anyone explain what questions can be posted on Stack Overflow?
Comment: You know how even in a country that has laws, people break those laws and sometimes get away with it? Same thing here.
Comment: https://stackoverflow.com/help/on-topic (note that having rules does not stop people from posting off-topic questions, and we cannot get around to closing them all)
Comment: I'd also say that coding with Excel is still coding. Functional, reactive coding, at that. See https://www.youtube.com/watch?v=0yKf8TrLUOw for example.
Comment: Excel is absolutely a programming tool. I'm sorry it's more pedestrian than Java, but it is a readily available tool many people have and questions on how to make it do things for you are absolutely on topic here.
Comment: About deleting answers: https://meta.stackoverflow.com/a/258746/4751173
Comment: The VBA code underpinning excel is a fully turing complete programming language
Answer: The general rules about what's on-topic here and what not can be found in the help center. More details can be found on Meta, in questions tagged scope.
If you see a question about system administration, flag it:

If you see a basic question about Excel, flag it:

(note that some advanced Excel questions, e.g. those involving VBA and complex formulas, are on-topic, see the tag info)
That way, you'll help to enforce the rules. You can also hop into the SOCVR chatroom to ask if a question is really off-topic and get help with closing the question, but be sure to read their FAQ first.
Comment: It is not only closing what we do. We can also guide users when they have doubt if closing is needed and/or fir which reason. We try to be more then just a close vote mob ....
Comment: @rene sure. 'Help with' is not just a close vote 'megaphone'. I've edited the answer a bit.
Comment: Upvotes on Meta don't give reputation either, so I'm not keeping it for the reputation. I'm keeping it for future users who might have the same question as you did.
Comment: @Pavel_K downvotes on Meta don't cost reputation and don't lead to question bans (well, only in rare cases). I think it's a useful question to have around; the downvotes may be because of lack of research (one trip to the help center would probably suffice to answer the question).
Answer: Short answer: no, Stack Overflow is only for programming questions. General IT questions have their own sites, so if people want to ask about that they should go to Super User or Server Fault.
The close vote queue often contains 10K to 20K questions, so we can't actually close all of the off-topic questions. This is especially the case for smaller tags that people with enough reputation to vote to close don't visit much. That's why we'll periodically have to have wide-spread cleanup efforts in certain tags; there are certain tags, such as openvpn, that consisted almost entirely of off-topic questions at one point, and there are still plenty of tags like that around. Off-topic and low-quality questions are less likely to survive in higher-traffic tags, but it does still sometimes happen.
That being said, the fact that off-topic questions sometimes slip through the cracks isn't evidence that they are, in fact, on topic. If you see examples of these, I'd definitely encourage you to flag them as off-topic and/or mention them in the Stack Overflow Close Vote chat room.
It's also worth noting that there have been numerous discussions on whether Excel formula and macros are on-topic in the past on Meta. As some people have indicated in the comments, these are (arguably) still programming questions, which means that they're on-topic.


Chasidic Sefarim on the Moadim

Question: I am looking for a comprehensive list of Chasidic sefarim which deal with every one of the Moadim, in terms of Machshava/Hashkafa. One I know of so far which meets this criteria is Pri Tzaddik by Rav Tzadok HaKohen of Lublin, which deals exhaustively with every one of the holidays in the year, down to each Rosh Chodesh and minor holidays (such as Tu B'Shvat), from a Torah/Chasidic/Kabbalah perspective. I have also found the Sfas Emes, by the Gerrer Rebbe Yehuda Aryeh Leib Alter, to write extensively on the Moadim, although he doesn't include Rosh Chodesh or minor holidays.  I focus my question on Chasidic sefarim because I have found them most likely to discuss these areas with the breadth I am looking for, but I am open to hearing of non-Chasidic sefarim which treat the Moadim similarly. Are there any other sefarim which take the cycle of the year so seriously in a Machshava fashion?
Comment: Anyone wish to explain why this question got down votes?
Comment: Tiferes Shlomo of Redomsk.
Comment: In case you are interested, the _S'fas Emes_ does address _rosh chodesh_ sometimes, particularly when it falls out on _shabas_. I don't have a good copy in front of me, but I believe there is one in חשון תרל"ג or תרל"ה, and at least one in the appendix in the back of _B'reshis_. I wouldn't be surprised if it comes up on _shabas Chanuka_ as well. Also, _Imre Emes_ follows a very similar pattern.
Comment: *Horeb*, by R' Hirsch, gives you a great deal of *machshava* about the holidays.
Answer: You can add the Shem MiShmuel by Rabbi Shmuel Bornsztain, the second Sochatchover Rebbe, to your list. Also, the Maharal MiPrague predates Hassidism but has been described as a forefather of Chassidus in terms of machshavic thought. (I believe he heavily influenced Rav Tzadok.) He has works related to many of the moadim including Gevurot Hashem on Pesach, Tiferes Yisrael on Shavuot, Netzach Yisrael on Tisha B'Av, Ner Mitzvah on Chanuka, and Ohr Chadash on Purim. (He had planned to write on the other Moadim as well but unfortunately never did.) Along those lines, you might also be interested in the Pachad Yitzchak of Rav Yitzchak Hutner, z"l.
Answer: Nesivos Sholom Moadim volume, from the Slonimer Rebbe. Also there are Lubavitcher Rebbe Moadim Sichos.
Answer: Bnai Yissaschar is based on the months and thoroughly goes through each Yom Tov.
Answer: This 17 volume set covers everything you're looking for. Each sefer covers both halacha, customs and Chassidic insights as explained by the Lubavitcher Rebbe. There are extensive footnotes to look up original sources.
http://store.kehotonline.com/prodinfo.asp?number=HRE-SHAAM.S
This second set, Nitai Gavriel, is not specifically Chassidut. It is Halacha. But again, is excellent, informative and comprehensive. It is also heavily footnoted.
http://seforimcenter.com/HEBREW-Books/Halacha/Nitei-Gavriel__c-p-0-0-73-74-305.aspx
Comment: +1, but I wouldn't say this set has quite everything I'm looking for. I'm looking for a comprehensive list of all such works, not just a single very good one.
Answer: Nefesh Shimshon based on the lectures of Rabbi Shimshon Pinkus is one of those modern classics that has found a wide audience in this area.
The series does not cover all the moadim as of yet, see the list of works here

Chasidic Sefarim on the Moadim


I'm looking to do my senior capstone project in the field of medical tomography, what is a good book to get acquainted with the field?

Question: I'm a junior currently pursuing a mathematics degree with aspirations toward medical school. I have a senior project I have my entire last year to devote time to, and I've decided that I want to tackle the challenge of medical signal processing. I'd like to write a program that reconstructs a 3d-model of the object from the cross-sectional images provided to it, very much like a CT scan. However, I have no idea where to start. You can assume that I have a good level of mathematical knowledge or the drive to acquire what is needed, so don't be afraid to throw some academic papers my way! I'd really like to dive in to my research as soon as possible, but I can't quite figure out where to start. What materials would you recommend to someone starting out, such as myself?
Answer: What about for a start:

Buzug, Computed Tomography
Hermann, Fundamentals of Computerized Tomography
Comment: These books look like exactly what I was looking for, thanks so much.
Answer: An oldie but goodie is Kak and Slaney, Principles of Computerized Tomography which is available on line.
Comment: Awesome, free is great. I'll definitely read this first before I purchase any others.


OS X Server DNS, on local network redirect external IP to internal IP

Question: I want it to be so that, when I attempt to visit my server at 94.xx.xx.xx, it will automatically redirect me to the internal address 192.xx.xx.xx, when doing so from the local network. Can this be done with OS X DNS and if so how?
Comment: Have you looked into `ssh -l`?
Comment: I didn't mention this, but it is actually for some FTP services and shares, so I imagine this couldn't help me?
Comment: Is the 94.xx.xx.xx address the external address on the LAN? As in, is it the same server that you are trying to reach, just by a different IP address? Finally, are you accessing it by DNS name or by numeric address?
Comment: @samh the 94.xx.xx.xx is the external address, and yes, same server by different IP. And I only ever attempt access numerically with IP addresses.
Comment: Flagged the question as unclear! Your question is missing some preliminary research how IP-networks and DNS works and how both are related.
Answer: No, it cannot be done by OS X DNS or any DNS, because you aren't interacting with DNS in your situation (according to your comment). Domain Name Service translates domain names into IP addresses and you aren't using any domain names to access the server.
If however, you set up DNS and used one name on external DNS and the same name on internal DNS - the same name could resolve to different addresses.

name.pretendco.com 220.127.116.11
name.pretendco.com 192.168.3.4

It doesn't matter if the numbers are at all similar, but you might find it easier to map things or check that the servers are correct. Setting up an internal DNS is worth the effort if you have several dozen hosts - otherwise it's easier to overload the local hosts file on the machines that need to resolve the name "internally" as opposed to externally.
(If you were using fully qualified domain names, there are ways to do this…I don't how "accepted" they are and I'm not enough of an expert to tell you all the possible side effects, but it can work.)
The issue you're having is a routing issue, from what I understand. Your public IP address is on a router that is not your server. Your server uses port forwarding on the router to receive traffic. You'd like to be able to connect to the public IP but from inside the local network. You need to enable/configure Hairpin NAT on your router, if it's supported. I can't think of any other solutions.
Comment: Forgive the large edit - I wanted to explain how _DNS could_ be used to accomplish the dual IP resolution and also mention editing the hosts file locally. Feel free to reverse my edit or change it substantially if you prefer.
Comment: @bmike I doubt that a split-brain setup is possible at all in the case of the asking person.
Comment: @klanomath if they must have IP address, then you are correct. No DNS will rewrite an IP.
Comment: Which is why I didn't go there after his comment on the original post.
Comment: I will actually be able to use character based addresses, so I've understood this correctly then I will be able to set it up? My router sadly doesn't support loopback, which is what lead me here in the first place. I do however only have the one internal DNS server available for configuration, so that will render me with only the host files you speak of, correct? Sorry if my question was unclear in terms of my requirements.
Answer: One way of resolving this is to add a DNS entry for this IP address, and use the name instead of the IP itself. Since you're connecting via IP, you're never using DNS.
This only works, however, if wherever you're accessing this from internally uses an internally-run DNS server. This would mean that you'd setup server.yourdomain.com on your internal DNS server to point at the internal IP, and server.yourdomain.com on an external DNS server to point to the external IP.
Then, when you try to access server.yourdomain.com inside your network, it resolves via the internal DNS server, and when you try to access from outside of your network, it resolves via the external DNS server.
Comment: I will be able to use the names instead. But I do however only have control of one external DNS. I supposed that leaves the desired effect unacquireable for me.


Continuous wavelet transform

Question: Continuous wavelet transformation has been quite widely used for various applications. Most of the papers that I found were using CWT for non-stationary signals. Can we use CWT for stationary signal analysis? if not what are the drawbacks in using Continuous wavelet transform?
Comment: The signal I'm analyzing is a very short peaky signal.  I did test the signal to measure it's stationary using two ways. First one is the sliding window method where I found that statistics of the signal changes in each window. This indicates that the signal is non-stationary. but when I tried the dickey fuller test it showed me that the signal is stationary. I'm confused about which one I should really on?
Comment: is there any way that I can directly contact you?
Comment: Yes you can, yet this site gets useful when exchanges are shared openly
Answer: Stationarity is a multi-fold concept in signal processing. It can denote a wide range of behavior, encompassing deterministic or stochastic aspects. Beyond that, the main question is: do you know if your signal is stationary, and how?
If you actually know how, it is probably wiser to use the generation process to build a custom, adapted model or transformation, and use it for the analysis.
Even in that case, I strongly advocate using different analysis methods in parallel, to help you detect artifacts, issues than you would not detect with a single model. For instance, let us remind that one usually observe only a few realizations of a "signal", and that acquisition issues, outliers, etc. may occur.
Finally, analyzing in first intention a signal  with time-frequency or time-scale transforms is a good idea, as it can help you detect the useful scales of interest, estimate parameters of stochastic events, etc.
The drawbacks are:

The difficulties in choosing the appropriate wavelet (real or complex), and the associated sampling (and the resulting speed)
The difficulties in interpreting the scalogram, as a knowledge of the underlying processes could be useful

Continuous wavelet transform


Router and broadcast domains

Question: I am studying up for CCENT, and I'm having some trouble understanding what a basic router does.  I understand one of the main functions is to split up broadcast domains.  When they say it splits broadcast domains, does that mean it only splits the WAN and the LAN? Can it split broadcast domains on LAN ports as well?
Comment: "LAN" and "WAN" ports are just names, usually based on the media type.  To the routing "function," it doesn't matter what the media is. Routers can have hundreds of ports, some can be called WAN and some can be LAN.
Comment: Let me answer your question with a question: If, for example, every device in the world has a unique MAC address, why bother with IP addresses, etc?  You could, in theory, address any device in the world directly.  Why do we need to route?
Comment: Splitting up broadcast domains is a side-effect of routers.
Comment: Well I understand the need for routing at Layer 3 it was a little unclear to me when Routers split up broadcasting domains on LAN ports. Especially when I see a depiction of an ISP router in the Text which explains there's actually a switch built into the router, so the router really only has 1 WAN and 1 LAN. A router with multiple LAN ports (not an ISP router) was a little unclear whether the router still split broadcast domains on those ports.
Answer: The function of routers is to route traffic between different networks at layer-3. This can be any combination of WAN or LAN ports.
A router strips off, and discards, the layer-2 frames from traffic received on its interfaces. A router will then use the information in the layer-3 packet to switch the packet to the next interface in a path toward the destination. It will then create a new layer-2 frame for any traffic sent out one of its interfaces. That is why it breaks up layer-2 broadcast domains; the layer-2 information doesn't survive when the layer-2 frame comes into the router.
Some routers will allow subinterfaces and can understand and place VLAN tags on the frames. The router could be configured to route between the subinterfaces, allowing layer-3 traffic to be sent between the layer-2 broadcast domains.
Comment: So any combination of WAN or LAN ports can be split up with different broadcast domains, got it.
Comment: It's any router interface.

Router and broadcast domains


Compare the ionization energies of C and Cl?

Question: I saw a test question today that basically boiled down to comparing the ionization energies of $\ce{C}$ and $\ce{Cl}$. I know that in the periodic table, ionization energy generally increases as we move right across a row (because nuclear charge increases), and decreases as we move down a column (because atomic radius increases, so valence electrons feel less attraction to the nucleus). Note that $\ce{Cl}$ is in the row below $\ce{C}$, but is also to the right of $\ce{C}$, so it is not obvious how to compare the two. So, without looking up the ionization energies and using only the periodic table, how can I answer this question?
Answer: It's the other way around,

moving left to right across a row increases the IP due to increasing nuclear charge, and
moving down a column decreases the IP, due to increasing shielding of the nuclear charge by core electrons.

Chlorine is only one row below carbon, but it is three columns to the right.  As the following chart illustrates, moving to the right by one position generally has a similar or larger effect than moving down one position.

(image source)
Therefore, in this case moving further to the right by 3 positions (and increasing the IP) strongly outweighs moving down by only one position (and decreasing the IP).  Hence, in this case the IP of chlorine would be predicted to be greater than the IP of carbon.  Indeed, the IP of chlorine is reported to be 13.0 eV, while that of carbon is only 11.3 eV.
Comment: I agree I don't like this kind of question because deciding qualitatively which factor wins out always comes down to sloppy reasoning. Thanks ron, I understand now.
Comment: Sorry I knew it was the other way around I made a mistake when typing. But I don't think you have answered my question because how do you know that moving further to the right 3 times wins out over moving down one time. What if moving to the right affects the ionization energy less than moving down? This is not solid reasoning.
Comment: There are no what if's, this is how it is. The reasoning is provided in the chart, it evidently shows the reasoning behind this concept. ron clearly explains this.
Comment: @JoshuaBenabou  I've edited my answer in an attempt to address your comment.
Comment: @JoshuaBenabou I think you or your lecturer would have needed to analyse this graph in some detail, prior to the test, to be able to answer this question. I don't see how a qualitative argument from principal quantum number, effective nuclear charge or another periodic trend would provide a clear answer in this case, as the effects are opposite. This is the sort of test question I do not appreciate; when multiple qualitative arguments produce opposing conclusions, quantifying which one "wins out" often quickly becomes untenable in Chemistry, and it becomes a toss-up whether you were right.


Is Pull Up Method really a good idea?

Question: My intuition tells me that moving duplicate/common codes among subclasses to the superclass (so superclass now have a new method) is a bad idea, but I have seen this technique used/described in both Design Pattern and Refactoring(e.g. pull up method) books. After some thinking my idea is that now subclasses' behavior is coupled to the superclass, and this will make someone who need to maintain the code to read the entire inheritance structure/tree to understand the logic in a subclass, if the hierarchy is large then it's hard to maintain it. Any advice?
Comment: So, let me ask you this. If we follow your argument to its logical conclusion, we would not have any code in the super class, so what's the point of base classes at all?
Comment: @RubberDuck: That's the conclusion I want: In ideal world, we don't need inheritance.
Comment: we don't need inheritance, it can be completely replaced by composition. The only question then, is how do things compose nicely? Does a device have protocols? Or do protocols rely on a device?
Comment: @RubberDuck: I don't understand your questions. The responsibility of upper layers in a hierarchy is to define the big picture of what to do, not how to do it, so I still don't satisfied with current answers, in my opinion moving implementation to upper-layer is just a bad idea. (Reusability is a consequence of good design, not the reverse.)
Comment: To understand what I mean one can refer to template method proposed in the book of GoF, the authors use only 4 pages (the shortest one among all patterns, which are all among 10~13 pages) to explain it, and it's heavily used in Android.
Comment: http://www.peterprovost.org/blog/2008/06/30/Inherit-to-Be-Reused2c-Not-to-Reuse/
Answer:
my idea is that now subclasses' behavior is coupled to the superclass

A subclasses behavior is always coupled to the superclass

this will make someone who need to maintain the code to read the entire inheritance structure/tree to understand the logic in a subclass

They will have always have to do that anyway.

if the hierarchy is large then it's hard to maintain it

That's why you shouldn't have large inheritance hierarchies, and prefer composition over inheritance in general.
Comment: The subclass directly using the superclasses behaviour *by definition* can't break LSP. A *client* of the type can't tell whether they have an object of the subclass or an object of the superclass, by it's behaviour, because it's the *same method* being called in both cases.
Comment: Although I upvoted I don't agree with the first reply. By Liskov Substitution Principle, isn't subclassing adds another pre-condition: Subclasses depend on the superclass' behavior, while the superclass doesn't depend on anything? And I always consider inheritance for code reuse is a bad idea, because no one will reuse your code if it's hard to understand.
Comment: May I add: duplicate literal does not necessarily mean duplicate semantics. The duplicating code may serve another greater purpose and thus may change for different reasons. If that is the case we are talking a out two different methods according to LSP.  And it is exactly those methods that are used for multiple different things that become those monsters we want to avoid
Comment: @marstato: So you're talking about the case where two subclasses each have a method that does exaclty the same thing, but for different reasons, which may therefore change differently in the future? A bit of an exotic case, but certainly possible. Even them I'm not sure if it's better to forego the refactoring; you can always reverse it if necessary, and a method that should be split up is easier to recognize than one that is duplicated in another class.
Comment: @MichaelBorgwardt yes, that case. depends on who is working on the project and how closely code is reviewed. if there is attention on such things i would agree to do the refactoring and reverse it when necessary.
Answer: You'll find a lot of resistance to large and/or deep class hierarchies, so I'm not suggesting that.  However,
Let's say you have three subclasses (S1,S2,S2), but only two of which (S1,S2) have common/duplicated behavior.  Because of the third class (S3), which doesn't share the common behavior, it is, in this case, not appropriate to pull methods up directly into the base class.  An alternative, then, is to introduce an intermediate subclass (B12) of the base, that the others (S1,S2) use for their base (leaving S3 alone).  Then pull up common subclass behaviors into that intermediate subclass.  This will avoid polluting the original base class with respect to the other subclasses (like S1).
Note that in languages with differentiation between interfaces and base/sub-classes, this can also be accomplished with interfaces — here one interface extends another — some concrete classes then implement the various interfaces as needed.  This offers the looser coupled of interfaces, while allowing that some are more specialized that the most general.

Is Pull Up Method really a good idea?


How to succeed as a freelance writer?

Question: I want to be a freelance writer, I've done some research on it and I will be signing up for online classes to learn more about the subject. Is there anybody on here who has succeeded as a freelance writer and could provide tips on the road ahead?
Comment: Possible duplicate of [How to be a freelance creative writer?](http://freelancing.stackexchange.com/questions/3559/how-to-be-a-freelance-creative-writer)
Comment: You may find some answers in quite a few similar, if not identical, topics on this site: http://freelancing.stackexchange.com/search?q=freelance+writer
Comment: Hi Aaron, there's a wealth of information on the Internet about how to succeed as a freelance writer. Take a look at that information, and come back with more specific questions. Our site works best when there is a specific problem to be solved. See [ask] for details. Good luck! :)
Answer: Years ago I tried to be a writer. I got freelancing tasks to rewrite some texts. In the end, it turned out to be a lot of work for the minimum rate.
After I was asked to make a master paper for some small money, I stopped being a writer.
I turned to programming and my perspective on the freelancing turned 180 degrees. At that time I also read a lot of stories of other writers and watched their profiles on freelancer sites, and realized that 99% of them are not earning much.
Also if you want to do anything in English, I have to say that native and Philipino writers will win over you (in case you are not native like myself).
Comment: What kind of topics were you writing about?
Comment: Had to think about this answer, could not believe I forgot it :). I am still not sure, but I remember we had a system with a list of essays that we could pick and write. So I picked those that are IT related and wrote about them.
Answer: I have a some experience in the matter but I think my biggest mistake was confusing a desire to be a freelance writer, with the desire of working from home. I get the same perks now as a programmer and the rates are good.
The rates seem really low for freelance writers in my opinion, especially on the freelance job websites. If you establish a good relationship with clients and always deliver good quality work on time, they will definitely prefer working with you, even if it means paying a higher rate but it's very hard to build those relationships online.
I think a good approach is getting involved in some indie projects like for games and short films.  Writing is something often over-looked which explains why a lot of indie projects lack good dialog, narratives and publicity.
Bottom line, think outside the box, don't do what everyone else is doing and build relationships with clients that will keep them coming back for more even if it means doing some pro bono work here and there
Good luck!
Answer: I'm not clear on whether or not you're already a writer and entering freelancing or beginning your writing career as a freelancer.  Either way, freelance writing is like many other kinds of freelancing.  You need to be resourceful and be a go-getter.  Don't wait for work to come to you.  If you're already a writer then you already know the ins and outs of making writing a success.  In freelancing you will be your own boss and will have to do whatever your boss would do.  Good luck.

How to succeed as a freelance writer?


What are the logical steps taken to perform ssh key authentication?

Question: I understand the logical steps of asymmetric key cryptography as it relates to TLS, however, I've started using Git and in a bid to avoid having to use a password for authentication, I've set up ssh keys for passwordless authentication. I understand that these ssh keys are complements of each other but I do not understand how the actual authentication is taking place. I've copied the public key to Git and stored the private key locally. As such, I am able to do what I set out to do (passwordless authentication) but I do not know the underlying steps as to why the authentication is successful. I've tried searching the web but every answer I've found thus far has been too high level in that they did not specify the steps. For example, were I looking for the TLS steps, I'd expect something along the lines of: Check cert of https page (server) - Grab public key and encrypt secret with it - Securely send secret to server which should be the only entity with the corresponding private key to decrypt - Server and client now switch over to encrypted communications using the, now, shared secret.
Comment: See RFC4252 (https://tools.ietf.org/html/rfc4252), section 7, for how the server authenticates the client via SSH public key authentication.  To see how the client authenticates the server based on the server's public key, see RFC5656 (https://tools.ietf.org/html/rfc5656), section 4.
Comment: Your understanding of TLS is way out of date. SSLv2 in the 1990s did use RSA-encrypt(servercert.pub,premaster). SSLv3 and TLSv1.0-1.2 allow this but also support several versions of Diffie-Hellman keyexchange, providing 'forward secrecy' or PFS, which became much more popular after Snowden in 2013. TLSv1.3 since about 2018 now supports _only_ DH (and a form of PSK used mostly to replace resumption). In contrast, SSHv2 has mostly used only DH since before 2000.
Comment: @mti2935: although many have switched to EC host keys not all have, so _also_ 4253 6.6.
Answer:
For example, were I looking for the TLS steps, I'd expect something along the lines of: Check cert of https page (server) - Grab public key and encrypt secret with it - Securely send secret to server which should be the only entity with the corresponding private key to decrypt - Server and client now switch over to encrypted communications using the, now, shared secret.

You're on the right track, but kind of in reverse.
For HTTPS the private key is on the server and you receive the public key on your client machine via the certificate.
When you use ssh keys, the private key is on the client (your computer) and the public key is on the server.
The protocol can proceed in different ways. The explanation in this paragraph is a high-level description that is appropriate for older versions of SSH. The server can use your public key to encrypt a challenge that is sent to you. Since you are the only one with the private key (hopefully), you are the only one who can decrypt the challenge. Thus, by successfully decrypting the challenge you have authenticated yourself without having to enter a password.
For more modern versions of SSH the protocol proceeds in somewhat the "opposite" direction. The protocol is described in RFC 4252. At a high level, the difference is that rather than accept a challenge from the server that is encrypted with the public key (on the server), the client uses the private key (which only the client has) to sign a message. The message the client signs contains: 1) session ID string; 2) message code byte; 3) user name; 4) service name; 5) authentication method; 6) boolean TRUE; 7) algorithm name string; 8) public key ID string. The server receives the signature and verifies it with the user's public key. This establishes the user's identity and so authenticates the user.
For more of the gory details, you can, for example, use Wireshark to observe your own traffic as you connect to a server using your ssh key. This will give you a better understanding of the detailed messages sent in practice.
Comment: Thank you for your reply. When I referenced the TLS steps above, I was referring to them from the standpoint of what format I would have liked to have received the SSH authentication steps in. Aside from that, your reply was very helpful and I am accepting it as the answer. I will dig through ietf.org documentation for my own edification at this point to get a deeper look into the mechanics.
Comment: Sounds good, have fun!
Comment: pubkey-encrypt a challenge was only used in SSHv1, broken and obsolete before 2000. Nobody uses it now, or for quite a while. rfc4252 as suggested on the Q is far better.


FAQ says History is off-topic and on-topic

Question: The FAQ seems to be contradictory.  It says that "If you have a question about...history of Jewish law or of Jewish life...then you've come to the right place."  But it also says, "On the other hand, questions unrelated to Jewish life and learning, even if they are about...Jews, Jewish history, and Israel...are generally off-topic."  This needs to be fixed.
Answer: The FAQ is precise about what kinds of history are on-topic and what kinds are off-topic:

The history of Jewish law or Jewish life, or in short, the history of Judaism, is on-topic.
The history of individual Jews, Jewish populations, or the Jewish State, unless also about Judaism, is off-topic.

If you think the way this is expressed in the FAQ is insufficiently clear, perhaps you could suggest an alternative way to say it here. The mods can edit this language.
Comment: The problem is in the term "Jewish life." Whaat is the difference in the history of "Jewish populations" and the history of "Jewish life"?  Where would you put, say, the story of the Holocaust era trek of Jews to Japan and China (which would include the Mir yeshiva)?  Is the history of Jews in Spain in 1492 off limits althugh it is highly relevant to the development of Jewish law in the time of. Rambam?
Comment: @BruceJames,the intent behind "Jewish life" is more like "living according to Judaism" than "life-forms who are Jewish." It's possible that this could be phrases more clearly. Questions about the Mir yeshiva, in particular, may be on-topic as about the history of learning, while questions about the escape to the East in general would be off-topic. Questions about the development of Jewish law in the times of the Rambam would be on-topic, while questions about the history of the 1492 expulsion in general would be off-topic. Rule of thumb: Iff the question is about Judaism, it's likely on-topic.
Comment: It could be that we should replace all instances of "Jewish life" in our docs with "Judaism."
Comment: @IsaacMoses "Judaism and Learning"?
Comment: @DoubleAA or perhaps all instances of "Jewish life [and learning]"
Comment: Result: http://meta.judaism.stackexchange.com/questions/1787/change-jewish-life-and-learning-to-judaism-in-the-list-of-on-topic-reasons?lq=1
Answer: Isaac's answer describes the distinction we're trying to make.  As pointed out here, the current FAQ wording includes, on the on-topic list:

history of Judaism

While the off-topic list includes:

Jews, Jewish history, and Israel

That's pretty nuanced.  I suggest we add a few words to the on-topic entry:

history of Judaism, such as the history of laws or customs

(I mean halachot and minhagim, but I'd rather our FAQ be low on jargon.)
And tweak the off-topic bullet:

Jews, other aspects of Jewish history, or Israel

I know -- history of Judaism isn't the same thing as Jewish history.  But a lot of people who'll be reading this list -- which includes non-Jews, people who don't speak English as their first language, and people not used to the careful and precise use of language that many of us aim for -- won't realize that.  What's redundant to us can be clarifying for others.


System response types

Question: Whenever I am given a system type with a certain transfer function, I am always asked to proceed to find out the 1. impulse response and 2. step response of the system. My question is, what is so special about these two response types that other responses, like for example parabolic response, is not what I am asked to find out?
Comment: See this: http://dsp.stackexchange.com/questions/536/what-is-meant-by-a-systems-impulse-response-and-frequency-response
Comment: From an impulse response it is really easy to determine response to *any* other signal.
Comment: I go into some background on impulse and step response and include a real world example here: http://electronics.stackexchange.com/a/27861/4512
Comment: How is that possible? How can I use the step response to determine a triangulated waveform response or sawtooth voltage response??
Answer: Actually, when you apply impulse signal to any LTI system, the output you get is 'impulse response'. Similarly, when input to LTI system is step signal, the output it produces is known as 'step response'.
Now, sampled version of any signal can be represented as the product of original continuous time signal with shifted version of unit impulse signal (Sifting Property). Hence, the response of LTI system to any input signal is nothing but convolution of input signal & impulse response of LTI system. Hence, impulse response is very important practically. That's why they usually ask about finding impulse response of LTI system.
For mathematical details, you may want to look at this.
Answer: I think the link to the dsp SE is very good.  The mathematics to fully explain the continuous case is a bit delicate so it is probably best to only understand the main ideas.
However, given your second question in the comment I wanted to write something short not mentioned in the other posts.
First lets review the terminology:
Let \$H\$ be your LTI system.  That is, we input functions into \$H\$ and \$H\$ returns functions.  We write this as \$H(f(t))(T) = H(f)(T)\$.  It has two main features given by the name.
Time invariance: \$H(f(t+\tau)) = H(f)(T + \tau)\$
Linearity: \$H(af(t)+bg(t)) = aH(f)(T)+bH(g)(T)\$
The time-domain transfer function of \$H\$ is defined to be the (unique) function \$h(t)\$ such that for all mathematically suitable functions \$f(t)\$ we have
$$H(f)(T) = (f*h)(T) = \int_{\mathbb{R}}f(t)h(T-t)dt.$$
Suppose that \$u_0(t)\$ denotes the unit step function at \$0\$ and we know \$H(u_0)(T) = y(T)\$. By time invariance we know the response to the step function \$u_\tau(t)\$ (the unit step function where the step occurs at time \$\tau\$) is \$y(T-\tau)\$.  By linearity, if \$\tau_1 < \tau_2\$ we know the response to their difference \$u_{\tau_1}(t) - u_{\tau_2}(t) = u_{[\tau_1,\tau_2]}\$ is \$y(T-\tau_1)-y(T-\tau_2)\$.
Summing up, given any interval \$I=[\tau_1,\tau_2]\$ we know \$H(u_{[\tau_1,\tau_2]})(T)\$.  Given any mathematically suitable input \$f(t)\$ (say a sawtooth wave) we know that \$f(t)\$ is approximated by functions of the form
$$\sum_i c_i u_{I_i}(t)$$
for intervals \$I_i\$.
Thus by linearity the response to input \$f(t)\$ is approximated by
$$H(f)(T) \sim \sum_i c_i H(u_{I_i})(T) = \sum_i c_i \int_{I_i}h(T-t)dt$$
where $$\int_Ih(T-t)dt = \int_{\tau_1}^{\tau_2}h(T-t)dt = y(T-\tau_1) - y(T-\tau_2).$$
Answer: And to expand on yuvi's answer, the step response is important because the unit step function is the integral of the unit impulse function. In the real world, it's easier to generate a step function than an impulse function, so this is what is used to measure actual systems. Knowing the relationship between the two makes it straightforward to derive the system impulse response from its step response, and then you can readily derive the response to any other stimulus from the impulse response.
Answer: To add to yuvi and Dave's answers, the transfer function of the system is nothing but the Fourier transform of the impulse response. Therefore those represent the basic behavior of the system in the frequency and time domain, respectively.
Answer: Impulse response:

as its Laplace transform is 1, the impulse response in the frequency domain is just the transfer function of your model;
makes it easy to estimate eventual response delays.

Step response:

as already pointed out by another user, given the practical impossibility (in continuous systems, not in discrete ones) to generate the impulse, the step response (whose transform is a pure integrator) can be used to estimate the impulse response. In practice though it's better to identify the model directly with other system identification approaches;
the analysis of the response gives many useful insights in the system, especially during tests. From there you can get peak (maximum gain in Bode magnitude plot), estimate the response delay by inspection, estimate the main time constant, estimate its damping coefficient, and evaluate eventual performance requirements.

However, in reality you are not 'always asked' to find out those responses, but rather to guarantee some degrees of performance, or to design a good control system.
For reference tracking problems, I believe ramps and parabolas, but even sines and anything that the real world might request could be important as well to evaluate the performance of the system.
For system identification purposes, a persistently exciting signal (like PRBS) could be better than a step, and a frequency sweep could give you more interesting insight in the system's frequency response.
For PID tuning, step response is useful because there are many rules-of-thumb that require its response.
And so on.

System response types


plagiarism vs. reference?

Question: I just finished reading the annotated edition of Lolita, and Nabokov hid references to other works of literature everywhere. Lately I've also been considering ways to work in lyrics and other oblique references in my own work. Is there an accepted way to go about referencing or repurposing bits of other works without it becoming plagiarism? Should I try and contact the original authors first? And have any of you had negative experiences using these sort of references in your own work?
Answer: Allusion is a time-honoured writing technique. Copyright only protects the expression, not the idea itself, so as long as the expression is yours (you are saying things in your own words), you should be in the clear.
Short quotes will generally be okay as well, under a "fair use" or similar policy, but should be properly attributed and sourced, if possible, in non-fiction writing. When writing fiction, I'd generally advise against using direct quotes as a matter of style; far better to paraphrase or otherwise hint at the relevant quote and leave it to the observant reader to spot the reference.
However, should you find yourself wanting to reproduce a substantial or highly identifiable (something along the lines of Jabberwocky, say) portion of a copyrighted text verbatim, you stand to run afoul of copyright law. Such uses should be licensed.
Moreover, certain names or titles may be trademarked (this is generally restricted to media franchises), which might mean problems if you use them in the scope encompassed by the trademark; so look out for that.
Comment: Great answer. So it's okay for a character to say half a line of a song, poem, or other work (as Humbert Humbert often does), but it's not okay for that character to sing the entire song or read the entire poem without some legal legwork.
Comment: In a nutshell, yeah. Unless the song or poem in question is out of copyright (for instance, the author has been dead for more than 70 years) - quoting Shakespeare or the Romantics verbatim shouldn't get you into legal trouble (AFAIK), but may nevertheless be cliche.
Answer: A "reference" (e.g. a paraphrase or a discussion of a theme from another work).  Short direct quotations (a few sentences) can just be attribute, in the text or in a footnote.  Anything longer you should get permission from the rights-holder (which is typically the publisher).

plagiarism vs. reference?


Are wallet address generators considered a dapp? like bitaddress or warp wallet?

Question: Is bitaddress or warpwallet generator considered a dapp? They aren't tied to centralized server when you use the application to generate your own addresses and it can run by itself.
Answer: I think this comes down more to semantics than anything else (and thus might make the question off-topic as opinion based), but I'll give it a shot.
I would classify BitAddress or WarpWallet as standalone programs (or even scripts, although I would lean towards program since they are interactive), much in the same class as a calculator app. Yes, they don't rely on a centralized server (barring distribution, which could also be done over torrents or something). They don't work in the same way as you would expect a dApp to. There is no data replication/distribution to peers. There is no interaction with a larger network at play here. They work fine in isolation and have no need to access any external resources.


How do I make Powershell run a batch file and then stay open?

Question: For example; with the old command prompt it would be:
cmd.exe /k mybatchfile.bat

Answer: Drop into a cmd instance (or indeed PowerShell itself) and type this:
powershell -?

You'll see that powershell.exe has a "-noexit" parameter which tells it not to exit after executing a "startup command".
Answer: When running PowerShell.exe just provide the -NoExit switch like so:
PowerShell -NoExit -File "C:\SomeFolder\SomePowerShellScript.ps1"

PowerShell -NoExit -Command "Write-Host 'This window will stay open.'"

Or if you want to run a file and then run a command and have the window stay open, you can do something like this:
PowerShell -NoExit "& 'C:\SomeFolder\SomePowerShellScript.ps1'; Write-Host 'This window will stay open.'"

The -Command parameter is implied if not provided, and here we use the & to call the PowerShell script, and the ; separates the PowerShell commands.
Also, at the bottom of my blog post I show a quick registry change you can make in order to always have PowerShell remain open after executing a script/command, so that you don't need to always explicitly provide the -NoExit switch all the time.
Answer: I am sure that you already figure this out but I just post it
$CreateDate = (Get-Date -format 'yyyy-MM-dd hh-mm-ss')

$RemoteServerName ="server name"
$process = [WMICLASS]"\\$RemoteServerName\ROOT\CIMV2:win32_process"
$result = $process.Create("C:\path to a script\test.bat")
$result | out-file -file "C:\some path \Log-$CreatedDate.txt"

Comment: Can be test.bat  another ps1 script (c:\path to a script\test.ps1) ? any full sample about it ?


How to render the Trajectory of a Moving Object?

Question: I want to use blender to draw a cycloid animation. I know the function, but is it possible to render the motion path of a vertex of a circle like the following video?
https://www.youtube.com/watch?v=x0Z9OeJbRy4
Comment: From your answers, I find an easy way to finish this task. I put the method [here](https://blender.stackexchange.com/a/168664/89559).
Answer: You can use dynamic paint, but as far as I know, this will alias a bit.

So I propose to use Animation Nodes instead. For 2.8 you can find an experimental version here.

The principle is to create a Bezier curve, set it to 2D, bevel it a bit and use it in Animation Nodes.

Calculation steps:

Take the moving sphere, its location and append it to the spline so that it is reinjected in the curve (bottom line of the nodes).
The used spline (top part of the nodes) is either an empty one (at frame 1, so that the curve starts to be empty) or the current spline of the curve as it is.

Few words about the cycloide itself.
If you add a simple deform (bend mode) to a subdivided segment, this will make a circle:

If we add an empty as axis origin, then moving the empty will make the obtained circle to rotate.
To make this rotation visible, add another empty (below with a sphere shape), and make the 3 first vertices of the segment parent of this empty.
Now the empty will move and rotate following the segment made circular thanks to the simple deform modifier:

The "drawing sphere above" is simply parented to this sphere empty.

(the file contains also the Dynamic Paint setting, using vertex color, it is on the hidden plane)
Answer: Two other tips more than Answers ... (thanks Lemon for Cycloid :) )
Particles
Scene Properties > Gravity off, Particles Properties > Velocity > Normal zero). To keep all particles you can enable Render > Extra > Dead or increase Emision > Life Time.

I just could not figure out, how to dense particles, they are appears on frame step, increase Sub-Steps didn't helped ... hm

Btrace
Addon that can create path from moving objects (particles etc.)

In this case, it dint work on lemon's cycloid (probably because driving object by Empty?), but worked on object Follow path. So it depence what exactly you would need to follow.


Raising a bilingual kid in monolingual community

Question: I speak to my kid in 2 different languages at one time now . I used to speak to him only English and his mom our native language for 2years now but seems it didn't work so I decided to communicate the 2 languages to him myself to be sure things go right because I am the only one who speak English but the boy started to get English from me and refuses to communicate to others . Is that true ? Please advise.
Comment: I don't mean to be rude, but if your spoken English is similar to your written English then maybe you should stick to your native language. I've mentioned [the importance of being fluent](http://parenting.stackexchange.com/a/137/109) before.
Comment: That's extremely rude and uncalled for @TorbenGundtofte-Bruun. There's no reason to suspect the OP's spoken English isn't sufficient. Don't see your comments on fluency are so relevant nor is your negative approach very helpful.
Comment: @gnasher729 I have no idea where Sam is from, nor does his profile indicate it, so your last sentence is nonsense. I am not discussing the poor written skills of some native English speakers. I am simply commenting on the original post, and linking to an earlier answer that explains in depth.
Comment: @TorbenGundtofte-Bruun: Sams written English is a lot better than what I have read from many native English speakers. And you follow "I don't mean to be rude" immediately by extreme rudeness. I value honesty. If you dislike Indians, why don't you be honest and write "I dislike Indians".
Comment: But its obvious where Sam comes from.
Answer: I assume that you are trying to teach your kid English because that's the language of your country - but that isn't the native tongue of either you or your wife. It's hard to tell from your question what the situation is right now, so what I'm going to say is just theory (one that we successfully employed ourselves given that we are in a similar situation). You should always speak with your children in your native tongue. If English isn't your native then don't use it. There will always be people that you have to talk English to, this is fine. But your children should get the language that you know really well.
The main reason for that is: your English isn't good enough. Even if you have no accent, even if you don't make grammatical mistakes, you are still using phrases that a native speaker wouldn't choose. Do you really want your child to learn your way of speaking and come across as a foreigner?
Besides, the most important thing is that the children have at least one really good primary language. That primary language doesn't have to be English. If they learn your native tongue well it will make learning other languages (such as English) much easier for them. Just make sure that they have native speakers to learn English from.
In our case this meant getting a babysitter just for that cause - so that there is some native speaker around regularly. We started with it when our daughter was three, before that she understood almost no German (which happens to be the language of the country here) and that's fine. Don't let anybody tell you that at some point it will be too late, while picking up languages gets somewhat more difficult with the time children can still do it very well even when they are ten.
Answer: It is quite difficult to get a full picture from the brief outline you've provided, as you're not sharing what it is exactly that didn't work in your old approach, and what the problem is you're facing now. Is the child behind in language development? Is the child using one language more than the other? Is the child mixing their languages? Or..?
In general, I'd like to say that children who are acquiring more than one language, can often appear behind in their language development compared to monolingual children, when in reality they're not.
When you compare a monolingual child using 50 words in language A to a bilingual child using 50 words, (of which 25 in language A and 25 words in language B), the bilingual child might appear to be behind in development in language A, but considering the child also acquiring 25 words in language B this makes sense.
It's also unclear what your 'language situation' is from your question. Do you live in a place with one majority language. Is your native language the majority language in your community or is English the majority language?
Children might not be interested in a language when they realise it's not relevant for them. Also, children and even adults will often not have equal skills in both languages, as the situations in which they use each language will often differ. (for example being skillful in religious related language in only one of their languages.)
I would advise on seeking additional advice on your child's language development and researching helpful bilingual approaches.
Lastly, I found Colin Baker - A Parents' and Teachers' Guide to Bilingualism rather helpful.
He also suggests judging whether a parent's fluency in a language is sufficient enough to be a good role model for your child. Raising a bilingual child could be a great opportunity for a parent to improve their own language skills beforehand, so they can help their child become skillful in both languages and not pass on problems.
Answer: We have brought up 3 bilingual kids in Norwegian (mothers language) and English.
We chose to do 100% Norwegian for the first years, will just some basic words in English and then "switch" to a more heavily English favoured home environment.
Our kids have been different in their language development. One was fluent in English at 4, the other was just beginning. The main thing we tried not to do was push English before they were ready. You're the best judge of that.
Once they are ready, perhaps they have a good grasp of grammar in their "first" language, a great way to make strides and bounds in English is 100% immersion - change the kids TV to English, story books in English, and have both parents talk in English 100% at home, if possible.
Getting them to speak English with other people requires more confidence. So re-assure them and practice English whenever possible with other people - family, friends, even the cashier in the store.
A great tip to get them so speak English, when you know they can but don't have the confidence, is when they want something. Imagine you're in the store, about to buy some candy - there's a good chance you can get your child to ask the cashier "can I buy this candy please" if you help them. (not suggesting you need to buy candy every day, but you get the idea...). Congratulate them when they speak well in English (positive reinforcement) and their confidence will grow.


Disable internal keyboard on high sierra

Question: I recently decided to bathe my keyboard in liquid and have lost functionality in my keyboard. My plan was to just plug in an external keyboard and run with that but it appears that my internal keyboard must be holding down the shift key so I'm forced to boot into safe mode. Is there a way to fully disable the internal keyboard? I've tried installing Karabiner Elements while booted into safe mode but the changes I make there don't seem to be doing anything.
Comment: The duplicate asks exactly the same thing as the question here, just in different words. Both face the problem of having stuck keys after a spillage event. This is a hardware problem which can't be fixed in software.
Comment: Hey. That's not a duplicate of https://apple.stackexchange.com/questions/298853/keyboard-key-stuck-or-not-being-recognized-how-to-fix The question is talking about disabling the internal keyboard, not fixing a stuck or unrecognized keyboard...
Answer: I assume you're talking about some sort of MacBook model. I would reset the Non-Volatile Random-Access Memory (NVRAM) to see if that resolves things for you.
Resetting the NVRAM
You don't specify your specific Mac model, so these generic instructions should cover all Macs (except for the iMac Pro which I'm assuming you do not have). Follow these steps:

Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then immediately press the commandoptionpr keys.
Keep these keys pressed down for at least 20 seconds!
Let go of the keys and let your Mac reboot normally.

Notes:

Do not be concerned if your Mac appears to restart during the 20 second period.
When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).
If the problem is still present after you've rebooted, then proceed to resetting the System Management Controller (SMC) below.

Resetting the SMC
As you haven't specified your specific Mac model, these instructions apply to all MacBook models on which you cannot remove the battery (i.e. it's a built-in battery). If you have an older MacBook model or a desktop Mac, please refer instead to How to reset the System Management Controller (SMC) on your Mac. Otherwise proceed as follows:

Shut down your Mac
Unplug the power cable from your Mac
For 10 seconds, press and hold at the same time the shiftcontroloption keys (on the left side of the built-in keyboard) and the power button
After 10 seconds let go of all keys and the power button
Plug in the power cable
Turn your Mac back on with the power button.
Comment: Hi there, just wondering if you've had a chance to try resetting the NVRAM and SMC yet? Did this help or...?


What is the process of degradation of proteins into amino acids inside living cells?

Question: Just like beta oxidation does our cells have a distinct mechanism for degradation of proteins? There are processes for degradation of amino acids but where does these amino acids come from, is it all from dietary proteins? Are they not obtained from the proteins(enzymes) that are being continuously made inside the cells?
Comment: Proteolysis (the breakdown of proteins into amino acids by the action of enzymes)
Answer: There are two major pathways through which proteins are degraded in your generic cell: In a lysosome or in a proteasome.
The Lysosome
It's considered an organelle. It has a lipid bilayer that encloses a potent cocktail of acid hydrolases working at a low pH. The pH is maintained by a Cl-/H+ antiporter(Ref). Acid hydrolases that are being processed in the golgi are targeted to the lysosome through mannose-6-phosphate residues which are recognized by the trans golgi M6P receptors, packaged into clathrin vesicles, and targeted to acidic late endosomes which fuse, forming the lysososome (Ref).
So through endocytosis or phagocytosis, vesicles full of extracellular proteins are uptaken and may fuse with a lysosome. The hydrolases thus digest whatever they can. In a cell stress response cells may also digest their own contents with the aid of lysosomes in a process called autophagy. We can take a look here at some established lysosomal enzymes current to 2009, and if you spot a protease you can generally take a look at it's specific mechanism to see how it works. So I'll pick one out of the bunch (a lysosome has many different hydrolases remember), Dipeptidyl-peptidase I aka Cathepsin C. The mechanism of proteolysis is that of a cysteine protease which follows a bit of a generic mechanism like so:

... and so forth, you can look at a given given protease, and roughly determine how it cleaves peptides.
The proteasome
This one is a a much more directed form of protein degradation. Proteins must be tagged on lysine residues by molecules of ubiquitin, at least 4, referring to the term polyubiquitination. These are added sequentially by proteins denoted E1, E2 and E3 (see proteasome wiki). Proteins that get degraded in this manner are often damaged or come from within the cell, unlike the lysosome where the proteins probably came from outside the cell.
The catalytic domain of the proteasome is a threonine protease which follows the generic mechanism of the catalytic triad, one of the most well-studied protease mechanisms. We can view this generally through the mechanism of a serine protease, like so:

If you read through the whole thing, two notes: (1) the generic term for protein degradation is proteolysis, and (2) The mechanism depends on the protein performing the proteolysis, namely a protease.
Comment: Good answer. I would add that lysosomes also can degrade the cells own proteins (not only extracellular proteins obtained from endocytosis) during autophagy. https://en.wikipedia.org/wiki/Autophagy
Comment: @Roland Duly noted, added a tidbit on autophagy! Thank you.
Comment: @CMosychuk What are the main sources of these proteins that are being proteolysed?
Comment: @SanjuktaGhosh So there's a number of places it can possibly come from, and it depends on some conditions. Largely: When you eat, digestive proteolysis breaks whole protein into small peptides that are capable of passing into the bloodstream. Thus the bloodstream becomes the main source. Otherwise cells are capable of scavenging from extracellular fluid/matrix, or nearby cells that die or undergo apoptosis (specialized cells called phagocytes normally take care of dead cells, though).
Comment: In addition to proteasome and lysosome, soluble (non-organelle) proteases may become important, depending on circumstances.


circuit ground vs chassis ground

Question: Can someone briefly explain what's the point of separating circuit ground from chassis ground with a capacitor + resistor?
Comment: More context needed.
Comment: [Here is a good article](http://www.circuitnet.com/experts/87211.html) on that.
Comment: I doubt that `150R` is actually 150 ohms. It is very typical to use a 1 mega ohm resistor like that to bleed stray electrostatic charge. 1 meg effectively isolates the equipment ground from earth ground.
Answer: Assumptions: It seems that the output of the configuration you have drawn there is a 24V DC signal that is +12 on and -12 with respect to circuit ground. There is a circuit ground from what appears to be the neutral of the ADC and a chassis ground from what appears to be a filtering RC circuit. I believe the intent of the filtering circuit is thus to send high frequency ripples from the ADC to ground.
Answer: Usually when you separate the ground versus the chassis wiring its due to fault currents. The power circuit here is circuit that is solidly grounded. If a fault occurred, the hope is that the fault current would flow to ground via that ground connection. If you connected the power circuit ground to the chassis you could run the risk of the full ADC short circuit running through the body into an unsuspecting homosapian in contact with it. The chassis filtering also provides a higher resistance to ground which might be more desired for the filtering that that particular designer wanted to have.
Edit: I'd like note that grounding a system can be very specific to different applications. This is because you have to consider what the circuit components need as well as what they will be interacting with. In this example the chassis grounding could be an attempt to reduce circuit noise. However, other systems use chassis grounding because there is no effective grounding pin between the interconnecting devices. These must be doubly insulated to prevent the chassis from getting energized where a user may be able to contact it. An example of this is when you see a 3 pin wire vs a 2 pin wire in common North American electrical devices.
Hope that helped clear up some confusion.
Answer:
It's not separating circuit ground from chassis ground. It's separating chassi ground from earth. There is probably some protection against surge relative to earth. In this scheme I imagine that chassis ground is common (circuit) ground too. Otherwise it would make non sens to separate it from earth. Not separating common ground from earth may have unexpected effects. Now why there are caps between outputs and earth, I don't know. It's very special a set up.
Another explanation is that they used the earth symbol for common ground. It makes more sens but it would be an important schematic design mistake.

circuit ground vs chassis ground


The N. word and reverse discrimination

Question: I hear black people using the N. word when referring to other people quite often on the internet and on YouTube and it seems to be legal or at least there are no  complaints. Would it be legal if a caucasion used this term? If not there would appear to be some injustice and surely the white person would be entitled to claim reverse discrimination. Can you shed some clarity on this issue?
Comment: The issue is not reverse discrimination; it is whether the meaning in context reveals discriminatory motives. An African-American using the word "Nigger" is unlikely to be using it in a denigrating sense and more likely to be self-deprecating or ironic. A Caucasian using the word "Nigger" is more likely to be using it in a pejorative, denigrating sense as a put down or slur, though there are contexts (e.g. quoting rap lyrics) where this is unlikely likely and it would be O.K. Still, in some contexts, e.g. a black cop arresting a black man, it could as a slur and reveal discriminatory intent.
Comment: There's no such thing as "reverse" discrimination. Either an action is discriminatory or it is not; a mindset that exists a defined direction of "true" discrimination, that it can only be done by the normative group, is the main issue with the premise of the question.
Comment: I assume that this is a United States question and am tagging it as such as the "N. word" is something that is primarily meaningful in a serious way that could conceivably have legal implications in the U.S.
Comment: As a general rule, injustice, hate and discrimination are all legal in the US. But there are specific contexts where they are illegal. If it involves business, it can be illegal since business is a regulated activity. If it involves violation of a person's rights, it can be illegal since rights-violation is a regulated activity.
Answer: U.S. answer.
It's perfectly legal for anyone at all to say and write the word, "nigger". Its use by a white person related to an action against a black person may be interpreted as evidence of a hate crime or unlawful discrimination. Using it publicly to describe a black person might have a number of negative consequences, but none of them from the law.
Comment: the concept of "fighting words" might also be relevant
Comment: I would add that using the word "Nigger" in a pejorative way or simply a thoughtless way, would probably be valid grounds to fire someone from a job since it could put a company at risk of a discrimination suit, reflects poor judgment, or is inconsistent with the company's image.
Comment: My understanding is that using "fighting words" means someone might punch you legally. Whether that's the case or not, it's a word that may get you punched, and whether legal or illegal, it hurts just the same.
Comment: @notstoreboughtdirt TIL that US law has provision for deciding that them's fightin' words.
Comment: @gnasher729 No, that's not what "fighting words" means at all! It's not lawful to punch someone just because they really, really insulted you. (If "fighting words" still exists as a valid concept in US law, which is doubtful, it just means that your speech wouldn't be protected by the First Amendment. But I think the common view is that Brandenberg's "imminent lawless action" standard now controls, not Chaplinsky's "by their very utterance inflict injury or tend to incite an immediate breach of the peace". In other words, the "fighting words" exception no longer exists.)
Answer: Use of the word "nigger" is not itself a criminal matter in the US. However, the Civil Rights Act, as it has been interpreted, prohibits a "hostile environment" in education, employment, housing and some other contexts. This is a civil matter--that is, cause for a lawsuit, usually against the institution at which the hostile environment occurred.
Your question seems to be about whether the law regards use of "nigger" by black people differently than its use by white people. The short answer is no. Nothing in the Civil Rights Act or other anti-discrimination legislation says that different conduct is permissible depending on your race. In fact, any such distinction would probably violate the Equal Protection Clause of the 14th amendment.
HOWEVER, let's say a black person claims they endured a hostile environment because someone used the word "nigger." The court or equal opportunity employment commission would probably consider the how the word was used. So they would probably regard, for example, affectionate use of "nigga," as is common among black people, differently than derisive or hostile use of the word. Intent, frequency, context, and personal relationships would all figure in to that. But there can be no clear lines based solely on the race of the speaker.
For example check out this case, in which a black manager was harshly penalized for calling one of his employees "nigger." He defended himself by pointing out the more benign use of the term in black English, but the court wasn't convinced. What mattered here was that he was using the word in a way that was critical and drew on racial prejudice. His being black was no defense.

The N. word and reverse discrimination


Bridge: Is it a rule that you must announce the meaning of partners opening bid

Question: Bridge Playing SAYC Is it a rule for partner to announce to the defenders what an opening bid (eg '1C minimum 3') means
Answer: I'm going to go just a bit stronger than Ruds here, assuming ACBL rules here.
Unless the ACBL alert chart mentions a specific announcement, you must not announce the meaning of partner's bid unless asked.  That is conveying information to your partner (conveying your interpretation of it), and is explicitly illegal, and may involve a penalty if a director is called.
Further, if it does call for an alert, you must only say "Alert" and no other information unless asked.  Again, providing that information also informs your partner.  (This may vary in high-level tournaments, where separate rooms or screens are used.)
The specific announcements - 1NT range and 1c shortness - are marked in blue on your convention card (indicating an announcement is appropriate).  Anything else - saying "Weak" after a weak 2, for example - is inappropriate.
Answer: It depends on which organization's umbrella you're playing under. If you're playing duplicate bridge in the US, this is the ACBL, and you generally don't have to announce the meaning of the bid.
Exceptions:

For natural 1NT openings, announce the agreed point range.

For non-forcing 1C and 1D openings that do not promise at least 3 cards in the suit, announce "may be 2" (or 1, or 0, per your agreement).

Most conventional openings must be alerted (ie, you say "alert" when your partner makes the bid).

See the 2021 ACBL alert procedures for more details.
Edited to add: When it's an opponent's turn to bid or play, you must always truthfully answer questions about your agreements with partner about partner's bids.
Answer: To give a non-US example, the English Bridge Union's rules (from the Blue Book, chapter 4) are:

exchange system cards at beginning of round (which looks like this), the front page of which has:

General system description
1NT opening and responses
2-level openings and responses
Other Aspects of System which Opponents Should Note

Announce non-forcing 1m openings that could be on 2 or fewer cards "May be 2", "May be 1", "May be 2, could have 5 diamonds".
Announce range of 1NT and 2NT openings; "12-14", "15-17, may contain a singleton", "20-21".
Alert 1-level openings that are not natural, unless Announced.
Announce 4-card Stayman after 1NT-p and 2NT-p
Announce Transfers: 1NT-p-2H, "Spades".
Announce 2-level suit openings, if they are natural:

"Strong, forcing"
"Strong, not forcing"
"Intermediate"
"Weak"

Alert 1-level openings that are not natural, unless Announced.
Alert non-Announced 2-level suit openings.

They've made a really nice table of all the Alerting rules.  So, similar to the ACBL, but customized to suit their bridge population.
As explained, other Regulating Authorities have different rules, and you should follow the ones of the RA you play under.  For rubber bridge, it is common to have a fixed system, so there aren't any "announcements"; if you are permitted your own system with this partner, either the club will have rules for that, or people follow the duplicate rules in force in their area (out of habit, if nothing else).
Answer: As ruds says, it depends not on what system you play, but on where you are (strictly 'whose rules you play by'). But the important thing is any conventional bid must be alerted **, so that you are not misleading the opponents. If your 1C bid shows an opening hand with strength in clubs. it is not conventional, so need not be alerted.
** Unless it is announced, which is needlessly complex for this question, and doesn't apply here.
Comment: "announced" absolutely applies, as that's exactly what the question is referring to (that's the opposite of "may be short", and is _not_ announced, but perhaps is said out of confusion with that announcement).
Comment: And - 1c opening hand with strength in clubs is not alertable, I don't believe, at least in the ACBL.  Natural bids (bids that show the suit mentioned) are almost never alerted, with only a few exceptions (and `1c` is not one).


SDL Surface clipping mask

Question: I am creating a GUI for my game, so I use some buttons like
. So you can see it is only text surrounded by a rectangle. But I currently use a huge png image with all the buttons I need arranged as I want it, it is really inefficient, so how can I  upload a single smaller image of the rectangle, a sample of the gradient I want and use SDL_tff to create a surface. Say: I copy the rectangle and the text in an SDL_Surface, it should have two colors (black and white), now make white pixel transparent and black pixels to be replaced with the gradient to create the buttons and place them using SDL_Rects.
Answer: You can start with your gradient texture and render your texture to a surface where you want your button to be. You can manually apply the gradient by only copying over the pixels from the gradient map onto the destination where the destination pixels have alpha (or multiply the two).
Note, when using GL/DX, you can use the stencil buffer (http://en.wikipedia.org/wiki/Stencil_buffer) to apply a mask to a render target and then render your gradient over the screen:
Create a new render target to a texture, render the font onto the stencil buffer (usually through an intermediate texture), draw the gradient on the render target, apply.

SDL Surface clipping mask