How to get crisp lettuce in a green house

Question: I am raising lettuce in my green house. It works, the lettuce is tasty, however it is not nearly as crisp as the lettuce I grow outside the greenhouse (same variety). What can I do to make my green house lettuce more crisp?
Comment: When you say 'salad' do you mean lettuce? And are you growing the same variety of lettuce in the greenhouse as you grew outdoors?
Comment: Yes. Yes. I have updated the question accordingly.
Answer: Turn off the heat, open all the vents - add more vents if that's not enough, or just grow the lettuce outside, if you like outside grown lettuce better, or want other crops/plants that are not as hardy as lettuce to stay happy in the greenhouse.
Comment: Ok, looking forward for more info :)
Answer: @Ecnerwal answer is correct, the book "The Winter Harvest" by Eliot Coleman [speaking of some vegetables including Lettuce] states "No only do many of them tolerate cold conditions and even temperatures well below freezing (as long as they are spared the desiccating effects of cold winter winds) they actually thrive and are sweeter, tenderer and more flavourful.
I believe he also explains that in response to cold temperatures many vegetables produce more sugars as a type of anti-freeze to help the plants cope, which makes them taste better.


Query to find top prolific questioners by tag

Question: I would like to get the list of questioners who asked the most questions per tag. Can you please advise me how to write such a query? I do not care about the reputation of questioners, I care about the quantity of questions they ask.
Comment: Do you know that going through the "top users" of every tag also shows that? See for [tag:discussion] -> https://meta.stackexchange.com/tags/discussion/topusers (it shows answerers first and then askers)
Comment: I do not know how to use your comment. I know that I can check how many questions single individual has asked. But I want a list of those who have asked the highest number of questions regardless their reputation. Top users may concern top rank, or am I mistaken?
Comment: Well, my link may serve you... partially, since the 'top users' of a tag shows the list of users taking into account the score of their posts on that specific tag. So it does list based on the amount of questions or answers, but on the score they got posting.
Answer: Here is a SEDE query: Users with most questions in a given tag.
SELECT TOP(##num?100##)
  q.OwnerUserId AS [User Link], q.OwnerDisplayName,
  COUNT (q.Id) AS [Question Count],
  SUM (q.Score) AS [Total Score]
FROM Posts q INNER JOIN PostTags pt ON q.Id=pt.PostId
INNER JOIN Tags t ON t.id = pt.TagId
WHERE t.TagName=##tagName:string?data-explorer##
GROUP BY q.OwnerUserId, q.OwnerDisplayName
ORDER BY COUNT (q.Id) DESC

EDIT: I have changed the query following rene's suggestion in the SEDE chatroom. He pointed out that I made an unnecessary join with Users table in the query. And also that using the PostTags table is better then my original version, where I checked Tags LIKE '%<##tagName##>. (Some further minor points: Addition of OwnerDisplayName ensures that the users who have deleted their accounts aren't added all together as one user. I have also omitted PostTypeId=1 which is now unnecessary - only questions have tags.)
You can also restrict the same query to the questions which are not community wiki. (See also: How to select community wiki questions?)
As already mentioned in the comments, even without using SEDE the top askers and answerers in a given tag (ordered by total score) are listed on the site. For each tag you have link to "Top Users", here is such link for the (data-explorer) tag.
It's slightly more complicated to get number (or score) for answerers, since you need look at the answer for the owner and at the question for the tag. Here are the queries for all answers and non-CW answers.
Comment: A couple of more answers to beat Tim Stone. Getting that score might be the hardest part.
Comment: Absolutely awesome. Thank you:-)


Sibelius 7 overlapping notes hiding each other

Question: Using Sibelius 7 how do I resolve overlapping notes so both parts can be read. For example in a two stave score for SATB, sopranos have a dotted minim and one crotchet in a bar, altos have four crotchets but the first note for soprano and alto in the bar is the same note so the first alto crotchet note in part 2 totally hides the soprano dotted minim in part 1. I cannot find a way of moving one of the notes slightly so both can be seen.
Comment: In Finale, I do this by moving one of the notes down one step then back up. It makes the program reset the measure.  I think [this](http://music.stackexchange.com/questions/11343/how-to-enter-overlapping-notes-in-sibelius-7) might be the answer though:
Answer: I take it you mean something similar to the first beat in the bass in the second measure of this example. This is in Sibelius 4, but I don't think Sib 7 works much differently: the tenor is in Voice 1 and the bass is in voice 2, and this is the default spacing, i.e., automatically without collision.
If you are using voices 1 and 2 already, you might want to look at things like whether the layout is locked, and whether extra space is being allowed for colliding notes in the note spacing rules - I know that these settings have carried over into recent versions.
Failing that, check the X coordinates of the notes in Inspector. The spacing in my example is automatic, so the notes show 0 displacement in the X coordinate. If the spacing in yours with the collision is 0 as well (which would be strange), then your final resort would be to move the dotted minim right (an X value of 2.25 usually works for me). My own experience, however, is that when the notes collide like that, either you are using the wrong voices (say, 1 and 4 rather than 1 and 2) or there is a non-zero value in the X coordinate of one of the notes (usually left over from earlier edits).


How can I stop anyone from changing a due date on Trello

Question: I would like to know how to stop other team members from changing a due date after I open a card on a board.
Answer: You cannot lock down individual cards on a Trello board: if a team member has editing permissions on your board, they can also edit due dates of cards.
What you can do is restrict a team member's rights to the board in general: if you make them an "Observer" they will by default only have read-access to the board, preventing them from changing due dates. You can then permit Observers to also add comments. This answer has more detail.
A related question that may be helpful is View previous due date after change in Trello.


Disconnecting external display without unplugging - turning off monitor doesn't work

Question: I run two external displays off my macbook pro 16" but when I'm not working, I much prefer disconnecting from them and using my MBP as my sole screen. Constantly disconnecting them from the ports is a pain in the butt (since i have one plugged into each side of the computer) and I fear it will wear on the jacks. I figured turning off the display's power would do the trick...but it does not. The displays go black (obviously) but the macbook still thinks its connected to them and I can still mouse off screen etc. What's the hack here?
Comment: Please stop suggesting outlets with on/off switches, they don't work. Mac is registering that something is plugged in the thunderbolt port and then no matter what you do, the monitor will still be there. Even if you unplug the VGA connection from the display (while leaving thunderbolt side plugged in) Mac will think that there IS a second display.
Answer: One option is to use SwtichResX

SwitchResX is the most advanced tool for Apple computers to take
  control of any screen connected to the Mac. No matter whether a
  MacBook Screen, an external monitor, a Retina display, a TV set or a
  beamer: SwitchResX can handle them all – if you want, straight from
  the menubar, a contextual menu or both. It's that easy!

It works as you need.
Comment: It's also a matter of no longer using the GPU, more importantly
Comment: I don't really care so much if the monitors are off or black, but I care that they are disconnected, i.e. my macbook screen goes back to being the only screen, with the resolution and sizing I have set for that and my mouse stops at the edges of its screen etc.
Comment: I had a friend who used this a while ago and said it was super finicky with more than one display. Do you have any experience with it and it is smooth?
Comment: To be honest, what I saw is that it doesn't turn off but it puts the monitor in black. but it works as we want. Give a try. In addition, a guy made a code and shared in Github, it was working few years ago, but I haven't smoked a test on it. You can go through it too https://github.com/Eun/DisableMonitor/releases
Answer: Yeah, this is annoying. I use my external monitor for meetings, but otherwise prefer just the macbook screen. The mouse goes off the screen, and notifications go to the turned-off monitor.
The best I've come up with is making it easy to unplug the monitor with this outlet switch: https://www.amazon.com/gp/product/B07QKPBZX1/. It works because the outlet is right by my chair.
With this setup (laptop via usb-c to docking station; docking station to monitor via hdmi) I can keep everything connected  and just click one switch for monitor on/off.
Answer: With actual fork to Disable Monitor https://github.com/epalzeolithe/DisableMonitor-3.0


I'm trying to create a custom version of the wp_list_authors function that includes custom post types

Question: I'm trying to create a custom version of the wp_list_authors function that includes custom post types. I have 3 authors on the site I'm working on (www.healthyeatingadventure.org). Two of them only post regular blog posts and the third only posts recipes which is a cutom post type I created because I wanted it to have a unique layout.
I'm working on a custom plugin that will list the authors in a sidebar widget and will link their names to their posts (whether the post type is post, event or recipe). I want to clone the wp_list_authors function in wp-includes/author-template.php to create a custom function called hea_list_authors that serves the same purpose but will include the other 2 post types I mentioned. Then I'll call that function in my plugin and the world will be a wonderful place :).
However, while I'm getting better at MySQL and PHP, I'm still sort of a novice and am having trouble figuring out how to make this work. The source code for the wp_list_authors function is found at the link below. I'd greatly appreciate any help someone could offer with this.
https://developer.wordpress.org/reference/functions/wp_list_authors/#source-code
Answer: Ok, so I found the solution to this problem and I thought I'd post it here for anyone else who may stumble upon this question.
Turns out I was making this much more difficult than it needed to be. I just added a simple function to the custom site plugin I created (this could also be added to your functions.php file).
<code>function hea_cpt_author( $query )
{
    if ( $query->is_author ) {
        $query->set( 'post_type', array( 'post', 'events', 'recipe' ) );
        remove_action( 'pre_get_posts', 'custom_post_author_archive' );
    }
}
add_action( 'pre_get_posts', 'hea_cpt_author' );
</code>
The hea_cpt_author portion can be whatever you want to name your function.


the power of a lens and radius of curvature relation

Question: Optical power of the lens depends on the radius of curvature R 1 and R 2 of its spherical surface and the refractive index n of the material from which the lens is made by expressed by the formula  $(\frac{1}{r1} + \frac{1}{r2} ) (n-1) $
the question is what's the difference between the two radii, aren't they one?
Comment: Draw an exaggerated picture where one side is flat and the other is curved.
Comment: elaborate please
Comment: +sarah both the sides don't have to be symmetrical. They can have different "bulginess" or radii of curvature. One side will protrude more and other side will protrude less. This would create two radii of curvature.
Answer: According to the lens maker's formula,
$\frac{1}{f}=(\frac{n_2}{n_1}-1)(\frac{1}{R_1}-\frac{1}{R_2})$,
Here, $n_2$ is the refractive index of the lens and $n_1$ is the refractive index of the medium from which the light is incident on the lens. The medium surrounding the lens must be the same for this formula to work.
$R_1$ and $R_2$ are the radius of curvature of the curved surfaces of the lens
 from which the light enter the lens and  emerges out of the lens respectively.
Sign Conventions play an important role here.

For a convex lens, $R_1$ is +ve (if light is incident from the left) and $R_2$ is -ve. In the above image, as you can see, the radius of the curvature of the convex lens' left curved surface $(R_1)$ lies in the direction of the incident ray, so it is +ve and the radius of curvature of the other surface $(R_2)$ points the direction opposite to the direction of incident ray, so its -ve.
So after applying the sign conventions for a convex lens, as explained above, we get the following formula,
$\frac{1}{f}=(\frac{n_2}{n_1}-1)(\frac{1}{R_1}+\frac{1}{R_2})$
Answer: I think you are confusing the radius of a circular lens with the radius of curvature of each face.
The radius of a circular lens is the same when measured from front and back, looking at the lens face on. The radius of curvature measures the bulge of the spherical faces as you look at the lens side on. The front and back surfaces of the lens can have a different radius of curvature.
See Radius of curvature of a lens.
Answer: This is just a rehash of Sammy Gerbil's answer with some illustrating graphics, since I have them on hand. Witness the three "radius" dimensions that define an object such as you are considering. $r_1,\, r_2$ are the two radius dimensions marked on the left hand projection.


Fill internal holes and merge faces

Question: I have a number of planar objects with internal holes in them that I need to fill and clean up. This is rather easy to do manually. In edit mode I select the internal vertices and merge them at center, disolve internal vertices and finally uses f to clean up the surfaces. Also shift+f and alt+f helps a lot. I would now need a button in oject mode that does this for me to save time and wonder if you have any suggestion how to identify the internal vertices or some other method?
Answer: i don't know whether it works "always" but you might give geometry nodes a try:
i could delete my "simple" holes with this setup:

hint: for gn pros here: it might be much better to use attribute statistic node for every mesh island and delete the mesh with island island with the most points (which should hopefully be the "outer mesh") which isn't safe always but more safe than my way ;)...and i have no idea how to realize that without loops.
Comment: Thanks, I have no experiannce using sverchok in a plugin. Would it be possible to connect this to a button and hide it from users?
Comment: I don't understand your comment? What has Sverchok to do with this?
Comment: Sorry, still new at Blender and I have only used python scripting to code. I thought sverchok and geometry nodes was the same thing. I guess the question sould be, can I call these geometry nodes from a button and hide it from the users?
Comment: Ähm….sorry, I don't know. But should be possible, yes. But I don't know how to do it.

Fill internal holes and merge faces


Placement of OV/UV OC protection circuits

Question:
Should the over voltage protection circuit placed after the TVS diode? What is the general way of placing the protection blocks? Am I missing anything apart from these protection blocks?
Answer: No like this, the fastest device should be nearer to the input. In general the OV/OC protection is slower than the TVS so an overvoltage peak at the input will trigger the TVS first and maybe blow the fuse, protecting the (more expensive !) OV/OC circuit.
Comment: According to this[Application Note](http://www.vishay.com/docs/88440/failurem.pdf) FUSE should come before the TVS.
Althoughh I agree with you about protecting the " more expensive" part, I want to ensure  the safety of the entire circuit
Comment: OK, I was not suggesting to move the fuse anywhere else ! The fuse must where it is in your schematic. The fuse protects against overcurrent which will flow when the TVS triggers. I actually see the TVS and the fuse as ONE protection. Only a TVS by itself is not enough.
Comment: Sorry about that @FakeMoustache . I misinterpreted it
Comment: No worries :-) As long as it is clear to you now.


How many users on Mi Yodeya are actually Jewish? Orthodox?

Question: As I've been using the website I've come across many users who either from their pictures or from context don't seem Jewish. Just curious how any users are actually Jewish? Orthodox? And if not, then how and why did you get on this website? I'm sure their are many interesting stories... do share!
Comment: The question, as asked in the title, cannot be answered since membership is anonymous and no statistics like these are collected. If you want stories, you should reflect this better in the tile of your question
Answer: I am Jewish. I disagree with the common presumption that subcategorization by "movement" is an essential aspect of Jewish identity and prefer not to define myself by affiliation with any such movement, but rather with the same verse cited by Rabbi Kaii. That said, given my institutional associations and pattern of attempted observance, those who insist on such categorization would naturally mark me as "Orthodox." I initially encountered this community by founding it.
I take exception to the implication that I perceive in the use of the word "actually" in the question, that Mi Yodeya is an Orthodox Jewish community. Mi Yodeya, per our official tagline, is "for those who base their lives on Jewish law and tradition and anyone interested in learning more." As such, the core community of experts we're targeting would mostly consist of what I'd call "observant Jews." ("Mostly" because the definition would squarely fit observant Noahides as well.) While there is a high correlation between this category and what people call "Orthodox," Mi Yodeya is not an Orthodox community by affiliation or by definition.
Comment: Indeed, qualifying the term Jew is silly, what is better or needs improving on the title Jew. There were no Orthodox, Conservative, Reform or Secular Jews at Sinai, I'll bet
Answer:
עִבְרִי אָנֹכִי וְאֶת יְהֹוָה אֱלֹהֵי הַשָּׁמַיִם אֲנִי יָרֵא (יונה א׃ט)

I'm a Jew and I'm proud, and I sing it out loud because (forever and ever) Hashem is watching over me!
Answer: I'm a conservative Jew with a slightly orthodox leaning, and happened upon here when looking around for a halakha question completely by accident. I liked it and since found myself with the odd question or two.


What is the best way to clean your dvd-burner?

Question: What is the best way to clean your dvd-burner?
Answer: Ed Bott found that these CD lens cleaners actually work shockingly well:
http://www.edbott.com/weblog/?p=2703

I probably turned 30 disks into coasters while investigating this problem, trying every troubleshooting trick I know to find the source of the problem. Converting the source files to WAV format and caching them locally didn't help. The problem wasn't software, either, as I found by repeating the issue with multiple burning programs, including Media Monkey and Easy Media Creator 10.
In several forum posts, I had read recommendations for special disks designed to clean the laser on a CD/DVD player/burner [..] When I received the product and removed it from its packaging, I have to confess I was skeptical. It looks like a regular music CD with instructions on the label side and a half dozen small brushes arranged in a track on the bottom (shiny side) near the center of the disk. In Windows Media Player, it plays like a music CD, with 14 tracks that include audio instructions delivered in a friendly female voice, along with some test tones to help you determine whether your speakers are wired correctly.
After completing the entire suite of tests in 10 minutes or so, I popped in a blank CD, fired up Media Monkey, and told the software to burn a collection of FLAC files from a network location to CD, converting them to WAV files in a local cache on the fly. Surprise! The first disk burned just fine. As did a second, a third, and a fourth.

Amazon links for Memorex lens cleaner, Allsop lens cleaner
Answer: Probably some sort of lens cleaner.
http://www.amazon.com/Allsop-23321-Carbon-Edge-CD-Drive-Cleaner/dp/B00000J1QM
Answer: I've heard one of the best things to do is get some compressed air cans and use short bursts of air to try and clean it out a bit...
From what I've heard, don't poor liquids directly into the drive.  It tends to break things...
Answer: In the early days of CD players, 20+ years ago, I used a bit of Chamois leather and some Isopropyl alcohol to clean both CD's and laser lenses, remember not to follow the data path when cleaning discs (don't clean in a spiral, go from the center to the outer edge or the reverse). This method applies to the latest 4K Ultra HD Blu Ray Discs too. If you are cleaning the lense on your disc player - be gentle they are fragile....


ORACLE ASM present one or more LUNs?

Question: I have the following question regarding the allocation of disks or LUNs to ASM in Oracle, specifically, I have an Oracle 18c DB in Cluster and I have created several diskgroups, now, I need to increase the size of the data diskgroup to which I only present a LUN of say 300 GB, it turns out that I have realized that it is not enough because the data volume will increase considerably, and I need at least 2 tb at the moment, I would like to know that it is recommended in these cases, to present a LUN of 2 TB, several of 300 GB ...???
My storage is completely integrated by NVMe SSD disks.
Thank you very much
Comment: Just grow the size of your existing LUN. No need to allocate an entirely new one.
Comment: What version of ASM are you using, and how are the LUNs presented to the OS (i.e. asmlib, udev, etc.)?
Comment: ASM version is 18.3 and LUNs presented using udev rules.
Answer: First, have your storage administrator increase the size of your LUN dynamically to the desired size up to 2TB, which is as much as ASM will recognize in a single disk.
When this is completed, you will need to get your OS to recognize the change. If you are using udev rules to present your LUNs, then use the udevadm command to update the device metadata:
udevadm trigger --action=change --verbose [device path]

If desired you can tailor the udevadm command to focus specifically on your LUN device using the device path or the --subsystem-match options. Use the --dry-run option along with --verbose to confirm which devices will be checked for changes before running it for real on a production system.
Once the changes are recognized by the operating system, you must propagate them them in ASM. Login to your ASM instance with SYSASM privileges and execute the following command:
ALTER DISKGROUP [DG NAME] RESIZE;

This will resize your diskgroup to consume the entire LUN in its new capacity.
I have performed these commands on live, running production systems without issue many, many times. It is much more efficient when using an external SAN for storage to resize LUNs this way than to worry about adding separate disks. Avoid that until you hit the 2TB limit, and then make every LUN in the group the same size (2TB).

ORACLE ASM present one or more LUNs?


What is effect of full settlement on credit report

Question: Suppose one has delinquency on credit cards that show R9 on the credit report. If he settles the credit card company with full payment, the credit report will show the status of settlement of full payment along with R9 (for about 6 years). How does this affect his credit report? In other words, can the status of the settlement of full payment improve his credit score? Can he get loans with this status?
Answer: Not having a delinquent debt will improve your credit score somewhat, or at least stop dragging it down. But it may take a while proving that you don't intend to let that happen again before your credit rating improves enough for people to be happy lending to you.
Comment: I believe that no lending is possible unless R9 (or R7) is removed from the credit report, is it right?
Comment: Depends on details.
Answer: The best way is when settling with the credit card company, make them sign an agreement that neither of you will disparage the other, and that includes statements on a credit report.  Then you have a contractual commitment from them that marks will be removed.  Then they will stop reporting the R9 and it should fall off and you should have a clean report.
This agreement needs to be signed before you settle; after you settle they have no reason to agree to it.
Comment: @user103 7 years is my understanding. If someone were to settle for less than full amount, they could offer to settle for *full* amount in exchange for the removal of mark.  The rationale for doing so is to eliminate income, since settling for full amount causes you to have taxable income for the forgiven amount.  The creditor may say "sure, for a couple grand, easy money, I'll remove the mark". Get it contractually in writing.
Comment: @user103 If you have been told that, you are being scammed, or you are not in the United States.  The "credit repair/counseling" business is a vat of sharks, because they know you don't have the resources to sue them.


Deleting all executables in a directory in Linux

Question: Before I recursively tar a directory i want to be able to delete all of the executables. In windows I would have simply deleted all of the files with .exe extensions. And I cannot simply delete all files with the executable mode since that would delete shell scripts as well. So is there any way to delete only non-shell script script files in a directory automatically?
Comment: It might help us answer if you provided more context describing why you need to do this.
Comment: Why don't you want to delete shell scripts? What about perl / python scripts? Do you only want to delete 'compiled' files? What about .pyc files (compiled python files)?

In short this sounds like a very difficuly spec and I can't see why you'd want to do this.
Comment: You haven't specified what you want to happen if a file with executable mode is neither a shell script nor in an executable format. The simplest solution would certainly be to delete those incorrectly formatted files as well. But it might not be desirable if forgetting the `#!` line of a shell script would cause it to be deleted.
Answer: I assume you mean binaries?  If the number of executables is very large, this command may fail due to the command line for "file" and "echo" being too long.  A quick example:
find /bin -type f | xargs file | grep "ELF.*executable" | awk -F: '{print $1}' | xargs echo
If you replace "echo" with "rm" in the above example, those files will be deleted.  The "grep" command should prevent libraries from being deleted (you can test on /lib).
(Note, I only have access to FreeBSD right now, so the output of linux's "file" command may differ, thus changing what you need to do.)
This should give you an easy template for how to do it.  You'll just need to be sure to know what to look for in the output given by "file" and grep accordingly.
Be careful.  You could totally bork your system if you run this as root on the wrong directory.
Comment: If the total length of the filenames is over the limit, `xargs` will do multiple commands as necessary; that's actually it's reason for existing in the first place.
Answer: find . -perm /111 -type f -exec echo rm -v {} \;

The magic here is that the -perm flag (for permissions) can take a / preceding the permission argument, which causes it to search for a logical OR on each of the bits. From the man page:
   -perm /mode
          Any  of the permission bits mode are set for the file.  Symbolic
          modes are accepted in this form.  You must specify 'u',  'g'  or
          'o'  if  you  use a symbolic mode.  See the EXAMPLES section for
          some illustrative examples.  If no permission bits in  mode  are
          set,  this  test  currently  matches no files.  However, it will
          soon be changed to match any file (the idea is to be  more  con-
          sistent with the behaviour of perm -000).

In case that wasn't clear, / specifies 111 specifies x in the user OR x in the group OR x in the others. And those are not XOR, so we're looking for at least one but up to 3.
Since the unix file permissions are
rwxrwxrwx
421421421

And we care about the x bits, we get a mask of
--1--1--1

or 111
It should be noted that in the command listed above, there's an echo to prevent you from shooting yourself in the foot. Feel free to take of the safety once you'd nailed the files correctly.
EDIT
OK, this blows away all shell scripts, too. There is no nice, neat way to do it with find that I've found, due to the relatively primitive regular expression matching. I can find all of the .sh files you want using regular expressions:
   -regex ".*\(.*sh\$\)"

But I can't invert that at all. So I give up. I'm still leaving this up here, in case it's useful to someone.
Write a shell script, or use someone else's suggestion, or if you really want to, just temporarily remove executable permissions to the shell scripts, remove all the executable files, then add the +x back. Good luck.
Comment: The OP stated he didn't wish to nuke shell scripts, which your command would do.
Comment: argh. ok, one sec
Comment: by one sec, I mean holy christ there's no way in hell using find. In order to negate a regular expression, you need to use a tool that has negative lookahead assertion, which gnu find doesn't do.
Comment: You can negate any test in `find` by preceding it with `!` as a separate arg; in most shells usually `!` invokes history expansion so to pass it to `find` you need to backslash or single-quote. `find` matches are always complete and don't need anchors, and here you don't need regex glob is fine: `'!' -name '*.sh'` But shell scripts aren't always named `something.sh`.
Answer: file * | grep executable | grep -v 'shell script' | cut -d: -f 1 | xargs rm

Or perhaps:
make clean

;-)
Answer:
Before I recursively tar a directory i
  want to be able to delete all of the
  executables.

IMHO the short answer is that there is no 100% foolproof way to do this.  Depending on permissions alone may miss or include things you don't want. Depending on filenames won't work.  Even depending on the output of the file command probably isn't a good idea, I have seen it miss-identify things on several occasions.
Answer: You need find to iterate over the files in a tree, the file command-line utility to determine their file type, followed by perl to filter the executables:
find . -type f -print0 | xargs -0 file -N0 -- \
| perl -nlwe '/(.*\0).*ELF.*executable/ and printf $1' | xargs -0 ls -l --

You really want to delete the files replace the final ls -l -- with rm --.
Note: all the -print0 and -0 switches are needed to make sure that spaces in the filenames are handled correctly. This is also the reason why perl is used instead of awk, which cannot really swallow null characters in the input. The -- switches are meant to protect against filenames starting a dash.
Answer: You probably have to write a shell script to do this. Off the top of my head, run file first, get the executables and exclude all the scripts. Then you can operate on the remainder which should be what you are looking for.
Answer: Using bits from Matt's answer I came up with this:
find . -perm /111 -type f -print0 | xargs -0 file | grep -v 'shell script' | cut -d: -f1 | xargs echo rm

Answer: I created a bash script to do just this. If you study all the lines in it I'm sure you can figure out how to do everything from the command line and modify it to delete any type of file, i.e. use "find -iname" or whatever.
#!/bin/bash
#this script will grab all executable files in the
#bash shell scripts ending in .sh will be saved
#current directory and delete them
#it will also destroy itself so keep a copy somewhere

echo "WARNING! This script will self-destruct and take all"
echo "executable files in the current directory when executed"
echo ""
#first create a new file to set up executable files
touch xdelgo.txt

#save all the bash shell scripts ending in .sh
#this will only work and in the pwd and not child directories
touch protected.sh
echo "#!/bin/bash" >> protected.sh
find . -type f | grep .sh | grep -v xdel.sh >> protect.txt
SAVE=$'\n';x=sudo;for l in $(<protect.txt);do echo -e "$x chmod u-x $l";
((x+1));done >> protected.sh

sudo chmod u+x protected.sh
./protected.sh

#throw all executable files from the current directory inside
find -type f -executable >> xdelgo.txt
echo "The following files have been marked for deletion"
echo " "
cat xdelgo.txt
echo " "

#create a new script that will execute deletion
touch xdelgo.sh
echo "#!/bin/bash" >> xdelgo.sh
echo "rm xdelgo.sh" >> xdelgo.sh
echo "rm xdelgo.txt" >> xdelgo.sh
echo "rm protect.txt" >> xdelgo.sh

#append rm to each line and throw into new executable file
DEL=$'\n';x=rm;for l in $(<xdelgo.txt);do echo -e "$x\t$l";((x+1));done
>> xdelgo.sh

#go give permission to the file
sudo chmod u+x xdelgo.sh

echo "bash scripts ending in .sh have been protected"
echo "run ./restore.sh to re-enable .sh files"
echo ""
touch restore.sh
echo "#!/bin/bash" >> restore.sh
find . | grep .sh | grep -v xdel.sh >> restore.txt
SAVE=$'\n';x=sudo;for l in $(<restore.txt);do echo -e "$x chmod u+x $l";
((x+1));done >> restore.sh

sudo chmod u+x restore.sh
echo "rm restore.txt" >> restore.sh
echo "rm restore.sh" >> restore.sh
echo "rm protected.sh" >> restore.sh

#THE POINT OF NO RETURN
echo "Are you sure you really wanna delete these files?"
echo "Press ENTER to continue, ctrl+c to abort"
read input
./xdelgo.sh

Comment: The question explicitly asks for a solution which does not delete shell scripts. Additionally you script will have major issues with special characters in filenames. And the temporary files are not really needed.


Proper way to scale an SDL Surface without clipping?

Question: what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way of doing this natively through SDL rather than redrawing the image like that. I haven't been able to find anything in the SDL documentation that covers this. I am able to resize surfaces without any problem by modifying the surfaces width and height, but the resulting surface is clipped.
Answer: I know this answer is way too late to assist the person who asked it, but I decided to write this to help anyone who stumbles upon this question. In SDL 2.0 You can use the SDL_BlitScaled() function to scale a surface into a targeted SDL_Rect. There's a tutorial by LazyFoo which describes this, or check out this documentation.
Answer: SDL doesn't support scaled blitting. According to the documentation of SDL_BlitSurface:

Note: the SDL blitter does not (yet)
  have the capability of scaling the
  blitted surfaces up or down like it is
  the case with other more sophisticated
  blitting mechanisms. You have to
  figure something out for yourself if
  you want to scale images (e.g. use
  SDL_gfx).

You could find SDL_gfx here. Writing your own blitting function isn't that bad, it might be a fun and useful learning experiment (though you'd be reinventing the wheel). Using OpenGL is also an option, as stuff like scaling and rotating could be done in a single function call.
Answer: For completeness, and because the question does not specify SDL version, scaling is possible in SDL2 using the API method SDL_RenderCopyEx. No additional libs besides the basic SDL2 lib are needed.
int SDL_RenderCopyEx(SDL_Renderer*          renderer,
                     SDL_Texture*           texture,
                     const SDL_Rect*        srcrect,
                     const SDL_Rect*        dstrect,
                     const double           angle,
                     const SDL_Point*       center,
                     const SDL_RendererFlip flip)

By setting the size of dstrect one can scale the texture to an integer number of pixels. It is also possible to rotate and flip the texture at the same time.
Technically this is not scaling a surface but rather scaling a texture. The procedure should be as relevant though as surfaces are almost always converted to textures before the rendering happens in SDL2 based applications.
Reference: https://wiki.libsdl.org/SDL_RenderCopyEx
Create your textures as usual:
surface = IMG_Load(filePath);
texture = SDL_CreateTextureFromSurface(renderer, surface);

And when it's time to render it, call SDL_RenderCopyEx instead of SDL_RenderCopy


Help with Minecraft plugin replacing default tp

Question: As the title states, I am having trouble with entity teleporting in Minecraft. I know that I am doing it correct as it works in singleplayer, so I figured it would be a plugin that is stopping me from teleporting entities. The command I am using is /tp @e[name=o] ~ ~300 ~, and the plugins on my server are:

AsyncWorldEditInjector, WorldEdit, Installer, VoxelSniper, Skript,
  CustomServerMessages, Buycraft, ColoredSigns, Vault, Multiverse-Core,
  PermissionsEx, EmptyWorldGenerator, WorldGuard, Tablist, CoreProtect,
  ItemRenamer, BuycraftAnnouncer, NoLeafDecay, WildSkript, ProtocolLib,
  HolographicDisplays, mcMMO, VoidWorld, Essentials, ArmorStandEditor,
  AsyncWorldEdit, EssentialsProtect, AuctionHouse, EssentialsSpawn,
  EssentialsGeoIP, WirelessRedstone, EssentialsAntiBuild,
  FakePlayersOnline, TitleManager, CraftBook, EssentialsChat

If you know how to fix this or what plugins to remove/disable please inform me. Thanks.
Comment: Does your teleport command work in vanilla?
Answer: I see you are using Essentials. I had the same problem on my server, just do:
/minecraft:tp @e[name=o] ~ ~300 ~
Answer: Use /setworldspawn for the world's spawn point


How do I prevent my Minecraft Xbox One Edition updating to the new Bedrock Edition?

Question: I have recently purchased a disk copy of the original Minecraft Xbox One Edition (because in my opinion it's better than today's Minecraft) and I haven't put it in my Xbox yet because I am too afraid that it will update to the latest version. (If it helps, I already own a digital copy of Minecraft Bedrock that came with my Xbox).
Comment: @TheLethalCarrot I believe you should be able to cancel the update, I don't know because I have PlayStation 3 and not Xbox 1.
Answer: It should prompt you to download the update first. You can then choose the option to not install the update. If you click download, however, there should be an option to cancel the update, like pressing B. I do not recommend that though, as it might corrupt some data. I learned that the hard way.
I don't own an Xbox One so this might not be how it works, but this is how it worked in Xbox 360, so this is (hopefully) accurate.
Answer: For PS4 Edition, once they become Bedrock Edition, you can click "Editions" to play the PS4 Edition. That is the easiest way to access your PS4 Edition exclusive stuff (i.e. Battle, Tumble, and Glide Mini Games) whilst having updated to Bedrock Edition.
Xbox One Edition and Minecraft Bedrock (on the Xbox One) are separate games. However, you cannot find Xbox One edition on the Microsoft store.


GTA V Vehicle Storage

Question: How many vehicles can I store in Trevor's hangar? I know you can store 2 vehicles in each of the main character's safe houses, but for example if I stored 1 aircraft and a truck in trevor's hangar, will one of them disappear?
Answer: I found this on a GameFAQs thread.
The original post is a bit long winded, so here is a summary:
Land Vehicles
They're simply stored in your garages as you expect, regardless of whether you stole them or bought them.  If you take one out and crashes it, you'll have to get another.
Other Vehicles  (helipads, hangars, and boat docks)
You can store stolen vehicles as per land vehicle.  However, purchased vehicles can be spawned infinitely, but they immediately replace the existing vehicle inside the storage compartment.
e.g.)  If you stored a stolen jet in a hanger, but decide to summon one of your purchased planes, your jet gets replaced instantly.

GTA V Vehicle Storage


PDF Document tracking & logging information

Question: Once a PDF document has been sent through email, control is lost to the owner. Anyone could be viewing the data and the owner lost awareness about it. That's why as an owner of the document, I want to track the activities performed with the PDF document. I want to know about the movements of the document and whether the PDF is spread beyond the intended personnel. Also, want to track logging information like IP addresses of the devices. In my office sometimes we deal with confidential and sensitive documents. Please let me enlight how to handle these issues. Thanks in advance.
Answer: A PDF document is merely a file, it's not a program which call back the author or the sender of the E-Mail. You have the option to limit the use of the document, concerning modification, printing, etc.
Answer: You can't, not with a PDF document. It is a simple as that. That is, by the way, for almost all information. It was even so in the old paper-days: if someone shared the confidential memo with someone else, the author/writer/....  would not have known.
Once someone with access to a photocopier had the document, you would have lost awareness about who views the document. And whether the copying is done by a scriptorium full of monks or by cp yourfile.pdf myfile.pdf, the underlying principle is the same: once the genie is out of the bottle, it is free.
Almost all security people (outside film/music industry) understand this. Therefore they wish to control who has access to the data. You will limit the access to people that you trust. And you will divulge data on a need-to-know basis.
There are a few companies that will sell you DRM for PDF documents. Digify, Locklizard to name a pair. But DRM is always bothersome and there is always the 'analogue' loophole (a camera or screenshot for example).
And it is a PITA. Digify, on their website, describe it as follows:

Why is DRM not more widespread?
While DRM sounds great for protecting your documents, the ease of use and cost are typically two factors that hinder the adoption of the technology.
Many DRM solutions are difficult for both the sender and the recipient. The recipient will need to go through many steps to get to the document, including installing special software or validating their identity.

You can also watermark the individual documents. At least when you find a copy in a place where it doesn't belong, you know who spread it and you can administer appropriate castigations.
Answer: What you can do is control the access. The best Acrobat can provide is signing the document against a certificate received from the receipient. In this case, only that particular person can open the document.
With the other restrictions you can apply, you can find out who leaked (if you get your hands on the leaked document)


"Selling via the Internet" - is it correct?

Question: The question is this - is it correct to say something like "I'm planning to sell my books via the Internet". I mean I know it is better to use other preposition but I'd still like to know - is it correct to use precisely this word? The basic meaning is that Internet will be used as the main channel - the tool - for doing something.
Comment: Yes, you are correct, we (east coast American English speakers) usually just say, "I'm planning to sell my books online," but you are also correct in saying "via the Internet" is not ungrammatical.
Comment: Thank you, sir! This is a popular question here since it comes from the differencies in the way we think and build our sentences. Just wanted to make sure one more time)
Answer: A search of the Corpus of Global Web-Based English suggests that the most common preposition  in sell [noun] [prep] the Internet is on, as in sell my books on the Internet, though over the Internet and via the Internet are also common.
Both on and via have senses for by means of; the Internet is the tool or method you are using to sell. On the other hand, sell my books through the Internet and sell my books by the Internet are much less popular, even though through and by can also share this meaning.
Comment: There's a difference between using the internet to do the entire selling process (attract customers, agree sale, take payments), and using it for part of the selling process (e.g. attract customers but complete transaction in person; or convert real-world customers to complete the transaction online). I suspect different prepositions would work in different cases. "Selling on the internet" suggests everything is done online, while "selling via the internet" suggests the internet is used for part of the process.


Active Directory, what forest model should I use

Question: I need my users to be in different security groups and the ability to delegate control. What forest model can I/should I use? And why?
Answer: There isn't much detail in the question that would require any special Active Directory Architecture.  If all you want is groups and delegation you can simply drop a domain controller in and be alright.
That is a single forest topology with a single domain.  It is simple, effective, and takes little to no expertise initially.
Typically if you are asking the question which should I use, you are at a point where you should start out with a simple topology until you have the requisite understanding and experience.


Bluffing on a two player table

Question: Is bluffing more useful and effective in a two player game, compared to bigger tables? When playing one single player, the possibilities of your opponent having good cards is smaller than if playing on a 6/10 player table. So I guess it is easier to frighten 1 player than more players at one go...
Comment: Bluffing is way more effective heads-up but it depends on the looseness of player. You can't bluff 3 other players, you need a hand or a pack of nit players.
Comment: I think this could be a useful question as people flesh out their reasoning about what makes them more or less inclined to bluff, depending on a critical point in the decision, how many opponents are left in the hand. Rather than closiong these questiopns, downvoting them might be more appropriate if thats your inclination.
Answer: So you've got the question, the answer, and the reasoning behind it.
Yes, bluffing is more useful and effective in a two player game (heads-up), compared to bigger tables. The only thing left to mention here is that your opponent probably knows this fact. The thing that can make bluffing in heads-up a bit more "complicated" than bigger tables.
And as a side note, the stack sizes in a heads-up game are also more effective than bigger tables, in regard to the game play, including bluffing.
Answer: The heads up game is much more complex than this. you need to adapt to your opponent. Effective is probably not the right word. In heads up bluffing is necessary. You need to play more hands. the tighter your opponent is, the easier it should be. Better even is a loose opponent preflop and tight post flop :)
Also bluffing requires a good understanding of ranges and behaviour.
Good luck
Answer: Yes, the more players you are up against, the less inclined you should be to bluff.  Not only is there a chance that one of them might have hand, but also even if you know they don't have a hand (and neither do you), they might just decide to float you (i.e. call with nothing to see if they can steal the pot or catch a card). Since there's some non-zero chance of this happening for each player as well, that's going to cut your odds.
Say there's three other players, all limped, and let's assume no one was paired pre-flop.  You are on the button, last to act, and everyone checks the flop.  You want to bluff, and let's say you are almost certain no one hit or has a pair.
That doesn't mean a bluff will work, because people might call your late-position bet.  Let's say that each player will call you 1 time out of 5 (not unreasonable against a late-position obvious bluff).  That means 1 - .8*.8*.8 = 49% chance you will get a call.
Watch what happens with more players, assuming the don't adjust their style based on number of players just to see how the math works:
<code>Heads-up: 80% fold percentage
2 opponents: 64%
3 opponents: 51%
4 opponents: 41%
5 opponents: 33%
</code>
So, decent odds with 2 opponents, but barely above even odds with 3, and 3:2 against with 4.
In general, factors that argue against bluffing are:

Previous aggression in the hand
Multiple opponents
Loose and/or aggressive opponents, including calling stations and angry
people on tilt
Poor position
Poor table image
Flops likely to hit your opponent (lots of high cards and draws).
Good flops are flops like J-7-3, 5-5-10, and 9-5-4.  K-Q-10 of hearts is
awful.
Shorter stacks.  When you bluff, a lot of the actual bluff is the
threat of the rest of your money getting bet on subsequent streets,
in addition to what you've actually bet.  If you are short-stacked,
you don't have as much of a threat behind that bet.  If your
opponent is short-stacked, he may decide he's pot committed and
re-raise all-in.

Bluffing on a two player table


Service startup type for Terminal Services

Question: What should be the proper startup type for the Terminal Services service on Server 2003? I have noticed on a couple of servers that I manage that the service doesn't always start when the server reboots, and the startup type is set to Manual. Is there any problem with setting the startup to Automatic?
Answer: The default is Automatic. There shouldn't be any problem with setting it to that.


Understanding the use of convolution in neural networks.

Question: I'm reading about Convolutional Neural Networks (CNNs) in Deep Learning by Ian Goodfellow.
CNNs are different from traditional neural networks in that they use convolution in place of general matrix multiplication in at least one of their layers. The convolution is introduced as follows:

Suppose that we are tracking the location of a spaceshift with a laser sensor. Our laser provides a single output $x(t)$, the position of the spaceship at time $t$. Both $x$ and $t$ are real-valued, that is, we can get a different reading from the laser sensor at any instant in time.
  Now suppose our laser is somewhat noisy. To obtain a less noisy estimate of the spaceship's position, we would like to average several measurements. Of course, more recent measurements are more relevant, so we will want this to be a weighted average that gives more weight to recent measurements. We can do this with a weighting function $w(a)$, where $a$ is the age of a measurement. If we apply such a weighted average operation at every moment, we obtain a new function $s$ providing a smoothed estimate of the position of the spaceship: $$\displaystyle s(t) = \int x(a)w(t - a)da$$
  This operation is called convolution
$\ldots$
In convolutional network terminology, the first argument (in this example, the function $x$) to the convolution is often referred to as the input, and the second argument (in this example, the function $w$) as the kernel. The output is sometimes referred to as the feature map.
$\ldots$
In machine learning applications, the input is usually a multidimensional array of data, and the kernel is usually a multidimensional array of parameters that are adapted by the learning algorithm. We will refer to those multidimensional arrays as tensors. Because each element of the input and kernel must be explicitly stored separately, we usually assume that these functions are zero everywhere but in the finite set of points for which we store the values. This means that in practice, we can implement the infinite summation as a summation over a finite number of array elements.
  Finally, we often use convolutions over more than one axis at the time. For example, if we use a two-dimensional image $I$ as our input, we probably also want to use a two-dimensional kernel $K$:
  $$S(i,j) = (I*K)(i,j) = \sum_m\sum_nI(m,n)K(i-m,j-n)$$

(I assume that $S(i,j)$ means the feature map at point $(i,j)$).
The author then gives an example of $2$-D convolution with the following image:

I don't understand how this image illustrates what the author explains earlier. If we consider the input an image, then $a$ would resemble $I(0,0)$ right? Using the given definition of the feature map I find that $S(0,0) = \sum_m\sum_nI(m,n)K(0-m,0-n) = I(0,0)K(0,0) = aw$. Since e would resemble $I(1,0)$ I find that $$S(1,0) = \sum_m\sum_nI(m,n)K(1-m,0-n) = I(0,0)K(1,0) + I(1,0)K(0,0) = ay + ew$$ However, according to the image the output would be $aw + bx + ey + fz$.
Question: Why does the output equal $aw + bx + ey + fz$?
Edit: If the displayed outputs (feature maps) are only the outputs corresponding to the internal points on the grid, then I think I understand the figure. I would mean that the highlighted output corresponds to $S(1,1)$ and that the outputs $S(0,0), S(1,0), \ldots$ are simply not shown here right?
Thanks in advance!
Comment: The picture shows the convolution coefficients mirrored. This is an unessential detail (you can rename the coefficients). Usually the kernels are symmetric or antisymmetric, making the mirroring really harmless.
Comment: @YvesDaoust Are $w, x, y,$ and $z$ the convolution coefficients? And if so, how can you tell that they're mirrored?
Comment: Sorry, this is obvious.
Comment: @YvesDaoust Why mention it then? Could you state the obvious one more time by explaining what the image would look like if the coefficients weren't mirrored?
Comment: Undo the mirroring. This is a matter of common sense.
Answer: Unfortunately, it is common practice in machine learning to compute correlations rather than convolutions (but calling them convolutions). They are different: for instance, see [1], [2], [3], [4], [5]. In the 2D case:
\begin{align}
\text{Corr: }\; C(u,v) &= (f\star g)(u,v)=\iint_{\mathbb{R}^2} f(u,v) g(u+x,v+y) \;dx dy\\
\text{Conv: }\; H(u,v) &= (f\ast g)(u,v)=\iint_{\mathbb{R}^2} f(u,v) g(u-x,v-y) \;dx dy
\end{align}
So notice that one can compute a convolution by mirroring the filter kernel (i.e., flipping vertically and horizontally) and then computing a correlation. So the answer to your question is just to do that double flipping first.
This renaming of correlations vs convolutions has seemingly caused widespread confusion. E.g., see these posts:
[1],
[2],
[3],
[4],
[5],
[6]. So why has it happened? Basically because (1) correlation and convolution have equal representational power (i.e., the capacity of a model using one is equal to that of a model using the other), (2) the kernels are learned so whether it is mirrored or not makes no difference, and (3) because convolution has such nice properties (e.g., Convolution Theorem for Fourier transforms) and is classically/historically more important in computer vision, practitioners prefer to think in terms of convolutions.


Does multiplying with integrating factor in ODE add extraneous solution?

Question: For example, can we show that for first order linear differential equations, the equations before and after multiplying with integrating factor are equivalent? How? That is, the solution of one is the solution of other and vice versa.
Comment: Are you using any textbook on ODE? Any textbook should have the proof that multiplying the ODE with integrating factor does not change the solutions of ODE.
Answer: The answer is no.
If you multiply a differential equation by a function, you could obtain a new equation which has more solutions if the function you multiply by can be zero on intervals.
By in first order ODE, the integrating factor is an exponential which is non-zero on your domain. To see that this leads to no extra solutions, you can argue by multiplication by the integrating factor (and then by its reciprocal) that every solution if the original equation is a solution of the new equation ( and conversely).


Does the Bhattacharyya distance and KL divergence measure the same thing?

Question: I'm currently studying about the two methods in the title.
Does the Bhattacharyya distance and KL divergence measure the same thing, but in a different way?
I know the things that Bhattacharyya distance and KL divergence take into account when calculating is different, but in their essence, do they both measure difference between 2 probabilities distributions?
Thanks in advance
Comment: KL divergence isn't a distance.
Comment: I suppose they measure the same thing in the same sense that swimming speed and bench press ability measure athleticism. // KL divergence is not symmetric and thus is not a metric, so calling it a distance (instead of a divergence) is iffy. (This is a different "Dave" posting.)
Comment: @Sycorax but that's, as a concept (of course you can't compare them on equation), the same thing, right?
Answer: Bhattacharyya distance and KL divergence both measure the dissimilarity between two probability distributions, but they do it in different ways. This means their numerical values are not directly comparable and, furthermore, they may not agree on the relative dissimilarities between multiple distributions. For example, suppose we have two distributions $q_1, q_2$ and want to determine which is closer to a reference distribution $p$. We might find that $q_1$ is closer to $p$ in terms of Bhattacharyya distance, but $q_2$ is closer in terms of KL divergence (or vice versa).
Bhattacharyya distance and KL divergence are both divergences, meaning they always take non-negative values, with a value of zero if and only if the two distributions are identical. However, neither is a true distance metric, which must additionally satisfy the triangle inequality (which neither measure does) and be symmetric. Bhattacharyya distance is symmetric ($D_B(p,q) = D_B(q,p)$), whereas KL divergence is not ($D_{KL}(p \parallel q) \ne D_{KL}(q \parallel p)$). The meaning of $D_{KL}(p \parallel q)$ is different than $D_{KL}(q \parallel p)$, and it matters a great deal which one we use.
Comment: @Dave Glad to help. I doubt there are any general rules for when to use each; it will come down to the specific problem you're working on. Sometimes it's just a matter of convenience, and you pick whatever's easiest to work with. Other times, one cares more about differences in their behavior; this would be best suited for a followup question
Comment: Thank you for your explanation. Do you have any general rules for choosing Bhattacharyya distance over KL divergence, and vice versa? When is the best to use each? Of course it is just a general guideline and each case has its special properties.


SystemModeler considered Mathematica related Wolfram product?

Question: I asked a question about SystemModeler which is Wolfram's modeling tool and comes tightly integrated with Mathematica, yet I got people saying this was OT. Are SystemModeler questions alright? I would note that there is a system-modeler tag, so I assumed I could ask a question about SystemModeler if there was a tag for it.
Comment: Really a question for the Mathematica meta site, no?
Comment: I am closing this post because one already exists asking the same question. But I do think it is worth re-examining the original question.
Answer: I think the real question here is whether there is enough expertise and interest in SystemModeler among the participants of this site. I, personally, have neither the expertise nor the interest, so I would vote to keep SystemModeler questions off the site. But that's a sample of one. If enough participants come forward here and indicate an opposing position, I would be willing to vote to reopen your question.
To make my position completely clear: I think admitting SystemModeler question would spread us out too thin. I believe we already spread very thin just covering the questions we already get. I would emphasize that this just my opinion and that I could belong to a very small minority (maybe me alone).
Comment: I agree. With the Wolfram Community site now active, I think we can fairly say that, since SystemModeler is not one of our strong suits, there are better places to ask about it--to the extent that we can be reasonably sure that such questions will not be answered well here and thus deem them off topic. But, as it's a fairly new product, that may well change in the future. I wouldn't want to unduly discourage users from asking their questions here if they strongly anticipate getting a useful answer. Questions won't be closed immediately, and can be re-opened, so it's worth a try if so.


What is the purpose of these coils in contactor auxiliary contacts?

Question: Can someone please tell me what the function of this module, and more specifically, the curley wires on top of this contactor? It looks like the wires go to the same terminals as the main contactor terminals (although I didn't test continuity to confirm), and from what I can tell, it engages at the same time as the contactor via connecting to the "buttons" on top. I tried to search Google but not knowing what to call it made that futile. The main reason I am asking is that the small curley wires are extremely thin, almost as if it served as some sort of a fuse. Any help would be appreciated.
Answer: I think you have omitted to mention that these contactors are part of a power-factor control panel and so they are switching a purely capacitive load.
If so, those coils are inductors.

simulate this circuit – Schematic created using CircuitLab
Figure 1. Power-factor correction capacitor soft-start.
Remember that a discharged capacitor appears as a short-circuit when connected to a voltage source. A huge inrush current occurs and this is hard on the contacts.
The auxiliary contact block on the contactors is designed to close before the main contacts. This allows a charging current to flow into the capacitors to partially charge them before the main contacts make and reduces wear and tear on the them. When I first saw them on an installation I was very surprised that such fine wires could do that work.
According to a couple of online calculators including MustCalculate the inductance for my estimate of Ø = 10 mm, L = 40 mm and 9 turns the inductance is about 180 nH. This has an impedance of only 56 μΩ at 50 Hz but it's effectively a transient that's being switched so the impedance will be much higher.
Comment: No, I'm speaking as a human.
Comment: They are controlling several (around 40) mercury vapor lamps being supplied by 3 phase power on a tanning bed so you are almost certianly correct with your assumption. Thank you for your detailed response.
Comment: Tanning beds are a very bad idea. Don't get involved.
Comment: Well I know they are not exactly healthy for people to use, but are you saying that from an electrical engineering/design perspective?


how do i configure entity framework to handle a default date constraint

Question: I am using Entity Framework 6, and when I try to create a new record I get the following error.  However, I have a default value on the column, so that when the record is created, it gets a timestamp from the DB.

The conversion of a datetime2 data type to a datetime data type
  resulted in an out-of-range value. The statement has been terminated.

In my table, I have a [created] column with a default constraint:
[Created] [datetime] NOT NULL CONSTRAINT [DF_Notice_Created]  DEFAULT (getdate()),

In my Class, I have a Created Property:
public System.DateTime Created { get; set; }

In my Mapping Class, I have:
this.Property(t => t.Created).HasColumnName("Created");

What configuration do I need to use, to have EF not try and create the column with a default value?
Answer: Try using DateTime? as your type (it's called a nullable type)


Is there a way to play expansions in offline mode?

Question: As the title suggests, I am looking to see if there is a way to play the Battlefield 2 expansions with bots in offline mode.
Comment: Still a good reason for me to try to get it, I m tired of BF3 badmins, and BF4 do not appeal to me anymore.
Comment: BF2 have a offline mode?
Comment: @DrakaSAN Yes...it does...but its dead easy.
Comment: Well offline mode is great for when there is no internet connection available.  And @DrakaSAN Steam & Origin sell the collection for 20$.
Answer: Someone told me over at the Steam community how to achieve this:

Log into the game with an Offline Account, click Community, then click Custom Games, click the line that says Special Forces, then click the Activate button...it will restart the game in Special Forces single player mode.


Boolean: one operator and multiple objects

Question: Is there any option to use a boolean operator for subtracting faces on multiple objects?
I need to make a section of a lot of pieces and make it one by one it should be crazy....but I need to keep the object separated.
Is there any chance to have a non-destructive command?
Many thanks in advance for your support
Answer: In Blender 2.91, a feature will be added to support boolean operations on collections. (Commit ab7608af1bd4).
Comment: That's an interesting patch - thanks for the link. However, isn't that the opposite way around - using a collecting as the object to remove from this one. I think the question was to cut away a section of lots of objects.


Marvel Contest of Champions - Hero Probability

Question: Is there a way to influence what hero I'll get in the "roulette" system when I'm opening crystals? Or is it completely random?
Answer: It is random. There is no way to manipulate your luck when opening crystals. You will hear the most amazing theories on how someone can get 4* heroes easily, but of course they are not true.
The most popular hoaxes, as far as I know, are:

if everyone from your alliance opens them at the same time you get a better chance of opening a 4*.
if you tap a arena crystal after 9 seconds of spinning you'll get units more often
if you buy too many crystals you'll actually lower your chances of winning good rewards

Again, those are all speculative theories on the internet, Kabam have denied them all. Don't forget

The plural of anecdote is not data.
Answer: From personal experience, its all luck of the draw.
I have heard that if you open lots of 10 you are meant to have a better chance at a 4 stars. I seem to have better results from opening bulk crystals of all types.


set default process and IO priority on Linux for given application/executable

Question: Is it possible to set up some sort of default process and IO priority for given application/executable? I am thinking some sort of FS extended attribute or loadable "policy" of sort?
Comment: What's wrong with `nice -19 ionice -c 3 command`?
Comment: @FloHimself I think @wilx is asking for some way of having the system automatically apply prorities to an executable whenever it is launched, without having to use `nice` or `ionice` every time.
Comment: @FloHimself: Yes, I want the policy to be automatically applied exactly like Stephen Kitt suggests.
Comment: The question should be expanded with some more background information. Why should this be done? What's the special use case?
Answer: The usual approach is to create a wrapper script.
Create a script /usr/local/bin/nicer:
#!/bin/sh
exec ionice -c3 nice /usr/bin/"${0##*/}" "$@"

Create symbolic links for each executable that you want to execute through this wrapper, e.g.
ln -s nicer /usr/local/bin/myprogram

Then when you run myprogram, it will execute the script /usr/local/bin/myprogram, which runs /usr/bin/myprogram with lower priorities.


proper time interval

Question: We have two frames s and s' , s' moves with a constant velocity 'v' with respect to s in positive x direction, a particle B is thrown downwards from s' , and it collides with a particle A , the point which i don't get is when the author of the book(modern physics by arthur beiser)  says that the time interval for the collision  measured by observer in frame s' is the proper time. But here there is relative motion between the observer in s' and the objects A and B , then how can it be the proper time. My understanding of proper time is built upon the idea of meon decay, where the proper lifetime of meon is that time which an observer would record if it traveled with the same velocity as that of meon along its journey.
Comment: Is that [Concepts of Modern Physics](http://www.amazon.co.uk/By-Arthur-Beiser-Concepts-Physics/dp/B008UBHN38) by Arthur Beiser? If so, what page is this on?
Comment: In the first edition its on page 32 and in the sixth edition its on page 22 . The wording in my question isn't exactly the same as that of the book, i have presented  gist of the point, which i am doubtful about.
Answer: In the book is said that the time required for B to make its round trip is $T_0$ as seen from the S' reference frame and $T$ as seen from the S frame, with the following relation connecting them: $T=\frac{T_0}{\sqrt{1-\frac{u^2}{c^2}}}$. The events, start and end of the trajectory of B happen in the same place for S' and in a different one for S. So the proper time between these two events is measured by S' and the above relation is correct.
Also there is no inconsistency with the muon case, since the observer moving with the muon measures the lifetime of it in the same place , i.e the origin of the frame.

proper time interval


Does a self-build random 256-key based on substition and permutation have the same power as an AES-key?

Question:
As far as understand AES takes 16 bytes, shuffles them and replaces every of the 256 bits via XOR.
Then the same procedure applies to the next 16 bytes, and then again - until the entire file is encrypted.
What if I just randomly shuffle numbers from 0 to 15, and also randomly write zeros and ones, 256 in total, and then use these results to do the same thing AES does (shuffling and substituting) - it would provide the same safety, wouldn't it?
If I got the AES concept wrong, an explanation would be much appreciated.
Comment: ***NO***. Many things are seriously wrong in the question: 1) 16 bytes is 128 bits, not 256. There's more than shuffling bytes and XORing them with a constant in AES. That's clear in the [wiki article](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard). 2) AES encrypts 16 bytes, not files. A block cipher [mode of operation](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) is needed for the later. The description made could be ECB mode. That's often insecure, even with AES. 3) What's proposed would be very insecure if applied to a file of more than 16 bytes.
Comment: also, xor does not replace bits, unless you xor with 11111...
Answer: Your understanding of AES is completely wrong. It works nothing like that.
AES, being a block cipher, takes 16 input bytes and spits out 16 output bytes.* The process can be reversed by running the algorithm in reverse, but only if you use the same key. AES is actually made up of 10 to 14 rounds, which can be thought of as mini-ciphers. Like AES itself, they take 16 bytes of input and generate 16 bytes of output. A round's output is used as the input for the next round. Each round is also given its own key, created from the master key after being fed through an algorithm (the key schedule) that ensures that each key for each round is different.
The rounds themselves are composed of four stages, each of which also take 16 bytes of input and has an output of 16 bytes. They operate on the 16-byte input as if it were a 4-by-4 matrix of bytes.

SubBytes: This step substitutes each byte for another byte. The same input byte will always result in the same output byte. For example, 0x58 always becomes 0x6a. Here is the table.

ShiftRows: This step shifts each "row" of four bytes to the left and wraps them around (so it's more like a rotation than a shift). The first row is moved by 0, the second by 1, etc.

MixColumns: This step operates on each "column" of four bytes individually and reversibly mixes them using a simple permutation algorithm. Each column can be acted on in parallel.

AddRoundKey: This is the last step and is simply an XOR of the input with the round key.

The last round lacks the MixColumns step because it would not add any security, and the first round is preceded by an extra AddRoundKey step (so there will always be one more round key generated than there are rounds). Each round, on its own, is pretty weak, but when they're stacked up on top of each other, they create an extremely secure cipher. Even though breaking through only a few rounds is easy, it's necessary to break through them all at once to break the entire cipher.
* You can't just use AES to encrypt a file by running it over each 16-byte block sequentially or you end up with an ECB penguin. AES must be used with a secure mode of operation to be used to encrypt more than 16 bytes with any given key.

I strongly suggest you read A Stick Figure Guide to the Advanced Encryption Standard (AES). It is an entertaining visual explanation of AES in three different levels of difficulty after giving a brief history of the cipher: basic cryptographic concepts, AES specific design details, and lastly the underlying mathematics. It explains it in more detail than I do, and it explains why each step is done the way it is.


".........neither shall ye break a bone thereof...." Exodus 12:46b, Numbers 9:12, John 19:36

Question: God commanded that the Israelites shall not break any bone of the Passover Lamb and it was fullfilled in Christ Jesus.
My doubt is "what is the significance of  this command, that the "bone shall not be broken"?
Comment: Hi Anson, welcome to BH.SE - thanks for contributing, this is a very interesting question. (+1) Look forward to seeing its answers!
Comment: The bones are seen as a matter of personal integrity in scripture but this is a matter of interpretation and comparison of many scriptures. Jesus suffered, but his own integrity remains intact. Up-voted +1.
Answer: Actually, John 19:36 about Jesus' bone being unbroken is a quotation from Ps 34:20 -

He protects all his bones; not one of them will be broken.

This is clearly interpreted as a Messianic prophecy by John.
However, Paul also tells us that Jesus was the anti-type of the Passover lamb:

John 1:29 - Behold the Lamb of God who takes away the sin of the world
1 Cor 5:7 - For Christ, our Passover lamb, has been sacrificed.
1 Peter 1:19 - but with the precious blood of Christ, a lamb without blemish or defect.

This last text is the key to understanding the prophecy about no bones being broken.  In Ex 12:5 we are told about the requirement for choosing the Passover Lamb:

Your lamb must be an unblemished year-old male, and you may take
it from the sheep or the goats.
Ex 12:46 - ... and you may not break any of the bones. (see also Num 9:12)

This was fulfilled by Jesus and His sacrifice; His bones were not broken, AND we are also told that Jesus was -

Heb 7:26 - ... One who is holy, innocent, undefiled, set apart from
sinners, and exalted above the heavens.
Answer: Semantic range of etsem
Before anything else, let's look at the semantic range of etsem, which means "bone" or "skeleton". The first thing to notice is not just the similar sounding "tselem" (image) but the corresponding meaning of self or same. Bone (etsem) is used as a synechdoche for the person as a whole, containing their essential character. The following is excerpted from the Theological Dictionary of the Old Testament article on etsem.
It is also used as part of the kinship formula "flesh (basar) and bone (etsem)" in many places to denote identity or kinship (Gen. 29:14; 2 S. 19:14)
But here there is a nuance between "flesh" and "bone". The bone is the lasting part of the body, the part that remains after the flesh goes away, and so can be a metaphor for what remains after death. ("bone" is a much better word to dig up in the old testament when looking for resurrection than nefesh, or life.)
In this sense we have a couple of meanings:

In Ezekiel 37.1-10, God brings bones back to life, but only when they are dry (no flesh is present).

In general, as dead bodies are unclean, the bones from a corpse are "very" unclean and require special rituals if touched. Nu. 19:16, 18

..but the bone of a righteous man, Elisha, restored a dead man to life (2 Kings. 13:21) again a hint of resurrection

Jewish Traditional interpretation
The main interpretation takes a cue from the unity "it will be eaten in one house" and view it as a sign of unity/lack of division:
In the Book of Jubilees, 49.13, we have:

There will be no breaking of any bone in it because no bone of the
Israelites will be broken.

VanderKam, J. C. (2018). Jubilees: A Commentary on the Book of Jubilees, Chapters 1–50. (S. W. Crawford, Ed.) (Vol. 1 & 2, p. 1166). Minneapolis, MN: Fortress Press.
Modern commentaries tend to follow this interpretation also:

No bone of the sacrificial animal is to be broken, to ensure that the
meat will remain inside, in the one house set apart for the worship of
remembrance (so Dussaud, Les origines, 211), and perhaps as a symbol
of the unity of the family worshiping (Noth, 101) and even of the
covenant community.

Durham, J. I. (1987). Exodus (Vol. 3, p. 173). Dallas: Word, Incorporated.
I have no bones to pick with this as one interpretation, but we can dig much deeper.
Messianic Interpretation
With the messianic interpretation, we can associate this requirement to Ps 34.19-22, as noted by Dottard.

Many are the distresses of the righteous, but Yahweh delivers him out
of them all. He protects all his bones; not one of them is broken.
Evil will slay the wicked, and those who hate the righteous will incur
guilt. Yahweh redeems the life of his servants, and none who take
refuge in him will incur guilt.

There are a few things going on here:

The righteous one (it is singular) will go through many trials, but these trials will affect his flesh only, not his bones, which wont be broken.

Yahweh will redeem the life of his servants

So this should be viewed as a prophecy of short term suffering but long term redemption of the righteous one, and now we can link it to Passover via the gospels.
But passover is a sign of passing from Egypt through the sea and into the promised land. This is the redemption or deliverance of the righteous one, passing through death, and as his bones are untouched, this suggests a successful passage even though the flesh is burned off (via exodus, the flesh must pass through fire and be wholly eaten, leaving only the bone).
Thus this is directly about Christ, his death and resurrection in a glorified body, and so is also a type of the church doing the same.
This is also pre-figured in Joseph's bones being carried out of Egypt.
So I think the messianic interpretation gives us a much richer exegesis of the text than a simple view of unity and no division, even though the unity interpretation is also a valid one.
Comment: "no bones to pick", "dig up"...nice =)


MAF Clamping & Tuning

Question: I am planning on making my normally aspirated engine into a boosted Supercharged Engine using the AEM F/IC 6. From many searches and forum posts I've heard I need to do MAF (Mass Airflow Sensor) Clamping, I don't mind doing it however, I was to understand why it's so important and the major difference between a boosted application and normally aspirated... is it simply that a boosted application will draw in more air causing the MAF to read higher than usual? How can MAF see boost?
(Small Reference https://www.youtube.com/watch?v=4sECmiN7EwA)
Answer: The MAF is a very accurate flow meter that sits in the intake air path. Its job is to tell the engine how much air is being drawn into the engine, so it can inject the correct amount of fuel to keep fuel/air mix at stochiometric, both so performance is at peak and smog is at minimums.  These things are allied causes, so normally this thing is your friend and there's no reason to screw with it.
However, when you boost an engine that was never designed to be boosted, you introduce an array of problems.  Among them is that the MAF is now indicating airflow numbers that are higher than expected because of so much air moving.  To detect broken sensors, the engine PCM checks throttle, temperature, baro and MAF against each other, and will blow a code if a sensor "doesn't make any sense".
If the manufacturer sells a supercharged version of that car, they set upper limits in the PCM so it doesn't consider "being boosted" to be a sensor error.  On a dedicated, built-for-purpose racing vehicle, you simply use a PCM that understands it may be boosted.
But of course the problem comes when you boost a made-for-street, EPA certified vehicle where the manufacturer never dreamed it would be boosted, and didn't give the PCM flexible enough parameters.
This vendor's hackaround to that is to trick the PCM and then take control of fuel injection.
Answer: The bottom line is, the MAF doesn't see boost, it sees air flow. The Manifold Absolute Pressure (MAP) sensor can see boost. In most normally aspirated cars, the MAF (if even equipped) and MAP work together along with other sensors to come up with the correct amount of fuel to be injected into the engine. Naturally aspirated engines only require a MAP sensor which can read pressures up to 1 bar (or a single atmosphere), while in boosted applications a MAP sensor which is capable of reading above 1 bar is  needed so the computer can understand what is going on.
When I stated if a MAF is even equipped in a car, the ECU doesn't necessarily need a MAF in order to run correctly. There are two modes which an ECU could run an engine in. The first using the MAF. The second is called speed density. Speed density only uses a MAP without a MAF. While a MAF can do a great job at determining how much air is entering the engine, there is a point where boosted airflow becomes an issue and the MAF no longer can read the amount of air coming into the system. Think of it as the MAF "being pegged" or maxxed out. It would only be sending the maximum reading to the ECU and nothing more.

MAF Clamping & Tuning


Trigger a certain key combo with another one

Question: Can anyone suggest me on what would be the best way to trigger a certain key kombo with another one. Say, I'd like to send CTRL+= while pressing CTRL+[.
Basically I want to workaround zoom for Google Chrome.
Answer: Esc (i. e. ^[) is not a shift-type key such as Shift, Ctrl, Alt, or Meta.  These latter keys alter the character code sent by another key sent in when pressed in combination with them.  For instance, the character sent by ] (]) is a different character from that sent by Ctrl+] (^]), which is in turn different from that sent with Shift+] (}).  Esc is itself a character, and cannot be combined with another character; merely sent in sequence (i .e. before or after) with them.
Comment: I see, however CTRL+[ could be bound to trigger some action, is it not possible to trigger another key combo?
Answer: If your distribution has xbindkeys in its repositories, you could easily combine it with xdotool.


WOW freezes after login 15.04

Question: I installed wine 1.6.2 and World of warcraft launcher through it. It fully installed and when I run the game it log ins and asks me to select zone and realm type each time. When I do this the special cursor turns back into a normal cursor and my screen freezes. I can move the mouse and I hear the music, but the screen is frozen. This forces me to reboot the system through ctrl + alt + f2 $ Reboot. I cannot enable opengl because no wtf.config files are made after the game freezes. I wish to play wow on ubuntu and hoping to get some help thanks guys.
Answer: That helped me with this kind of problem:
<code>WINEDEBUG=-all wine "/home/user/.wine/drive_c/Program Files (x86)/World of Warcraft/WoW.exe" -noautolaunch64bit
</code>
Answer: i had similar problem and the screens only moved when I held down the windows key and then refroze. after a lot of trial and error. I finally found a solution. it seems to come down to screen refresh rate and windows/graphics card refresh / framerate being out of sync. once I set all to same rate (60hz and fps cap of 70fps game worked fine. resolution of 1920x1080.
to find the refresh rate for my screen I went to windows advanced settings and the monitor tab, there it lists the refresh rates your screen can use.

WOW freezes after login 15.04


Best weapons types for certain vocations

Question: My question is to know the best weapon type for a mage useing lots of mana and magic(I use wand), and the best weapon type for a healing , reviving strategy minstrel. (I use a sword , currently have inferno blade)
Comment: What exactly do you mean by "healing, reviving strategy"? Providing detail may help the community provide an answer.
Answer: This has been unanswered for a while. I think I can offer some guidance.
For a Mage, the best weapon type for your setup is a Wand because you get to recover MP when it strikes, plus you get MP boosts when you put points into its skill.
A Minstrel who heals as a main strategy should probably use Fans. You can get some good ones that heal MP-free when used as an item in battle (such as the Friendly Fan). Remember though that Minstrels are jack-of-all-trades and if you don't switch strategies often then consider a Priest.
Do play with putting these two in the back row. As these two are not using physical attacks you can hit from distance.
Having said that the game logic is said to be broken by some, that the back row makes no difference to attack strength only reducing the chance of being targeted, so it won't matter according to them.


How to remove .php from url using htacces

Question: I want to remove index.php from my url, please give me solution over this.
Answer: step 1: Goto to your site root folder and you can find the htaccess file there.Open it on text editor and find the line #Rewrite Base/ magento. Just replace it with Rewrite Base/
step 2: Then goto your admin panel and enable the Rewrites(set yes for Use Web Server Rewrites). You can find it at System->Configuration->Web->Search Engine Optimization.
step 3: Then goto Cache management page (system cache management ) and refresh your cache and refresh to check the site.
Just with the .htaccess u can try
<code>RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</code>
Comment: hello @swash_nam, if it works for you, you can accept my answer


Direction of Meteors

Question: Do meteors always streak in the same direction? While I know it's not likely to be exactly the same direction, but generally speaking. Would one say meteors always travel, for example, east to west?
Comment: Related: http://astronomy.stackexchange.com/questions/1866/do-meteorites-streak-across-the-sky-in-the-same-direction
Answer: Not in general, but sometimes there is a dominant direction.
When the Earth passes through a stream of debris from a comet or asteroid,
a
meteor shower
occurs, and those meteors appear to come from a point in the sky called the radiant.
Since the parent bodies have different orbits, different shower radiants appear in different parts of the sky.
For example, the Geminid radiant culminates earlier in the night than most, and the Perseid radiant is well north of the Ecliptic.
As the Earth can encounter meteors from any direction at any time, there are usually a few sporadic meteors unrelated to any active radiant.
Meteor observers have identified some
not quite random
directions for these.
Comment: thanks for that incredibly interesting link, MikeG - good one

Direction of Meteors


Backpropagation and gradient descent

Question: I just want to clear one doubt - we use gradient descent to optimize the weights and biases of the neural network, and we use backpropagation for the step that requires calculating partial derivatives of the loss function, or am I misinterpreting something?
Comment: Yes, you got it right. To compute the gradients ($\partial loss/\partial w,\,\,\partial loss/\partial b$) we use backpropagation.

And in order to compute the updates of weights ($w$) and biases ($b$) we can make use of this gradient (and  its variants) $\rightarrow \delta w = \alpha \frac{\partial loss}{\partial w}$, $\,\,\delta b = \alpha \frac{\partial loss}{\partial b}$
Answer: Yes you are correct. Gradient descent (or various flavors of it) is the mechanism by which you find a local minima of your loss space using some learning rate. Backpropagation calculates the gradient of the error function with respect to the NN's weights and biases.
Answer: We have an ANN defined:
$$A = (N, I_n, P, g)$$
$$N: ℝ^{|X_i|} ℝ^{|I_n|} \rightarrow ℝ^{|O_n|}, ~~ N(X_i,I_n) = O^i_n$$
With epoch $E=E_X\cup E_Y$ of input records $E_X = \{X_0,...,X_n\}$ and desired outputs $E_Y = \{Y_0,...,Y_n\}$, a weight-bias vector $I_n$ trained $n$ times, a set of neurons, $P$, and an activation function $g$. The bias can either be different for each neuron, different for each layer or a single one for the network.
We have a neuron input for the $j$th neuron on layer $i$:
$$a^i_j = \sum_l {w_j}^i_l ~ z^{i-1}_l$$
We have a neuron output for the $j$th neuron on layer $i$:
$$z^i_j =\begin{cases}g(a^i_j) & i\in\mathbb{Z^+}\\ x^i_j & i=0 \\ \end{cases}$$
Where $g$ is the activation function
We have an initial weight-bias vector:
$$I_0 = (w_0,...,w_n, b_0,...,b_n)$$
We have an initial set of outputs for record $X_0$:
$$N(X_0, I_0) = O^0_0 = \{o_0,...,o_n\}$$
We have a desired set of outputs:
$$Y_0 = \{y_1,...,y_n\}$$
We have a cost function:
$$C_i: ℝ^{I_n} \rightarrow ℝ, ~~ C_i(I_n) = \frac{1}{|N(X_i,I_n)|} \sum_{o,y~\in~N(X_i,I_n), Y_n}(o - y)^2$$
$$\nabla C_i(I_n) = \left(\frac{\partial C_i}{\partial w}, \frac{\partial C_i}{\partial b} \right)$$
Where $w = w_0,...,w_n$ and $l$ is the learning rate. Note that each weight and bias is involved in the cost function, because it computes over $o_i$ which are formed from the weights and biases in the network, therefore each one has a partial derivative with respect to the cost function that can be worked out through backpropagation, which is just using the chain rule to work out those partial derivatives in the gradient vector of the cost function $\nabla C_i$ at $I_n$. This is indeed done by realising the output is the function (given by some activation function) of the outputs of the previous layer multiplied by their weights plus a bias.
We have batch gradient descent (which gives a new weight-bias vector by computing an error vector as the sum of the mean square errors from all the test input records and subtracting the error vector from the current weight-bias vector):
$$I_{n+1} = I_n - l\sum_{i=0}^{|E_X|-1} \nabla C_i(I_n)$$
We have a stochastic gradient descent (which gives a new weight-bias vector by computing an error vector as the mean square error of a single test input records and subtracting the error vector from the current weight-bias vector):
$$I_{n+1} = I_n - l\nabla C_n(I_n)$$
As you keep performing the recurrence relation, you should get closer to a local/global minimum. You move in the direction of the gradient of steepest descent on the error surface at the current location $I_n$, and you are locked to the surface -- picture $z=f(x,y)$, you can only change $x$ and $y$ and each $(x,y)$ has a $z$ coordinate which places it on the surface.

Backpropagation and gradient descent


Time length molecular dynamics

Question: What limits time length of simulation in molecular dynamics to femto and in coarse graining to nano or micro second?
Comment: What attempts have you made to figure it out? And is there something more specific that you don't understand?
Comment: I am new to MD. I have not found a proper answer to it. why in coarse graining length of simulation increase, and If I run a program more time, why reaching bigger time is not possible?
Answer: There is a practical and a "theoretical" limit to why you can't just run longer with molecular dynamics simulations.
First, the practical limit. If you are looking at an atom and you want to accurately resolve something, you need to have a sufficient number of temporal integration points per time scale of interest. Since we are looking at atoms and molecules, everything we might want to know is related to the motion and vibration of the atoms in the lattice. So let's just take a really simple example of simulating a single Cesium-133 atom. This is the atom used in atomic clocks and so we know it oscillates at roughly $1\text{e}9~\text{Hz}$. So to resolve 1 period of motion for the atom, we might need, say, 100 temporal points per period. We're looking at something like a timestep of roughly 10 picoseconds. To run "longer" physical times, you need a whole lot of time steps to get anywhere more practical. In problems like this example, it's easy to just run longer. But if it took you 6 months to get your 100 billion atom system to reach a point where you can get some statistical information, another 6 months to get double the physical time may not be something you can afford. Many of the simulations I compare against are run at tenths or hundredths of femtoseconds in order to be stable and accurate, so just running longer is ridiculously expensive.
Now the "theoretical" limit. I put it in quotes because it's really due to the implementation in hardware that limits it. You should know (and if you don't, start digging into it) that the Explicit Euler scheme is bad. It's simple, sure, but it's bad -- it imposes a rather harsh time step restriction, but most importantly it is unconditionally unstable. It doesn't conserve energy and it will blow up eventually. And being first order, it's not really accurate.
An alternative is a fully implicit method. These are unconditionally stable, allowing for arbitrarily large time steps, but in practice you can't do that. You need to resolve the physical processes of interest so you still need to select reasonable time scales. So before when we took 100 temporal steps per period, that is probably due to stability constaints -- maybe we can only take 10 steps and still get a good answer if our method is stable. The downside is fully implicit methods typically require a global matrix inversion. These don't scale well in parallel as processor counts get large. So they tend to be avoided.
What is used instead are semi-implicit methods, or symplectic methods. The most common in MD is the Verlet integration (either position or velocity depending on the needs). Looking at Verlet specifically, it's a second-order accurate method and allows much larger time steps compared to a fully explicit scheme, although smaller than a fully implicit scheme. Most importantly, it is energy conserving in theory.
But here's the problem -- although energy conserving in theory, no scheme is actually energy conserving in practice. Finite precision in hardware means errors accumulate over time. So if you are running at 0.01 femtoseconds and you ran 1 billion time steps, you probably accumulated some numerical error due just to finite precision. At best this means you answer drifted and is wrong, but at worst your simulation will be unstable and blow up. Verlet has a tendency to do the latter and it will be unstable for large numbers of timesteps. So you cannot just keep running longer -- you are either inaccurate or unstable.
As an aside, you also run into more numerical precision errors -- trying to add something like $1e\text{-}17$ to $1e\text{-}9$ could lead to underflows. This can be fixed by using higher precisions numbers (quad instead of double) but then it just doubled memory space and probably compute time, so it will take many times longer in CPU time to get to the same physical time. And now we're back at the practical problem.
When you coarse-grain your simulation, you can take larger time steps because you no longer are interested in the smallest physical time scales. Rather than looking at the motion of individual atoms relative to one another, you look at the motion of individual molecules relative to one another. In length and time scales, this may be orders of magnitude larger. So now you can run at nano- or picosecond time steps instead of femtoseconds. When you ran your original simulation 1 billion steps and only got to 1 nanosecond, now you can run for 10000 time steps to get to 1 nanosecond. Fewer time steps means less accumulated numerical error; alternatively, if you ran the same number of time steps until it was unstable, you've gone way further in time in the coarse simulation.
All of these issues (and more) are not confined to MD. The same is true in any numerical simulation.
Comment: +1. You could also mention the costs of scaling the system (how does the computational workload scale with the simulation length scale $L$, and how much longer these take to equilibrate). Also worth mentioning is the "effective time" of many coarse grained systems: As the energy landscape is smoother, the phase space is sampled faster. This usually results in problems with dynamical parameters, such as the diffusion constant.
Comment: @alarge Unfortunately, I actually know very little about MD specifically as I work in fluid dynamics. I'm working on solid-phase simulations at the smallest continuum scales and I need to compare against results from MD, but I don't actually work in the area. Everything I've written is just based on my understanding of numerical methods more than any direct understanding of MD. So while I'd love to add to my answer, I don't have the expertise. If you do, please add your own answer -- then I'll learn something new!
Comment: The GCC manual says that we can expect quad math to be "an order of magnitude or two slower" than double precision ([specifically talking about Fortran](https://gcc.gnu.org/gcc-4.6/changes.html))
Comment: @KyleKanos Yeah, quad is horrendous. Double used to be an order of magnitude worse than single (and still is on things like GPU's) until they started adding hardware for doubles. Never try to run something using GSL's arbitrary precision unless you want to wait a lifetime.

Time length molecular dynamics