Pylons: address already in use when trying to serve

Question: I'm running pylons and I did this:
paster server development.ini
It's running on :5000
But when I try to run the command again:
paster serve development.ini
I get this message:
socket.error: [Errno 98] Address already in use
Any ideas?
Answer: I've found this trick in a forum:
This will kill all programs listening to port 5000
kill -9 `fuser -n tcp 5000`

Comment: You can accomplish the same thing with `fuser 5000/tcp -k`
Answer: Normally that means it's still running, but that should only happen if it's in daemon mode. After you started it, do you get a command prompt, or do you have to stop it with Ctrl-C?
If you get a command prompt back it's deamon mode and you have to stop it with
paster server development.ini stop

If you have stopped it with Ctrl-C (and not Ctrl-Z of course), I have no idea.
Answer: As I understand your question, you start some application to listen on port 5000. Then without stopping it (?), you try to start another instance to listen on het same port? If so, you won't succeed.
You can always check what application is listening on what port number by using netstat (for both Windows and UNIX-like systems, I have no experience with others).
Answer: This has also happened to me when the server died unexpectedly, and didn't close it's socket's properly. Essentially, the socket is still listed as open with the operating system, even though the process has died. I've found if I wait for 30-60 seconds, the OS will realize the associated process has died, and cleanup the sockets automatically.
Answer: your default port 8080 is using.
you should add '-p 10000'
after command to take port 10000
Answer: naturally netstat (netstat -an | grep 5000 does the trick on linux). Will grab the port
However I found this other question with the same error.
Python [Errno 98] Address already in use
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

Essentially Python takes too long to open the socket.
Answer: I tried all the upvoted answers exists here but no one works for me. But this below command does the trick.
sudo kill $(sudo lsof -t -i:5000)

This would kill the process which listens on the port 5000.


Propellant filling rate in propellant tanks

Question: I want to pump LOX into a pressure vessel at 2 bar (say). So for pumping it what should be safest flow rate?
Comment: The question as-is probably cannot be answered: What kind of propellants are we talking about? "Safe" in which respect? With what kind of tank/tank-design?
Comment: This is way too broad (there are too many kinds of rockets and liquid propellants) as well as unclear what you mean by safe. Try to be more specific about a given type of rocket and liquid propellant. But that may not be enough, as "safest" is probably too subjective. See if you can identify a question where a fact-based answer will suffice.
Comment: @Amar if you are going to edit your question like that, in the very least read my answer to your previous phrasing and account for it in your question. You have addressed 1 aspect but completely ignored the other 2.
Comment: I put a reopen but if you are going to get more you need to research and refine your question.
Answer: I probably shouldn't answer this question, then again I can't vote to close because it is to broad and ambiguous, so I will try and give an suitable answer to help the OP out.
First aspect: What is the propellant?
Different propellants can be piped at different rates mostly related to their chemical volatility. If your propellant was water for instance, you could push that as fast as it isn't sawing your tank in half.
Second aspect: What are diameters of your hose and ports?
If you have a wide enough port you can fill your tank in 5 secs.
Third aspect: What is the overall engineering of your system?
This sort of relates back to the first two aspects but is meant more encapsulate all the other factors that could result in explosions. Say you are piping liquid O2. You could pipe it as fast as you wanted provided you kept it cold, the pipe from exploding, and eliminated any chances for it reacting  with something like hydro-carbons. Usually though, extremes of this aren't pursued as they become economically infeasible and simply not worth the effort.
Comment: I'm sorry that trying to help the dude understand the complexity of the question he is asking upsets you. Technically though he did not explicitly ask for a numerical answer, he asked for the safest flow rate which I described is one that is based on the engineering of his system. :D
Comment: @anon I think uhoh's point was, you could've posted a comment like: "Before answering this I will need information such as: 'What is the propellant? What are diameters of your hose and ports? What is the overall engineering of your system?' this is too vague to answer as is." Instead of posting an answer to the question, making it so that the OP cannot delete it and repost it later if he wanted to.
Comment: @MagicOctopusUrn I get that, but there isnt enough space in a comment to describe all that. Obviously, there is a lot the OP doesnt know, moreover I strongly doubt he will ever be able to describe a system in enough detail to get a meaningful answer so I figure the least I can do is outline some of the variables he can consider to research to solve whatever problem he is contemplating.
Comment: Hopefully the question will be modified to something like "what factors affect fastest safe fill time, and what things can be done differently to make it faster, *because I am building a strategic nuclear weapon and I need to know how to launch it quickly*..."


Are conference papers, proceedings or journal articles published 6-7 years prior to his patent considered as published material invalidating patent?

Question: In 102(a) it says that if you published the material before he invented it, then his patent is invalid. This is also problematic, because it involves determining when he came up with the invention. However, if he didn't really invent it, he'll have a hard time coming up with proof that he invented it before the publication came out.
Comment: Did you intend to link to the patent in question?
Answer: Yes, materials published many years before a filing priority date would be considered useable as prior art. The U.S. has a quasi-grace period of a year for things published by the inventor him/herself, but for the time frames you are taking about it wouldn't matter if the publications were by the inventor or by others.
Since March 16 2013 the US is now a first to file country. It is no longer relevant when the inventor invented - only when he filed. For application filed before that date, something published before filing would be sited as prior art by the examiner and it would be up to the inventor to "swear behind" the purported prior art publication dates and otherwise establish that the actual invention occurred before the publications.
If the application is in a particular early stage of examination, any third party (you) can submit material to the examiner using a third party submission process created by the AIA. There is no or very little fee associated with this.
If a patent has issued, the information could be used in an IPR preceding (also from the AIA) to try to get the patent invalidated. IPR is much less expensive than an actual courtroom action but still in the $100,000's of dollars - mostly for attorney fees. The USPTO fees start at $15,000.
Comment: I can expand on this answer if more information appears in an edited question.


What is the difference between 'gnome-software' and 'ubuntu-software'

Question: I ran a sudo apt-get upgrade and it upgraded the packages , gnome-software and ubuntu-software. Out of curiosity, I typed both into the Terminal and I haven't found a difference between the two. Is there a difference, is  yes, what is it? If not, why are there two packages.
Comment: I believe that ubuntu-software is the old name and in later  releases it will be superseded  by gnome-software ... but this is only a guess and may not be accurate.
Comment: No, I know the old one is called `software-center`, and if I run that in a terminal, it brings up the old one.
Answer: Canonical, the makers of Ubuntu, created the Ubuntu Software Center (software-center) as a user-friendly way to discover and install apt packages (friendlier than Synaptic, which was the package manager at the time).
Then the GNOME project thought, "hey, that's a really good idea. Let's make a software center for GNOME. It'll follow our own user-interface principles, and it'll work on all sorts of different Linux distributions, not just Ubuntu." Over time, they created the GNOME Software Center (i.e. gnome-software). (Now that I think of it, it's possible the Gnome Software Center already existed first, but Canonical rejected it for whatever reasons, deciding to write its own version instead. I think they were criticized over that decision, but it's their right.)
Both Software Centers existed for a while, but then Canonical changed their minds and decided it was silly to have two teams working on such similar projects. So in the latest Ubuntu release they have totally discontinued the Ubuntu Software Center in favor of using the GNOME Software Center. This will remain the default software center in the forseeable future of Ubuntu releases, and Canonical will work to improve the code and integrate it with Ubuntu.
However, many users who upgraded their installations to 16.04 from an older version (rather than doing a fresh install) now have both software centers, since the upgrader program tends not to like removing packages unless they're not being used anymore.
(disclaimer: I could have the timeline of events wrong; feel free to correct me)
Comment: GNOME Software came about in 2013, which I think is after Ubuntu Software Center. They didn't like GNOME software because it didn't have reviews or ratings and was missing some other features that Canonical wanted if it was going to replace its own SC.
Comment: Canonical decided to switch to Gnome software because Ubuntu software center chokes.


COVID-19 data sets with patient-level demographic information (e.g. age)

Question: I'm searching for data sets about Covid-19 patients, where the column "age" occurs for each patient. All the sets I find are summarized, like the one from the John Hopkins University.
Answer: The UK Biobank (cohort study of 500,000 participants) incorporates SARS-CoV-2 test result data. It contains age, as well as entire medical history information for each participant.
Ref: Dynamic linkage of COVID-19 test results between Public Health England's Second Generation Surveillance System and UK Biobank (2020) *

* Disclaimer: I have worked on this project.
Answer: This question in opendata.SE has answers that might help.
There are three answers at the time of writing

Anthem XPRIZE
Github large dataset
South Korean data
Comment: South Korea doesn't seem to actually allow full dataset downloads, based on the answer there.


Is there a way to create a polar plot in Numbers?

Question: I am trying to do a polar plot, or radar chart as excel calls them, for a report. I don't have excel, only Numbers, is there a way to do that type of plot with Numbers? I can't seem to find a way. The closest thing to a polar plot that I was able to create was a point cluster with the data transformed from polar to cartesian coordinates, but this doesn't center the axis at 0,0.
Answer: An app called Radars on the Apple App Store generates polar plots for you to import to your Numbers documents. That's what it says in the description, I however have not tried it yet.


How do I install AMD drivers?

Question: I installed a fresh copy of elementary os 5.1.2 Hera and my gpu fan is cranked up to about 50% all the time it sounds like. I have a feeling it has to do with it missing a driver. So how can I install a driver for an HD 7570 graphics card?
Answer: The eOS distribution already has the Open Source AMD drivers included in the MESA and the Linux Kernel. If you wish, you can download and install the FULL AMD Drivers (follow this tutorial)

How do I install AMD drivers?


Difference between similar words like "electric-electrical"?

Question: What is the difference between words like: Electric-Electrical ?
For example is it correct to say Electric engineer rather than Electrical ?
Answer: Economic usually refers to application while economical usually refers to the quality

"Economic, which usually
  refers to economics or an economy, has a wider range of
  application than economical, which usually refers to the
  quality of economy and means 'thrifty' or 'not wasteful.'"
Webster's Dictionary of English Usage

Electric and electrical is normally synonymous; but the latter is more common in a compound naming devices

"Both can refer to anything involving electricity, be it a thunderstorm... All that is required for something to be electric or electrical is that it involve forces created by the presence of charged particles, such as electrons... and molecules made from them. Chemical bonds are ultimately electric in nature, and even the magnetic field of a bar magnet can be considered an electrical phenomenon, since it results from the motion of electrons in the atoms of the magnet. The word electric is somewhat more common in compounds naming devices such as electric motor..."
American Heritage Guide to Contemporary Usage and Styles

Historic refers to a significant event in history while historical refers to something that happened in the past

"Historic refers to that which is associated with significant events in history... Thus, a historic house is likely to be of interest not just because it is relatively old, but because an important person lived in it or was otherwise associated with it. In contrast, historical refers more generally to that which happened in the past, regardless of significance."
American Heritage Guide to Contemporary Usage and Styles
Answer: The use is context dependent. That means you need to follow common usage in each case.
An Electrical engineer is a person skilled in the construction and maintenance of electric devices.
An Electric engineer is an engineer who is powered by electricity. (this doesn't exist)
The -al suffix forms an adjective meaning "pertaining to". So while "Electric X" means that "X is electric" (for example it may be powered by electricity"), an "electrical X" means that "X is concerned with electricty" (for example they are interested in it).
Using "Electric" with an living being is jarring. It goes against our expectations. The author Phillip K. Dick used this in the title of his novel Do androids dream of electric sheep?
In other situations the words are close synonyms: "an electric circuit" or "an electrical circuit" mean the same.
Comment: "Electric" is sometimes used in connection with a person to mean "exciting".  In that sense, an "electric engineer" might be unusual.  :-)


Should I sand between coats of polyurethane when finishing a table?

Question: I am finishing an oak table. I lightly sanded the polyurethane after the first coat, as per the instructions. After the second coat of polyurethane dried, I see sanding/brush marks. If I don't sand again, will the third coat of polyurethane cover these sanding/brush marks?
Answer: I would sand this coat with a much finer grit of sandpaper than you used on the last coat. Then wipe it down with some alcohol before applying the next coat. This will help remove the deeper marks and the sanding dust. Also, use a foam roller or foam brush instead of a bristled one.
Comment: Will it still show if I put another coat of polyurethane over it as it is now? I am afraid to sand too much and ruin the stain underneath!
Comment: Using a finer grit will only knock the top off the grooves and allow for a smoother next coat. There is no way you will get down to the stain unless you use an electric sander. Use a 220 grit sandpaper.
Comment: Thank you! I used 220. I think I will get something finer.
Comment: So that means it would show through if I just polyurethane without this sanding?
Comment: If you just go over it with a coat of Poly, it will most likely still show up. You can switch to a 320-400 grit sandpaper for an extra fine finish. The marks left behind are merely tiny ripples. You want to sand them to try to smooth out the finish. You aren't harming the finish at all. You are strengthening the next coat by allowing it to adhere better. Using that poly brush will help a great deal as well.


How to get CRS of a raster layer in pyqgis?

Question: I have this problem accessing to the coordinate reference system(crs) of a raster layer map.
I wonder if such thing is possible?
I have used this xml from GDAL open map service to load in a raster layer(crs id 900913) to my stand-alone pyqgis application (http://www.gdal.org/frmt_wms_googlemaps_tms.xml)
It displays the map just fine, but when I tried to draw an icon at a specific lat long position (crs id 4326), the icon appeared weirdly.
I used the QgsCoordinateTransform class to convert the coordinates.
Please advise me what I should do to get it right? I am very new to pyqgis.
Thanks a ton!
Answer: I am not entirely sure if i understood your question right, but you flagged it with pyqgis and it is quite simple to get the CRS here.
<code>#Assume that you have a raster layer of type QgsRasterLayer
crs = rasterlayer.crs()
print crs.toProj4()
# You can extract CRS of multiple layers and simply compare them with ==
crs1 == crs2 # Returns false, if the CRS is differnet
</code>
Using gdal it would look similar to this
<code>rasterPath = "your file" #load as a gdal image
srcImage = gdal.Open(str(rasterPath))
srcImage.GetProjection() # Returns a string, which contains the crs. The string can be processed by python string splitting or by turning it into a list
</code>
Comment: Thank you so much. That's exactly what I want. However my problem is not yet solved. I want to draw an icon at a specific (lat, long) onto a raster layer which I loaded from this xml file (http://www.gdal.org/frmt_wms_googlemaps_tms.xml). The raster layer is using EPSG:900913, so I converted my lat long position using QgsCoordinateTransform(4326->900913). The icon however appears way off the position i intended to draw. It seems like the origin of destination crs is not set properly. Anyone knows this problem?


Problem with my model when I change the shading from flat to smooth

Question: I have an issue with my model whenever I hit smooth.
Basically the model looks better when flat than when it's smooth shaded.
I dont know how to make it look good like the reference image.
Answer: In a case like this you want the best of both worlds. To achieve this you can use the Auto Smooth option in the Mesh Context.
I'm on mobile right now, so I can't take screen shots of Blender, but I've found some example images on the web.
Notice how the model on the right has both flat and smooth shading?

Here's where to find that feature:

This last one is actually from another Blender Stack Exchange answer. It would probably help you to take a look at it.
The Angle slider determines at what angle the meshes shading will switch from flat to smooth. Play with this.
Comment: Oh, glad it's working out for you. With the Edge Split Modifier just be aware that placing other modifiers after it in the chain will often yield undesirable results because of the split edges. But if you have no intention of placing other modifiers after it then you should be good.
Comment: thank you very very much..... That really helped.... But i think i found another way, i used the edge split modifier.. i think that also did pretty much the same thing... thank u


Derivative softwares copyrigths from a more generic software

Question: Imagine consultancy C has a generic software for analyzing data S.
Now C has a client C1 and from the software S it derives a software S1 to analyzed some specific data for C1. The overall dependency may be the same but the overall structure and purpose is specific to the need of client C1 which owns the IP (copyrights) over S1. Again, C has another client C2 and again they do something specific to analyze the data of that company C2 with software S2. C2 owns the IP (copyrights) over S2. Since both these softwares S1, S2 are derivative work of S is there any infringements betweeen C1 and C2?
Answer: If the copyright to S is owned by the consultancy C, and both S1 and S2 are derivative works of S, but not of each other, then C has the right to sell S1 to C1 and S2 to C2, and there is no infringement. However C should probably notify both C1 and C2 "The software created for you is a derivative work based on generic software created by C. C retains the copyright on this base software." That way neither C1 nor C2 will be mislead into thinking that they own the rights to S. I don't know if such notification is mandatory, but I would think it good practice at least.


Implement a RBT for proprietary software using idea from Linux kernel

Question: Linux kernel's RBT implementation has a nice trick of using the LSB bit of parent pointer as a node color. If I were to implement a RBT for my proprietary software and use the LSB as a node color bit as well, would it be considered a derived work (and have to licence my code under GPL v2.0) or independent implementation?
Answer: Copyright protects creative expression, not ideas. So feel free to use such bit twiddling tricks in your software. TBH, tagging pointers in the lower or upper bits is a fairly standard technique in low-level C.
You are of course most welcome to copy Linux' implementation into your software, but then the GPL would clearly apply.
It may be worth pointing out that some organizations want to steer very very clear of intellectual property infringement. In such a setting, even just reading open source code would be "dangerous": (1) you might accidentally copy copyrightable aspects of the code into your software, or (2) some of the ideas and techniques you see could be patented. When such an organization would want to copy functionality from another software, it would attempt a clean-room design.
Answer: I'm sure the idea isn't original in Linux. If you rummage around in oldish data structure books (or books on assembly language programming, LISP implementations, or perhaps even in Knuth's "The Art of Computer Programming") you'll find rampant reuse of "spare" bits.


Backward compatibility issues while DumpSaving Interpolation polynomials

Question: I have bkwrd compatibility issues when I save my NDSolve result (which is an interpolating polynomia) using DumpSave from Mathematica 8 on Windows 7 and then try loading it using Mathematica 7 on Linux.
Is there any way I could specify backward compatibility (and cross compatibility: files can be imported into different OS with or without the same version of mathematica) in DumpSave?
I have read this and this but they don't address the same issue.
Also, is there anyway the interpolating functions can be saved in a human readable format?
Example code to work on, for convenience.
Comment: Compatibility in `DumpSave`? As I recall, it is to be used only with your machine. See the docs: _"Files written by DumpSave can only be read on the same type of computer system on which they were written."_
Comment: Depending on the equation you solve with `NDSolve` the functionality needed to make the interpolation function may not exist in older versions. To look at it in human readable form you could use `InterpolationFunction[..]//InputForm` perhaps that helps.
Comment: @ruebenko Useful! Thanks!
Comment: @ruebenko The `//InputForm` takes forever to crank though.. at least on my 2GB RAM Linux machine running Mathematica 7.
Answer: The MX format (that is written by DumpSave) is not portable between different computer systems.  One can't count on it being compatible either between versions, different OSs or different architectures (32 vs 64 bit).
I recommend that you use Compress and export the results as a string instead, as I described here.  This is not as fast as saving to MX, but it has quite good performance, and good compatibility. (Note though that previous versions may not be able to handle certain data structures, e.g. Graph, even if they can load the file!)
Also, a warning: if you are saving interpolating functions, be sure to read about this problem!
Comment: @DNA The expression that you want to export, in this case the interpolating polynomial.  This kind of exporting is analogous to `Export`, not `DumpSave`.  See [this answer](http://mathematica.stackexchange.com/a/2008/12) to understand the difference.
Comment: Will try your approach of compressing and exporting as a string.
Comment: In `Export["data.mmaz", Compress[expression], "String"]
expression = Uncompress@Import["data.mmaz", "String"]
`, what is `expression`? The expression that has the interpolating polynomial assigne to it?
Comment: @DNA Both MX and this `Compress` trick are ways to save arbitrary Mathematica expressions.  `WDX` or `Package` would have worked too as `Export` formats, but they're much slower to import/exports.


Which projection when dealing with least-cost path estimation across the Mediterranean area?

Question: I am planning to perform a least-cost path analysis in ArcGIS 10.1 (advanced license) by means of Path Distance tool. I am taking into account a large area, corresponding to the Mediterranean basin. I am planning to use wind direction as an horizontal factor in the estimation of anisotropic least-cost paths representing navigation routes across that basin. My question: is there any specific type of projection that should be preferentially used when dealing with such a large area and given the type of analysis involved?
Answer: When calculating least-cost paths, the best projection to use is one that preserves scale.  One that might be preferable would be an Equidistant Conic Projection.

The projection has the useful property that distances along the
  meridians are proportionately correct, and distances are also correct
  along two standard parallels that the mapmaker has chosen. The two
  standard parallels are also free of distortion.

One such projection would be the Europe Lambert Conformal Conic which you can find in the ESRI Continental Projected coordinate systems.
Another one which I found on EPSG Registry is ETRS89 / LCC Europe (EPSG 3034).

ETRS89 / UTM (CRS codes 25828-37 or 3040-49) used for conformal
  mapping at scales larger than 1:500,000. ETRS89 / LAEA (CRS code 3035)
  used for statistical applications at any scale.
Comment: Thank you @Fezter for your useful reply. I have found a webpage which indicates (as indeed you did) that a conformal projection should be used "when the map's main purpose involves measuring angles, showing accurate local directions, or representing the shapes of features or contour lines" (http://www.geo.hunter.cuny.edu/~jochen/gtech201/lectures/lec6concepts/map%20coordinate%20systems/how%20to%20choose%20a%20projection.htm).
Comment: If this post answered your question, please accept it as per our [help page](https://gis.stackexchange.com/help/accepted-answer). I also came across the same page.
Comment: I am wondering why when I set on ArcMap the coordinate system as Europe Lambert Conformal Conic and I add a layer projected on UTM 33N (European Datum 1950), ArcMap doen not return any warning about the difference in coordinate system. I am just courious to know if there is any connection between the two. Apologies for what may prove a stupid question. I will more than happy to be redirected to any relevant source of information.
Comment: Rather than ask a new question in the comments, you'll get a wider audience if you post a new question. However, this topic was covered recently in [this post](https://gis.stackexchange.com/a/236238/7424).


How to modify something in two dimensions at the same time?

Question: One of the biggest mysteries which I cannot understand is how do you modify something in two dimensions at the same time. I tried to solve it myself by pressing two keys at the same time but unfortunately it doesnot help me. If someone doesnot understand what I am talking about: I want to do something like this artist on this video on 0:44 time. The Artist is modifying the mesh in two dimensions at the same time but there are no tips in left-bottom corner so it is still the mystery for uninitiated pupils like me. I searched in Google but it seems to be a secret. If someone of you can reveal this magic power, please tell me and I swear I will use it in good deeds.
0.44
https://www.youtube.com/watch?v=qrYngJmrEFA
Answer: As I see.
If you want to move the object by 2 dimensions.
1. Select the object
2. Press G
3. Press Shift + Z (Or Shift + Y, Shift + X demand on which dimension you don't want to change)
4. Move as much as you want.
Do the same with Scale.
Comment: Thank you for help, SHIFT + Z was the spell which I was looking for!
Answer:
In Edit mode, select the Edge Select mode (bottom horizontal menu bar)
Select both the up and bottom circular edges with alt right click and shift alt right click
Type E to extrude, then Enter
Scale with S and constraint your scale on both X and Y axis with shift Z.

/
Comment: Thank you for help, SHIFT + Z was the spell which I was looking for!


Can I know in what Mac macOS was installed for a given storage?

Question: I sometimes need to get some forensic information from Macs. One is this: I have a hard drive, SSD or flash storage that I removed from a mac and that has macOS installed, I then install it in another same mac or into an external enclosure so I can either start the mac from this storage or connect it to a USB port; can I get any information from that storage, such as from a log file, that would let me know in what mac the macOS was installed?, such as the serial number of the mac, or the MAC address (Physical address of the network card) or at least the Mac model of the Mac that was used to install the operating system?.
Answer: You could take a look at /private/var/log/install.log. If you search for "MAC address" you'll find output from configd detailing the MAC addresses of the network interfaces on the Mac at the time.
Note: If you're doing any serious type of forensics, it is bad practice to boot up from the storage you're examining. Instead take a copy of the disk and examine that from a separate computer (either by mounting it read-only, or by booting up on a duplicate of the copied image).
Comment: Thanks for your answer.  I couldn't find the MAC address there nor the serial number, but at least I found this useful bit: Hardware: Macmini7,1 @ 2.60 GHz (x 4), 8192 MB RAM.  which somehow identifies the model that was used to install macOS..


What do the terms in-sample and out-of-sample estimates mean in MVO?

Question: How do the in-sample estimates and out-of-sample estimates I so often hear authors refer to in emperical analysis of MVO differ?
Comment: Is [this](http://en.wikipedia.org/wiki/Cross-validation_(statistics)) what you are looking for?
Answer: The term in sample and out of sample are commonly used in any kind of optimization or fitting methods (MVO is just a particular case).
When you make the optimization, you compute optimal parameters (usually the weights of the optimal portfolio in asset allocation) over a given data sample, for example, the returns of the securities of the portfolio for the past 5 years.
The thing is, if you run your strategy over the given data set (over the last five years), you do it in-sample i.e you evaluate your result over the sample you used to fit it. This should technically give you the best possible result.
If you evaluate the strategy over the next two months, then you will do it out of sample, i.e you evaluate on a period which is different from the one you optimized the strategy on.
In asset allocation, it is important to use out of sample backtesting because you will only be able to invest today the result of an optimization made today. Hence you will earn tomorrow's strategy performance; not yesterday's.
Answer: I do not think they are directly applicable to MVO because inherently you always model the efficient frontier or asset selection on in-sample data and the result is measured out-of-sample. You can't say, "hey I model it in-sample over 2005 data and then I measure the performance of the portfolio over 2006 data and compare that with results derived from 2010 data." 2010 returns may be derived from the "most efficient" portfolio that may be completely different from the "most efficient" portfolio you built in 2005.
Actually one inherent weakness of MVO is that it "treats return as a future expectation and uses volatility as a proxy for risk, the flaw being that volatility is a historical parameter and you cannot assume that today's prices provide an accurate forecast for the future." (Mean–Variance Optimization: A Primer).
Obviously there is connection between in-sample and out-of-sample data as indicated in above quote but as I mentioned I would not consider its usage in the same way as in-sample and out-of-simple data are used, for example in those optimization where the optimization is done once, in-sample, and results are comparable across different out-of-sample time frames.
Answer: In practical terms, it means your strategy will perform similarly as measured by say Sharpe ratio on the sample of data it has not seen before. Note, there is plenty of ambiguity in the my previous sentence. For example, if you tested on a set of equity data from 10AM to 3PM, removing market openings and closings and struck out special events, you might think you have done a good job optimizing. Then you throw market openings, closing and special events back in and your Sharpe ratio goes negative.
What most don't discuss is how to divide your set of data into in sample and out of sample. I tend to think it should be random which is the closest it gets to fair. Then you could use first set for optimization and second for validation. Even better, during optimization choose the sets dynamically.


Did Carl actually get raped?

Question: In final episode of The Walking Dead season 4 a big disgusting fat guy TRIES to rape Carl. We can hear the buckle of the guy and all, but we don't see him actually doing movements. So I'm a little confused regarding what happened. Please explain.
Answer: I just re-watched the scene in question to refresh my memory.
(Warning: Graphic content discussion follows)
It's true the fat man (whose name was Dan, apparently) was trying to rape Carl, but he never got far enough to begin the actual act.  We hear the sound of Dan undoing his belt buckle, but there's no indication he had time to pull his pants down, and Carl remained fully clothed for the entire scene.  Not even a ripped sleeve.  The camera is moving around a lot, but my sense of the scene is that there wasn't enough time for anything to have actually happened.
When the tables turned and Rick came to Carl's rescue, Dan was up on his feet in seconds, backing away with both hands raised.  There aren't a lot of shots below the waist in this struggle, but if Dan's pants were actually down, he would've been holding them up with at least one hand.
Answer: He definitely wasn't raped, but I do think he was being molested.  The sounds you hear Carl make defiantly give the impression the attacker is doing something to him. And given the amount of time the attack is going on the man would've had ample time to overpower him. Plus Carl looks to be in pain and distress beyond just struggling.
As for the belt buckle it was most likely Carl's.  In the comics his attackers pull his pants off so it could be that was the intent here as the shows creators have said they originally filmed the scene to be more inline with the comics.
So no he wasn't raped, in all likelihood he was sexually assaulted in some manner though.
Answer: In this scene, Carl, who is 14 years old and is a minor so he was too young- I might get this wrong
Carl is seen to be sleeping in the truck while Michonne and Rick were talking by the fire and were talking about what they never talk about and etc. They hear some cracking sounds in the forest and didn't go see what it was, they just looked in the direction from where it came from. Claimers came out of the forest and walk towards Rick and Michonne andJoe points a gun at Rick's head ad telling him that he "Screwed up"
Meanwhile, Carl is awakened by Dan at the window staring at him and Dan puts a knife up to the window. Soon Joe and his "Claimers start counting down to One Mississippi. Daryl pops up and stops Joe from counting to zero.
Daryl tries to make Joe and his "claimers" let Rick, Carl, and Michonne go and that they are good. But Joe brings up that Rick strangled one of his claimers to death in a bathroom so it meant that they were not good people and tells two of his claimers to "Teach him all the way" which meant "Beat him to death"
Terrified Carl watch them beat Daryl and is distracted which gave Dan a chance to pull Carl out of the car and hold him by the neck?> "I don't know what it was" Rick who notices that Carl got dragged out of the car, tries to get up, but is stopped because he is still held at gunpoint.
Carl is now whimpering. Dan who is holding Carl whispers in Carl's ear "Shhh" he said and did in a very disgusting way which sent a shivering tingle down Carl's body as he tried to get him out of his hands but couldn't. when Dan did that Carl turned his head and whimpered "No" as he knew what was about to happen
I'm gonna skip to the "Molested Part"
Carl is soon thrown to the ground by Dan. Dan gets on top of Carl and grabs his hands swaying them around like he was teasing him. Rick who watched Dan throw Carl to the ground is getting really angry. Meanwhile, Dan is telling Carl to stop squirming.
Other "Molested Part"
Soon, Carl is still struggling but is turned on his stomach and is held down and I could see he was beginning to Cry, Carl didn't want this. Soon you can hear Dan's belt unbuckle and he was about to rape Carl but is stopped so he didn't rape Carl I think he Sexually Assaulted Carl.

Did Carl actually get raped?


Why did Pittheus trick Aegeus?

Question: The story of Theseus' birth has already been covered in this forum. My question is about Pittheus' motivation behind getting Aegeus drunk and offering him his daughter Aethra. In Euripedes' Medea, Aegeus describes Pittheus as 'closest of all my allies'. So why did Pittheus, who understood the Pythia's prophesy, deliberately trick Aegeus into not following the prophesy and thus cause Aegeus' death (albeit quite some time later)? What did Pittheus have to gain by this? Influence in Athens?
Answer: A grandson.
Since his purpose was to get him to sleep with his daughter, he must have deduced that the resulting son would be something special, and special enough to risk angering Aegeus.
At least, on the face of it.  There are no myths that go into what he was thinking.
Answer: This is a follow-up to the accepted answer, which I think provides a good account for Pittheus' motivation, as backed up by the entry for Pittheus in The Oxford Classical Dictionary (4th edn):

[Pittheus] got [Aegeus] drunk and put him to bed with his daughter Aethra, thus becoming the grandfather of Theseus and creating a family tie between his own small state and the powerful city over the water.

How much Pittheus betrayed his ally Aegeus depends on the precise wording of the Delphic prophesy. If, as portrayed in Euripedes' Medea, the prophesy was such that Aegeus' engaging in sexual intercourse before returning home to Athens would result only in his continued childlessness (which would be consistent with Poseidon being Theseus' true father), then Pittheus' betrayal was bad enough. But if the prophesy was 'Do not loosen the bulging mouth of the wineskin until you have reached the height of Athens, lest you die of grief', then Pittheus' betrayal was complete.

Why did Pittheus trick Aegeus?


How can I delete the recommendation section of my LinkedIn profile?

Question: A company I partner with is asking me to delete the recommendation section entirely from my profile. They can't even have it as an option on my profile. Is this possible?
Answer: LI lets you show/hide individual recommendations.
(Copied from LI help)

Click the Me icon at the top of your LinkedIn homepage
Click View profile
Scroll to the Recommendations section and click the  Edit icon in the top right corner
On the Received tab of the pop-up window, locate the recommendation you want to hide or unhide
Switch the toggle to Show or Hide
Click Save


Hook postProcess doesn't work with message templates form

Question: I'm trying to add a couple of fields to the message templates ("CRM_Admin_Form_MessageTemplates") in a custom extension. I use the "buildForm", "validateForm" and the "postProcess" hooks. The "buildForm" and the "validateForm" hooks works perfectly but the "postProcess" hook does nothing.
I'm using civicrm 5.27.4 and drupal 7.72.
I tried it also on a other installation but same results. I also tried it with a other clean custom extension but that also doesn't work. And the same hook works on other forms.
Can someone help me?
Answer: Yes, some admin config forms doesn't invoke postProcess hook. Try below patch to invoke post process hook
<code>diff --git a/CRM/Admin/Form/MessageTemplates.php b/CRM/Admin/Form/MessageTemplates.php
index 5f809f2..67cac30 100644
--- a/CRM/Admin/Form/MessageTemplates.php
+++ b/CRM/Admin/Form/MessageTemplates.php
@@ -309,6 +309,7 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Core_Form {
       }

       $messageTemplate = MessageTemplate::save()->setDefaults($params)->setRecords([['id' => $this->_id]])->execute()->first();
+      $this->postProcessHook();
       CRM_Core_Session::setStatus(ts('The Message Template \'%1\' has been saved.', [1 => $messageTemplate['msg_title']]), ts('Saved'), 'success');

       if (isset($this->_submitValues['_qf_MessageTemplates_upload'])) {
</code>
Comment: Thanks! will test it!


set of centers of sphere inscribed in tetrahedron

Question: Having a sphere and three diffrent point $A,B,C$ on this sphere. Find set of all centers of spheres inscribed in a tetrahedron $ABCD$, where $D$ is some point on the given sphere. The problem reduced to 2-dimensions is trivial it's just sum of two arcs of some circle, but in 3-dimensions the set is not so simple. Checking in geogebra it's not sum of some parts of sphere. I don't know what this set looks and how it's described.
Comment: Why restrict $A$, $B$, and $C$ to be on the sphere?
Comment: The boundary of the set is formed by incenters of tetrahedra with $D$ at infinity. Do not expect it to be particular nice surface.
Comment: $D$ is on the same sphere as $A,B,C$. It makes that the set is inside that sphere
Comment: @AntonPetrunin: "with $D$ at infinity": Could you expand on your comment?
Comment: @JosephO'Rourke, ignore it, it was a comment to the old version of the question where $D$ is arbitrary.
Comment: @AntonPetrunin: OK (I missed the original version).
Answer: A little algebra shows that, for $A=(1,0,0)$, $B=(0,1,0)$, and $C=(0,0,1)$ on the sphere, this surface is an irreducible algebraic surface of degree 5 that is singular at $A$, $B$, and $C$ but is otherwise smooth (even on the plane at infinity). In fact, the hypersurface is defined by
$$
\begin{aligned}
0 &= 2s_1^5-9s_1^3s_2+9s_1^2s_3+9s_1s_2^2-27s_2s_3\\
&\quad -7s_1^4+18s_1^2s_2+18s_1s_3-9s_2^2\\
&\quad\quad +8s_1^3-9s_1s_2-27s_3
-2s_1^2
-2s_1
+1
\end{aligned}
$$
where $s_1=x+y+z$, $s_2=xy+yz+zx$, and $s_3=xyz$.  (Written out in terms of $x$, $y$, and $z$, the polynomial on the right hand side has 56 terms; as Anton suspected, it does not appear to be very nice.)
The singularities at $A$, $B$, and $C$ are cubic (i.e., the polynomial, when expanded about each of these points, has lowest nonvanishing terms of order $3$), so one suspects that this surface, once the singularities have been resolved, might be a known algebraic surface.  In fact, the projectivization of the tangent cone at each of these three points is a nonsingular cubic curve.  (I have not computed the j-invariant, though.)
Answer: For $A,B,C=$ $(1,0,0)$, $(0,1,0)$, $(0,0,1)$ (blue below) on a unit sphere $S$,
the surface is a sort of triangular tea bag with corners at $A,B,C$.
Below are two views of $100$ random tetrahedron incenters (red)
on the surface,
corresponding to random points
$D$ (not shown) uniformly distributed on $S$.

A typical $D$ (green), the determined tetrahedron,
the inscribed sphere and its (red) center, are shown below.

Answer: Here is a depiction of Robert Bryant's surface defined by the $56$-term polynomial
he details:

Note one component is the "triangular tea bag" discernable in
my empirical investigation.
Here is the polynomial:
$$
2 x^5+x^4 y+x^4 z-7 x^4+2 x^3
   y^2+4 x^3 y z-10 x^3 y+2
   x^3 z^2-10 x^3 z+8 x^3+2
   x^2 y^3-12 x^2 y^2 z-15 x^2
   y^2-12 x^2 y z^2+6 x^2 y
   z+15 x^2 y+2 x^2 z^3-15 x^2
   z^2+15 x^2 z-2 x^2+x y^4+4
   x y^3 z-10 x y^3-12 x y^2
   z^2+6 x y^2 z+15 x y^2+4 x
   y z^3+6 x y z^2-6 x y z-4 x
   y+x z^4-10 x z^3+15 x z^2-4
   x z-2 x+2 y^5+y^4 z-7 y^4+2
   y^3 z^2-10 y^3 z+8 y^3+2
   y^2 z^3-15 y^2 z^2+15 y^2
   z-2 y^2+y z^4-10 y z^3+15 y
   z^2-4 y z-2 y+2 z^5-7 z^4+8
   z^3-2 z^2-2 z+1$$
The plot above restricts $(x,y,z)$ to lie on or in the sphere.
Comment: Thanks for making the drawing.  In case others might wonder what the other 'components' are, here is a comment:  What the algebraic surface describes is the locus of centers of spheres that are tangent to all four planes that make up the sides of a tetrahedron ABCD where D is an arbitrary point on the 2-sphere.  Of course, one such sphere will be the sphere that lies in the convex hull of the 4 points, but, of course, there are four others.  The polynomial equation can't distinguish these.  As your picture shows, even requiring that the center be interior to the original sphere is not enough.


How to load program into Arduino pro mini using FTDI cable?

Question: Do we need a ftdi basic board to connect a ftdi 232R USB - TTL serial level converter cable via a 6 pin 0.1" male header into an Arduino pro mini/ nano 328 to upload the sketch?
Comment: you can use an UNO instead, most of us have a few laying around...
Answer: For the Arduino Nano:
NO, the Nano already includes the USB-to-TTL conversion circuitry. Just use the USB connector as you would with a Uno.
For the Arduino Pro Mini:
YES, you need an external breakout board to perform USB-to-TTL conversion. This board may use the FT232RL chip, but also any other equivalent one like the CH340G. You only need to have the adequate driver in your computer and you'll be set.
NOTE:
If you have "converter cable" you might not need a breakout board because this kind of cable already includes the FT232R (or equivalent). You don't need to use this cable with the Nano.
Comment: Note that you need the DTR signal available for board reset. Some boards or chips don't provide that. Some, like the MCP22xx only provide RTS and may not be usable without knowing how to get the RTS pin to toggle for you. UECIDE provides direct support for that though.
Comment: Well seen. But then it's all down to being careful enough as to select a breakout board whose chip implements all the required functionality, right? FT232RL or CH340G would be OK, whereas MCP2200 and others wouldn't (at least straight away, as you say).
Comment: Correct. It's all about attention to detail.


Word to describe something that has an ending

Question: How to say that something has an ending in one word? I am looking for the opposite of endless.
Comment: Limited, as well as finite (like Glor mentioned), both work.
Answer: The word finite comes to mind:

1 b : having a limited nature or existence
  // finite beings

(source: Merriam-Webster)
It's the opposite of infinite, the 'formal'/'scientific' version of endless.
Comment: A ring would be finite, but has no end.
Answer: I think it will depend on the kind of thing that has an ending.
Finite works for some things. A finite series, for example, would be a series that has an end. But a finite ring might not have an end.
A ring that was changed to have an end might be a broken ring. It might also apply to things like promises or contracts. A broken contract is ended.
Limited also will work in some cases. A limited engagement would be an engagement that has a specific or anticipated end. A limited life span indicates mortality. But a globe has limits and, just as the ring, no end.
Terminated works in some cases. Or variations such as terminating. A life can be terminated. A journey can terminate at a destination and we might say "terminating in New Jersey" for example.


How to "freeze" a View at the time of publishing?

Question: I have a content type for publishing a node once a week (type A) - on Saturday night/Sunday morning - that needs to show, as an attachment, a list of some other nodes (type B) that go live daily during the week (one node a day)
I have a view that puts together nodes of type B for 6 days of week - Monday through Saturday, so I have a filter on Post Date between 'last Sunday' and 'now' and I limit the number of nodes to 6. Then I use Viewfield to show the view of nodes B on content type A - and it all seems to work, but! (there are always those 'buts', right??) - I want to 'freeze' the View's content at the time of publishing - so if somebody will click on the type A node two weeks from now, the list of the type B nodes should be relevant to the week the type A node was published on - so, I need to somehow filter the type B nodes view using an "external date" parameter
How do I do that?
Answer: I thought about the relationship angle and couldn't find one but I have been known to be blind in the past to things in front of me and instead went the hook_views_pre_view() route...
function YOUR_CUSTOM_MODULE_views_pre_view(&$view, &$display_id, &$args) {

  if ($view->name=='last_sunday_and_now') { // or whatever your View is named

    // see what we have to work with...

    $filters = $view->display_handler->get_option('filters');
    drupal_set_message('
Before: ' . print_r($filters, TRUE) . '
');

    // here on my box it is 'date_filter' so let's change things up

    $filters['date_filter']['default_date'] = // set this to whatever you want instead of "Last Sunday"
    $filters['date_filter']['default_to_date'] = // set this to whatever you want instead of "now"

    $overrides = array();
    $overrides['filters'] = $filters;

    foreach ($overrides as $option => $value) {
      $view->display_handler->override_option($option, $value);
    }

    // let's see what we have...

    $filters = $view->display_handler->get_option('filters');
    drupal_set_message('
After: ' . print_r($filters, TRUE) . '
');

  }

}

It's up to you to define the logic of what to set the dates to, but if this is sitting on a node, you can grab the post date of it via menu_get_object() pretty readily and then use any of the various date and time functions to create the dates.
Comment: thanks! this looks like a solid straight-forward way to do it, definitely will be my plan B: I'm still trying to solve it without code writing - with the relationships... no progress yet.
Answer: It sounds like you need a relationship from parent node A, the publish date to be the filter for Nodes of type B. I think Views can handle this use-case out of the box.
So add like a  contextual filter for the parent node A NID in your View for B stuff -- and then basically keep the rest of your view listing for type B the same.
Viewfield should be able to accept an argument for the View as the type A parent NID that was published.
Comment: I'm at loss here...I added a relationship - Content Type B now has a Node Reference field that references Type A (is that what are you talking about?). On Content A, its Viewfield that renders the View of Nodes B, passes [node:nid], [node:created] args. But how do I add the context. filter for "parent NID"?? and BTW - I have Clean URLs on, so - not much is coming in the URL. And how do I use the A's publish date to filter on Bs? I don't see such option... can you give some more details please?


Can I run programs that are released under GPL on cloud servers?

Question: According to what said in the GPL FAQ (#SubscriptionFee), GPL does not allow to run GPLed programs on a device that will "stop operating if customers do not continue paying a subscription fee", while most cloud computing require users to continue paying the fee in order to use the service continuously. It's pretty normal to see a cloud server running GPLv2 or GPLv3 programs. Is this really violating the GPL?
Comment: I suspect that FAQ refers to a device you put into the hands of your customers with GPL software on it. The AGPL license wouldn't have been needed if the GPL covered cloud servers.
Comment: @curiousdannii this sounds reasonable. That part of the FAQ is really a bit misleading...
Comment: @Moebie I have to agree; I find that Q&A very surprising. I would expect at minimum the answer to be , "Anti-tivoization in the GPLv3 means that the manufacturer must enable you to install your own software that doesn't perform a license check." It's also unclear to me if they're talking only about the legal aspect (i.e., maybe you *can* get the device to run but you are legally forbidden to do so without paying) or only the technical aspect (i.e., a situation where the device's behavior is to shut down if the fee isn't paid, but you are not legally in the wrong if you circumvent this)
Answer: With cloud computing you don't buy a "device that stops operating" when you stop paying the service provider. Instead you buy a time-share of some hardware to run your software on (where 'your software' means that you control which software gets executed on your behalf). Thus you don't pay for the right to run GPL software, but rather for the hardware resources you use.
Comment: This make sense. Thank you for your answer, it's helpful!


Difference(s) between Rational Expectations Equilibrium and Nash equilibium

Question: What is the major difference between the notion of rational expectations equilibrium and Nash equilibium? And why do we, only, have a rational expectation about the first moment (the price) in the former one? Do they coincide or they constitute a completely different framework? They seem so similar to me in some articles, that I can not distinguish their features if they are any!
Comment: @markleeds Please post answers as answers.
Comment: sure. but I'm not sure if it's a "true" answer. I'll move it.
Answer: Hi: They are pretty close to completely different. I don't know the least thing about game theory but a nash equilibrium describes what happens in a game when two or more people have a certain type of expectation. RE is one type of expectation but if you google for RE you'll see that it's a field in itself. It happens to have an application in game theory but it's a seperate field developed by macro-economists in the early 70's. RE founder could be viewed as Lucas or John Muth depending on who you ask. Muth came up with the concept in 1961. Lucas applied it to macro-economics in the early 70's and it took off from there.
Comment: It is true that Rational Expectations is mostly used within the field of macroeconomics, but there is a connection with Nash equilibrium.
Comment: @brunosalcedo: That's kind of why I wanted to keep my answer as a comment.  If you can summarize the relation, it's appreciated.
Answer: I think you just need to compare model-specific definitions carefully, rather than vague notions.
Nash equilibirum (NE) typically is a strategy profile such that every player's strategy is actually a best response to other players' strategies, i.e. that no player in this equilibrium has any incentive to deviate.
Rational expectations equilibirum (REE) in macroeconomics is typically defined as a set of prices (actually price functions of some state variable) and agents' decisions (i.e. strategies in the language of game theory rather than decision theory) and perceived laws of motion for some state variables, such that given prices and these perceived laws of motions (i.e. expectations), agents maximize their respective objective functions, markets clear and, last but not least, the perceived law of motion coincides with the actual law of motion in this equilibrium (this is the actual law of motion).
Note that while NE concretely specifies the number of agents (i.e. players)  involved (at least typically it's a finite number of players) in a game studied by game theory, REE can be more abstract as it typically involves representative households and representative firms, which means that the all the households and firms can be represented by one household and one firm. Additionally, in the latter there's this impersonal aspect of market equilibirum: magic happens and markets clear. Finally, there's this explicit intertemporal dimension in the latter involving the coincidence between perceived laws of motion and the actual ones. In contrast, NE doesn't involve any of these, but in case of imperfect information, expectations (beliefs) are explicitly taken into consideration in the notions of, say, weak perfect bayesian equilibirum, in which additionally implausible Nash equilibria are ruled out.
"And why do we, only, have a rational expectation about the first moment (the price) in the former one?"
I don't know what you exactly mean by the moment in this context, but in the model in which prices are flexible, price isn't even a state variable (if the states are minimally, parsimoniously defined), but, say, capital or technology can be the only state variables, so rational expectations need only primarily involve capital and technology rather than prices. But in the models with sticky prices, prices can actually be the state variables, so the expectations can primarily involve them.


Can I use my Chinese name as my Japanese name?

Question: Im Chinese and my name is 陈依仁 (Chén Yī Rén). Can I use this as my Japanese name, and if so how do I read it in Japanese? Or would it be better to use the Katakana version of my English name which is タン・スジン?
Comment: 「陳 依仁」(陈→陳)と書かれるでしょうね・・ 「[陳]{チン} [依]{イ}[仁]{ジン}」と読まれるでしょうね・・
Comment: Related, if not duplicate: https://japanese.stackexchange.com/questions/3013/when-chinese-personal-names-are-written-in-japanese-in-kanji-is-there-always-an
Comment: Please use the contact form to merge your accounts. If you want to leave a comment on some answer, use the comment function rather than editing your question.
Comment: Do not self-vandalize
Comment: 「依仁」を「よりひと」とかいうふうに、中国人の名前を訓読みすることってあるんですかね?
Answer: Just from personal experience (purely anecdotal), I came across a few Chinese people who all used their original characters hanzi pretty regularly in work scenarios, normally without furigana (name badges, shift schedules, etc).
Anybody who sees your name written thus should know from your surname that you are not Japanese, they will likely ask you how to read it. The people I encountered would say the closest approximation of their name that the Japanese ear could decipher. I would recommend 「チェン・イーレン」.
Answer: In the media, Chinese names are often read in a native Japanese way. For example, Xi Jinping (習近平) is read as 「シュウキンペイ」 instead of 「シージンピン」. In your case, your name would be read as 「チンイジン」, though in a work setting 「チェンイーレン」 might be better.
Answer: Yes you can of course, as many have said. However, I am not sure why nobody mentioned that you can also pretty much use the kanji in your name and just associate to them a Japanese pronunciation as well.
In fact, I think it's important to notice that when it comes to pronunciation Japanese is quite flexible (especially with proper names)  and it is not uncommon to find kanji in names associated to very peculiar readings.
If I check a name dictionary, I can actually find tens of possible readings for 陳. Most are similar to チェン. For example you have じん、しょう、ちいん、ちぇん etc. However, I see also the more Japanese sounding のぼる (given name) or the kind of particular くわおつく (last name).
And actually, I can even find 依仁 with the reading よりひと (a given name).
Given that these records exists you can very well write your name using exactly the original kanji (except for using the traditional version of  陈) and simply say that it is pronounced (last name-first name):
くわおつく-よりひと
Or play around and find any other combination you like. Maybe くわおつく sounds a bit odd, but if you pick a more standard じん for example, I feel that じん-よりひと or read it the other way around よりひと-じん is quite a cool sounding name. :D
Comment: @Zanne lol, sorry I couldn't know that. Thanks for accepting my answer.. despite it came late and has less up votes to be honest I do also feel is maybe the closest answer to what you were actually asking. Let me think about a possible more girly name. By the way, if you switch Jin to be the first name, that in my dictionary is also indicated as a female first name. I mean after all just find a name dictionary look up the kanji and play around with the possible readings and combinations.
Comment: Is くわおつく really attested? I see it in online dictionaries but I can't find any occurrences of it on the Japanese Internet.
Answer: Since we do not have Letter 陈 in Japanese, you might want to choose 陳 依仁 and read it ちん よりひと (Chin Yorihito).
There was a prince named 依仁 (よりひと, Yorihito) about a hundred years ago.
Answer: Although the plural of "anecdote" is not "data", there are examples of Chinese people using the same characters for their Japanese name (or making only slight changes). One example that readily comes to mind is the instant ramen inventor Ando Momofuku (安藤百福), whose Chinese name is Go Pek-Hok (吳百福).
Comment: So all the OP needs to do is marry a Japanese national and take her name like Mr. Ando did?
Comment: @BJCUAI this partially true, but 百福 does indeed come from his original Taiwanese name.


When powered Ring Pro won't stop chiming.

Question: When Ring Pro is connected to power, doorbell rings constantly. What can I do to correct this?
Comment: Did you install the diode (or is it a resistor?) that came with the Ring?
Answer: sounds like it's not wired correctly or it uses too much power. When the button is pressed, the line voltage drops, which is why the light on the button goes out. electrically, there are conductors and insulators, and a button switches between the two, whereas your ring is somewhere between a conductor and insulator (a load). Yopu old-fashioned bell is confused by this new electrical gray-area.
If your wiring is correct, and it's still "stuck", you have a few options.

a bigger doorbell transformer. Many are very weak, especally ones made after real buzzers and bells were phased out by chimes and speakers (80s?). Make sure the transformer has enough "watts", "VA", or "ma" (labels vary) to power the Ring.
thicker doorbell wire: lower guage wire drops fewer volts over distance, so it might make up the difference to the ringer enough to avoid the low-voltage triggering state continuously.
disconnect the ringer and rely on your phone to notify you of visitors.
Comment: I have not worked with a ring pro but some door bell circuits don't play well with lighted doorbell buttons , other than this it could be a screw or staple causing the bell to ring.

When powered Ring Pro won’t stop chiming.


What's the max prestige for Gym?

Question: I've already seen a level 10 Gym with 52k/50k so I assume that you can go higher
Comment: This is not a duplicate. This is about the prestige, not about the level. They are related, but not identical.
Comment: [What is the maximum gym level?](http://gaming.stackexchange.com/q/273239/120411)
Answer: The intended maximum prestige appears to be 50,000, since 10 is the maximum level. However, being that this is Niantic Labs that we are talking about, there appears to be a related bug.
As noted in the answer here, the maximum prestige of a gym should be 68,000. The likelihood of ever finding an instance of this is probably very low, but it should be theoretically possible.

EDIT:
As stated in my answer here, the maximum prestige is actually capped at 50k. The maximum it will display is still 68k/50k, but even at that "level", if the first Pokemon is defeated, 18000 prestige will be removed plus the prestige removed for defeating a Pokemon.
So, while you are able to make a gym appear to have up to 68k/50k prestige, the game will not recognize prestige over 50k, and will behave accordingly.
Answer: The amount of Prestige you see is a combined total, unlike more typical EXP/Level bars where it would indicate EXP so far this Level.
The threshold ( /50k ) is therefore the amount of Prestige needed to reach the next level. However, since Lv10 is indeed the maximum level for the Gym there is no "next level" to indicate, and so it just shows the threshold that was needed for Lv10.
The actual amount of Prestige attainable appears to be unlimited, but so far there is no confirmed information either way.

What's the max prestige for Gym?


What is the blues term for the note between the minor third and the major third?

Question: I thought it was the blue note but this is not it. For some reason, "perfect third" comes to mind, but google returns nothing. Anyone know?
Comment: This isn't really correct. _Neutral third_ is the term for a third mid-between major and minor, but it's _not_ used in blues and not really appropriate. "Blue note" is more often explained as a minor third in a major key, but actually Blue notes are neither necessarily minor nor neutral thirds. Rather, they're generally notes _smeared emotionally downwards_ – usually not to a fix, well-defined pitch.
Comment: It is a blue third/neutral third
Comment: @leftaroundabout- "notes smeared emotionally downwards". You just painted an amazing picture in my mind, now that's what we're talking about here.
Answer: In guitar tab it's labelled 1/4 tone bend. It has to be bent, as it's half way between the m3 and M3. Since it can't really be written on the normal staff of 5 lines, 4. spaces, in Western music it can't have a letter name, surely. The 'blue' third is generally regarded as m3 in a major key, and never heard of a 'neutral' third - or any other 'neutral' interval.
EDIT: having Wiki'd 'neutral third', it seems it is indeed a recognised term for that elusive note! Something new every day... Now what about the ones in between it and the m3 or M3..? Guitarists playing Blues use those as well !
Comment: Well, so much for the concept of twelve individual notes in a chromatic scale. Anybody have any idea how many unnamed tones/frequencies in an octave? Also explain how they are notated if you please.
Comment: @skinnypeacock - I'd label them with their value in cents or Hz, but music is a continuum, so there are technically infinite unnamed frequencies in an octave if you adhere strictly to (the finite number of) existing tuning systems.
Answer: I think I know what you mean. This tone can be produced by singing, woodwind, brass and string instruments, guitar and especially the blues harp ...

wouldn't we call it just a "bent 3rd" ? or  "bent" 5th?
Answer: When we talk about the 12 possible semitones, we are seeing music from a Western standpoint. Exploring other music traditions, we find other notes, and therefore other intervals, in common use. We think of them as in-between notes only because we are comparing them with our own standard set.
The bent minor third, achieved on guitar by bending the string to increase the tension (and on harmonica by "bending" the major third down) is more common than the standard  "western" minor third in Blues. As a reference, watch any blues guitarist, such as B B King, and you will see the minor third being played with the higher-sounding string visibly bent.
So as to what it is called, we could call it a bent minor third or, when it is clear we are talking about blues, perhaps we need only call it the minor third, it being taken for granted it will be played slightly sharp compared to "Western" intonation.
On a guitar, if we play an A on the 4th string, 7th fret and at the same time a C on the third string 5th fret, and try various degrees of bend on the C note only, we can make a subjective judgement of the "relative sweetness" of the bent interval.
If we use the nomenclature of the 24 Equal Temperament Scale, the note midway between the major and minor third is called the Neutral Third. I am not aware of any frequency-measurement data comparing this with the bent minor third as played by recognized blues masters.
Qualification: I have played guitar, including blues guitar, for almost 60 years, and have a degree in Applied Science.
Answer: This is a new one for me. There is only a half step between a minor third and a Major third, and though either one may be sharp or flat by being out of tune, there is no designated note between the two notes in western music and a third interval is not classified as being a Perfect interval.
Comment: You surely know this tone: s. "it ain't necessarily so" or "Once upon in the time in the West", or Janis Joplin and many blues singer!  this note is marked as blue note with a slight slash something between   ' or )  above it.

https://www.musicradar.com/tuition/guitars/blues-scale-string-bending-for-beginners-214120
Comment: @Albrecht Hugli- This video went a long way towards helping me understand something about myself. I would classify the "note" being discussed here as an effect that's accomplished by bending the third, Major or minor, where others would define it as a "note" being played. I now have an idea what others may be talking about if it ever comes up in discussion. Great video.


Can I Publish Research if I work for the company?

Question: I will be doing some research for a company I am about to start working for. The company is small and provides animal assisted interventions in schools. They want and need ways to measure the children's progress. I have suggested a validated measure and agreed to help with research and analysis.
Am I able to write this up and submit for publication?
I have a masters in Psych and been through the publication process before (although unsuccessful).
Basically I am worried about conflict of interest (I suppose it is in my favour to show positive results) and ethics as I am no longer affiliated with a university.
But I know there's a shortage of research in this area and I want to add to it.
Any suggestions are very welcome!
Thank you in advance
Answer: Two important things to consider...
A) It's up to the company. If they approve, then you can possibly write it up. If they disapprove, you cannot.
B) Human subjects research must be conducted under proper ethical controls - some sort of institutional review board has to approve of your human subjects research ahead of time, or certify that your research does not need full review.
These research regulations do not apply to certain types of data that are not considered research. For example, if a teacher is assessing the efficacy of their own lessons, and they don't plan to disseminate the results, it is not considered "research". Similarly, market studies, customer satisfaction surveys, etc, are all not "research" from a regulatory perspective.
Therefore, it's possible that your study is completely okay if it's just used internally, but not okay to be published without taking steps like obtaining proper informed consent from the research subjects and getting prior approval for the study.
(this is from a US perspective; rules might be different elsewhere, but there are likely to be similarities and it's something you would need to investigate)
Answer: There are companies who will claim all your work while you are employed for themselves. Those companies have you sign an agreement to that effect. The "agreements" can be quite limiting and extensive. Non disclosure, no expiration, lots of possibilities. Some will let you publish under your own name provided that they approve in advance of what you will write.
Since you haven't started working for them, I suggest you work out an agreement to your mutual satisfaction. It may be in a small company you can get this done, especially if the research isn't involved in the main "product" of the company.
Don't make assumptions about what is possible. Work it out. It may even be an advantage for them to have you publish freely. But lawyers will possibly be concerned that you will publish something that refutes the value of what they do.


What causes Mach No. to increase with altitude at a constant cost index?

Question: If a jet aircraft flies at a constant cost index but changes flight level the Mach no required by the FMC will increase with increasing altitude and decrease with decreasing altitude. Why is this? (Disregard aircraft weight changes due to fuel burn etc)
Comment: This sounds an awful lot like a homework assignment.
Comment: In other words: does the aircraft need to burn less fuel at higher altitude?
Answer: Cost index is a function of Time Cost/Fuel Cost and is more related to True Air Speed than Mach Speed since Mach Speed varies with altitude.
At FL300 M.85 equals 501 knots but at FL400 M.85 is only 487 knots. In order to maintain 501 knots at FL400 you need to increase your Mach speed to M.87
Answer: Both of these terms are not related. There is no cause effect relation between them. That is the reason why there is a constant cost index even though the mach number changes as the altitude increases. This is sufficient to answer your question directly. If you are wondering how these data are unrelated, continue reading.
This may get quite technical. Please bear with me.

COST INDEX
As said above, cost index is the ratio of unit cost of time to the unit cost of fuel. This is used to optimize the aircraft's airspeed.
About Airspeed
Aircraft's airspeed is the speed of the aircraft relative to air in it's vicinity and this is different from ground speed (which is defined as the relative speed of the aircraft with respect the ground). Please note that there are 3 types of airspeed (true, indicated, calibrated). For now, just consider the airspeed.
Jet Engine Theory
What jet engines do are quite simple:

Absorb the air
Compressor compresses the air and pushes it backwards
Due to compression, air heats up and pressurizes and wants to expand
The nozzle is convergent and the ambient air pressure is low. So this gives an extra boost to expanding air.
Newton's third law. The air expelled propels the engine forward

Temperature v/s Altitude
Temperature of the air decreases with increasing altitude
Efficiency of the jet engine
The net change in pressure created by the compressor of the jet engine

at ground level, is quite high (Sorry, no numbers. But it is high enough to easily provide enough velocity for lift-off).
at higher altitudes, this is even higher. Why? The lower temperature of air gives room for higher change in air temperature. And thus higher air pressure. And thus, more thrust.

How does this related to cost index?
Well, in order to optimize fuel consumption, it is necessary to maintain near constant airspeed (which is optimized based on individual flight parameters). So, now you may understand, why sometimes you are flying slower on a map and why sometimes faster. This is because, the wind-speeds vary a lot. And airlines try to maintain a constant airspeed (not constant ground speed). Saves a lot of fuel.

Mach Number
\begin{equation}Mach\space Number = Aircraft\space Airspeed / Speed_{\space Sound\space in\space Air}\end{equation}
As explained above, the aircraft's airspeed is maintained as constant as possible coping to changes in external wind speeds. However, what actually makes mach number higher, is the denominator part.
\begin{equation}Speed_{\space Sound\space in\space Air} = \sqrt{\gamma\space R\space T} \end{equation}
Speed of sound in air decreases as the altitude increases. This is due to changes in properties of air with increasing altitude.
And thus, mach number increases even though the airspeed is almost constant.

Hope this helps in discerning how cost index and mach number are independent of each other. Cheers.


What to do with old code?

Question: Often I change code but I don't know if I might need the old one, I can leave it under comment but then I find myself with lots of green lines while I hardly can read the real code.
Thanks.
Answer: You use a source control system (like Subversion or Git) which keeps track of old versions of the code. Then you can safely delete unused code, since you can always roll back if you discover you deleted something by mistake.
Comment: better: »like Mercurial or Git«
Comment: I would not suggest subversion. Git is enough :D
Answer: You might use the following options:
TODO-comments
If you make a change in your source code, you can first comment out the old part and add
<code>//TODO: your description
</code>
above it.
After some testing you can then search in your code for "//TODO:" and clean it up.
Version control system (e.g. git)
Additionally you should use a Version control system, e.g. git. this gives you the possibility to roll back to any version you want and to add a comment to your changes when you push them.
Archive folder
If you decide that you don't need a software project anymore (e.g. because you don't have enough time or your priorities have changed), you should create an archive-folder where you move your old projects to.

What to do with old code?


What's the process to buy an old house to tear it down and create a new one?

Question: I'm seeing an old house in Union City, NJ, that I'd like to buy to tear it down and create a 3 family one to generate income. What are the steps to take in this process and what kind of contract should I use with the bank? PS: I'm a first time home buyer and I don't have a lot of money to give up front.
Comment: Have you checked to see if zoning ever permits this? Every town has its own zoning rules, minimum land to build a certain size house. The land my house is on can't be used to build a multi family house for example. It seems to me this is the very first step.
Comment: Yes, it's allowed if I live in the building, that's my plan, create a 3 family house with the help of a partner and live in one of the units.
Answer: By process, I assume you mean the financial process. Financially, this doesn't look any different to me than buying an empty lot to build a rental unit, with the added expense (potentially significant) of doing the tear-down. Given your lack of experience and capital, I would be very hesitant to jump in like this. You are going to have to spend a lot of time managing the build process, or pay someone else to do it for you. And expect everything to take twice as long and cost twice as much as you expect. If you really want to get into the landlord business, I would suggest starting with a structurally sound building that needs some renovation work and start there. One you have that up and running, you can use the cash flow and equity to finance something more aggressive.
If you still think you want to do this, the first thing to do is figure out if the financials make sense. How much will it cost to do the tear-down and rebuild, plus the typical rental expenses:ongoing maintenance, taxes, insurance, vacancy rates and compare that to the expected rental rates in the area to see how long it will take to 1) achieve a positive cash flow, and 2) break even. There are a lot of good questions on this site related to rentals that go into much more detail about how to approach this.
Comment: Also, you would probably need to hire someone to check the zoning to see if you can even tear down and/or rebuild how you want.  I would start recommend starting as mentioned above in the first paragraph.
Comment: Financially I see one potentially significant difference.  If user179589 needs to borrow money to buy the property being demolished, when he destroys the old home the value of the property the initial loan is against would drop significantly.  If that resulted in the outstanding loan balance being more than the value of the empty lot I could see the bank being unhappy.
Comment: I assume this is something that could be negotiated when taking the loan out; but would need to be brought up in advance to avoid problems.
Comment: Also more generally you do need to be on the alert about the loan terms.  If you are getting a loan for the property, banks are likely to view it differently depending on whether you're planning to live there yourself, rent it out, or both.
Answer: Thank you for your response KeithB and Ross. I was researching more about this and looks like I have to follow all these steps (please, correct me if I'm wrong):

first search for a good real state broker dealer and explain my plan. Probably he's going to suggest using the "construction-to-perm" type of contract. In New Jersey we also have incentive for first-time home buyers, not sure if it's applicable here.
with the letter of credit approved, make a bid to the homeowner and buy the house
choose a builder and an architect
work up house design with the builder/architect
tear the home down.
draw the money and receive inspections from the bank at specific milestones (the money is not paid in advance)
pay interest to the bank meanwhile the construction it's in progress
after completion, conversion to permanent mortgage financing
Comment: @user179589 You'll have to double-check that. Even living in the property may not allow you to use a first-time home buyer plan. The property would have to be zoned R-2 to allow a multi-family dwelling.
Comment: Many of the first time home buyer plans require you to live in the property for a specific amount of time. knowing the plan is to tear down, rebuild and rent out would likely make this project ineligible.
Comment: You need a step 0 in there, which is to read @JoeTaxpayer's comment on the original question and then investigate if this will even be allowed. Zoning and land use regulations (and if the home is in some kind of historic district) may preclude doing this at all.
Comment: Sorry, I should had mentioned that part. I'm planning to live in one of the units and rent the rest. Doing this I can fit the requirements.
Comment: Thank you, I'm going to check that. I'll comment my answer later when I find all the information.


Udev doesn't match ENV variables on remove

Question: As probably thousands of us I wanted to have special script running when "this one" usb stick is inserted. But also I want to have something running when it's removed - this is pain in the ass.
I did read about issues with correct matching removal here: https://www.linuxquestions.org/questions/linux-desktop-74/udev-not-doing-remove-rules-841733/
So. My rules are:
ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{model}=="USB2FlashStorage", ATTRS{vendor}=="Ut165   ", ENV{UDISKS_IGNORE}="1", ENV{PX2_KEY}="1", SYMLINK+="key%n", OWNER="root", RUN+="/root/bin/key.sh add"
ACTION=="remove", SUBSYSTEM=="bsg", ENV{PX2_KEY}=="1", RUN+="/root/bin/key.sh del"

Add one works perfectly but remove doesn't at all.
I tried to use with and w/o SUBSYSTEM (usb, block, scsi), with or without correct ENV{ID_MODEL}, ID_VENDOR, ID_SERIAL, ID_F..._POOP and nothing.
On the current stage you can see that I'm creating own symlink (key%n) and tried use that as well with
KERNEL=="key*"

no luck! You probably noticed also I'm setting my own variable (PX2_KEY) and trying to match by this and... no luck as well... What am I doing wrong... Maybe I'm missing something on rules order but did try making my rule file 10-local as well as 99-local - didn't work. Add works, remove not. bsg is set because this is the first subsystem where I see udev shows existence of PX2_KEY in
udevadm monitor --udev --environment

when remove is done. Thought maybe I need to catch first occurence. But tried different too.
Answer: It works.
I'm not too smart. The issue was that in the script I wanted to run, I run zenity with --display=:0 as root trying to write message for different user.
Script ended before any "logging" part...
Comment: No, you are smart for figuring it out. Well done!


Is a song with new lyrics a cover, remix, or freestyle?

Question: If I used the instrumental of a song and the hook but wrote new lyrics for the verse using a completely different cadence what terminology would I use in the song title?
Answer: Traditionally, in American pop music, the core of the song is considered to be the vocals/lyrics. Therefore if you keep the vocals and change the instrumental, it's a remix. New lyrics and vocals over an existing instrumental would be considered a derivative song, or possibly a brand new song sampling the old song (although you wouldn't typically use the entire instrumental in that case). Finally, a cover has the original lyrics and roughly the same melody, but new vocals and instrumental (it's a karaoke cover if you use the original instrumental). In any of these cases, if you make money off the song, the original songwriters are considered your cowriters, and are entitled to a share of your profits, even if you don't keep anything they explicitly contributed. (Freestyle has two meanings, neither of which apply here. The older, obsolete meaning, is a rap with no focused subject or theme. The contemporary meaning is an improvised rap created simultaneously with being performed.)
It's a term of art, however, and not a scientific classification, so there are ambiguities. For instance, you're keeping the original hook --if the hook is the real core of the song, then you might call your version a remix. Or, if some of the original verses are still in the song, it might be considered a remix.
Interestingly enough, in Jamaican dancehall music, the relationship is reversed. The riddim (instrumental) is considered the core of the song, and the vocals are interchangeable.
Answer: You may find it interesting, that the re-use of the same melody for a different text was already done by classical composers. The technical term at that time was parody, in the meaning, that different lyrics were used. This was done extensively by J. S. Bach when he reused melodies from secular cantatas for religious ones or vice versa, as well as by Handel, when re-using the music from an aria in a new opera (where the text of course needed to be completely replaced), sometimes combined with a musical overhaul as well.


index2.php in root causing 404 error

Question: I put up a quick splash page with index.php and added a link in that splash page to index2.php and when I go to index2.php, I get a "page not found" error. Getting rid of the splash is not an option right now. Is there anything I can do to get this to work?
Answer: Try to just use a index.html file and use
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=http://example.com/wp-content/themes/your_theme/index.php">
in your  section.
Let's see if the easy stuff works.
edit: to be on the save side, always display a link to the index.php file with some descriptive text like "if your browser doesn't redirect you automatically, please click here"
Comment: Sorry, just to clarify: So I should try changing index.php (which is the splash page now) to index.html with the addition of the head content? Or do you mean change index2.php to index.html?
Comment: Also, to clarify further, it looks like index2.php is showing everything but the main section. That is the header, sidebar, and footer. But no 'main' section. I don't know if that helps.
Comment: Afaik the index.html get's catched first, so yes, your index.php. The index2.php would get renamed to index.php and serve it's normal purpose as your theme's index file. Give it a try. I'm not exactly sure if it will work.
Comment: Oh, and no, i don't know what the "main" section is...
Answer: I suggest you to create a custom page and name it home.php to load it first and link it where you want.
http://codex.wordpress.org/Template_Hierarchy

index2.php in root causing 404 error


Flood Elevation Setback

Question: I have a floodplain layer with elevations assigned to it. Per scope of the project, I need to create a safety setback. The flood elevation is raised by 2 ft. and when the raised point extended horizontally to the ground becomes the setback. How do I create this setback/buffer?
Comment: can you define 'setback' nearest point to dry land from the edge of the flood plain?
Comment: Welcome to GIS SE!  Can you use the **edit** button beneath your question to do the above but also to include the version of ArcGIS for Desktop that you are using, please?
Answer: You didn't specify a software requirement for your solution (although there is an ArcGIS tag on the question) so I've provided a method below based on the free and open-source GIS Whitebox Geospatial Analysis Tools, for which I am a developer.
Whitebox GAT has a tool called Elevation Above Stream (see image below):

For a given DEM and rasterized stream network...

...the tool will calculate the elevation difference between each location and its nearest downslope stream cell:

You can then threshold using the Raster Calculator, Reclass tool, Less Than tool, or Conditional Evaluation tool. In this example I've simply pulled out each cell in the elevation above stream raster with a value less than 2 ft and vectorized the resulting polygons:

There are your setbacks! I should also note that while I used a stream network as the target in this example, you could easily replace the required input streams file to the tool with a rasterized version of a floodplain polygon. It would work equally well, but would redefine the output as elevation above the floodplain. In fact, this is nearly the exact application that inspired me to develop this tool in the first place. Good luck and let me know if you need any further details.
Comment: +1.  Great answer.  I wouldn't delete your answer even if an Arc solution is required.  This may be useful to other users who are trying to do the same thing.  And WhiteboxGAT is a great program.
Comment: @Fezter Thanks for the feedback. It's well appreciated.

Flood Elevation Setback


Is it possible to use multiple accounts from one email address in K9 application?

Question: In the company I work for We would like to use one general email address, but different accounts. Is it possible to do that?
Answer: AFAIK, it's not possible (Related How to setup K9 Mail properly for free email services offering multiple aliases for same email box?)
K9 mail isn't really active in development and I would rather suggest you switch to a modern Email Client which does this and much more. I am talking of FairEmail. Don't be discouraged by "unreleased"  status. It's very much functional and actively developed. See this XDA thread.
Specific to your query see FAQ 9
I am not associated with the app but would happily recommend this being a better alternative to K9 mail - it's leagues ahead of K9


Is there any Biblical answers to what condition our bodies will be in after the resurrection?

Question: I hear a lot of people claiming that our bodies will return to the state where we were at our best. Like for example, a woman with bruises from abuse won't have her bruises. Is there a Biblical basis for this, or is this just a common 'misconception?'
Answer: The scriptures tell us that in the resurrection we will be "changed" to be "like the angels" with spiritual bodies that are imperishable and powerful:
Luke 20:34-36 NIV

34 Jesus replied, "The people of this age marry and are given in marriage. 35 But those who are considered worthy of taking part in the age to come and in the resurrection from the dead will neither marry nor be given in marriage, 36 and they can no longer die; for they are like the angels. They are God's children, since they are children of the resurrection.

1 Corinthians 15:35-58 NIV

The Resurrection Body
35 But someone will ask, "How are the dead raised? With what kind of body will they come?" 36 How foolish! What you sow does not come to life unless it dies. 37 When you sow, you do not plant the body that will be, but just a seed, perhaps of wheat or of something else. 38 But God gives it a body as he has determined, and to each kind of seed he gives its own body. 39 Not all flesh is the same: People have one kind of flesh, animals have another, birds another and fish another. 40 There are also heavenly bodies and there are earthly bodies; but the splendor of the heavenly bodies is one kind, and the splendor of the earthly bodies is another. 41 The sun has one kind of splendor, the moon another and the stars another; and star differs from star in splendor.
42 So will it be with the resurrection of the dead. The body that is sown is perishable, it is raised imperishable; 43 it is sown in dishonor, it is raised in glory; it is sown in weakness, it is raised in power; 44 it is sown a natural body, it is raised a spiritual body.
If there is a natural body, there is also a spiritual body. 45 So it is written: "The first man Adam became a living being"; the last Adam, a life-giving spirit. 46 The spiritual did not come first, but the natural, and after that the spiritual. 47 The first man was of the dust of the earth; the second man is of heaven. 48 As was the earthly man, so are those who are of the earth; and as is the heavenly man, so also are those who are of heaven. 49 And just as we have borne the image of the earthly man, so shall we bear the image of the heavenly man.
50 I declare to you, brothers and sisters, that flesh and blood cannot inherit the kingdom of God, nor does the perishable inherit the imperishable. 51 Listen, I tell you a mystery: We will not all sleep, but we will all be changed— 52 in a flash, in the twinkling of an eye, at the last trumpet. For the trumpet will sound, the dead will be raised imperishable, and we will be changed. 53 For the perishable must clothe itself with the imperishable, and the mortal with immortality. 54 When the perishable has been clothed with the imperishable, and the mortal with immortality, then the saying that is written will come true: "Death has been swallowed up in victory."
55
  "Where, O death, is your victory?
      Where, O death, is your sting?"
56 The sting of death is sin, and the power of sin is the law. 57 But thanks be to God! He gives us the victory through our Lord Jesus Christ.
58 Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain.

From this, it seems that our bodies will not be merely returned to the state when we were at our best, but will become something qualitatively better.
Answer: When the Word says that when we see Him we shall be like Him, we can understand 1 John 3:2 to be saying a number of things.  I take it
to be an allusion to things already written about our resurrection body.
John 20:19, 26-28

19 Then the same day at evening, being the first day of the week, when
  the doors were shut where the disciples were assembled for fear of the
  Jews, came Jesus and stood in the midst, and saith unto them, Peace be
  unto you.
  26 And after eight days again his disciples were within, and
  Thomas with them: then came Jesus, the doors being shut, and stood in
  the midst, and said, Peace be unto you. 27 Then saith he to Thomas,
  Reach hither thy finger, and behold my hands; and reach hither thy
  hand, and thrust it into my side: and be not faithless, but believing.
  28 And Thomas answered and said unto him, My Lord and my God.

What this can be taken to mean is that our bodies might be able to walk through walls at the least.  Solid matter such as walls and
doors will be of no consequence to us.  But, then do they stay in a transmogrified, ghostly state with no material substance?
No, we see that Thomas was able to touch Jesus and feel His nail scarred hands.  The event happened twice while the room was shut and
likely locked.
Luke 24:42

And they gave him a piece of a broiled fish, and of an honeycomb.

Hebrews 2:5-9

5 For unto the angels hath he not put in subjection the world to come, whereof we speak.
  6 But one in a certain place testified, saying, What is man, that thou art mindful of him? or the son of man that thou visitest him?
  7 Thou madest him a little lower than the angels; thou crownedst him with glory and honour, and didst set him over the works of thy hands:
  8 Thou hast put all things in subjection under his feet. For in that he put all in subjection under him, he left nothing that is not put under him. But now we see not yet all things put under him.
  9 But we see Jesus, who was made a little lower than the angels for the suffering of death, crowned with glory and honour; that he by the grace of God should taste death for every man.

lastly
Luke 24:13-35
Which speaks of Jesus' encounter with two of His disciples on the road to Emmaus.
The fail to recognize Him, and also fail to recognize His voice.  It's only later on that they recognize one of His mannerisms. His unique way of blessing the bread, reminded them of who they knew Him to be.  Then He left at will, disappearing.
To me this speaks to how He was fundamentally changed.
Once again, when we see Him, we shall be like Him.


DCFL substitution closure

Question: Deterministic context-free languages are not in general closed under substitution. I have been looking at the DK-test (it is described in the 3rd edition of Sipser's Intro. to Theory of Computation, 2012) which can be used to check if a given CFG is deterministic, and it seems to me this can be used to show that DCFLs are closed under substitution when the substituted languages are disjoint DCFLs. Is this a known result? Or is anything known about the substitution closure of DCFLs with other restrictions on the substituted languages?
Answer: Since $ab$ is a DCFL, your result would imply that DCFLs are closed under concatenation, which they aren't. So your result can't hold.
Comment: Thanks. Still, it would only imply closure given the concatenated languages are disjoint, right? (I do see that it still would not hold). Do you have any idea about substitution with end-marked DCFLs, or end-marked & disjoint DCFLs?
Comment: I'd guess that end-marked & disjoint alphabet should work. Disjoint languages with the same alphabet could get tricky, if the PDA can't decide early enough, which criteria it should test (cp. non-closure under union).
Comment: Doesn't having disjoint alphabets have the same effect as end-markers?
Comment: @sjmc Only if the word before substitution contains no substring $aa$ for any $a\in \Sigma$.

DCFL substitution closure