When moving files between two external drives, are they temporarily written to the internal hdd of the computer?

Question: While moving a big chunk of data between two external USB drives, I notice my laptop is slowed down. It was my understanding that the files are not written to any intermediate location (such as /tmp or similar) unless there is a shortage of free RAM. Am I wrong?
Comment: The slowdown may be caused by the copied files getting cached and pushing more useful things out of RAM. It seems to be a common problem on Linux.
Comment: Some system monitoring tools can tell you disk usage per-disk, so you can check if the internal disk is being (heavily) used while copying: https://serverfault.com/questions/9428/how-can-i-monitor-hard-disk-load-on-linux
Answer: If you have a copy such as this, or its GUI equivalent,
cp -a /media/external/disk1/. /media/external/disk2/

the data is read from the first disk's filesystem and written directly to the second. There is no intermediate write to another storage location. If you are seeing slow speeds it may be that the two disks are sharing the same USB controller and contending for access to the bus.
Anything more than that and you will have to provide further details, such as the make/model of computer, its bus topology, etc.
Comment: @vsz the OP discounted swapping when they wrote, "_unless there is a shortage of free RAM_". However, to address your question, it might be theoretically possible for block data to land in swap. On the other hand depending on the type of copy it could, also theoretically, be a [direct copy](https://en.wikipedia.org/wiki/Direct_memory_access) between the two devices without the CPU even being involved. I don't know that level of detail
Comment: @Mephisto yes, it's the same.
Comment: If I copy them using a graphical interface (i.e. Ctrl+C Ctrl+V in Nautilus), the answer is the same. Right?
Comment: Can't parts of it still land somewhere on your internal hdd? Data is not written byte by byte, but in chunks, and those are held temporarily in RAM. And it might theoretically happen that some of that RAM gets paged if the operation takes long enough and some other ram-hungry process gets prioritized..
Comment: @vsz Any buffers used in the copy process would ipso facto be very actively accessed memory. Anything causing these to be swapped would have to be *really* RAM-hungry
Comment: @HagenvonEitzen : I agree with that. But in case of a really high-security scenario, this is still an issue to be taken into consideration. (of course, the OP didn't ask about such scenarios)
Comment: @Mephisto, when you copy-and-paste a file using a graphical interface, the "copy" part of the process doesn't actually make a copy.  Instead, the computer makes a note that you plan to copy a file, and doesn't actually start copying until you do the corresponding "paste".
Answer: There is no concept of internal and external: The operating system knows not of the box, and what is in or out of it. The only file-system that is special (but only a little bit) is the root file-system, and this can be mounted read-only. You can still do almost anything with a read-only root file-system (but not change the content of the root file-system).
Comment: It might be important for the user where a disk is and how it is connected, for the Linux operating system however they are all "filesystems", therefore copy from one "external" disk to another "externel" will not be buffered on a "internal" disk. If copying slows down the whole system, then it is due to high driver cpu or interrupt load.
Comment: @HEGX64 the distinction is not internal or external. if is root or not-root. Or it is same device or different device.
Comment: The concept of internal and external is very useful here (assuming the root fs is internal). A common cause of computers being slow is if the device behind the root fs is too busy doing IO. It means the OS can't access the data of the running binaries etc. without waiting for the drive.

This is a very common problem on cheap windows 10 computers with a slow hard drive and not enough ram. I've also seen it on Ubuntu while copying large files to the root fs.

The ability to rule out this as a cause is very useful. Otherwise I'd have posted an answer suggesting it as the cause.
Answer: TL,DR: it's probably the cache.
Copying or moving data between two removable drives doesn't store the data on an internal drive. The copying program reads a chunk of data from the source drive, writes it to the target drive, and repeats with the next chunk of data. A sophisticated program may try to make the copy faster, at the expense of heavier load during the copy, by copying multiple chunks in parallel.
Accessing drives takes some CPU time, both for the filesystem and for the actual drive access. The cost of the filesystem management is small if you have a lot of small files and negligible for large files. The cost of drive access depends on the quality of the USB controller and of the driver. I think USB controllers and their Linux drivers generally use DMA reasonably efficiently so there's not much CPU cost here either, but I know very little about USB and may be wrong here.
The data that is being copied is cached like any other data that is read from a disk. If you're copying a large amount of data (relative to the size of your RAM), the data that you're copying will displace frequently-accessed files and will even cause part of the memory of applications to be moved to swap. This can cause a significant performance hit. The system doesn't know that the data that it's reading from the source disk is only meant to be written out immediately, and doesn't need to be kept in RAM, so it tends not to make the best decision in terms of cache allocation.
When you copy a large amount of data on Linux, try using nocache (available as a package in major distributions). This is a command line utility that runs a command in a mode where the data that it reads will mostly not go into the cache. For example:
nocache mv /media/source/dir /media/target/dir

Using the nocache prefix can work on a GUI application, but only if the application starts normally. Some desktop environments arrange to start applications via a central process (e.g. KDE with kdeinit), or may open a window in an existing process, and in these cases nocache won't have any effect.
If you're concerned about privacy, it's unlikely, but possible that some of the data could end up in the swap space. It's unlikely because the copying program only keeps each chunk of data in memory for a small amount of time, and swap is used in priority for parts of the memory that haven't been accessed for a long time.


When I parent an object with a bone the object moves its place

Question: I went to the object tab and parented with a bone. but when I did this, the object rotated and moved. what should I do to fix this? (weirdly when the object moves its place the location which is displayed on the tab that appears when you click 'n' is the same)
Answer: You must have parented the object with a bone that is not in Rest pose, so first select your bone in Pose mode and altG, altR, altS to reset its location, rotation and scale.
Answer: this is usual if you parent an object to another object in the relations parent field.  (their xyz coordinates are placing the object in parents coordinatesystem.)
usually you can use ctrl+P to parent objects without switching places. shift+P automatically rewrites the location, so that the object wont move.
Just select the childmesh, then the armatures bone (in posemode), hit ctrl+P and select "Bone".


How to get multiple solutions for a given input using neural network?

Question: Let a Neural network is trained. Let
multiple number of inputs result same output. We can determine any one input for a particular output using neural network. But, how can we determine all the inputs for a given output.
To be precise,
Let, x+y=10.
So for 10 the inputs are (1,9),(2,8),(3,7) and so on.
Answer: You can't. Even for $x+y=10$ there's infinitely many possible inputs. You can pick random $x$, say $526149.6427855$ and solve for $y$
$$
526149.6427855 - 10 = y
$$
same can be done for any $x$, or for any $y$.
Neutral networks are deterministic, but much more complicated then summation, so solving it wouldn't be that simple. Moreover, they almost always have multiple inputs, for example you input $32\times 32 \times 3$ image and get single number as output, or for recurrent neutral network, you take a sequence of any length, possibility infinite, and get a number, so that's much harder then two unknowns. Neural networks also use many non-linear and wasteful transformations, e.g. ReLU activation transforms any $x<0$ to zero, MaxPool takes many different values and returns single, highest one, etc., so there's many inputs that lead to their output. Even finding a single input that might have produced the given output of neutral network is non-trivial problem, since its seeking for a needle in a haystack, not talking about finding all such inputs.


Xcode merge branch,remind tree conflict when add some new file

Question: I create a branch2 and add some new class file,when i merge into master branch,Xcode reminds us:"The files ViewModel.h,ViewModel.m had a tree conflict"
If I just edit some code but not add new file,it will be ok,but how should i solve this problem?
Comment: http://stackoverflow.com/a/16369770/2399980
Answer: Change to your master branch, and then use the option "Merge from branch", and select your branch2.
Answer: This happened to me too. The problem was that the master branch had uncommited changes (unrelated to the changes in the other one). Switching to master and committing the changes allowed me to merge the feature branch back into master.


Is there a way to save a Microsoft Word document so that it automatically opens in outline view?

Question: I have a Word document (it's a task list) that I always read and edit in outline view. Is there a way to tell Word that so that the document always defaults to outline view when it is opened?
Comment: I've just switched from office 2010 to 2013 and noticed this - very irritating. All previous versions of word used to remember the view mode, and the specification for the docx format (ECMA-376) describes how this is stored in the document with . Either it's a bug or a deliberate removal of functionality but I don't see any way of getting it back :-(
Comment: What version of Word are you using? I am using 2010 and it opens in the view I last saved the document in. Therefore, when I save the document in outline view, it opens that way the next time.
Comment: 2013. Interesting that yours works, perhaps there is an option for that buried somewhere.
Answer: Now with 2013 you have to write macros and re-save all your outline documents as macro-enabled:
http://answers.microsoft.com/en-us/office/forum/office_2013_release-word/make-default-view-outline-in-word-document/29a178c3-673a-4e06-939a-cca132b69636
Superusers can do this, it just will be a real pain and take a lot of time. Probably most users of Word will find this too complicated and manually switch to outline view every time they open a document.
Answer: It's a setting: In Word Options, under the heading 'General', you must choose 'Alloiw opening a document in 'Draft View' (it works for Outline view too).
I ONLY work in Draft view and Outline view, so it was really important for me.
The other annoyance is that images no longer display in Draft view (only in 'Print Layout' view. This can be fixed.
You must save the document as an earlier version (Word 97-2003), then save again as DOCX.
Mark L-S
Comment: Sounds great Mark, but when I set "allow opening a document in 'Draft View'" under Word's Advanced -> General option it has no effect on existing or new documents. They fail to open again in either draft or outline. Hopefully this works for others though
Comment: Yes, it works in Word 2010, but not in 2013! I am hating Word 2013, from its CAPITALISED tab names, to the failure of the browse for file locations, the 'flat' look, and now the failure to open in Draft mode. I think I am going to reinstall Word 2010.
Comment: 'Alloiw opening a document in 'Draft View' is not at my Word 2013 > Word Options > General tab.  It is in Word Options > Advanced > General > "Allow opening..."  And... it did not work.  I saved while in outline view, re-opened... got Print Layout view.


K-means metrics

Question: I have read through the scikit learn documentation and Googled to no avail. I have 2000 data sets, clustered as the picture shows. Some of the clusters, as shown, are wrong, here the red cluster. I need a metrics to method to validate all the 2000 cluster-sets. Almost every metric in scikit learn requires the ground truth class labels, which I do not think I have or CAN have for that matter. I have the hourly traffic flow for 30 days and I am clustering them using k-means. The lines are the cluster centers. What should I do? Am I even on the right track?
Comment: It will be hard for someone to help you without more information. What do your axes represent? You stated the lines are the cluster centers. So you ran k-means with k=3?
Comment: Correct, the horizontal axis is the hour, 0 to 23, and the vertical is the traffic flow, so the dots you see are the traffic flow in that hour over the 30 days, so to say each hour should have 30 days of hourly flow data point.
Answer: SciKit learn has no methods, except from the silhouette coefficient, for internal evaluation, to my knowledge, we can implement the DB Index (Davies-Bouldin) and the Dunn Index for such problems. The article here provides good metrics for k-means:
http://www.iaeng.org/publication/IMECS2012/IMECS2012_pp471-476.pdf

K-means metrics


Circadian clocks in enzymes

Question: I'm aware of the existence of circadian clocks, but I don't understand exactly how circadian clocks regulate other circadian mechanisms. For example, if an enzyme is found to have a circadian rythm, how is this rhythm produced? Is it because of one or more clock genes?
Comment: I think more details about what you're interested in would be helpful here. You seem to have two questions: 1) how the biomolecular clocks generate rythms, ie the fundamental nature of the biological oscillators, and 2) how they transmit that information to other biological elements like genes etc.
Comment: If i am right, i think that all circadiam mechanisms regulations by circadiem clocks is highly discuss theme in chronobiology. So i dont think that you will get sufficient answer. Anyway can you be more specific about what kind of enzymes would you like to know because still it is too broad.
Answer: Molecular feedback mechanisms create rhythmic patterns. The circadian rhythm is driven by a handful of genes, which in turn can regulate a number of downstream factors.
Here is a very nice explanation of the Drosophila circadian clock, which gives you an idea how this works. The video shows the same animation adding more factors every time to guide you through how the system works on the genetic/protein level.
A brief summary: The genes period and timeless are transcribed over night. Their proteins stabilize each other and build up in the cell. At the same time they block their own transcription, limiting the amount of proteins.
Other factors destabilize the proteins and evoke their degradation. One of them is the light activated protein Cryptochrome. This helps entraining the clock and results in the removal of Period and Timeless protein during the day. The negative feedback of their blockage is removed and transcription starts anew at night, when Cryptochrome is inactive.
These clock genes do not only regulate themselves but can also activate or deactivate other factors resulting in daytime-dependent transcription of genes or protein activity.
The whole picture is of course a bit more complicated and involves a lot of additional factors. But also in humans and other mammals you find very similar mechanisms.

Circadian clocks in enzymes


Signal spectrum when carrier width changes

Question: If I have spectrum $X_k$ of the signal evaluated at frequencies $k \delta f$ and I want to know what is the value of that same signal at some other frequencies , i.e., $k' \delta f'$.I know that $\delta f$ and $\delta f'$ are somehow reelated (e.g. $\delta f = 12 \delta f'$) how can I express spectrum of the signal with this new carrier spacing ($k' \delta f'$) having only info about $X_k$ or in other words what is the coefficient, $X_k' = coefficient \cdot X_k$.
Thanks in advance for any help.
Answer: If the signal is band-limited (at least above some noise level) below half the highest frequency in your initial frequency evaluation set, then you can resample the spectrum to any other frequency spacing by using periodic Sinc (Dirichlet) kernel interpolation.
If there is an integer relationship between the two carrier frequency bin spacings, then you can pre-calculate a polyphase interpolation table using the Sinc function (or a windowed approximation, if that meets your S/N requirements).  Otherwise you can convolve the entire spectrum vector against a computed periodic Sinc or Dirichlet kernel with the appropriate phase offset per computed "carrier" frequency.
Comment: Thx for the answer. But what I would simply like to know (from mathematical point of view) is if I have info about $X_k$ how can I obtain info about $X_k'$. I sould obviously multpily $X_k$ with some complex exponential but what is the exact value?
Comment: Not Xk, but the entire vector X (or a large part of it) needs to be multiplied by a coefficient vector to get a single new spectrum sample (unless X′k happens to be one of the Xk).
Comment: Ok, but the question is how to compute that coefficient vector? how it relates to $\delta f'$ and $\delta f$?


What is a driver, and how does it work?

Question: I recently reintalled the OS on my computer, and had to install a number of drivers to get everything to work. It made me wonder, what is a driver, how does it work? And is there a difference between for example a printer driver, and a graphic card driver?
Comment: This question seems a little broad.  What a driver is exactly is not an easy subject to understand, but it also is well document, and there is learning material out there that explains the basic idea behind them.
Answer: When I write software to print to a printer, I do not want to need to know the specific special commands you need to send to a Lexmark printer to make it print versus a HP printer. What I want to write to instead is a abstraction given to me by the operating system, that way I only need to write my printing code once and my users can use whatever printer they want as long as the OS can translate the generic interface in to the manufacturer specific interface.
Now how does the operating system know how to translate that abstraction in to the manufacturer specific commands for the device? The operating system publishes a API that the manufacturer can write their "translation code" that goes from the generic interface to their specific hardware.
That "translation code" is a driver.
The difference between a graphics driver and a printer driver is that a printer driver talks to the print API and the graphics talk to the graphics API.
Answer: One of the jobs of an OS is to provide "abstraction" - an environment where programmers do not have to detail with low-level details and can instead work on the task they want the computer to do.  This reduces development time and costs.
I/O can be looked at in a very generalized way.  You open a file, read or write to it, then close it when you are done.  This I/O paradigm here (and it's not the only paradigm but certainly the most common and easiest to understand) can apply to a wide number of devices obviously.
But the low-level details of devices are often vastly different.  Programming and operating a floppy drive controller is very different from a hard disk controller, which is very different from NAND flash.
Given, say, something like a programmer who is trying to develop an application like a spreadsheet - it would be very beneficial if he or she did not have to worry about all the meticulous and often times convoluted techniques and requirements involved in getting those devices to read blocks, spin their motors, etc.
We likely get a far better spreadsheet program if someone who understands the low-level I/O hardware details packages that in an API, and then the spreadsheet programmer can use that (hopefully well-documented) API and work on what he/she knows best.  So we write a driver for each device that implements our I/O paradigm - the driver would be the small program that takes high level requests and has the knowledge necessary to get a device to obey them.
The additional benefit is that we (usually) don't have to change our applications when new types of devices come out.  We just add more drivers and tell the application to save to a different place.
Now this is a simplified look but hopefully gives you a good idea.
Comment: Thanks, fully understanding how it works might be a bit above my IT level, but it deffinetly gave me a better idea of what it is, Thank you!
Answer: Drivers are the middleware that allow computer programs to use resources of a specific hardware device.
Comment: More detail would improve this answer
Comment: I wanted it to be a tldr answer.

What is a driver, and how does it work?


Is Linguistic search feature availabe for SharePoint Online?

Question: I am trying to use the stemming feature of Microsoft Graph connector which is a part of the Linguistic search feature. As per some Microsoft documentation, this feature is available for SharePoint onprem. But there is no mention of SharePoint online.
So my question is, is this feature available for SharePoint Online? If Yes, do you have any references?
Answer: Unfortunately, as far as I know, the stemming feature of the Microsoft Graph connector is not currently available for SharePoint Online.


Is there a way to use PC browser bookmarklets with the Android Browser or Dolphin HD?

Question: Can I make these work on Android or is there a google place to create or convert bookmarklets to make them Android Compatible?
Comment: see also: http://android.stackexchange.com/questions/1054/is-there-a-way-to-use-userscripts-greasemonkey-scripts-on-the-android-browser-o
Answer: Finally got it to work and it wasn't complicated at all.
Simply create a bookmark and paste the javascript into the URL field.  I've tried it on this bookmarklet that does a google definition search:
javascript: s = (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (s == '') { l = parent.frames.length; if (l != 1) { for (i = 0; i < l; i++) { s = parent.frames[i].document.getSelection ? parent.frames[i].document.getSelection() : parent.frames[i].document.selection.createRange().text; if (s) { break; } } } } if (s == '') { void( s = prompt('Google Define:
Enter a term or mark some text.','') ); } if (s) { s = String(s); s = s.replace(/^s*|s*$/g,''); s = escape(s);void( bmw = open('http://www.google.com/search?num=100&start=0&q=define:'+s+'','GoogleDefineBM'+String(Math.round(Math.random()*1000))) );}
To get it saved as a bookmark I just saved the text in evernote then copied it on my phone an pasted it in the url field of "new bookmark."  To make it even easier to access I created a custom dolphin gesture that opens it as "Go To URL".  Now when I'm browsing and I want to lookup a word I hit the gesture button and draw a "d" and it brings up a popup that allows me to lookup the word.
I've only tried this on Dolphin Browser HD.
Comment: Unfortunately on Firefox and Chrome for Android it doesn't work.
Comment: But with Dolphin Browser it does work.
Answer: Works in Chrome mobile. Here's the recipe:
PREPARE
Create a bookmarklet = add a script to your bookmarks:

on Chrome PC¹, then sync (so your bookmarks show up in Chrome mobile on your phone)
or directly in Chrome mobile on your phone²

USE
Do not invoke/call the script (on phone) by looking it up in Chrome Bookmarks (menu [ ⋮ ] / Bookmarks) → that doesn't work. You have to tap the URL bar and start typing the bookmarklet's name. Select the bookmarklet from the list (it'll begin with javascript:blahblahblah…).

¹) on any webpage hit Chrome's button [ ⭐ ] on URL bar then [More] in the popup that appears, then enter the bookmarklet name, URL (=code beginning with javascript:blahblahblah…), optionally choose folder, then hit [Save]
²) on any webpage hit Chrome's button [ ⋮ ] then [ ⭐ ] then [Edit] on a bar that shows down the screen, then enter the bookmarklet name, URL (=code beginning with javascript:blahblahblah…), optionally choose folder, then hit [←] to save and go back
Answer: It isn't so much being "Android compatible" as being compatible with the specific browser.
That being said... I haven't gotten URL-based javascript to execute in Dolphin, but that proves nothing.
Answer: "Simply create a bookmark and paste the javascript into the URL field."
Bookmark a page that you have not bookmarked, then modify the bookmark, Name, Address, Folder (to something like "Bookmarklets"), and Assign a Gesture, then Add.
Suggest you create a gesture to create a bookmark and draw a five pointed star as that gesture. (or use the "+" at the left end of the address bar.)
For more information see http://dmcritchie.mvps.org/dolphin/dolphin_mygestures.htm
Comment: This does not work in Chrome.
Answer: Chrome to Phone and also...
Phone to Chrome,
Once the the linkys gets synchronized, then its merely a matter of bookmarking it.
The only onus, is that Chrome is installed on the PC Desktop, in that way, linkys can be shared.


file uploading in asp without ActiveX class

Question: Is there a way to check file size on the client (without the use of ActievX which also errors out), before it is passed back to the server? in asp
Answer: In ASP? No, by definition. Active Server Pages can't do anything before they get a request from the client.
There is a draft File API that will allow you to perform this sort of check using client side JavaScript. The Mozilla Developer Network has a guide on getting information about selected files. Once you have a reference to the file, you can just access its <code>.size</code> property.
Note that since the specification is a draft, it is rather new and subject to change. This one is very new and thus has [very limited browser support](http://caniuse.com/#search=file api).
You might also be able to achieve what you want using a Java applet or Flash (the latter of which would be better supported).


Can I share my Diablo 3 account?

Question: My brother bought a Diablo 3 copy from China, and i stay in Malaysia. We were thinking whether we can share the same account and play in different country?
Comment: Sharing a Battle.net account is against ToS and can/will result in a Ban from Battle.net for that account (and all games linked to it). It is always a safer option to purchase your own copy of the game.
Comment: Actions that are against ToS are also considered off-topic on this site.
Answer: China and Malaysia are both part of the Asian region for purposes of Diablo III. While Global Play does allow you to play in any region, so, for example, if you wanted to play on American servers while your brother played on Asian servers in order to keep characters segregated, you could technically do that, there's a bigger problem here.
Specifically, that Blizzards terms of use for Diablo III and Battle.net accounts in general explicitly prohibit this sort of behavior. Furthermore, because you're both based in Asia, and using IP addresses in different countries, this is going to expose your account to a very high level of scrutiny, meaning it's very probable that you'd be caught, have your account banned, and your license to the game revoked.
In short, I would not suggest doing this. You will probably get banned. It will almost certainly end in tears.
Comment: @Emerica. At which point buying the second copy would have been better because they spent the same amount, but would actually have access for two accounts.
Comment: That is acctually an interesting thought, and the result of this would most certainly end in despair. If someone doesn't want to spring to pay for two then they'll die paying twice for one.
Comment: @Adanion Its a cruel world.
Answer: Your diablo account is not restricted to your region. You can make a character on any region. Of course you will never be able to play together, but there is no reason why region would stop you.
Comment: which means i can use my brother account to login, just we cant login at the same time only right ? but will it crash the diablo3 license agreement
Comment: @KIT As LessPop said, because of the major difference in IP Address the account would most likely be reviewed by Blizzard. And, if you read through the agreements that most people just click okay for, it basically says they can ban you for breaking any of their rules.
Comment: @Emerica - You are not allowed to share a Battle.net account with family members.
Comment: @Ramhound That in no way makes my answer wrong...the account is not restricted by region and that is clear as day. "There is no reason why REGION would stop you". I never said anything about other rules.
Answer: Yes, you could share it.
You can decide to play with the same 8 characters or, changing the server, playing with different characters.
You can choose to play in US ,Euro or ASIA server and for every one you can have 8 characters.
To change server on main login screen click "Options" then go to "Account" and click "Server Region Selection"
You can't play together but with the same account yes ^^
Comment: sound good ...but will i be the unlucky one and get ban from battle.net? xD
Comment: @KIT - Your account WILL be banned if you share your account with your brother.
Comment: @Shyghar - The limit is 10 character per region.  He is NOT allowed to share the account.

Can I share my Diablo 3 account?


Can a landlord submit a change-of-address on behalf of a former renter who refuses to do so?

Question: My family owns a condo, and I recently moved in. The previous tenant refuses to have his mail forwarded because, as he says, "I don't want the junk mail, and everything important is forwarded already." I am getting multiple catalogs and letters addressed to him and his wife still. Can I fill out a change of address form for this guy who just wants me to clean up his mess rather than unsubscribe himself?
Answer: There is a USPS form to fill out, to change a person's address. This page shows you what the form looks like. You should notice the text which they transcribe onto the page:

NOTE: The person signing this form states that he or she is the
person, executor, guardian, authorized officer, or agent of the person
for whom mail would be forwarded under this order. Anyone submitting
false or inaccurate information on this form is subject to punishment
by fine or imprisonment or both under Sections 2, 1001, 1702 and 1708
of Title 18, United States Code.

So you cannot legally do anything, other than take annoying mail and notate it with an indication that they are not at this address ("Return to Sender" is the classical response), and stick it back in the mail.
It is also legal to go to the post office and complain (politely) to the staff, who deal with the situation in a way that doesn't put you at legal risk.
Comment: That's not going to work.  Virtually all junk mail is sent under "Standard Mail" or "Bulk Rate Mail" rates.  This *does NOT* include "Return to Sender" services, so the sender will never find out.  (unless the bulk mail piece includes the notation and barcode for "Return Service Requested" which is rare).  If you throw it back in the mailbox, the Post Office will deliver it back to you (if it is machine routable) or throw it in the trash (if not).
Answer: As the answer by user6726 explains, you cannot legally fill out a forwarding order for someone else without that person's permission.
However, you can write "Please forward to: [Tenant's new address]" on the mail if you have the the new address at hand, and return it to the carrier or the post office with this note, if you choose. (Cross out your address with a single line so it is readable.) If you return it to the carrier several times, s/he may filter out mail addressed tom the former tenant. Or the tenant, finding mail forwarded in this way, may choose to unsubscribe from no longer wanted sources of mail.
Comment: That won't work.  See my comment to user6726.  There is no way to signal to a bulk mail sender to stop sending, other than contacting the bulk mailer directly.  (in most cases they are *happy* not to send out undesired mail, since it costs at least $1 per piece to produce and mail a piece.)
Answer: He will need to visit the USPS and have form 3575Z (internal COA) filled out for the individual. This will have the past tenants first class mail returned to sender. This will NOT stop their non-first class mail (presorted STD, marketing/junk, "or current resident", EDDM/ECRWSS/ECRWSH, charity, political, non-profit). Non-first class mail is NOT returnable or able to be forwarded.
More than likely they will state - moved left no forwarding address.
ONLY the individual can submit an actual forwarding address!


Where does a Class 8 probe get is power from?

Question: In the TNG Episode The Emissary, we learn that a Class 8 probe can travel at warp 9 (which puts quite a strain on a Galaxy-class starship, let a lone a probe!).  The probe in question was stripped of most of its features to fit a passenger (I shan't name the person to avoid spoiling the episode) inside, who occupied the vast majority of the probe with very little room to spare.  Hence, how does the probe manage to sustain such extreme velocities and where does it source its power from?
Comment: That's what she said. I tend to agree with you that it doesn't make much sense myself, but that's the best I can come up with at the moment.
Comment: I had thought it was launched at warp 9, not that it accelerated itself to that speed...
Comment: @DougT. - that is certainly a possibility, although the question then presents itself as to how the probe *maintains* that speed
Comment: I thought the same as Doug T.. I would assume that something launched at warp speed would maintain that speed until stopped by an outside force, likely gravity, due to inertia. This is the case in the *Star Wars* universe, though I know of nothing that proves this is also the case in *Star Trek*.
Comment: @JamesSheridan - in the episode though, the probe is traveling at warp 9 and then slows as it approaches The Enterprise, suggesting some sort of propulsion system.  Also, when the Enterprise's saucer section separates, it continues to travel at the warp speed without a warp core, but does indeed slow down.
Comment: A pre-programmed flight path that uses some sort of battery power?
Answer: Class 8 probes are based on photon torpedoes, which use a warp sustainer engine:

Star Trek: The Next Generation Technical Manual

The propulsion system of the torpedoes is a warp sustainer engine. The engine coils of the torpedo grab and hold a hand-off field from the launcher tube's sequential field induction coils. A miniature matter/antimatter fuel cell adds power to the hand-off field. When launched in warp flight, torpedo will continue to travel at warp, when launched at sublight, torpedo will travel at a high sublight speed, but will not cross the warp threshold. (pg. 129)
Class VIII medium-range and class IX long-range multi-mission warp probes both use a modified photon torpedo casing and a warp sustainer engine as the power plant. (pg. 117,118)


C# Compilation without visual studio

Question: I am learning C# and I know the advantages and ease of using Visual Studio but basically I want to learn the mechanics of C# the old school way.
I understand that I need to the least .NET Framework and Notepad to compile C# code which I have already. Now I have created the small app as myApp.cs and I want to know how should I compile it as executable from command line cmd.exe
Comment: Download a decent editor.  Notepad is just about the worst thing to write code in.  Try Notepad++, its free (both meanings).
Comment: Added some extra relevant tags
Answer: The command line compiler is csc.exe.
MSDN has an article that might help get you started.
Comment: What's the difference between .NET Framework and .NET Framework SDK?
MSDN Article mention .NET Framework SDK and I see that I have .NET Framework all  of the versions from 1.1 to 3.5 SP1 and yes the folder does contain the csc.exe
Comment: The .NET Framework is the runtime, and the SDK is the Software Development Kit for the runtime. It has extra things like disassemblers, a debugger, code-signing tools, tools for manipulating the Global Assembly Cache, and so on.
Answer: csc.exe is the compiler.
http://msdn.microsoft.com/en-us/library/78f4aasd.aspx
Answer: It is actually very easy to run the csc.exe compiler outside of the IDE but the trick is to make sure you have first run the vsvars32.bat file. This batch file sets up all the environment variables required by the compiler.
And while you're at it you can even debug the program outside the IDE by using the standalone debugger.
Answer: http://www.devsource.com/c/a/Using-VS/Working-at-the-Visual-Studio-Command-Line/
That should help. It describes how to command line compile using the Visual Studio tools
Answer: nAnt and msbuild are a couple of other utilities that may be useful beyond just the compiler.
Answer: Good idea, I think it can help with understanding what is going on.
Using csc:
The /recurse flag is really useful and can be used to compile all files in a directory tree.
If you want to make life a little bit easier for yourself while still staying close to the basics use a nicer text editor than notepad. One that can call a batch file that compiles and runs your program. Then you can set it up so that when you click on a compile error it goes to the source code for that error.

C# Compilation without visual studio


More than one coverage layers in QGIS atlas

Question: In QGIS how can I have more then one coverage layer in Atlas?
As is shown in the image below I have multiple city blocks (in a layer), that contain multiple land lots (in a different layer).
I wish to generate various maps (like the one in the second image, highlighting a different land lot each time) where Atlas could go first through all the land lots polygons inside a city block, then again in all land lots inside another city block, and etc.
Comment: Maybe using the report (https://docs.qgis.org/3.16/en/docs/user_manual/print_composer/create_reports.html) could get you there
Comment: Great question! I don't dare to say "That's not possible", so let me just say that so far, I don't know if it's possible at all. Let's hope so and I would be lucky to see an answer on this. I'm not sure but maybe creating a virtual layer that combines both block and land lots and than using this virtual layer as coverage layer could be an option?
Answer: I think you can solve this using a single coverage layer (the plots) and then use an expression to set the extent of the map to the bounds of the enclosing block based on the location of the plot.
Comment: That is what I did with the expression seen here https://gis.stackexchange.com/a/289688/159239. It's not perfect since the frame around the feature gets very narrowed but for what I needed it suited. So I'm taking this as the answer since there's no "official" way of doing this. Thanks
Answer: You can create the combination of the two geometries and use this as coverage layer for your Atlas. There are at least three possibilities to add the features of the two layers. The first (and preferable) one will not create new data and any change in one of the two initial layers is automatically reflected - that comes as close as possible as using two layers as coverage for the atlas:

Create a Virtual layer that combines your two polygon layers (see here for the query to use).

Use this virtual layer as coverage layer and you're done.

Options 2 and 3 are good to create actual layers in case using the virtual layer should be unstable. However, changes in the initial geometries are not refelcted and new data is generated.

Use Merge vector layers tool.

Use Geometry by expression to create a new layer combining both input polygon layers with the following expression, than run Multipart to singleparts and Delete duplicate geometries.
<code>collect_geometries(
    aggregate('plot', 'collect', $geometry),
    aggregate( 'building', 'collect', $geometry)
)
</code>
Comment: I'll definitely try this. Thank you!


Regression: can I run specific models or do I need to run a full factorial model?

Question: I am running a GEE (Generalized Estimating Equations) Linear Scale Response regression.
I have 4 IVs: Time pressure and Approach as as factors, and BIS and BAS sensitivity as covariates.
My DV is "Choice".
Under Model tab, I need to specify my model effects.
What I would like to do is to test the main effects for all 4 IVs + the 3-way interaction between Time pressureApproachBAS (BIS is included only as a main effect as I want to control for the effect of BIS).
This gives me a significant 3-way interaction effect.
However, I wonder if this is correct? Can I specify the model effects that I am interested in? Don't I need to run full factorial models (that include all possible main, 2-way and 3-way interaction effects)? If I run the full factorial model, the significance of the 3-way interaction disappears.
Answer: If you have a 3 way interaction, you will (in nearly all cases) want to include the 2 way interactions that are part of that 3 way interaction and all the main effects in the 3 way interaction.
Similarly, if you have a 2 way interaction, you should (in nearly all cases) include the main effects.
You also shouldn't look exclusively at significance; look at effect sizes.
Comment: Thank you Peter! By effect sizes, you mean the B coefficient values?
Comment: Yes, exactly. Look at those and see what they mean in your model.


Live tracking of shipment in Magento 2

Question: How to configure live tracking in magento 2 CE?
Answer: "Live tracking" is available in Magento 1.x and 2.x by way of the transactional email. When adding a tracking number to a shipment the email that follows contains a link to the shipping module Tracking Popup action. This loads the popup.
To call this "live tracking" is a bit of a misnomer but if you utilize the API of a shipment provider like UPS or Fedex you will likely be able to click through to the tracking page for that API.
Comment: can you please provide steps of how  can i utilize that API?
Comment: It's not an API. It's a feature of the Magento shipping module in the platform - a windowed view into the tracking information as received from the shipment provider.
Comment: @philwinkle I am using, ups, usps, fedex, My live tracking popup window show nothing, but courier website shows every tracking details.
Answer: You have 2 options:

Utilize the API of the carrier, if the carrier offers an API and your carrier module supports it. In that case you need to have an active account with specific permissions to each carrier to use their API. Usually your carrier module asks for API credentials in it's configuration settings.
Use a module which consumes a tracking API, which supports several carriers.
For example: ShipTracker

Live tracking of shipment in Magento 2


Active Directory LDAPS not working

Question: I have a test domain with one domain controller. On it I have imported the root and issuing CA certificates to the appropriate certificate stores for the entire computer and have done that for every computer on the domain as well. I then imported a certificate into the NTDS Personal Certificate Store that was issued by the Issuing CA (certificate imported by double clicking on a .pfx file and following the prompts). The issued certificate has Server Authentication, a CN and SAN that match the fully qualified domain name of the domain controller, and is not expired or revoked. After setting this up I restarted the domain controller. When I try to connect via ldp.exe (using the FQDN) from another computer on the domain I am unable to connect. All ports are open so there is no firewall issue. What else can it be?
Comment: Please tell us what you have tried and show logs or results and Read:
https://stackoverflow.com/help/how-to-ask
Answer: Trouble shooting:
Telnet to it and see if you get an empty screen with a blinking cursor.
Use the Ldp.exe tool on the domain controller to try to connect to the server by using port 636 If you cannot connect to the server by using port 636, what are the errors that Ldp.exe generates?
Answer: Turns out the certificate I generated was incorrect. The instructions I was following said to generate a certificate with a CN (or SAN) matching the value that shows up in the Active Directory Domains and Trust (in my case, the domain name) but that didn't work for me. What ended up working was having the CN match the computer_name.domain_name. Once I did that everything worked as expected.
For example, if your domain name is example.com and your computer name is EC2AMAZ-ABC1234, then your CN (or SAN) should be EC2AMAZ-ABC1234.example.com, which may very well be your "Full Computer Name".

Active Directory LDAPS not working


Pathophysiology of babinski sign in spinal cord injury?

Question: How can we differentiate between upper motor and lower motor neuron lesions on the basis of babinski's sign ?
Comment: The SE network, including Bio, is not just for your answer only, it is built for the community at large. Supplying background information aids that purpose.
Comment: Could you add some more background to the question? I.e., what is babinski's sign?
Comment: shouldnt people (to whom the question is intended to be answered by) know it ?
Answer: Short answer : If the Babinski sign is positive in adults, it indicates an upper motor neuron lesion.
Long answer :
The plantar reflex is an interesting reflex since it has two physiological responses. One in kids 1-2 years of age and another in the rest. It is one of the primitive reflexes that are present in infants but are cortically inhibited later in life.
The primitive response to the plantar reflex is extension of the hallux and fanning out of the toes. Once the kid is around 1-2 yrs of age, the corticospinal tracts are fully myelinated and this primitive reflex is inhibited leading to the flexion of the hallux.
Extension of the hallux is regarded as a positive Babinski sign while flexion is sometimes called negative babinski.
So in an adult, due to cortical inhibition of the primitive reflex, the plantar reflex should yield flexion of the hallux. But if it pathologically shows a babinski positive, it indicates the absence of cortical inhibition - an upper motor neuron lesion. This might be a serious neurological issue and you'd want to do a CT brain, CSF study or an MRI spine to localise the lesion.
On the other hand a negative babinski in kids who should be showing the primitive reflex, may be showing signs of spasticity. This should direct us towards progressive neurological disorders like cerebral palsy.


Probability for Poisson distribution problem

Question: Let the random variable $W$ denote the number of students who take
business calculus each semester at the University of Louisville. If the random
variable $W$ has a Poisson distribution with parameter $\lambda$ equal to 300 and the probability of each student passing the course is $\frac{3}{5}$, then on an average how many students will pass the business calculus?
Answer: $W$=Number of students taking the course. Say $X_{i}=1$ if the $i^{th}$ student passes the course and $0$ otherwise. So you have to find $E[\sum_{i=1}^{W} X_{i}]$.
Then $E[\sum_{i=1}^{W} X_{i}]=E[E[\sum_{i=1}^{W} X_{i}|W]]$. Now $E[\sum_{i=1}^{W} X_{i}|W=w]=\sum_{i=1}^{w}E[X_{i}]$ assuming independence of $X_{i}$ and $W$.
Now $E[X_{i}]=\frac{3}{5}$. Hence $E[\sum_{i=1}^{W} X_{i}|W=w]=\frac{3w}{5}\Rightarrow E[E[\sum_{i=1}^{W} X_{i}|W]]=E[\frac{3W}{5}]=\frac{3}{5}E[W]=\frac{3}{5}*300=180 \Rightarrow E[\sum_{i=1}^{W} X_{i}]=180.$
Answer: Suppose that $X$ is the random variable denoting the number of students that pass the course each year. Then $X \sim B(\frac{3}{5}, W)$ where the right hand side denotes the binomial distribution with $W$ trials, and a probability of success of $\frac{3}{5}$ for each trial. Now since
$$ \mathbb{E}(B(p, n)) = pn $$
we see that
$$\mathbb{E}(X) = \frac{3}{5}\mathbb{E}(W) = \frac{3}{5}(300) = 180.$$
The last part is justified by the fact that for any Poisson distribution, so $\mathbb{E}(W) = \lambda = 300$, since the parameter of the Poisson distribution is defined to be the average events (in this case the number of people taking the course), which is what I used above.
Hopefully that helps.
I guess it does depend a lot on the rigour you require. The answer given by @AnirbanChatterjee is much better for this.
Answer: Hint: Let $X\sim$ Poisson. What is $E[X]$?


Why are fixnums in Emacs only 29 bits?

Question: And why don't they change it?
Edit:
The reason ask is because I'm new to emacs and I would like to use Emacs as a "programmer calculator".  So, I can manipulate 32-bit & 64-bit integers and have them behave as they would on the native machine.
Comment: So fixnums aren't really what you want.  You really want custom integer operations that simulate machine arithmetic.  I could elaborate, but it would probably be useful to others visiting the site if you opened a new question for that.
Answer: Emacs-Lisp is a dynamically-typed language.  This means that you need type tags at runtime.  If you wanted to work with numbers, you would therefore normally have to pack them into some kind of tagged container that you can point to (i.e. "box" them), as there is no way of distinguishing a pointer from a machine integer at runtime without some kind of tagging scheme.
For efficiency reasons, most Lisp implementations do therefore not use raw pointers but what I think is called descriptors.  These descriptors are usually a single machine word that may represent a pointer, an unboxed number (a so-called fixnum), or one of various other hard-coded data structures (it's often worth encoding NIL and cons cells specially, too, for example).
Now, obviously, if you add the type tag, you don't have the full 32 bits left for the number, so you're left with 26 bits as in MIT Scheme or 29 bits as in Emacs or any other number of bits that you didn't use up for tagging.
Some implementations of various dynamic languages reserve multiple tags for fixnums so that they can give you 30-bit or even 31-bit fixnums.  SBCL is one implementation of Common Lisp that does this.  I don't think the complication that this causes is worth it for Emacs, though.  How often do you need fast 30-bit fixnum arithmetic as opposed to 29-bit fixnum arithmetic in a text editor that doesn't even compile its Lisp code into machine code (or does it?  I don't remember, actually)?  Are you writing a distributed.net client in Emacs-Lisp?  Better switch to Common Lisp, then! ;)
Answer: The remaining 3 bits are used as flags by the Lisp interpreter.  (You can get bigger integers by compiling Emacs for a 64-bit machine.)
Answer: Others have commented on why fixnums are only 29 bits wide. But if you want a programmer's calculator, check out calc. It offers arbitrary-precision integers, matrix operations, unit conversions, graphics via gnuplot, statistical functions, financial functions, scientific functions, RPN and algebraic notation, formula simplification... and it's already part of Emacs, so to get started, visit the Info node for "calc" and start at the tutorial.
Answer: The other three bits are used as a tag of the type of object. This used to be so prevalent that a number of CPU architectures included at least some support for tagged integers in their instruction sets:
Sparc,
Alpha,
Burroughs, and the
K-Machine for example. Nowadays we let the Lisp runtime deal with tags, without additional hardware support. I'd recommend reading the first link, about Sparc, if you want to get a quick overview of the history.
Answer: In many Lisp implementations, some of the bits in a word are used for a tag.  This lets things like the garbage collector know what is a pointer and what isn't without having to guess.
Why do you care how big an Elisp fixnum is?  You can open gigantic files as it is.
Answer: I use the Common Lisp interpreter CLISP as a programmer's calculator.  Common Lisp has the sanest number handling that I've seen in any programming language; most notably, it has integers of arbitrary size, i.e. bignums, as well as rational numbers.  It also has input in arbitrary number bases and bitwise functions for bignums.  If you want to calculate from within Emacs, you can run CLISP in an M-x shell.  As a bonus, the syntax is almost exactly the same as what you would use in Emacs Lisp.
Answer: That is only true for 32 bit architectures, and can be changed based on build options.  The other bits are used for tagging the basic data structures.
You can use a 64-bit build which has larger integers, and there are packages for arbitrarily large integer arithmetic.
Or, you're just asking a rhetorical question trying to sound angry and important...

Why are fixnums in Emacs only 29 bits?


cakePHP layout data, using requestAction, is there another way?

Question: I'ts a known issue, requestAction is a resource waste. however, I need some dynamic data in my default layout. I'm using elements for it, with requestAction calls.
Is it the only way?
Answer: I believe requestAction is a good tool. Most MVC frameworks do not even think of the need to show multiple pieces of content, whereby you do need that most of the cases within a single layout.
I'm not sure how it wastes resources and why the documentation makes you believe it is a performance bottleneck. Use caching with the right keys and it should do the trick.
Answer: There's nothing wrong with requestAction, it's just very easy to invoke it inefficiently  and skewer your app's performance. The way it works, you'll end up with monster objects bulging with properties, etc - stuff you don't need and probably wouldn't have pulled if you'd realized it was going to happen like that. How many devs wouldn't spend three extra seconds to type $this->Other->Model-> if it saved you from potentially trying to debug one of those behemoth objects?
85 times out of 100, there's a more efficient (app performance) way to do whatever you needed requestAction() to do. There's actually another method built into cake that does almost the same thing, only it's meant to be used in controllers and if I can find it, I'll link...
Edit I can't seem to find it. It's something a little extra obscure.
Answer / suggestion to your question, avoiding requestAction is especially easy in views / elements.
If the data is less abstract and more dynamic, ajax -> call your controller / method, pass any data, etc, fetch your dynamic result.
If the data is highly abstract or applicable - such that you need it in your default layout - consider tucking it into your AppController or even the bootloader. This is probably a much more efficient solution - pushing it from the process stage rather than paddling upstream to get it at the rendering stage.
Components / helpers, of course, would be another way to position multiple-controller + layout-level view data fetching.
HTH :)


Can water pressure ever be high enough to trap gas bubbles or keep them from surfacing?

Question: Can water pressure ever become high enough to trap gas bubbles and/or keep them from surfacing?
Comment: I think a bottle of soda is a good example of how that is done ;)
Answer: The highest pressure in the ocean is at the bottom of the Mariana trench, where the pressure is 1 086 atmospheres. Using the online calculator for the properties on nitrogen at 4 °C and 1 000 atmospheres the density comes out as 602 kg/m³, which is still less than water. So a bubble of nitrogen would rise even at the deepest point in the ocean.
Response to comment:
In principle we can continue increasing the pressure and the nitrogen should get denser. However at temperatures above 0 °C and the sorts of pressures we are talking about, nitrogen is a supercritical fluid so it does not obey anything like an ideal gas law. Calculating at what point the density would exceed the density of water is far from easy.
The effect of pressure on water is straightforward. At sea bottom temperatures (about 4 °C) the density of water increases only slowly with pressure to about 1 050 kg/m$^3$ at 6 000 atmospheres, at which point the water freezes to form ice V. So the question is whether the density of nitrogen exceeds 1 050 kg/m³ below a pressure of 6 000 bar.
I can't find any figures for the density of nitrogen at these sorts of pressures and temperatures, though I did find this paper that gives a Mie-Grüneisen type equation relating the density, pressure and temperature. Unfortunately the preview only shows two pages and the rest of it is behind a paywall. However using the figures they give and waving my arms around a bit I find the density of nitrogen rises to 1 050 kg/m³ at around 4 000 atmospheres.
So, it might just be possible to get a nitrogen bubble that is denser than water and will sink instead of floating. But I don't know whether the equation from the paper I cited is accurate at these sorts of pressures and temperatures, and it's possible the nitrogen will solidify before the water does (though I'd guess not).
Comment: But, under artificial compression, is it _possible_ to trap the gas bubbles somehow?
Comment: @josephminor: I've edited my answer to respond to your comment
Comment: But wouldn't another gas possibly be dense enough at lower pressure?
Answer: In case your question stemmed from seeing a similar phenomenon yourself, what you saw might have been an antibubble. An antibubble is a droplet of water, encased in a thin shell of air, suspended in water. These are pretty unstable in nature, so they're rarely observed unless artificially induced.
An antibubble will have roughly neutral buoyancy, being composed almost entirely of the medium it is suspended in, and will therefore accelerate neither upwards nor downwards (unless disturbed). This means it can easily be mistaken for an anomalous gas bubble that is "trapped" in place.
Answer: If you fill a glass tube with water, and then pull a vacuum on it, at some point bubbles will start to form.  Increase the vacuum, and the bubbles will rise.  Reduce the vacuum and the bubbles will disappear.
What's going on there is that the water is evaporating to form the bubbles.  There is a continual motion of water molecules across the bubble interface, moving from vapor to liquid.  The process is highly dependent on pressure.  If more molecules are becoming vapor than are becoming liquid, then the bubbles grow until equilibrium is reached.
Something similar can happen with dissolved CO2 or dissolved nitrogen in water, which explains why soda in a closed bottle does not keep making bubbles, and why divers need to ascend slowly from great depths to avoid "the bends": formation of nitrogen bubbles in their blood and tissues.  Solubility of CO2, nitrogen, and other gasses is highly pressure-dependent.
See for example this link.
Answer: The above answers don't answer the initial question, but rather other one's not asked.  The soda "answer" is an example of a closed container with equal preasure at all points, and thus no buoyancy effect present. The Marianas Trench "answer" again changes the question by delving into the q of at what pressures can you force a gas to be higher density than water, but in the 'answer' example the same buoyancy pressures (more pressure lower than higher on the air bubble pushing more below than above) are discussed as in any country club pool, just higher psi involved.
The question is skirted and changed in the above "answers".   So if this isn't done, if a very strict scenario is in place forcing an answer to the question asked and not another one, then how would you answer?
Scenerio - a 20 foot deep pool filled with water with a walled cylinder dropped in virtically and the bottom of the cylinder sealed to the floor of the pool, with the cylinder walls 10 feet high.   Within the cylinder on the floor all across it's circumference is a one foot high container of air that has a lower psi than the water above it but the air is, for now, trapped by a top that can be swiftly slid off.     So, in this hypo there is no surrounding higher psi water below or around the air to cause uoward buoyancy effects, it (the higher psi water) is all higher to start than the lower psi air.
I believe this is the initial question asked (put more rigidly to stop the above recited answering a different q issue) - what if all of a sudden the air container top is extremely swiftly slid off through a slot in the cylinder wall.  Will the lower psi air be trapped by the higher psi water above it?
And the answer is....... No, the air will not be trapped, but will rise.  But more correctly, actually the pressure  above will compress the lower air very quickly until the air reaches the same psi as the water, and gravity will 'force' the water downward seeping between the air molecules and a process will begin wherein the water will displace the air and at some point (very, very quickly) there will be present a two-phase mixture wherein the pressure of the water will be greater upon the separated (now) air bubbles bottoms than tops, and the normal buoyancy effects come into play, causing the air to rise to the top. And walla, all is right with the world; and it is once again safe for democracy.


When to choose a Structure over a Channel?

Question: Structures look interesting because you can reorder entries manually, generate breadcrumbs and visually see a hierarchy of entries. Besides this, what are the primary consideration when choosing a Structure over a Channel?
Answer: Ordering and Hierarchy are the main benefits but they create a couple of side benefits such as the ability to

get the "children" and "parents" of an entry
get siblings including next and previous siblings

The best part is there no real downside, they have all the features and functions of a regular channel PLUS the structure.
Comment: The only downside of a structure over a channel is that there is overhead associated with keeping track of all that extra information (hierarchy, ordering, etc.).  If you don't *need* the features of a structure, then a channel is much more efficient.
Comment: "much more efficient" - how much so? What sort of performance impact are we talking here?
Comment: Also worth noting: You can always convert a Channel into a Structure or vice versa, without loosing field-data.
Comment: I see no one replied to that for years, but I'll chime in: it's more efficient on large websites to use channels instead of structure because mysql has to make extra queries and fetch extra data to generate pagination (prev entry, next entry, count entries to generate number of pages, etc.). You can see a similar performance problem with WordPress (if you don't use pagination, you can declare an option called "no_found_rows" that removes those extra queries). On a smaller database, it's not much noticeable though, so take with a grain of salt.


Workarounds to avoid trying to conditionally protect cells in a shared workbook

Question: Now...I have a workbook with 5 tabs.  On tab 1 (the dashboard) I have four buttons - each one is basically a link to one of the other four.  The reason it's there with buttons is that only users with 'admin' permission to the workbook can go and change data on the other four tabs.
All other users should not be allowed to change any data on those other four tabs.  It's a "look but don't touch" policy. Oh - to complicate it a little, we then decided they SHOULD be able to change one column on each worksheet.
So. It's a shared workbook. My piece of code:
Private Sub cmdViewHistology_Click()
    If UserPermsLevel = "High" Or UserPermsLevel = "Super" Then
    Worksheets("Histology and Cytology").Visible = True
    Worksheets("Histology and Cytology").Activate
        Exit Sub
    ElseIf (UserPermsLevel = "Normal" Or UserPermsLevel = "Normal and UserName") Then
        Worksheets("Histology and Cytology").Visible = True
        Worksheets("Histology and Cytology").Range("A:I").Locked = True
        Worksheets("Histology and Cytology").Range("J:J").Locked = False
        Worksheets("Histology and Cytology").Protect DrawingObjects:=False, Contents:=True, Scenarios:=False
        Worksheets("Histology and Cytology").Activate
    Else
        MsgBox "Sorry, this command is not available."
    End If
End Sub

It doesn't work.  Because it's shared, I know I can't protect the sheet - which is a shame.  The problem is...I need those admin users to be able to change everything, and I need everyone else to be able to look but not touch!
So...does anyone have an alternative approach I could use for this?  At the moment my workaround is to disable the four buttons and give them an out of order message which is not winning me any favours...
Really really hoping someone has a bright idea which will help me out of this hole!
Thanking you
Answer: If you know the Windows login for the admin users (or non-admin, whichever is easer) you can use Environ("Username") to check against a list of approved users.
On the change event of the worksheet, find out what cell is being changed, and if it's not allowed, then check to see if that specific user has rights to do so.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim EditableRange As Range
Dim Intersect As Range
    Set EditableRange = Range("A1") ' Set your range appropriately...
    Set Intersect = Application.Intersect(EditableRange, Target)
    If Intersect Is Nothing Then
        'If this is not in the list of editable cells, then check for admin status
        If UserPermsLevel <> "High" And UserPermsLevel <> "Super" Then
            Application.EnableEvents = False
            Application.Undo 'Undo the edits the user made
            Application.EnableEvents = True
            MsgBox "Sorry, this command is not available."
        End If
        'Implied else: allow change
    End If
    'Implied else: allow change

End Sub

Also, you will need to set this code on each of your 'uneditable' tabs, or put it in a separate module which is then called by the Private Sub Worksheet_Change(ByVal Target As Range) on each of those tabs, not on the code for the buttons that switch the visible tab.
Comment: Thanks, will test today - I am already using a specified list of users and will try to separate module approach as I already have another couple of subs in a separate module...
Comment: @Elatesummer - Ok, didn't know if the `Environ()` would be helpful or not. Also as an FYI, depending on how much changing of data is going on, this may trigger quite frequently, which *may or may not* cause some slowdown in processing.
Answer: Perhaps checking on the SelectionChange event if ActiveCell.Column is whatever you want to allow and UnProtect the sheet, any other column would assert protection. Keep things otherwise locked to all but admins.  --I meant to suggest that @Gaffi check for UserPermsLevel is a good idea to incorporate as well
Comment: Thanks for your answer - Gaffi's answer did the trick though!


Picard of the product of two curves

Question: Can anyone point to me where I can find the proof that the Picard group of the product of two curves is isomorphic to the product of the Picard groups times the hom among the Jacobians?
Does the result work on an arbitrary field?
Thank you very much for your time and attention
Comment: Over $\mathbb{C}$, this is easy to see from Hodge theory and the Lefschetz $(1,1)$-theorem; one just computes with Kunneth, and uses that Hom of the Jacobians is the same as Hom of $H^1$ of the curves.  The result is true over arbitrary fields, however, but requires more argument.  I can write out more details if you'd like over arbitrary fields, though it's a bit exhausting.  Have you come up with maps both ways yet?
Answer: It seems likely that you are assuming the curves are smooth and geometrically connected (e.g., you don't have in mind generalized Jacobians for singular curves), but you have omitted hypotheses on the ground field and have not indicated if you are assuming the existence of rational points.
Let $X$ and $Y$ be geometrically integral proper schemes over a field $k$. First assume there exist $x_0 \in X(k)$ and $y_0 \in Y(k)$, so the relative Picard functors ${\rm{Pic}}_{X/k}$ and ${\rm{Pic}}_{Y/k}$ respectively classify isomorphism classes of line bundles on $X$ and $Y$ trivialized along $x_0$ and $y_0$. Let $L$ be a line bundle on $X \times Y$, and define the line bundles $L_1 = (1_X \times y_0)^{\ast}(L)$ on $X$ and $L_2 = (x_0 \times 1_Y)^{\ast}(L)$ on $Y$, so the line bundle
$$L' := L \otimes (p_X)^{\ast}(L_1)^{-1} \otimes (p_Y)^{\ast}(L_2)^{-1}$$
has trivial pullbacks along $x_0 \times Y$ and $X \times y_0$.  Hence,
$L'$ as line bundle on $X \times Y$ trivial along $x_0 \times Y$ is classified by a $k$-morphism $f_L:Y \rightarrow {\rm{Pic}}_{X/k}$ carrying $y_0$ to $0$. This map lands inside ${\rm{Pic}}^0_{X/k}$, and it is clear that $f_{L \otimes M} = f_L + f_M$
for $L$ and $M$ on $X \times Y$.
Assume now that $X$ and $Y$ are curves, so by the Albanese property of Jacobians we see that $f$ corresponds to a $k$-homomorphism $J_Y \rightarrow J_X$.  This defines a homomorphism
$${\rm{Pic}}(X \times Y) \rightarrow {\rm{Mor}}_k((Y,y_0), (J_X,0)) = {\rm{Hom}}_k(J_Y, J_X)$$
that admits a natural homomorphic section via the Picard functorialty of $J_X$ with respect to $(X, x_0)$ (essentially run parts of this construction in reverse).
The seesaw theorem implies that the kernel of this surjective map consists of exactly those $L$ for which $L'$ is trivial, which is to say it is the image of the visibly injective map $${\rm{Pic}}(X) \times {\rm{Pic}}(Y) \rightarrow {\rm{Pic}}(X \times Y).$$
Hence, we have built the desired isomorphism, but our construction rests on the choices of $x_0$ and $y_0$.
If these construction are carried out in a more careful scheme-theoretic manner over $k$-algebras uses the schematic form of the seesaw theorem, and keeps track of trivializations then this argument provides a left exact sequence of $k$-group schemes
$$0 \rightarrow {\rm{Pic}}_{X/k} \times {\rm{Pic}}_{Y/k} \stackrel{j}{\rightarrow}
{\rm{Pic}}_{(X \times Y)/k} \rightarrow \underline{\rm{Hom}}(J_Y,J_X)$$
where the final term of the \'etale Hom-scheme over $k$ and the induced map on geometric points is short exact.  But the initial inclusion $j$ between smooth $k$-groups locally of finite type induces on Lie algebras the natural map ${\rm{H}}^1(X,O_X) \oplus {\rm{H}}^1(Y,O_Y) \rightarrow {\rm{H}}^1(X \times Y, O_{X \times Y})$ that is an isomorphism, so ${\rm{coker}}(j)$ is \'etale.  Consideration of geometric points then shows that ${\rm{coker}}(j)$ maps isomorphically onto the Hom-scheme, so the left-exact sequence of $k$-groups is short exact.
What happens to the identification of the cokernel of $j$ with the Hom-scheme if we change $(x_0,y_0)$, using the identification of Jacobian as dual to Picard scheme (thereby suppressing its dependence on the base point, via Grothendieck's definition of the Picard functor through sheafification)? Since the entire construction can be carried out using sections after base change over any $k$-scheme, the dependence on $(x_0,y_0)$ is classified by a $k$-scheme morphism
$$X \times Y \rightarrow \underline{\rm{Isom}}({\rm{coker}}(j), \underline{\rm{Hom}}(J_Y,J_X))$$
which must be constant since the target is etale.
Hence, the identification of the cokernel of $j$ with the Hom-scheme is independent of the choice of $(x_0,y_0)$, so in general without assuming such $k$-points to exist we can carry out the construction over a finite Galois extension of $k$ where rational points can be chosen and then use Galois descent to bring it down to $k$ (independently of all choices).  This solves the original question in the form of a short exact sequence of smooth $k$-groups which is split-exact (hence also split on $k$-points) when $(x_0, y_0) \in (X \times Y)(k)$ is chosen.  In the absence of such base points it isn't clear that one should really expect a description of ${\rm{Pic}}(X \times Y)$ in the form requested.  (Presumably the case of curves of genus 0 or 1 without $k$-points may already exhibit some obstacles, but I am too lazy to sort that out at the moment.)
Comment: It seems that it might be a bit easier to keep track of things if one uses the Leray spectral sequence for the maps $X\times Y\to X\to *$.  Then one gets an exact sequence $$0\to \text{Pic}(X)\to \text{Pic}(X\times Y)\to H^0(X, \text{Pic}(Y))\to \text{Br}(X)$$ and we may write $H^0(X, \text{Pic}(Y))$ as $\text{Hom}(\text{Pic}^1(X), \text{Pic}(Y))$.  I haven't thought very hard about when the last map in this sequence is zero, though...
Comment: Thank you very much for taking the time to explain everything to me. You are correct, of course, about the hypothesis. I apologize for the sloppiness. In truth I was just looking for a reference... this is so much better. Thank you very much!

Picard of the product of two curves


Citrix login performance

Question: How do you go about troubleshooting application startup time in a Citrix environment? We have some users that get very fast startup time, others take forever when starting the same application on similar hardware/network.
Answer: Take a look at the profiles. If they are on the same hardware and it's consistently the same users who are slow, look at the profile size. That's the first place we start. Larger profiles take longer to load. So if there's a substantial difference, there you go.
Comment: Some people have this habit of saving their files to the desktop, which is part of the profile. So, the other part of this solution is to encourage everyone to save things to their home directory. Firefox's default of saving downloaded files to the desktop is a Very Bad Thing.
Comment: Another option is to redirect their folders (desktop, My Documents) to the server using Group Policies.  This eliminates the issue and also keeps the files out of the easy to corrupt Profile folders.
Answer: Try to establish the point in the logon process there is a delay. I would search the Brian Madden website for an article called Troubleshooting Slow Citrix and Terminal Server Logons. I would link to the site but am not allowed as a new user...
Note: If profile bloat is the problem, then you will see a delay whilst 'Loading personal settings' is displayed on screen.
Answer: Also check for differences in login scripts between your users.  Users who are mapping lots of drives and having multiple group policies being applied to them will take a lot longer to log in.
Answer: Check the number of files that are in the users profile, as having 100's of files will slow the copying of the profile.

Citrix login performance


What do terrorists hope to accomplish by killing muslims?

Question: Most victims of terrorism are Muslim. I can understand why they kill non-Muslims, there seems to be many reasons from their twisted perspective, but most often, they are killing Muslims. What is the point of this, given that it merely increases the support of anti-radical sentiments in Muslim communities, which should be the opposite of what they want?
Note that I am not referring to Islamic State: they are a big organisation and thus by killing Muslims who don't support them, they can make an active difference and increase their power and status ... but most terrorist attacks in, say, Pakistan, Afghanistan, Turkey, etc ... they seem to have almost no positive effect on the power of terrorists in those regions, quite the opposite, with those countries usually focusing much harder on fighting terrorism than they otherwise would've done. So what is the point of these types of attacks?
Comment: You see, these terrorists believe that all muslims who aren't wahabiists (a fundmanetalist sect of islam) are actually Kuffir just like every other non-muslim.  Muhammad himself said to wage war against the Kuffir.  Therefore, terrorists, being pious muslims, must by the very nature of their religion kill "muslims" and non-muslims alike.
Comment: Wrong to describe these people as "terrorists", because terror is simply a political tactic, which can be used by any person or group so inclined.  (As can propaganda,  armies, navies, attack aircraft, &c, if one has the resources.)  This would better be divided into two separate questions: 1) Why do various Islamic sects fight among themselves? and 2) Why do they think terrorism is an effective tactic to use in settling their differences?
Comment: Often these attacks are intended to force a regime to divert resources from counterinsurgency to protecting its supporters. If the regime cannot keep its capital city safe it loses support.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/64255/discussion-on-question-by-don-what-do-terrorists-hope-to-accomplish-by-killing-m).
Answer: First of all, self-identifying Muslims are not the only people in the world who commit terrorist acts. Terrorist acts are committed by all kinds of people in the name of all kinds of ideologies. But this question seems to be mostly interested in Muslim-on-Muslim terrorism, so this answer will only focus on this.

Not all Muslims are the same. There are the two main branches Shia and Sunni, which also have a number of sub-branches, and a couple of minor branches. In some places, these branches don't get along with each other. Many of the terrorist attacks in Pakistan can be attributed to religious differences (most seem to be uprisings against the government, though).
Just because a terrorist act is performed by a Muslim does not mean it's about religion.

Since the Taliban regime in Afghanistan fell, many local warlords are competing for local dominance and some resort to violent methods. Further, the remaining Taliban loyalists consider those who collaborate with the US-backed government traitors and thus consider them legitimate targets in their war to retake control of the country.
Most terrorist attacks in Turkey are attributed to either Kurdish nationalists or the Gülen movement. The difference between Kurds and Turks is more a matter of culture than a matter of religion. Gülen is a political opposition to the current government.
Comment: I don't understand why this answer gathered so many downvotes in such a short time. Can you please offer some constructive criticism?
Comment: I think this leaves out a lot. I am shocked it reviewed so many upvotes and if I had the appropriate rep, I'd downvote it. It is incredible how many mistakes and omissions it has. Take the first bulletpoint. It would have been easy to state that these differences may lead one group to consider another heretical and therefore that belief, in their view, justifies violence.
Comment: @Philipp If you can't answer a straightforward question without couching it to avoid triggering someone who chose to misread it (as you did in your first edit), I'm a bit skeptical for the future of this site. +1 from me
Comment: @Lan - Granted. It could certainly use a *lot* more information. But as to why it's so upvoted, I would say it's by comparison. The next most-voted answer uses a definition of terrorism that restricts it only to war (thus ignoring what might be the majority of terrorism, which clearly doesn't seek military victory), and says that terrorists aren't extremists. The answer below that blames terrorism on essential characteristics of Islam, and is basically anti-Muslim.  This answer isn't as good as it could be, but by **comparison**, it's pretty good.
Comment: The linked article about the Gülen movement does not mention any links to terrorist attacks. While I know that the Gülen movement is designated a terrorist organisation by the Turkish government, I have not heard of a terrorist attack attributed to them. Crould you add a source for that?
Comment: @Philipp Good answer, however incomplete. A major reason for attacks in Pakistan is because these terrorists think that because the other muslims are not joining them (or speak against them), they are infidels and therefore not muslims, hence legitimate targets.
Answer: Terrorism is a tool of war.  So the result is what is hope to be accomplished with any real war.
The Caveat is that the definition of terrorism has been expanded within my life time from something that is part of war (Such as the IRA) to any act resulting in a killing where a group of people are coerced.  This is the definition when used in the Charlottesville incident.  They are related but that is not what most Muslim terrorism is about or historically.
The short answer is the subjugation of one group of Muslims over another, such as the long term war between Sunni and Shia sects.  The hope is that the terrorism will cause the opposition to surrender and be subjugated according to the goals of the group doing the act of terrorism.
I believe the confusion of what terrorism is comes from forgetting the true intent of any armed conflict.  That is to kill and destroy as much of the enemy until the enemy surrenders to you.  This is so close to the the act of terrorism.  War, for most of human history, has not differentiated between damaging the enemy's army or civilian population and infrastructure.  See Sherman's march to the sea during the civil war, Dresden bombing, Hiroshima for classic examples.  Was that terrorism?  By definition, yes, and it was also a tool of war.
The belief that terrorists are extremists is not borne by evidence.  Focusing on Muslim terrorism, you can see there are many similarities to guerilla warfare that occurred during the Vietnam war, and more classically the Soviet-Afghanistan conflict.
A terrorist will see no reason why he should not kill other Muslims simply because they are Muslim.  The terrorist accomplishes his planned mission like any soldier, because he was ordered to by his command and control system.
Comment: It's not about some ludicrous Terrorism = Evil notion. Guerrilla warfare is, well, warfare. It usually isn't targeting civilians to advance an agenda, and there's an army hunting them down. Anarchists in the late 19th with bombs (and assassinations) were terrorists, as were the IRA and the Oklahoma City bombers doing the same, Palestinians blowing up planes, or Al Quaeda crashing planes on 9/11. Small group, agenda, violence to advance the latter. Point being, they were all extremists.
Comment: @DenisdeBernardy I think what Frank is getting at here would be whether you would consider a siege to starve an entire castle as terrorism? That used to be how wars were fought and won, regardless of civilian casualties. David Blomstrom made a comment above alluding to being able to use the same definition of terrorism to describe US drone bombings, which is also an argument that I think has some merit. Some may want to argue that war is war and terrorism is just a fancy word for people fighting war by another means, and one person's terrorist is another's freedom fighter.
Comment: Grant didn't march to the sea. He was in Virginia laying siege to Petersburg  while Sherman was marching to the sea.
Comment: Disagree with the premise. The goals/aims is what separates terrorism from more conventional military actions. Driving a car into a crowd in France is, even in one's wildest imagination, going to kill enough people or cause enough damage to cause France to surrender to ISIS, or to disable France's capabilities to function.
Comment: @PoloHoleSet Do it once sure, but do it enough times it could cause political instability and decrease France's willingness to wage war outside of her borders.
Comment: @JeffLambert - but only through the psychology of terror in the civilian populace, not through actual degradation of population, capacity or capabilities, which is where it differs from other examples you gave that were wartime strategies. Guerrilla warfare is probably a more apt analogy, but then we're talking about consciously choosing military vs civilian targets, which is quite different. I think the equivalence is a bit of a stretch.
Comment: "The belief that terrorist are extremist is not borne by evidence." Err? To me, being an extremist, for any cause, seems at the very core of terrorist activity.
Comment: @Denis_de_Bernardy What about guerilla warefare? That is in any conflict.  Now, I will say that in recent years, terrorism as defined by the media has changed to only be extremist.  However, muslim terrorist have more in common with IRA in the 80s than the Oklahoma city bomber.
Comment: I beginning to see the source of your argument: Is it Terrorism = Evil?  Things are not the simple.  A person can be evil, an idea can be evil, but a group of people are way more complicated.
Comment: @JeffLambert, Absolutely, The agenda is incidental.  I disagree with the current media where an act where people are killed for ideology is automatically terrorism.  The line that separates the Okla. bombing and ISiS is that one has a well formed command and control system and the other does not.  Someone is pulling the strings and is using Isis while McVeigh was McVeigh.  The proof is where is Isis getting all these fancy weapons and vehicles, they don't have and economy so there is no taxation of civilians. Some country is funding it.
Comment: @PoloHoleSet You're forgetting that "war is a continuation of politics by other means".  The aim of war isn't to kill the other side's soldiers, it's to gain territory, resources or power.  If you can achieve your objectives by terror, countries and non-nation-state actors throughout history have been perfectly happy to do it.  It doesn't make it right or moral, of course.
Comment: Sorry, I meant Sherman's march to the sea.  He deliberate targeted civilians by the way, there was very little military.  I wish I could find his apt quote (other than "war is hell")
Comment: @Graham - No, if fear and terror are a complimentary effect of the strategic aims of any activity, great, but targeting for no strategic purpose except to incite fear and terror, where the targets are often unrelated to any kind of ongoing conflict or military activities are what separates terrorism from war. I could see bombings of military barracks as being more of a war activity.  A marketplace with civilians going about their day? No strategic military value, beyond terror.
Comment: @PoloHoleSet I'm not saying terrorism is moral. However, The strategic value of blowing up a market places is very obvious. Consider that killing 3 soldiers in a platoon is a statistic that affect only the 3 soldiers. Killing 3 civilians in a market minding their own business affects the whole population of the municipality the market is in. That's a lot of pressure brought to bear for the price of a simple bomb versus the millions of dollars that go into a weapon system that can kill 3 soldiers.
Comment: @FrankCedeno - I understand that, and that is psychological warfare on the civilian populace.  Three dead civilians does not change the military **capabilities** of a nation, in any way, let alone in proportion to the psychological impact targeting civilians in that way has.  That's the difference between terrorism and warfare.  That is exactly my point.  It's not the same. If you ask a general whether an action will help his troops on the battlefield, today, taking out three troops will, taking out three civilians in a market won't.
Answer:
I can understand why they kill non-Muslims

No, you do not understand. That's why you need to ask the original question, which is based on a false premise.
The picture of a muslim terrorist who kills disbelievers only to get a couple dozen virgins in heaven is propaganda. People don't just kill other people because they have a different faith. If they did, life expectancy around the world would be significantly lower.
Terrorists, including white christian terrorists who kill white christians (IRA, ETA, Breivik, that Nazi who drove a car into a crowd at Charlottesville, and so many more) do so usually for "justice". They often lack a proper future, or longer see a meaning in the "normal" life, and are convinced the enemy is bad enough that they can justify killing civilians who are somehow associated with the enemy. To kill innocents, a terrorist's sense of justice needs to be warped, which it is.
Outside of dishonest political campaigns there is no war where "the Muslims" fight against "the Christians". Terrorists kill people who are on the "bad" side from their point of view. Muslims often live next to other muslims, therefore if a muslim group gets into a conflict with another group it's quite likely that both groups have muslims.  Some people who are muslim fight against some things they believe the west stands for, and do so using terrorist acts (which are retaliated and sometimes "pretaliated" by some western soldiers committing terrorist acts against some people of muslim faith). Other people who are muslim fight against some things some other muslims stand for, and do so using terrorist acts. And some people who aren't muslim fight many other things too, and do so using terrorist acts.
Comment: @SharenEayrs *"People do do kill others just because they have a different faith"* - Citation needed. They sometimes *justify* killings with the dead person's faith, which is not the same thing. Most places in the world, including all Arab countries, contain people of various different faiths who are still alive.
Comment: People do do kill others just because they have a different faith. The difference is that the christians, being secular, no longer do that. And yes, life expectancy when they do it are indeed quite low.
Answer: The objective for Muslim extremist groups attacking other Muslims is generally focused on discouraging and/or punishing an opposing viewpoint.
You could ask a similar question about why white supremacist terrorists would kill white people, as happened in Charlottesville recently. The answer is essentially the same. Moderate Muslims who preach or accept peaceful coexistence with the West and non-Muslims are in direct opposition to the goals and rhetoric of Islamist organizations, so they are the enemy. If they can't be convinced to support the cause, they're just another opponent, and in some ways a more dangerous one - a Muslim speaking out against Islamist ideology is inherently more convincing than a non-Muslim, after all. Killing such people, therefore serves a dual purpose in silencing that dissent, and intimidating others who might also want to speak out against Islamist organizations.
Internally, this is justified or rationalized by declaring Muslim opponents as "kafir" (infidels), essentially claiming that they're not really Muslims, and therefore legitimate targets.  One of the "kill lists" released by ISIS relatively recently in its online magazine was focused on Western Muslims.  The article was titled "Kill the Imams of Kufr in the West" and called on its followers to kill "overt crusaders" and "politically active apostates" who "involve themselves in the politics and enforcing laws of the kufr".  You can find a copy of the magazine here, and of course, it's all kinds of unpleasant, and contains disturbing images.
Answer: The trivial answer is they dont find the selfproclaimed religious denomination of their victims all that relevant compared to the goal they try to reach by blowing them up.
You should split up the question if you want real answers. Like this: why do group-name1-terrorists feel its okay to kill fellow muslims in Turkey? Why do group-name2-terrorists also feel its okay to kill fellow muslims in Turkey? And so on.
To answer such questions you have to take into account what the goal of the terrorists is, if they perceive the victims as their constituents or allies (or as enemies, fair game) and how much they think killing those victims will help reaching their goal. And you have to take into account how realistic the terrorists are.
Let me explain with examples from other terrorist acts.
After suffering a real military defeat (Kobani) ISIS set fire to a POW pilot from Jordan. This succesfuly diverted media attention from their magnificent defeat and put them on the map as real badasses.
We cannot know if they found the brutal murder of a fellow muslim/enemy soldier difficult to commit, but it is clear that the victim's religion did not make their action less successful in diverting media attention from getting their asses thoroughly kicked at Kobani.
Andras Breivik is a white supremacist who murdered white children, his fellow-countrymen, because he mistakenly thought that this would provoke a civil war in his country (which in his head was a 'good thing'). The children were attending a leftist political summercamp so he considered them to be enemies.
The IRA certainly did not have the support of all Catholic Irish. It did not help their popularity that they not only killed British soldiers, but also placed bombs in public places killing ordinary Irish men, women and children.
However, in the end they put their cause on the agenda for long enough to get to a peaceful solution.
The Basque seperatists tried to do much the same thing but failed. (My point being sometimes hurting their own people does not stop terrorists from reaching their goals sometimes it does.)
And, very important, you should consider the possibility of false flag attacks. If you look up the Bologna Attack on wikipedia, a terrible terrorist attack in Italy in 1980, you can read about all the false claims of responsibility and planting of evidence.
Answer: Because it isn't about religion, it's about power. Islamists want power, not for everyone to respect religion the right way.
So when non-islamists, "moderates" or just another branch of islam, because you have Shia and Sunni yes, but you also have the Wahabi Sunnis(Saudi Arabia), the somewhat more moderate Egyptian Sunnis, the even more moderate Syrian and Lebanese Sunnis, etc.
All these different practices stem from different seats of power. Syria and its sort of adopted child Lebanon are friendly towards Iran and the Shia, and do not seek religious fascism.
Egypt has a much more radical view on religion, but avoids exporting it and seeks a relatively large intellectual and spiritual life.
Saudi Arabia practices the worst kind of islam, the very very medieval one, and intends for this kind of islam to be imposed worldwide with no regard towards what others might have to say about it.
ISIS is of course the bastard child of the US destruction of Irak(which created a power vacuum and thus room for a new power) and the massive support of Saudi Arabia towards the most radical elements of Islam.
On an ideological level, Egypt battles Saudi Arabia for influence, but is a ruined state and thus cannot battle the Swims-In-Oil nation. Syria is more mild, it's a smaller nation led by a dictator from a non-muslim minority, and thus tries to keep a balance by opening itself to Iran, and might be the only Sunni nation to do so.
To cut to the chase, the problem is and has always been Saudi Arabia in that matter, both because of their endless pits of black gold, and because of their position as an archaic absolute monarchy that sits on the most holy muslim sites and always had a large share of the muslim world's fanatics.
ISIS is mainly supported both in men and money by the Saudis, and they're the ones killing most muslims, except when the Statesians start bombing or pushing for revolution.
Answer: Much of the muslim vs. muslim terrorism happens between the various branches of islam, e.g. sunni and shia islam to name two biggest branches.
Thus, the terror afflicted on muslim-majority countries might well be motivated by religious differences perceived by extremist supporters of the different branches of islam.
In the course of reporting on the ongoing terror within Iraq, I heard a political commentator refer to this situation as the islamic world's analogue of the Thirty Years' War. The Thiry Years's War is often described as a war between the two dominant branches of Christianity in Europe, i.e. Catholicism and Protestantism. However, the picture is more complicated, as what started out as a religious conflict, internal to the Holy Roman Empire, over time devolved into a general war.
Although, the comparison is rather loose, one might see some similarities.


Change the default mode used when opening a new buffer

Question: For example, we can open a new buffer with C-x b <new-buffer-name>, and by default, this new buffer opens in fundamental-mode, which is not very useful to me. I would like to change this to open all new buffers in org-mode. How can I do this?
Answer: You have to customize the major-mode variable (see also the emacs manual). C-h v:

Symbol for current buffer's major mode.
The default value (normally `fundamental-mode') affects new buffers.
   A value of nil means to use the current buffer's major mode, provided
   it is not marked as "special".

You can do this with M-x customize-variable major-mode or with something like (setq-default major-mode 'org-mode) somewhere in your init file.
See also initial-major-mode for the *scratch* buffer.
Comment: In my testing(Emacs 28.2), only the "M-x customize-variable major-mode" works, "(setq-default major-mode 'org-mode)" did not works for me.
Answer: Add to your init.el one string:
(setq initial-major-mode (quote <major mode name>))

For example, I use markdown-mode as primary mode on my job:
(setq initial-major-mode (quote markdown-mode))