Writing label expression in QGIS to remove end of string?

Question: I am using QGIS 2.18.
I have a point shapefile showing ranger stations in a park.  The  attached image is the field I want to use to label my points.  I want to omit "Ranger Station" from showing in the label on the map.
Answer: In your Layer Properties dialogue box, fill in the Label with box with the name of your column (LOC_NAME) (osm_type in my example), and click the Sigma button to the right (circled in red in the image below).

In the new dialogue box that opens, you can write a string query to get rid of your unwanted text. Your query will probably be replace(LOC_NAME, ' Ranger Station', '')
The first argument is the input string, the second is the text that you want replaced, and the third is what you want it replaced with. In your example, you want the unwanted text replaced with nothing, so you put in two single quotes with nothing between them. (Note also that you probably want to get rid of the space that is currently between the text you want and "Ranger Station," so I included an extra space within the single quotes of the second argument: ' Ranger Station'.
In the example below, the input string is "relation", and I'm replacing "tion" with "x" to make "relax".
Comment: Thanks @Abijah! Exactly what I was looking for.  I can think of several other places I can use this.
Answer: You can use the the strpos function for this if the name Ranger Stations is always constant.
substr(  "LOC_NAME" , 0, strpos( "LOC_NAME", 'Ranger Station'))

The function strpos prints out the string between the given start and endposition. Startposition is easy and set to 0. The end position is delivered by the function strpos. This function delivers the first occurence of the search string. Thats your endposition for the substr function.
Comment: Thanks @Matte!  I tried your suggestion as well and it worked great.
Comment: @user94618 then accept the answer with the checkbox
Answer: @Matte has a better solution than the one that I am going to post here, but I will post it anyway.
I used a substr & length expression instead.
I am labeling my map with the name field, which has the word "Permit" at the end of each valid field.

I do not want the word "Permit" included in my labels, so in the expression builder of the Labeling dialog, I entered this.

This gets the length of the name field, and I simply counted the the characters I wanted to subtract from the name field for labeling.
Here is the result.


How well is insertAdjacentHTML supported?

Question: I recently discovered the insertAdjacentHTML method and it's a god-send. Being such I wanted to know how well this method is supported. Does IE have it? What about Chrome?
Answer: I highly recommend this article by John Resing - http://ejohn.org/blog/dom-insertadjacenthtml/
Basically, it works on IE since IE4, and it is going to be a part of HTML5. There are also few limitations on which HTML elements you want to call this code on.
Comment: How would you insert an local image by using this method ? I am struggling here. I have tried to create a my source code lines as *** var img = new Image(1,1); img.src = 'file:///android_asset/high.png'; then tried to use it as tag.insertAdjacentHTML('AfterEnd', '  '); **** gets an error as "Not allowed to load local resources: file:///android_asset/high.png at :0 .....any advise on this please :-)
Answer: The documentation page on MDN indicates that all browsers have been supported it for a while except Firefox which will introduce its support in version 8.
If you want to use it now and make sure older versions of Firefox support it (although they will disappear in few months) you can put this insertAdjacentHTML polyfill (shim) in your site and the method will work everywhere.

Update: As the above shim is deleted, you can use https://gist.github.com/1276030
Answer: Yes, it is supported in Chrome and Internet Explorer, as well as later versions of Firefox and Opera. I couldn't narrow down which versions of IE it was compatible with, unfortunately, however it is provided detailed on this site (IE 4+).
See this reference for more information.
Addendum: This page provides some compatibility information, as well as sample code to catch incompatible browsers. Please note, however, that contrary to that site Firefox is supported, but only in recent iterations and in some cases in limited functionality.
Answer: Try code here http://www.cnblogs.com/meteoric_cry/archive/2010/10/14/1851093.html. Just ignore the Chinese words...


Untouchable local server

Question: We have a software that needs a connection to our servers for license management purposes. Now we have a new customer who wants to use our software on systems that don't have access to internet. So I was thinking about setting up a local server in their private network. Is it a good way? What are the flaws of this approach?
Is it possible that they copy our server data and use it somewhere else? In other words can they clone our server? If they can what's the solution?
Can I in some way use a TPM to prevent cloning?
Comment: Could you add some more details on a) how the local server would be set up? and b) how the software client has to prove itself to a license management server?
Comment: I'm thinking about putting a mini pc in their network. The software has to authenticate itself with the license key that was provided to it. This key changes on each connection. The said server is supposed to manage changing and providing this key.
Comment: I think it's a good question, because you are essentially trying to make a network "dongle". The "dongle" based protection being a USB key that is used to validate licenses for a lot of high value software. I am assuming you don't want to use an actual dongle because there are many machines on the same network that need to be licensed?
Comment: we used to have a "phone-in" validation system.  The way it works is they press a certain key combination and a key(series of numbers/letters) is displayed, they read the key to you on the phone and you type it in on your end and get back a validation code that you read back to them.  They enter this key to validate the product.
Answer:
Is it possible that they copy our server data and use it somewhere
  else? In other words can they clone our server?

Using Thunderbolt for example ?
They will have physical access to it so everything is possible.
The question is: how much do you trust the client ? If you trust them enough you could work out another arrangement, for example deliver software that will work offline but with restrictions based on local conditions, for example a fingerprint of their local machine.
Even if there are time-based limitations you should be able to work out something.
There are things you can do like encrypt the hard drive, so it can't easily be mounted on another machine for examination. Disable all USB ports, Thunderbolt etc. But fully securing a system you can't even monitor is difficult.
How will your server validate licenses ? If you put a server connected to the Internet, and that server has connections with the client's computer, then you are indirectly exposing their machine to the Internet, which is something they probably want to avoid.
Personally I would not be comfortable at all with a black box on my network.
The client can be burglarized too. The computer could be stolen by third parties and expose your trade secrets. So think hard about what you are going to put on that machine and what would be the impact of a worst-case scenario.
I think the best option is to deliver a tailored version of your software but you can charge the client for that, because this is a software customization.
Perhaps you could ship a USB dongle or something. A tiny Tomu for example if cheap and versatile. Conceivably, the physical token could be replaced every year. Just ship it by post.
Answer: You want a portable offline license server and want to make it as secure as possible. This is possible, and sounds like a fun project.
The secret licensing mechanism will need to be embedded into this server and therefore needs to be protected from copying and analysis.
So the licensing code will need to be encrypted using some type of on-board hardware to prevent the code from running elsewhere. A TPM could be used for this, but you should try to keep the device as small and as simple as possible to eliminate as many attack vectors as possible.
I would recommend a raspberry pi with a secure element: https://www.zymbit.com/blog-security-module-raspberry-pi/
Build your licensing server on something like this and you should have a nice little deployable solution for offline networks.
Comment: Thank you for your solution. I checked this Zymbit module and I found it really useful.
Answer: If you are working in good faith with your client, the solution you are proposing sounds somewhat reasonable. There are of course some accompanying challenges, but - depending on the relationship with your client - they are manageable.
Low priority risk, but it's good that you have it on your mind:
Your client could theoretically abuse this system, once it's in their infrastructure. As a rule of thumb, you should keep in mind, that "If a bad guy has unrestricted physical access to your computer, it's not your computer anymore" 1. So even with strong access control, protecting your PC with a tamper resistant lock and so on, it's nigh impossible to keep it safe forever, if someone wants to get in. That said, only you can estimate how bad the damage would be, if that happens.
The risk I would be worried about:
Going out of your way to provide this solution to one of your clients. Because this solution doesn't seem to be part of your current portfolio, it should't be too easy to maintain. Working outside your standardized products leaves you vulnerable for other forms of attacks. In this case:

social engineering against the admin who is maintaining things is easier when an environment is unknown (this holds true for your customer as well)
you are disclosing - possibly confidential - internal information to your customer
you possibly have to create new guidelines on how to handle PCs
that have been in another corporate network for some time
probably more, but there's not enough detail on the setup

This doesn't mean that you cannot expand your portfolio, but you have to test before you run and you have to build controls that mitigate risk beforehand.
Answer: From your question, your real problem is

Now we have a new customer who wants to use our software on systems
  that don't have access to internet

Your rest of the problem arises when you consider below to be a solution

So I was thinking about setting up a local server in their private
  network?
  Is it a good way?What are the flaws of this approach?

No, it is definetly not a good way and the answers by @Tom and anonymous have done a good job letting your know the flaws/risks in approach.
So addressing your real problem, One possible way this issue can be solved is with the use of proxy and setting routes. The Traffic can be routed from this system to a proxy within the local network which has internet access which in turn allows license management to proceed as usual.
If the machine is devoid of internet connectivity purposefully and is considered unsafe to connect to internet at any point in time, let license be installed on machine's clone ensuring all safety and checks in place while doing so and then move the entire machine back to internal network replacing the original machine.
Hopefully I understood your problem correctly and this answers your question.

Untouchable local server


Single Source of Truth for Org Development Model

Question: I think that the SSoT (single source of truth) is VCS (e.g. Git) Am I right?
Answer: All the metadata files that represent your org (as best it can) is the "truth". You'd really want to use "all" in this case to call it the representation of your org. When you put that in one accessible location, it becomes the single source of truth.
Git is just a version control system (VCS). It's used to track changes in any set of files.
To reiterate, having one location with those set of files that represent your system is really the single source of truth.
You could then have those set of files be hosted remotely using many services catered for git (Github, Gitlab, Bitbucket, etc).
So, in essence, wherever you decide to store your set of files (in this case, metadata from the Metadata API in Salesforce) is the single source of truth while git assists your workflow in all developers accessing those files, making changes, and tracking changes.
Answer: Both org based and source based development are important. Source based works better for code merge and application development where limited metadata types are needed. This model works well for developers using Salesforce DX and Visual Studio Code. But system administrators dealing with the other 200 metadata types need org based sandboxes and release management systems. For example, there is not much point putting Profiles in Git. They are huge and not human readable. I've written about some of the best practices, here is a link:
https://appexchange.salesforce.com/appxContentListingDetail?listingId=a0N3A00000FR5Vw
Comment: I personally think there is point in putting everything in git - you can (at least conceptually - Salesforce behaviour can actually prevent this) reproduce any version of your configuration at any time and you can look at who made what changes, when. As long as the metadata files are text rather than blob based your VCS can help you understand changes made over time using relevant diffs. If I could, I would make it impossible to make untracked changes. It is often the uncontrolled changes applied by admins that mess stuff up - and is a frequent source of trouble for devs...
Comment: For example, because the admin adds some validation rules the unit tests for code no longer pass.
Comment: I think that this may not answer the question being asked.


How much weight is given to letters of recommentation from developing country for Dphil at Oxford University?

Question: If one graduate at a developing country which lack highly ranked professors, how much weight should be expected to be given from Oxford University to recommendation letters for a Dphil? Do they weight it as much as letters of students with famous letters from famous professors? Are students with letters from famous professors preferred or they just access the content?
Comment: Without knowing the content of the letter or the letter-writer's standing in their academic community, this question is impossible to answer. Economic development is a crude indicator of academic excellence, you would expect the admission committees to look for more direct evidence when making their decisions.
Answer: I doubt there are any statistics to support this, so this is my opinion plus some limited experience in selecting applicants to graduate programs.  A famous professor's letter is likely to have somewhat more weight, but not purely because they are famous; more because the fact that they are famous implies that they have more experience judging people.  If someone who has mentored two students says "This is the best student I have ever had", their ranking has less weight than the same claim from someone who has mentored two hundred.
On the other hand, a strong recommendation from someone who knows the applicant well will have much more weight than a vague and impersonal recommendation from someone who clearly doesn't know the person as an individual.  Remember that committees already have much information about the applicant as a student -- grades, C.V., courses taken, extracurricular activities should all be present in the application elsewhere. A recommendation that merely says, for example, "This student received a good grade in my course" is useless; we already can see that, it's redundant information.
A useful recommendation letter adds new information that the committee can't get elsewhere. A student may have received an "A" because they are slow, but diligent; or they may be brilliant but lazy. The student has published a paper -- Did they perform a technical but unimaginative role, or did they conceive of the idea and push it to a conclusion? The outcome will look the same on the other documentation, but the recommendation letter can tell the committee what actually happened. Similarly, committees look to recommendation letters to try to understand the applicants' personalities. Are they cooperative, argumentative, shy, stubborn, agreeable? There is wide latitude for personalities in graduate studies, but there are certainly some people who are unlikely to do well because of their personality, and a recommendation letter can help flag those who are likely to be great fits.
If that new information comes from a famous person who has had the opportunity to compare to many other students, so much the better.  If it comes from an obscure person, it is still far more useful than a mere recitation of the same information that's already present in the CV; and it's far more useful than unhelpful information, no matter how famous the person.
(I have seen cases where applicants included personal recommendations from senators and in one case the US president.  These letters not only did not help, they reduced the ranking of the applicants, because they were inappropriate and reflected poorly on the applicants' judgement and understanding of the field.)
Answer: Well from my personal experience, I worked in an office where we were sending students to world top ten universities from Pakistan. We sent some to Stanford USA, and Oxford UK beside others. What I saw was that indeed weight is given if you are from a reputable university or not in a bad one at least. And that most of the weight is given to grades but most important is the research proposal that you write and your personal statement.
Also, a letter of recommendation not only states about you, but also the writing expresses the professor himself, how good he writes it.
Then if there is some research that has to be related to a developing country, then they will prefer you, especially if it's related to your country or like wise.
I myself got a scholarship in a good university under top 100, though lot of my friends with excellent grades didn't succeed. So keep trying is the key.


How can I automate HTML-to-PDF conversions?

Question: I've been using htmldoc for a while, but I've run into some fairly serious limitations. I need the end solution to work on a Linux box. I'll be calling this library/utility/application from a Perl app, so any Perl interfaces would be a bonus.
Answer: Sorry to unearth this old post, but it came out first in my search for the best HTML/PDF conversion tool.
On Linux wkhtmltopdf is very good (takes into account CSS, among others) and GPL.
Comment: Like the docs say, you need static version with patched Qt to run it without an X server.
Comment: `wkhtmltopdf` is awesome. but it doesnt support flex box styling.
Comment: To Support your point , 1)works like a charm 2)uses the webkit rendering engine, and qt which means it can benefit from updates . Though last RC was released Feb 2011.
Comment: To update on @kommradHomer's comment, the project is still active; the latest stable version was released just last month. It is also available in Ubuntu official repositories, but at the time of writing a few versions behind.
Comment: phantomjs is another possibility, also based on webkit, if you want to fetch remote pages and convert to pdf.  It can do many other things too, such as scraping using javascript and the DOM.
Comment: it fails on some platform with this error: "Could not connect to display"
Comment: you can use it with a "virtual x-server" - see [this question](https://stackoverflow.com/questions/9604625/wkhtmltopdf-cannot-connect-to-x-server)
Answer: WeasyPrint produces nice PDFs with selectable text and hyperlinks.
weasyprint input.html output.pdf

If you use wkhtmltopdf instead, try the following options:
wkhtmltopdf --margin-bottom 20mm --margin-top 20mm --minimum-font-size 16 ...

Comment: And to set tiny margins:
    `weasyprint docs.html docs.pdf -s <(echo '@page { margin: 0.5cm; }')`
Answer: Update 2019-05
The whole process has thankfully been packed into a docker image by TheCodingMachine: https://github.com/thecodingmachine/gotenberg
This makes maintenance and usage of chrome based pdf generation in production environments really smooth and hassle free.

There is a new headless mode since Chrome 59. As all the other solutions really struggle with newer (or not so new anymore) CSS features like flexbox, this was in my case the only solution to produce a proper PDF output.
To create a pdf from a local html file just use the following command:
chrome --headless  --disable-gpu --print-to-pdf file:///path/to/myfile.html.
For Mac OS substitue chrome with /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome.
The only downside I noticed so far is that (currently) you can not pass the html via stdin, but creating a temporary file is not that much of an issue.
For more information see https://developers.google.com/web/updates/2017/04/headless-chrome#create_a_pdf_dom
Update: As it turns out, the chrome guys will most likely provide some kind of node module for this task, which would eventually deprecate the headless mode (https://bugs.chromium.org/p/chromium/issues/detail?id=719921).
The best bet would be to use the node based approach using the puppeteer
 module as documented under https://developers.google.com/web/updates/2017/04/headless-chrome#node and print the page via the Page.printToPDF command, which enables some additional configuration, too.
Of course, you can connect to the debug console websocket from any other environment than node (i.e. PHP script), too.
Comment: I've tried tried weasyprint (does not support display: grid, also a bit slow), then wkhtmltopdf (nearly a GB, couldn't get it to work on Ubuntu/WSL) then puppeteer. Puppeteer works, is fast, allows Selenium-like automation, works on pages which load content via JS, etc. Thanks for your suggestion!
Answer: NOTE: This answer is from 2008 and is probably now incorrect; please check the other answers
PrinceXML is the best one I've seen (it parses regular HTML as well as XML/XHTML). How is it the best? Well, it passes the acid2 test which I thought was pretty darn impressive
It is however, quite expensive
Comment: I've had this same problem.  I've recently evaluated Prince XML and can vouch for it being a SERIOUSLY awesome app.  The speed and quality of the output is simply unbelievable.
Comment: Passing the acid2 test was seriously impressive in 2008 when I made that answer. In 2016, or today? Not so much, but I imagine prince has come a long way since then too
Comment: A fair answer at the time. But out of date now.
Answer: I did a bit of googling for you and came up with two options.  There may be more, my google strategy was to try "webkit command-line pdf" and "gecko command-line pdf", basically looking for commandline programs that embed the two popular open-source rendering engines in command-line renderers.  Here's what I found:
Firefox command-line printer - outputs to pdf and png
wkpdf - while this is for mac, it's probably pretty portable.
Answer: I wont claim this is the "best" solution but it is "a" solution i have used.
HTML Input --> HTML 2 PS --> PS 2 PDF --> PDF Output
Answer: You can install the free Calibre, and use the ebook-convert command line utility it has, to convert many html documents into a single epub, or pdf.
https://manual.calibre-ebook.com/generated/en/ebook-convert.html
Idea comes from here
I haven't used it, but this npm module wraps this process up like my following bash script, but probably better ;-)
For me, on my mac, I use the following bash script to convert a local html website to a PDF:
convert_html_to_pdf.sh
function show_help()
{
  ME=$(basename $0)
  IT=$(cat <<EOF

  Converts an html file to pdf, epub, mobi or more if you look!

  usage: input.html output.{pdf|epub|mobi}

  e.g.

  $ME index.html output.pdf

  Note: Requires Calibre be installed. more info here: https://ebooks.stackexchange.com/a/6285
EOF
  )
  echo "$IT"
  exit
}

if [ "$1" == "help" ]
then
  show_help
fi
if [ "$1" == "--help" ]
then
  show_help
fi

/Applications/calibre.app/Contents/MacOS/ebook-convert $1 $2 --max-levels=1

Answer: This would be total overkill, but you could download and install mirth.  It is a message routing engine, but it has the ability to convert html to pdf, so you could set it up to pick up an html file in a folder, convert to pdf, and drop the pdf in the same or other folder.  Like I said, overkill, a bit of a learning curve, but it's free, and java so you can run it on linux if you like. And all your perl app would have to do is drop the html to a file.
Comment: The `mirth` project seems to be dead, this answer should probably be deleted.
Comment: It's had several renames since, but certainly not dead.  It's now NextGen connect integration engine.
Answer: You should have a look at http://phantomjs.org/
Conversion can be done by a small script rasterize.js and then issuing
phantomjs rasterize.js 'http://en.wikipedia.org/w/index.php?title=Jakarta&printable=yes' jakarta.pdf

Answer: I have found Electroshot to be supportive of modern CSS features, particularly layout.  This was after struggling with wkhtmltopdf showing its age in not supporting things like CSS3.
From Electroshot's features description:

Electroshot uses Electron, which offers the most recent stable version of Chrome (rather than one from years ago); this means that pages render as they would in a browser...

I've been able to use Bootstrap 4 to design a page, and then use Electroshot to render a PDF very closely resembling the HTML/CSS.
Answer: An alternative solution that hasn't been answered here is to use an API.
That advantage of them is that you externalize the resources needed for the job and have an up-to-date service that implements the recent features (no needs to update the code or install bugfixes).
For instance, with PDFShift, you can do that with a single POST request at:

POST https://api.pdfshift.io/v2/convert/

And passing the "source" (either an URL or a raw HTML code), and you'll get back a PDF in binary. (Disclaimer: I work at PDFShift).
Here's a code sample in Python:
import requests

response = requests.post(
    'https://api.pdfshift.io/v2/convert/',
    auth=('user_api_key', ''),
    json={"source": "https://en.wikipedia.org/wiki/PDF", "landscape": False, "use_print": False}
)

response.raise_for_status()

with open('wikipedia.pdf', 'wb') as f:
    f.write(response.content)

And your PDF will be located at ./wikipedia.pdf
Answer: You might want to check out 'Document Conversion Service' by Peernet (at http://www.peernet.com/conversion-software/batch-document-converter/).  This runs as a service on a Windows Desktop or Windows Server machine.  It opens HTML documents in a web browser, then prints them through a print driver to create PDF documents, so that the PDF document produced looks exactly as if you had printed the HTML document from the browser.
Answer: Here is a nice easy-to-install version of headless Chrome:
https://www.npmjs.com/package/chrome-headless-render-pdf
Unlike "standard" headless chrome, this does not show the annoying auto-generated headers and footers!
Or there is unoconv (which uses LibreOffice behind the scenes) can make pdfs from html:
unoconv -f pdf mypage.html
You can install it on most Linux flavours via the package manager, e.g. apt-get install unoconv
That's nice and easy for simple files. If you need javascript of css support, then use headless Chrome.
Answer: I have started to put together a tool to provide a simplified interface to common actions.
You can convert an HTML to a PDF like this:
$ npm install @lancejpollard/act -g
$ act convert tmp/index.html -o tmp/index.pdf -w 2000px -h 3000px

This will create a new PDF for the HTML file.
If nothing else check out the source and see how to write your own script to do this in JavaScript.
Answer: wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely "headless" and do not require a display or display service.
How to use it?

Download a precompiled binary or build from source
https://wkhtmltopdf.org/downloads.html
https://github.com/wkhtmltopdf/wkhtmltopdf

Create your HTML document that you want to turn into a PDF (or image)

Run your HTML document through the tool.

Usage: wkhtmltopdf input.html output_name.pdf
Answer: I often get very good results when using the ebook-convert command line tool that ships with Calibre.
ebook-convert <input.html> <output.pdf>

Check the numerous options for tweaking in the manual. For example, it is possible to automatically generate a table of contents based on H1/H2/... headlines (or anything using XPath expressions, basically).
Please note: Calibre focuses on digital documents and I don't know how well ebook-convert works for very complicated HTML. Worth a try though. :-)


What happened to EDP445?

Question: What happened to sports youtuber edp445? He had a channel with 2M+ subscribers but his channel has been terminated. Why was his channel terminated?
Comment: **Moderator note**: as this issue involves a potential ongoing criminal investigation, please keep all interactions on this question to verifiable facts. Any speculation will be deleted.
Answer: EDP445 has been accused of paedophilia and has deleted all the videos from his channel.

What happened to EDP445?


Does the continous EM spectrum contradict discrete energy?

Question: After some research, it seems apparent to me that the EM spectrum is continuous, but this would contradict a physics fundamental that energy is discrete. Is there a conflict here?
Comment: The two most common bases for this mis-claim are the photoelectric effect (which says that energy emission in a particular wavelength occurs in discrete chucks) and the line spectra of atoms (which is related to the  steady-state energies available to bound systems being discrete). Both of these things are limited claims.
Comment: You seem to be interpreting restricted claims in an unduly broad fashion. There is no general claim that "energy is discrete". There are many claims about discrete emission. Perhaps you can point us at the sources you are reading. Otherwise this is simply too broad.
Comment: Related: https://physics.stackexchange.com/q/256758/ https://physics.stackexchange.com/q/256194/ https://physics.stackexchange.com/q/256758/ https://physics.stackexchange.com/q/169209/ and others
Comment: @daniel *"Wasn't this question just asked?"* Well the OP's previous question https://physics.stackexchange.com/q/330025/ arises from the same misunderstanding, but this version makes the exact nature of the disconnect clearer.
Comment: I am temped now to answer this question of mine too. I think the lesson for me and perhaps others is this: There is a lot of misinformation out the on the web, youtube in particular. Tons of sites saying that energy is discrete. Good thing this site is here.
Answer: No, there isn't a contradiction. From the very inception of the idea of quantization of energy (in Planck's explanation of the continuous blackbody spectrum) the two ideas have been compatible.
The "physics fundamental" that "energy is discrete" that you refer to, when applied to the electromagnetic field, says that each mode of electromagnetic radiation at frequency $\nu$ can only hold energy in discrete lumps of size $h\nu$. However, there is a continuous infinity of possible modes spanning all possible frequencies $\nu\in(0,\infty)$.
There are additional aspects of energy quantization when matter is involved (most commonly the photoelectric effect and the discrete nature of atomic emission and absorption lines) but these refer to the nature of the energy transitions that matter itself can perform and interact with, and they say nothing about the nature of the frequency and energetic spectrum that the EM field itself can accommodate.
Comment: Thanks for the answer, Emilio.  I lost some points on this question, but that's the way it goes.


In Java Collections Map What does "?" refer to?

Question: In Java Collections I saw something like this: Map<Key,?>.
I don't know how it is working, can anyone help me out with this or provide an example?
Answer: The question mark (?) represents an unknown type.
In your example, Map<Key, ?>, it means that it will match a map containing values of any type. It does not mean you can create a Map<Key, ?> and insert values of any type in it.
Quoting from the documentation:

In generic code, the question mark (?), called the wildcard, represents an unknown type. The wildcard can be used in a variety of situations: as the type of a parameter, field, or local variable; sometimes as a return type (though it is better programming practice to be more specific). The wildcard is never used as a type argument for a generic method invocation, a generic class instance creation, or a supertype.

For example, say you want to create a function that will print the values of any map, regardless of the value types:
static void printMapValues(Map<String, ?> myMap) {
    for (Object value : myMap.values()) {
        System.out.print(value + " ");
    }
}

Then call this function passing a Map<String, Integer> as argument:
Map<String, Integer> myIntMap = new HashMap<>();
myIntMap.put("a", 1);
myIntMap.put("b", 2);
printMapValues(myIntMap);

And you would get:
1 2

The wildcard allows you to call the same function passing a Map<String, String>, or any other value type, as argument:
Map<String, String> myStrMap = new HashMap<>();
myStrMap.put("a", "one");
myStrMap.put("b", "two");
printMapValues(myStrMap);

Result:
one two

This wildcard is called unbounded, since it gives no information about the type. There are a couple of scenarios where you may want to use the unbounded wildcard:

If you're calling no methods except those defined in the Object class.
When you're using methods that don't depend on the the type parameter, such as Map.size() or List.clear().

A wildcard can be unbounded, upper bounded, or lower bounded:

List<?> is an example of an unbounded wildcard. It represents a list of elements of unknown type.
List<? extends Number> is an example of an upper bounded wildcard. It matches a List of type Number, as well as its subtypes, such as Integer or Double.
List<? super Integer> is an example of a lower bounded wildcard. It matches a List of type Integer, as well as its supertypes, Number and Object.
Comment: Thanks a lot for explain and examples!
Answer: The Unknown Wildcard
? can be any dataType
List<?> means a list typed to an unknown type , This could be a List<Integer>, a List<Boolean>, a List<String> etc.
Now coming to your example Map<Key,?> means Value which is to be inserted in this map can be of any data Type.


What's the practical difference between "allot" and "allocate"?

Question: I've noticed allot is usually used as an adjective (as in, "your allotted amount"), and allocate is more often used as a verb (as in, "I will allocate some resources"). Any other notable differences?
Answer: According to a couple of dictionary sources (since the question stumped me), there is a difference in these two words.
"Allocate" means to set aside for a specific purpose, to fix the place of, to locate. "Allot" means to divide or distribute by share, to appropriate for a specific purpose, to set apart or dedicate.
Very close, but to me the difference is in this sentence.

The Parks Council has allocated 10 hectares of Millennium Park for community garden. The garden was divided into 10 plots which were allotted to Blue Mount charity.

Allot and Allocate
Answer: According to Wiktionary:

Allot
Allocate

Allot should only be used when a collection of items is divided up into equal-sized chunks ("lots"), and then distributed. Allocate is more general in that it describes distribution, but has no requirement that the total set of items be divided into lots.
Therefore, allocate is more likely to be used in cases like computer memory, where a program asks for a given amount of memory from the free store, and that amount of memory is returned. But allot is more likely to be used in cases such as a "allot each person 50 pounds of grain per month".
Comment: So, the CPU time would be allotted then?
Comment: @SamB: No -- CPU time is not divided up into fixed size chunks and then distributed -- the size of the chunks usually varies according to things like priority level, and whether or not you have the user's attention as the foreground.
Comment: I disagree that allotting *requires* equally-sized chunks, although this may be the case more so than when using 'allocate'. I also do not consider wiktionary to be an especially reputable dictionary. Try the Oxford English Dictionary or Merriam-Webster.


What are the benefits or drawbacks of learning poetry?

Question: What skills can be improved by learning by heart poems in the target language? Won't this inhibit the learning process as poems sometimes disobey common grammar rules?
Comment: I think the effect will be similar to that of songs because they are related very much.
Comment: @SMSvonderTann They are related, but poetry often spans more generations than songs (especially popular music) and therefore has a slight difference with respect to cultural implications than popular music.
Answer: Learning poetry is important to the cultural aspect of a language. Depending on your outcomes and goals for learning a language, poetry may or may not help you as much as you would like.
First, (almost) any exposure to a language will be beneficial as your subconscious begins constructing rules and observing patterns regarding that language. One study observed that a group of random people who were exposed to Korean, Japanese, and Chinese for 30 minutes (both written and spoken) were able to distinguish between the languages when presented with them one week later.
Second, many idioms and expressions come from poems or folk stories of that region and communicate a lot in a few words. For example, in English, we may say "Well, it's better to reign in Hell." and many people will know the subsequent phrase from Paradise Lost of "Than to serve in Heaven." Another example in Chinese, There is a famous poem that talks about procrastination, but most people will only quote the first one or two lines from the poem (明日复明日,明日何其多).
Overall, poetry will help you in your communication of a language because it is closely related the cultural experience of the people and they will connect to it and see you as caring about their culture as well as their language.
Answer: Comparing to the other methods of studying, learning poems has it own pro's and con's.
Pro's

Arguably, remembering a rhymed verse may be naturally easier than remembering a plain text of an equivalent size. It is very individual for every learner, however.
Verses naturally have a certain meter. Learning poetry is extremely helpful for a learner to grasp the rhythmic aspect of the language. This becomes especially useful if one is learning with no aid from the native speakers.
Learning poetry is fun, unlike "these boring lessons". If you teach kids, they will arguable enjoy it more than plain lessons.
By knowing poetry of the language you're studying, it seems to be helpful to get treated with respect by the native speakers. This, in turn, may lead towards getting more help from them to a language learner.

Personally, I've remembered the full name of Bangkok city by remembering this song (Youtube) and Thai National Anthem, even without exact understanding of each individual word. I found the locals treated me with more respect because they see me expending some effort toward learning.

Con's

Very often, writers of poetry step off the standard grammatical constructs, in order to achieve some artistic effect. Remembering those, before understanding the proper, grammatical ways to construct a phrase, may harm one's study.

In languages with lexical tone, the song lyrics may follow the music (ignoring the proper tones). Compare these two songs:

做你的愛人 or 自由飞翔 — tones follow the melody, even if they are incorrect;
นอนไม่หลับ or อยากรู้แต่ไม่อยากถาม — simply read the lyrics, and the melody will arise by itself.

Poetry may use obsolete words or constructs.

So, in order to mitigate the disadvantages of language learning by reading poetry:

ensure you learn from modern poetry, at least, at the beginning stages;
work with different sources, authors, and books.

Further reading

This question at Linguistics.SE may provide with some more details;
Answer: TL;DR Learning poetry in a foreign language can have a net beneficial effect in areas of vocabulary, language comprehension, and grammar (depending on the learner).

Poetry in general is constructive
Poetry typically uses illustrations and/or figurative language. Immersing yourself in such things can do you so much good. Not only can it strengthen your language comprehension skills, but also your vocabulary (idioms), imagination, and creativity, and potentially your sense of rhythm. Especially if the poem is memorized, pronunciation skills can improve as well.
In your target language, the complex sentence structure and vibrant language of poetry are even more beneficial to the language learning process. The use of polysemous words also enforces in learners a deeper understanding of vocabulary and grammar. source
It uses unconventional grammar
Yep. Poetry is probably going to break the rules of grammar. However, assuming that poetry is not your only resource for language study, I believe that the nonconforming grammar can be easily enough understood, and once that occurs, the learner's grammar can improve even more.
Otherwise, even if the learner picks up some less-than-ideal grammar from poetry, the good still outweighs the bad. A teacher, native speaker, or even a little research should be more than enough to correct any errors.

In conclusion, if you can, definitely study poetry in your target language. You won't regret it.

(Note: I think this is a somewhat subjective question, because everybody learns differently, so I've attempted to write a somewhat broad answer. However, I do think this is still a question fit for this site.)
Answer: Poetry has been proven that it can help students improve their fluency by repeated reading, which also helps with improvement of fluency. Performance repeated reading (like repeated reading but with a performance) has also proven very, very effective. Though grammar might be a little off, poetry has its place in teaching students.
Articles have also shown the effects of poetry on the fluency of students, like this article. From personal experience, poems are more fun to read and bring out more emotion and is more thought provoking, showing a true understanding of the text thus better fluency.
Answer: The advantage of learning poems is that you learn the way the language is actually used, and by unusually sophisticated people who write these poems. Not everyone can write a poem, even in their native language.
There is a "downside" in that they sometimes disobey grammar rules. But they don't do this "randomly." There is usually a "method to their madness," and if you learn the whys and wherefores, you will get a deeper insight into the language.
Answer: One benefit of poetry is "fun" and "surprise" effect, which (together with rhyme) makes remembering whole sentences easier. Your brain is looking for surprise, or even better something sex-related, and filters out anything boring. The more vivid image you can conjure, the easier is to remember.
From personal experience, I used limericks, repeating them many dozen times, as pronunciation exercises, when learning English. Or lyrics of favorite songs.
Comment: Welcome to Language Learning Peter!


Failed to play sound: Invalid state

Question: I'm running on Arch Linux with gnome and Pipewire.
I have the strange issue, that when I want to play sound I get the following error message:
(gnome-control-center:4636): sound-cc-panel-WARNING **: 12:13:50.653: Failed to play sound: Invalid state

I found this in journalctl when trying to run a speaker test through sound settings and also got it printed when running gnome-control-center via CLI and running speaker test from there.
Side effect: I cannot e.g. start any YouTube videos, they just do not play, unless I open pavu control go to configuration and swap my profile to anything and back to my current state (Analog Stereo Duplex). After that dance audio works fine and I can play YouTube videos.
Maybe unrelated, but my internal microfone is dysfunctional, too. I always need to use the BlueTooth mic from my headset, even the USB mic form my webcam does not work.
Does anyone have an idea how to debug this? To be honest, I don't even know where to start.
Thank you very much in advance.
Answer: I m fedora user so my advise can be wrong but nobody answered you so:
i use comand: sudo dnf install libcanberra-devel-0.30-31.fc38.x86_64
and thats fix everything so meybe try that
good luck!

Failed to play sound: Invalid state


Custom content drupal6

Question: I'm new to drupal, so forgive me if my question will be silly :)
I've a little problem with my first custom content on a drupal 6 installation. My content "biography" is listed in admin/content/types page, but when i click on my type, page reloaded instead of loading /admin/content/node-type/biography
If i force the url in the browser, i'll be redirect to /admin/content/types page again.
Do you know why? I've implemented both the node_info and form hooks, but with no luck.
Thank you in advance and sorry for my english! Have a nice day!
UPDATE
I cant reply on my own post because i still have low reputation, but...
Bingo..Thank you ARUN! I had been deceived by the fact that it had appeared in content type's list without clearing cache!
have a nice day!
Answer: That might because of cache. Clear your site cache here /admin/settings/performance. Then try to load your content type edit page /admin/content/node-type/biography.

Custom content drupal6


Are there any issues connecting Neutral and Live at once to the supply line?

Question: A normal plug point has the wiring structure of the normal cct diagram I've drawn below. I'm thinking about plugging a device into the outlet in a permanent way and keep the switch closed and control it using a switch at a separate place. My problem is will there be any electrical sparks or anything if I connect the live and neutral to the supply line at once?
Answer: Your circuit diagram looks perfectly safe.
A two pole isolator is often used where the need is to make a circuit safe to work on, not simply to turn off the power.
Earth should not be switched, your diagram looks correct.
Disclaimers  As always, check the law and codes in your country. You might need to have a professional certify it safe. There will be rules about the type of wire, termination, labelling etc. The body of the 2-pole switch should also be earthed, and the earth cable should run in the conduit between them, not taking a short cut. The power should run through the switch, not there-and-back. You are probably not allowed to fasten the cord of a portable device to the wall in any way, or run it under a carpet or floor.  You're probably not allowed to mount a hand tool in a permanent way. I can't tell you that your system is safe, but the electrical concept is not dangerous.
Comment: I'm planning on using this to my PC. I have to use 3 plug points to plug in the monitor, system tower and router. Each time I have to go there and plug them and switch on. So I'm thinking about having them moved into a nearer location with 3 switches and keep the wall socket plugged in all the time. So would that be safe? :(
Comment: Why do you want to unplug them, or use a 2-pole switch? Why not just use a switched power strip?
Comment: [link]http://i01.i.aliimg.com/photo/v0/60146420673/2Gang_1Way_Wall_Switch_Button_Panel_Switch.jpg_220x220.jpg[link] I want to use this switch instead. It's kinda cool :D
Answer: The brief answer is that it will probably be OK as shown, but removing Earth from the connections is problematic especially if whatever you are connecting has metal parts that could come into contact with a person. Earth is a safety feature in case live comes loose inside.
Comment: But the box that the extra switch is in should be earthed, in case something comes loose inside there.


What is best way to put Required Text in Select Box?

Question: I'm creating contact form. I have read Web form design guidelines and found tips to add optional or required text instead of putting asterisks. I have found the information in https://www.cxpartners.co.uk/our-thinking/web_forms_design_guidelines_an_eyetracking_study/. I want to put Required text in select box. I'm confused where to place the text in Select field. Can anyone suggest best place to put it?
Comment: Does the "REQUIRED" flag remain in the text box once the user clicks on it and starts typing?
Comment: No it will disappear once user click on this
Answer:
it will disappear once user click on this

Support persistence is important, whether it's labels, flags, or hints.
So either leave the flag in the box when the user is typing:

(The problem with this is if the entered text overlaps the flag.)

OR, place the flag outside the box:
Comment: I think Required Field outside the field is the best way to solve this, because it will work in the case of select box as well. What you think in the case of select box?
Comment: Yes, same. I typically place field support next to the label, but I like how you right aligned the REQUIRED flag better.
Answer: Leaving it outside the box would leave it with less visual noise and also would not be a problem in specific use cases (e.g. If you ever need to use and icon inside the box)
This is also a direct advice from Universal Design Center https://www.csun.edu/ (https://www.csun.edu/universal-design-center/web-accessibility-criteria-required-fields#:~:text=Required%20fields%20should%20be%20indicated,the%20user%20activates%20the%20field.)
Points:
1 - Id insert it between parenthesis to make it secondary, "something about this" (Required).
I know you are already using the color to balance the weight, but make sure this is alright from an accessibility POV.
2 - Why are you shouting REQUIRED to the user?


How often do airline pilots actually have to avoid other aircraft that ATC did not tell them about at cruise altitude?

Question: I know any pilot flying in VMC, whether under VFR or IFR, must "see and avoid." How often do airline pilots actually "see" and have to "avoid" other traffic at cruise altitude without being told about the traffic by ATC? Can it happen without someone doing something wrong?
Comment: It's possible if someone departs from a clearance, but that's what TCAS is for.  The vertical separation is only 1000 ft at the FLs above 280, and because of GPS, everybody is exactly on the airway centerline, so when someone passes above or below on your airway, they pass precisely overhead or underneath, 1000 ft above/below. They look like they are coming straight at you until they are a couple miles out.
Answer: In the U.S., at cruise altitude for airline operations (normally above FL180 and in class A airspace) it should never happen because all aircraft are operating under IFR and being positively separated by ATC.
Comment: In theory. I was on a corporate customer acceptance flt, flying a big circular route while the customer checked out the cabin systems. We made a boo boo in the FMS entries and left out a waypoint in the 12 or so that made up our big circle. Airplane started turning toward the waypoint AFTER the one we were supposed to turn to, making our turn sharper than it would have. Kindly ATC said, "XXXX I see you're heading toward waypoint Y instead of waypoint X. Would like like me to amend your clearance?" We looked at each other; yikes. "Yes we'll take the revised clearance and thank you VERY much".
Answer: Above FL180, basically never. Below, just like any other VFR pilot
Expanding on 757toga's answer, in the US there are altitudes above which it is not legal to fly except under IFR. At those altitudes, there should never be anyone. However, that leaves flights over international waters as well as flights below those altitudes.
Below 18000', there is no positive control of the airspace. The FAA politely asks that VFR pilots cruise at altitudes ending in 500', e.g. 3500', 10500, 14500', etc... However, the request is not a requirement, in that not everyone in the sky is is cruising. There are many, many users of the sky, such as gliders, aerobatics, balloons which would not be expected to be in level flight.
So IFR flights below FL180 still need to aggressively practice see-and-avoid. Airlines will fly at those altitudes often enough when coming into and out of airports, so they will need to see-and-avoid just like a normal VFR pilot.
The only time an IFR pilot can be sure there's no one at a sub-FL180 altitude is when flying in a cloud and thus knowing there are no VFR pilots around.
ATC will provide guidance if there are transponder or radar blips, but there is no universal transponder requirement and so many planes are invisible to ATC.
That being said, the sky is a very, very, very empty place. The number of times I've had to see and avoid, as opposed to simply see is... 0? (I'm not counting flying in a gaggle with other glider pilots.) I imagine most pilots are in a similar boat.
Comment: 14 CFR 91.159 is **not** phrased as a request...
Comment: "Below 18000', there is no positive control of the airspace." -> What about class B airspace?
Comment: @downvoters in general, I think you should reconsider your downvote. Pilots who see the airspace as *only* IFR cruise or *VFR* cruise are some of the biggest threats to users who are pure VFR. It's galling that there are so many of us who seemingly never look outside our cockpits, because too many of us feel 91.159 and ADSB gives us invincibility.
Comment: The only times that I have had to see and avoid another airplane were within Alert areas for high amount of flight training. Airplanes in those areas usually do a lot more climbing, descending, and turning due to the nature of operations.
Comment: @Bianfable that's a fair point, but those airspaces are few and far between.
Comment: @randomhead, sure, and I'm assuming you were one of the downvoters. Please note that the 91.159 is only applicable to *level cruising flight*.  I've updated my answer to make it more clear how 91.159 is not applicable to the OP's question. We are frequently up and down the airspace within the mode-C veil, in gliders and aerobatic experimentals with neither ADBS nor transponders.
Comment: Well, the question was about airliners at *cruise* altitude, which tends to imply above 18,000' MSL.  So the answer was *broader* than the question, but not in any way that was unclear or confusing.  I strongly agree w/ a lot of the content in answer, and in comment immediately above.  Shame about all the dv's.  Rephrase to delete "politely asks" but keep the other content and maybe they'll come to their senses and reconsider.
Comment: There's a new question here somewhere in the making, what is the definition of "cruise" anyway, on a long XC flight if I choose a continuous steady climb to the midpoint and then a continuous descent, flying VFR below 18,000', am I violating any reg? How low would my climb or descent rate have to fall before I were considered to be "cruising"?  Someone ought to ask that question.
Comment: @quietflyer that's an excellent point, and why I had the "politely ask" phrase. 91.159 mentions level cruise only, so if you are climbing and descending you are not violating any regs, nor even, I would argue, behaving inappropriately. AFAICT, 91.159 is toothless and probably only can be enforced as part of a broader 91.13 administrative action.
Comment: Wow, still collecting downvotes. Literally spoke about this topic with a glider DPE a week ago and we both concluded that there is no requirement for aircraft to be at those altitudes. People, please keep your eyes open for the many, many users of the space who are not at all visible to ATC. Just two weeks ago, I was thermalling at 7k' with Spirit jets passing below at 5k'...


How do I hatch a Tallbird egg?

Question: So I've managed to survive the onslaught of Tallbirds and get a few Tallbird eggs. How do I hatch them? And what are they useful for (other than pecking you to death when they grow up)?
Comment: Better off utilizing them in crockpot recipes for food that provide a lot of health and hunger.
Answer: To quote the Don't Starve wikia,

A Tallbird Egg can also be placed near a fire, where it will become a Hatching Tallbird Egg and eventually hatch into a Smallbird.
A Hatching Tallbird Egg is a Tallbird Egg that has started to hatch after being placed near a Campfire or Fire Pit for at least 10 seconds. Hatching takes roughly 3 days before it will become a Smallbird.

And concerning the second part of your enquiry, a similar question has already been answered on the stackexchange.

How do I hatch a Tallbird egg?


Do the leaves of Yggdrasil (the World Tree) have any special properties?

Question: Do the leaves of the World Tree (Yggdrasil) have any special properties in Norse Mythology? How about in other fantasy works, including comics?
Answer: The World Tree Yggdrasil was supposedly the anchoring element between the nine realms of Asgard. While no legends speak specifically of the leaves, the wood of the tree was reputed to be used by Wotan (Odin) as the mighty spear of heaven, Gungnir (from the Old Norse "swaying one").

Mythology: In The Ring of the Nibelung
In Wagner's opera cycle Der Ring des Nibelungen, Wotan's (Odin's) spear is made from the wood of the world tree Yggdrasil and engraved with the contracts from which Wotan's power derives. When he tries to bar the eponymous hero of the opera Siegfried from awakening Brünnhilde from her magic sleep, Siegfried breaks the spear in two and Wotan flees. It is implied that this is also the end of Wotan's power and he never appears onstage again.

Given the tree spanned the Nine Realms, supported numerous creatures within its branches, survived being gnawed on by the Midgard Serpent, it seems plausible there would be other properties of its leaves, but legends (such as they are) do not speak to any particular properties.

The Marvel Comics representation of the Nine Worlds from the Handbook of the Marvel Universe.
Answer: This unfortunately is an answer of there are no stories of the leaves of the Yggdrasil. There are stories of various animals that live in the tree and the roots are gnawed on by the world serpent and various other myths mention the roots and pools that spring from them. The only story that might come close to any magical properties is the story of  Líf and Lífþrasir who are the survivors of Ragnarok. Although the stories differ on whether or not it is Yggdrasil that they hide in and it's not clear if the leaves shield them or if they hide in a hollow of the world tree. Yggdrasil is supposed to be an Ash tree it doesn't seem to have magical properties it's self as much as it is a bridge between all worlds which means that magical beings and things happen to it and near it rather than it being the cause of them. Also no known reference in comics or stories. Is there something specific that you remember or are you just wondering because now I'm intrigued about it. One more side note the Norse myths are more about action of characters than of items. It seems an element of Norse mythology that anything could be magical and the world just is. It's the way that it's dealt with that matters.
Comment: Thanks Kevin! I actually run a Dungeons and Dragons game and had this come up on a random item table. My players asked "What does it do?" and that wasn't covered by the games rules.
Comment: Ah sees that get more into the game schematics. Which version of D&D it was and which world it was being run in. If you have the specifics it might be better to ask Role-Playing Games stack exchange. D&D can sometimes have items come up that was a onetime creation of an author of a game that has no reflection on anything other than that particular authors taste.


Seeking marriage record of Pierce Butler and Anne Reynolds before 1832 in Ireland?

Question: I am seeking Catherine Marie Butler's PARENTS' names, their birth, death, etc., because I found and have copies of Catherine's name listed in "THE IRELAND, SELECT CATHOLIC BIRTH AND BAPTISM REGISTERS, 1763-1912" as "SEPT 9, 1832 - BAPTISM PLACE: WESTLAND ROW, DUBLIN, IRELAND - CATHERINE M. BUTLER - FATHER: PIERCE BUTLER, MOTHER: ANNE - SS - MICHAEL REDMOND, CATH WHITE" (I don't know what the column "SS" means, and I assume Michael Redmond and Cath White were her godparents/witnesses?)
Our historic and large family records and trees passed down through my generations show Catherine being born on 9/5/1832, baptized 4 days later, and listing her parents as PIERCE BUTLER & ANNE REYNOLDS, but I haven't found details on them!
Our family records show that Catherine was born into wealth and nobility, so I, through research, suspect that PIERCE'S MIDDLE NAME MIGHT BE "SOMERSET", born 1/25/1801, died 7/28/1865, maybe lived in Kilkenny Castle.
He was an Irish politician in the United Kingdom House of Commons. On 2/3/1855, he married Jessy Anne Warren who could be his 2nd wife after Catherine's mother died and after she and Thomas immigrated to America in 1850.
I HAVE much info on Catherine: born 9/5/1832 in Dublin to "Pierce and Anne"; maybe in Kilkenny Castle? She died in Pass Christian, MS on 4/22/1889 and is buried in St. Paul's Catholic Cemetery along with her husband, Charles Aloysius McDonald (10/22/1821 - 2/20/1890). I have copies of their marriage certificate and of their "Find A Graves" which I have visited several times.  Catherine's parents are not listed.
After Catherine's mother died, her father remarried sometime before Catherine was 17 because she at age 17, AGAINST HER FATHER'S WISHES & DEMANDS - HE EVEN THREATENED TO DISINHERIT HER, immigrated to America, (I HAVE COPIES OF THE SHIP'S PASSENGER LIST), arriving in New Orleans on the ship GEORGE EVANS on 11/23/1850 with her younger brother, Thomas Butler, so that she could be governess to the children of her cousins, Percival Butler McCutchon and Jane Butler Browder McCutchon who lived in New Orleans. Percival and Jane were cousins who married each other: his and her mothers were sisters whose Father was Col. William Butler, one of the "FIGHTING BUTLERS".
In New Orleans on 1/11/1853, Catherine married another Irish immigrant, Charles Aloysius McDonald (a 31-year-old widower - his 1st wife was Kate Redmond - with 3 young children, who had immigrated to America in 1849, landing in New York, then moving to New Orleans). Charles was a brick mason.
Charles and Catherine moved to Pass Christian, MS where they raised 9 children, among them being my grandmother, Caroline Elizabeth McDonald, who married William John Bohn. They, too, lived in Pass Christian and raised 6 children, among them my deceased father, Hugh De Lacy Bohn.
Most of these relatives are buried in 2 cemeteries in Pass Christian, MS.
Comment: Welcome to G&FH.SE!  If you haven't done so already, please read "What topics can I ask about here?" in the [help/on-topic] and follow the guidance in the section **How to ask questions about ancestors born less than 100 years ago**.  If your father is not yet deceased, please edit your message to remove his name.
Comment: Thank you, Jan Murphy and PolyGeo, for your interest and excellent advice!  I will simplify my question as you suggest and resubmit it tomorrow.
Comment: Likewise welcome to G&FH SE!  It sounds to me like the question to ask is "how to locate birth/baptism record for Catherine Butler born 1832 in Ireland?" and to do that there may be evidence as to her parents in her marriage and death/burial records.  Would you be able to [edit] your question to provide us with the information that those records contain, please?
Comment: Please don't be offended that I have removed the sentence mentioning your father's name.  This in line with the comment about our "born within last 100 years policy" mentioned by @JanMurphy, but also by removing it the focus becomes more on finding the vital records of Catherine's parents (your current question) rather than starting to trace out their great grandchildren.
Comment: Did Pierce Butler and Anne Reynolds baptize any other children?  If so, what were the names, dates and locations of those baptisms?  A timeline of these could help with determining whether he may be the Pierce Somerset Butler that you found a baptism for.
Comment: Since you already seem to know the names of Catherine Butler's parents I think you should focus this question on finding vital records for just one of them, and then ask a separate question about the other.  Often by trying to put too much information into a question here it can make it look like too much work for potential answerers to consider tackling.  If you can simplify the question (without losing any information critical to the problem) then I see no reason why it should not attract answers.
Comment: Thank you for editing my question and facts!  It made me realize what I am REALLY seeking:  Ancestry and descendants of Pierce SOMERSET Butler to see if he is my great great grandfather (father of Catherine Marie Butler, my great grandmother)?  If he's not, then I have to look elsewhere for a Pierce Butler.
Comment: This question has always bothered me because I don't see any evidence tying the politician Pierce Somerset Butler to OP's known relative Catherine Marie Butler b. 1832 Dublin to "Pierce and Anne" d. 1889 in Pass Christian, MS. Just "family records show that Catherine was born into wealth and nobility." Is this whole question a case of [premature connectivitis](https://genealogy.stackexchange.com/a/9583/10577)?
Answer: Pierce Somerset Butler married Jessy Anne Warren, (nee Bryan) a widow, on 3rd February 1835 in London. St. George's.
She was formerly married to Pooley Abel Warren of Kilkenny, in 1828 at Balbriggan.
There was a family scandal involving a lady named Harisson. Details of the court case are contained in Pierce Somerset Butler V. Viscount Mountgarret.


What's the logic behind comment selection when there are many comments?

Question: What query is used to show the 'popular' comments when the number of comments is too many?
Comment: _"sometimes an answer is buried below 15 comments"_ Once again, this is why people should not write answers in comments. **Answers go in answers.** Why are people not getting this -.-
Comment: @ali: Oh, well sorry. That doesn't seem like a terrible hardship, though. Oh no, a Google user landed on the question page and had to _scroll_ by 300 or so additional pixels in order to get their immediate free expert help. Can't say I'll lose any sleep over that!!
Comment: Highest voted comments and order of comments. If there are not enough highly voted (and newer) comments, it's just later comments that are hidden. As later comments become upvoted, they push older comments into the "hidden" area.
Comment: Like [your previous question](http://meta.stackoverflow.com/questions/298367/how-does-so-handle-permalink-to-a-comment-after-a-large-number-of-comments): _why_ are you so interested in this, why are you placing this emphasis on comments? Comments on Stack Overflow are not meant to be long-lived. See also @Lightness's comment and [How do comments work?](http://stackoverflow.com/help/privileges/comment) and [What are comments?](http://stackoverflow.com/help/privileges/comment).
Comment: Another related question (that I would like to know) is about the logic behind *how many* comments will appear. There are questions where just a few comments are visible and others with many many comments.
Comment: As Zanon mentioned, the current algorithm does not select a fixed number of comments. This is not good for all posts, sometimes an answer is buried below 15 comments. What @Kendra described sounds like an ill posed version of decay ranking algorithm, a good example is [reddit's ranking algorithm](http://amix.dk/blog/post/19588). If the decay ranking method was properly implemented for comments, each comment would have had a popularity score, then we could easily select a fixed the top N popular comments for the time.
Comment: @CodeCaster here is the chain: **lack of question clarification feature → introduce comments → too many comments causing noise → only show a selection by default → what's the algorithm for this selection?** The way the selection works currently leads to yet another problem: when clicking on show more comments, the old thread is replaced by a new thread which has a different sorting. The user loses the reference of the comment she already went through.
Comment: Then we're back to my answer on your previous question: comments are meant to ask for clarification (for which they are great), not discussion. If there are too many comments, we should focus on that (i.e. instruct users to edit their posts instead of adding more comments) instead of making the comments easier to navigate. The point is: as a question visitor, you should not have to read comments. If there currently are a lot of posts with too many comments that contain answers (as opposed to the post itself), then **that** is the problem that needs fixing, not the comment count.
Comment: This is meta. I'm talking about the regular site. If a question on the regular site needs lots of discussion in order to be answered, it's most likely not a good question as we'd like to see them on the site, and perhaps someone should then invite OP to chat, for example - and close the question. I think you're seeing problems that don't exist, or looking for the wrong solution if it already were a problem.
Comment: @LightnessRacesinOrbit I meant the actual answer post is well below the question post, spaced by 15 comments. So a google user who lands on that question page has to scroll down to see the answer.
Comment: @CodeCaster I'm interested in this because it seems to me that [comments business logic in SO is not well defined](http://meta.stackexchange.com/questions/180325). Comments were not originally part of the Q&A design of SO, then they were introduced to solve the question clarification problem, and they ended up to be one of those solutions that generate more problems.  I'm not against comments, I'm just trying to understand the ambiguous borders of this feature in SO.
Comment: I'm just trying to figure out how this question and its answers will address that "problem", or whether it's just here to satisfy your own curiosity.
Comment: @CodeCaster you are assuming that people can get to a _clarification_ without going throw a _discussion_. There is no guarantee that this can be the case all the time. And when this does happen, it is not reasonable to ask users to clean up the discussion related comments, just because they are supposed to be ephemeral. Look at _this_ very thread. You [started](http://meta.stackoverflow.com/questions/298371?noredirect=1#comment215760_298371) with clarification, and now you are into a discussion with me. Are you going to delete those comments later?
Comment: As illustrated here, sometimes the comments shed useful light on the topic. Sometimes that can be edited back into the question or answer; sometimes it can't; often it isn't. HOWEVER, I don't think having to click "show the rest" is a hardship... and I would hope that before comments are discarded someone _does_ make an effort to scavenge them and either edit locally or start a new question for those points. HOWEVER AGAIN,, I'm not sure how often anyone actually makes that effort. HOWEVER YET AGAIN, if they don't we usually haven't lost anything completely unrecoverable. It works well enough.
Answer: For what it has been my experience, it simply select the 5 comments with more upticks (upvotes?) and shows them. If more than one have the same amount of upticks it shows the newest first. That's the only logic here. (meta is different, of course)
Other sites may have different preferences, like showing no comments at all unless they have some upticks (Workplace).
Comment: It actually shows the oldest first (given an equal number of upvotes). Are you saying this should change?
Comment: @MrLister no, OP is asking what's the logic to show popular comments on a post. I'm describing that.


Existence of norm for C*-Algebra

Question: I was wondering wether one can always find/construct a norm which turns an involutive algebra into a C*-algebra. For sure, if it exists it is unique, but does it always exist. If not can you provide a simple example of an involutive algebra such that there's no norm which turns it into a C*-algebra. Thanks alot!
Kind regards, Alex
Comment: You don't just have to find a norm. You also have to have $x \mapsto x^*$.
Comment: See also [Why is $\ell^1(\mathbb{Z})$ not a C\*-algebra?](http://math.stackexchange.com/q/95129/49437)
Answer: (Below by "algebra" I mean "complex algebra.")
You can't even always find a norm that turns an algebra into a Banach algebra. For example, the Weyl algebra $\mathbb{C} \langle x, y \rangle/(xy - yx - 1)$ can't embed into a Banach algebra (see this math.SE question).
Another constraint on being a Banach algebra is that the spectral radius (a purely algebraic concept) of every element of a Banach algebra is finite (in fact bounded by its norm), and this fails in general. For example, the spectral radius of every nonzero element of $\mathbb{C}[x]$ is infinite.
Yet another constraint is that, by the Gelfand-Mazur theorem, the only Banach algebra which is also a division algebra is $\mathbb{C}$. This means that, for example, $\mathbb{C}(x)$ cannot be a Banach algebra, but it means more generally that any commutative algebra $A$ with a maximal ideal $m$ such that $A/m$ is not isomorphic to $\mathbb{C}$ cannot be a Banach algebra (since if $A$ were a Banach algebra then $m$ would be closed, so $A/m$ would also be a Banach algebra).

In the case of C*-algebras there are even heavier restrictions. For example, the finite-dimensional C*-algebras are products of matrix algebras, and these are precisely the semisimple algebras. Most finite-dimensional algebras are very far from semisimple; the smallest example is $\mathbb{C}[x]/x^2$ (which can be made into a Banach algebra).
More generally, the Jacobson radical of a C*-algebra is always zero (so a C*-algebra is always semiprimitive). This is a strong and purely algebraic constraint, and it is easy to write down many examples of algebras which are not semiprimitive, e.g. a commutative algebra with nilpotent elements can't be semiprimitive.
Comment: Ok that shows that it cannot even be equipped with a norm turning it into a normed rather than a banach algebra since any norm gives rise to a completion ...the construction is outlined in http://www.math.ksu.edu/~nagy/real-an/2-05-b-alg.pdf
Comment: Btw thx for the awesome answer ;)

Existence of norm for C*-Algebra


'Awaiting recommendation' on Scholar One before any review process

Question: I submitted a manuscript to ScholarOne about 10 weeks ago. I'm aware of the typical workflow of a journal. There are two bullet points that have remained unchanged for about 8 weeks now - one saying 'awaiting reviewer scores' and the other saying 'awaiting recommendation'. From reading other posts, these don't seem to usually be said together - does it usually just say one or other? What does this mean?
Answer: The status that authors see is fully customizable, and depends on the actual workflow employed by the journal. What you are seeing generally indicates that there is at least 1 review task pending, and also a recommendation task pending. This is possible! For instance, let's say the journal assigned 3 reviewers, but only requires 2 to move on to the recommendation task. Since they are both now "pending", you could see both status's at the same time. Without specific information on the journal you are working with, I can't give you exact details on your situation. There are other possible scenario's.
Note: I am an employee of ScholarOne, but my posts and answers are strictly my own.


Which sensor should I use to recognize just humans? (not all of the obstacles)

Question: I would like to make a social distance meter and the device should only avoid from humans, not the obstacles. I'll use an ultrasonic sensor and a PIR sensor but I'm not sure it will be enough. Do I need to use a temperature sensor too? But not sure how I can implement the temperature sensor from social distancing approach. Do you know any specific sensor or method to detect only humans?
Comment: There have been many questions on this site about various techniques to achieve the same end. Most of them are doomed to failure. Yours will really struggle with trying to do 360° cover and match up responses from the range sensor with data from something like an infrared camera. The processing will be very complex and, judging by your question, beyond your present capability. Recommendation: forget about this project. If it was practical then similar devices would be on sale already.
Comment: In Terminator they used dogs... very good at detecting humans...
Comment: a *sensor* isn't what you're looking for – it's the post-processing of sensor data that does recognition.
Comment: You are right but I should work on this topic due to lecture requirements. I think I may change this project to an AI project and use a camera and OpenCV to observe and measure the distance between humans.
Answer: Afaik, infrared sensors are used for this, they also work in the dark.
When searching for human sensors, I also came for example to this sensor:
AK9750 Human Detection IR Sensor Module. This sensor has a range of 2-3 meters which should be sufficient for social distancing measurements. Probably there are more similar sensors.


Basketball equivalent to soccer's "goal"

Question: You say "goal" in soccer when the ball gets into the net. How about basketball, When the ball gets through the hoop?
Comment: Basket is the general term.  Sometimes it could be called a '2-pointer' or '3-pointer'.
Answer: I agree with Maulik, in that basket qualifies as a generic term roughly equivalent to goal in some contexts:

Ronaldo scored a goal on the play. Lebron made a basket on the play.

However, it's not a perfect synonym. We're all familiar with the ecstastic call from the broadcasters at World Cup matches:

Gooooooooooooooooooal!

I don't think a sportscaster in a basketball arena is nearly as likely to exclaim:

Baaaaaas - keeeeeeet!

Also, if I'm summarizing a game, I might say:

Ronaldo scored two goals.

but I don't think I'm likely to say:

Lebron made seven baskets.

Instead, it would be:

Lebron scored 14 points.

Similarly, I might ask my son (the striker), "Did you score any goals today?" but I would be more likely to ask my daughter (the point guard), "How many points did you score today?" (not, "Did you make any baskets today?")
I imagine this difference holds for two reasons: (1) there are far more points scored in a basketball game than in a soccer match, and (2) not all baskets are worth the same number of points.
So, the terminology goes more like this:

Steve Kerr scored 21 points. He was 7 of 9 from the field, he made 4 of 6 free throws, and he made one three-pointer.

A three-point shot in basketball is sometimes called a three-pointer, although, with enough context, that can even be shortened to a single word: three.

He made a three!

As Maulik's answer also hints, the term field goal can be used. That term isn't used so much conversationally, but you do see it on stat sheets, like this one:

3P refers to three-point shots, and FT refers to free throws. FG is field goals, which refers to, well, baskets.
Comment: But at least to a non-sports fan like me, it seems that the level of excitement for an individual basket would be much less than for a goal, since a hundred or so baskets might be made in any game, versus maybe half a dozen goals.
Comment: @jamesqf - I agree; that probably plays a factor, too. To the O.P. - I thought of one more: if the ball goes through the basket without touching the rim, that is sometimes called a [_swish_](http://www.thefreedictionary.com/swish).
Answer: You make or shoot a basket.
OALD on it:

basket (n): a point that is scored by throwing the ball through this net

This proves it further:

In basketball, the term field goal refers to a basket scored on any shot or tap other than a...
Answer: Generally, in basketball when someone scores it is called a two pointer or a three pointer depending on the distance from where the throw has been made.
But when a player is fouled, depending on the game's context they can be awarded three free throw attempts, two free throw attempts or one free throw attempt each attempt valuing one point.
More on this here.
Answer: There is no equivalent to soccer's Gooooooooooaaaaaaaaal!.
But in basketball  scoooorre or she/he scooooorres! is possible.
In hockey, goooooaaal is more likely than scoooorrre, although both are possible.
In baseball, it's back to s/he scooorrrrres! There are no goals in baseball, whereas in cricket everybody snores.
Comment: I agree that both are possible, but, in ice hockey, the exclamation _scoooore!_ is more prevalent than _goooal!_ – at least among sportscasters (both in the [playoffs](https://www.youtube.com/watch?v=vzN3ahO5C9E), and in the [regular season](https://www.youtube.com/watch?v=pzaMGmt6Z68)).


Is it safe to put pots and pans with hard plastic handles on the bottom rack of the dishwasher?

Question: I have a Whirlpool dishwasher I bought in 2014. It works fine. But where should I put pots and pans with hard plastic handles when I load the dishwasher? I want to put them on the bottom rack, but I wonder if even hard plastic handles might melt from the dryer element at the bottom. Other than the handles, these pots and pans are otherwise made of metal.
Comment: I'm voting to close this question as off-topic because "Operation of major appliances or questions regarding small appliances" is specifically listed as off-topic in the help center.
Answer: Ours go in there all the time.
Answer: The temperature encountered by these handles when used on a gas stove exceeds the temperature of the air anywhere inside a dishwasher even when set on "heated dry", so if they survive the cooking then they will survive the washing.
However -- do not allow any materials to come into direct contact with the heater element.
Answer: The short answer is you are fine with placing that in the bottom rack as long as you don't force the plastic handles down under the rack to come in contact with the heating element. That will take some serious effort - so I don't think you will do that.
I can tell you I have had plastic forks, plastic spoons and plastic bowls , and plastic plates in the bottom rack with my washer on HEATED Dry.  I can't count the number of times I have washed them with heated dry but I can tell I wash dishes every day.
True Silverware might have certain disclaimers about washing in the dish washer - so pay attention to that.


Using missles and rockets in war

Question: السلام عليكم
Is it permissible to use missles and rockets to attack a city where there will be women and children, doesn't missles and rockets also come under the prohibition from the hadith "No one may punish using fire other than the Lord of the Fire (Allaah)." Abu dawud
Answer: Yes it is permissible to use missiles and rockets during war. Both for destruction of enemy property and for killing enemy personnel.

ولا بأس برميهم بالنبال ونحوها من وسائل القتال الحديثة
There is no harm in shooting missiles at them and using other modern means of warfare
— Fiqh al-Islami wa Adillatuhu

Missiles and rockets are just a means of delivery. Typically they use explosives i.e. shock waves shrapnel and debris to kill and destroy. This is similar to the use of projectile weapons like arrows and catapults which were used by the Prophet ﷺ and the sahaba. And even if they use incendiaries it is permissible to use them.
Killing by burning with fire can fall into either of the three cases:

When the enemy has already been subdued and made prisoners. The majority considers it forbidden to execute prisoners through immolation based on the hadith:

بعثنا رسول الله صلى الله عليه وسلم في بعث فقال إن وجدتم فلانا وفلانا فأحرقوهما بالنار ثم قال رسول الله صلى الله عليه وسلم حين أردنا الخروج إني أمرتكم أن تحرقوا فلانا وفلانا، وإن النار لا يعذب بها إلا الله، فإن وجدتموهما فاقتلوهما
Allah's Messenger (ﷺ) sent us in a mission and said, "If you find so-and-so and so-and-so, burn both of them with fire."
When we intended to depart, Allah's Messenger (ﷺ) said, "I have ordered you to burn so-and-so and so-and-so, and it is none but Allah Who punishes with fire, so, if you find them, kill them"
— Bukhari

However some madhabs allow for burning in Qisas (retaliation):

ثم أمر بمسامير فأحميت فكحلهم بها
Then he ordered for nails which were heated and passed over their eyes
— Bukhari and Muslim

والحرمات قصاص فمن اعتدى عليكم فاعتدوا عليه بمثل ما اعتدى عليكم
For [all] violations is legal retribution. So whoever has assaulted you, then assault him in the same way that he has assaulted you.
— Quran 2:194

And some rarer opinions allow for any burning and execution by immolation or burning their bodies posthumously, as  فاقتلوا المشركين (9:5) makes permissible all ways of killing by default. It is recorded that some sahaba such as Abu Bakr, Khalid bin Waleed and Ali ibn Abi Talib used fire in killing some people. The above hadith may be interpreted as not being a general prohibition but rather as kindness shown by the Prophet ﷺ in one particular incident.

During the attack when it is feasible to kill or capture the enemy without using fire. The ruling in this situation is disagreed upon. Some madhabs consider it forbidden to use fire in this case, while others allow it.

During the attack when it is not feasible to kill or capture the enemy without using fire. It is agreed upon that it is permissible to use fire in this case. That is because necessity makes it permissible to use. And refraining from using it would lead to harm for the Muslims and to abandonment of the obligation of jihad by making it impossible to carry out.

The following are some ahadith and an athar on the use of fire as a weapon:

فانطلق إليها فكسرها وحرقها
Jarir proceeded towards that house, and dismantled and burnt it.
— Bukhari

حرق النبي صلى الله عليه وسلم نخل بني النضير
The Prophet (ﷺ) burnt the date-palms of Bani An-Nadir.
— Bukhari

نزل نبي من الأنبياء تحت شجرة فلدغته نملة، فأمر بجهازه فأخرج من تحتها، ثم أمر ببيتها فأحرق بالنار، فأوحى الله إليه فهلا نملة واحدة
Once while a prophet amongst the prophets was taking a rest underneath a tree, an ant bit him. He, therefore, ordered that his luggage be taken away from underneath that tree and then ordered that the dwelling place of the ants should be set on fire. Allah sent him a revelation:-- "Wouldn't it have been sufficient to burn a single ant?"
— Bukhari

فحدثني أسامة، أن رسول الله صلى الله عليه وسلم كان عهد إليه فقال أغر على أبنى صباحا وحرق
Narrated Usamah: The Messenger of Allah (ﷺ) enjoined upon him to attack Ubna in the morning and burn the place.
— Abu Dawud

أن جنادة بن أبي أمية الأزدي، وعبد الله بن قيس الفزاري، وغيرهما، من ولاة البحر من بعدهم كانوا يرمون العدو من الروم وغيرهم بالنار
Junadah bin Abi Umayyah al-Azdi and Abdullah bin Qais al-Fazari and other admirals said that they threw fire at their enemies from Romans and others
— Sunan Sa'eed bin Mansoor

Some fiqh references on the issue:

ولا بأس بإحراق حصونهم بالنار، وإغراقها بالماء، وتخريبها وهدمها عليهم، ونصب المنجنيق عليها لقوله ﴿يخربون بيوتهم بأيديهم وأيدي المؤمنين﴾ [الحشر: ٢] ولأن كل ذلك من باب القتال
There is no hindrance in burning their fortresses with fire, and drowning them in water, and destroying them and making them collapse on the enemy, and using catapults against them. The evidence for this is the verse:

they destroyed their houses by their [own] hands and the hands of the believers (59:2)

And because all these acts come under the meaning of fighting
— Badaa'i' as-Sanaa'i  also see Durr al-Mukhtaar (Hanafi)

ويجوز حصار الكفار في البلاد والحصون والقلاع، وإرسال الماء عليهم، ورميهم بنار ومنجنيق وما في معنى ذلك من هدم بيوتهم، وقطع الماء عنهم، وإلقاء حيات أو عقارب عليهم ولو كان فيهم نساء وصبيان
And it is permissible to besiege the disbelievers in settlements, fortresses and castles. And to let lose flood water on them, and to shoot fire and catapults at them, and whatever else comes under the meaning of that such as demolishing their homes, and cutting off their water, and throwing snakes and scorpions on them even if there are women and children among them
— Mughni al-Muhtaaj (Shafi'i)

يجوز رميهم أي: الكفار بالنار،  ... فإذا قدر عليهم، لم يجز تحريقهم
It is permissible to throw fire at the disbelievers ... but after control is gained over them it is not permissible to burn them
— Kashshaaf al-Qinaa' also see  al-Mughni (Hanbali)

As for the casualties of women and children that is covered in the answer to the question: Does islam allow killing or enslaving civilians in war? In short women and children should not be specifically targeted but it is permitted to target a place where they are mixed with those adult males who can be targeted.
The evidence of this is the hadith about the permissibility of raids at night when it is not possible to distinguish between men and women and children:

وسئل عن أهل الدار يبيتون من المشركين، فيصاب من نسائهم وذراريهم قال هم منهم
The Prophet (ﷺ) ... was asked whether it was permissible to attack the pagan warriors at night with the probability of exposing their women and children to danger.
The Prophet (ﷺ) replied, "They (i.e. women and children) are from them (i.e. pagans)."
— Bukhari

And the fact that the Prophet ﷺ used a catapult in the siege of Taif. Taif was a settlement like any other where men, women and children lived together and it is obvious that the women and children could have been struck by the catapult.
Similarly the sahaba used catapults such as at the conquest of Alexandria and Caesarea.
And based on reasoning, as it is a necessity and without it Jihad would become unfeasible or even impossible to carry out and the enemy would gain easy ways to shield themselves from the attacks of the Muslims.
And scholars have noted that this is permissible as mentioned in the above references as well.

المحرم إنما هو قصد قتلهن فأما إذا قصدنا قصد الرجال بالإغارة أو نرمي منجنيق أو فتح شق أو إلقاء نار فتلف بذلك نساء أو صبيان لم نأثم بذلك
It is forbidden to intentionally aim for the women and children. However if we aim for the men in a night raid, or when shooting a catapult, or when demolishing a dam, or when throwing fire and that causes casualties of women and children then we do not earn sin because of that.
— Saarim al-Maslool

Missiles and rockets follow the same ruling.
Answer: Missiles and rockets can be used if it is sure that it will target the enemies at war and will not target women and children. Some people say if enemy is killing our children, we can kill their children too. This is not correct approach. Muslims are going to war to bring peace and justice and if this war is killing innocents the purpose of war itself is lost.

O you who have believed, be persistently standing firm for Allāh,
witnesses in justice, and do not let the hatred of a people prevent
you from being just. Be just; that is nearer to righteousness. And
fear Allāh; indeed, Allāh is [fully] Aware of what you do. Quran
5:8

Using missles and rockets in war


Is there a way to stop Windows 7 from minimizing a window with focus when clicking the taskbar item?

Question: In Windows 7, if you click the taskbar item of a window that has focus, that window is sent away. As I clicked the window, I want to put focus there. I have searched for a method to make Windows treat the click as either giving focus or doing nothing, but have not been able to come up with a satisfactory set of search terms.
Comment: That's not correct. In *every* version of Windows since 95 (the first with a taskbar), clicking the taskbar item of a window that is visible and active would minimize it.
Comment: IF it has focus, and you click it, it minimizes.  So it HAS focus already... what are you trying to accomplish by clicking the focused app's icon?
Comment: I see I was a little vague, and said "window" at one point when I shoudl have said "taskbar item". To be clearer -

Sometimes with many windows open, I don't know which has focus. It is often easier to find the task bar item than the window itself, especially with multiple monitors. If I click the taskbar item, I want the window to retain focus *and* not minimize.
Comment: I agree with CrankyDog that it's quite annoying to see a window minimize when you actually want to focus it. Especiialy when working with Excel files with similar names this can be confusing...
Comment: True enough - "closing" was misleading, so I have edited that. As for clicking again, sure, I can do that, but I don't really want to have to. In previous versions of Windows, clicking on a taskbar item that had focus did nothing - that's the behavior I want. To my way of thinking, clicking the item means "Give this focus." It's a small point, and Windows has many more major irritants, but this one has been bugging me a lot lately.
Comment: If you click the taskbar button a second time, the window is restored.  Why don't you just do that?  (BTW, your use of the word "closing" in your question title is misleading -- in Windows language, "closing" a window means destroying it.)
Comment: If the window *has focus* and is not minimized, it will be minimized because that is the expected, normal behavior. If it has focus and is minimized, then it will be restored. If it is minimized and does not have focus, it will be restored and given focus. Finally, if it is not minimized nor has focus, then it receives focus. If you don't know which one has focus, then how will clicking its taskbar icon tell you? There would be **no change in its appearance** since it already has focus. If anything, clicking it would get your attention by having it minimize.
Answer: After looking around unsuccessfully for programs that could do this, I actually went back to my favourite i.e. 7+ Taskbar Tweaker. Turns out it does allow you to do this, but using a hidden option that's not exposed through the UI! See the Advanced section of the help file for details.
I. For normal installation of the program

Open regedit and navigate to:
HKEY_CURRENT_USER\Software\7 Taskbar Tweaker\Mouse Button Control

Create a new DWORD called taskbaritem|lclick and set its value to 1.

II. For portable installation of the program

Run the program once then close it completely (i.e. right-click the tray/notification area icon and select Exit) in order to create the 7+ Taskbar Tweaker.ini file in the same dir that 7+ Taskbar Tweaker.exe resides in.
Open the INI in Notepad or any text editor and add the following section to it at the very beginning or end (don't mix it up with entries for other sections such as Config or OptionsEx):
[Mouse Button Control]
taskbaritem|lclick=1

Now run the program and try left-clicking any taskbar button as much as you want. :)
Comment: Since v4.4, you can use the [Advanced Options Editor](http://rammichael.com/7-taskbar-tweaker-v4-4#more-1043).
Comment: as per @Paul's comment, click on "Help" within the `Advanced Options Editor > Mouse tab`  for more details and mouse options
Answer: Sometime I work with multiple files that are almost identical and this is causing me headaches.
I was under the impression, like the original poster, that Win 7 was different yet the argument saying "older version did that" also seemed correct.
I realized just now what the difference is and it is not evident since Win 7 have a lighter taskbar "highlight" than XP. I'm not sure how to explain it so I'll take the long route...
Let's say I have two apps already opened in the task bar called A and B.
Clicking on 'A' in the taskbar brings the 'A' window up.
Then Click on 'B' in the task bar brings the 'B' window up.
If I click again on 'B' in the task bar it will minimize the 'B' window - fine.
But here is the problem... as 'B' minimize, it is 'A' that gets the focus.
And that's a problem because in the past I knew that ANYTIME I clicked the 'B' windows in the task bar, the 'B' application was getting the focus wether it was minimized or not.
But now, clicking the 'B' taskbar item does NOT garanteee that you will have 'B'. If you click by mistake when 'B' is already up then it is the previous windows that pops up and not 'B'.
Now, I do not have a XP machine in front of me, but I'm pretty sure that's the annoyance with minimize. When having two identical windows this jumping mecanism could make you work on another document without your knowledge. The solution is to keep a close eye on what task bar item is highlighted from now on as it can 'jump'...)

I also just realised that Win 7 also highlights the taskbar icon when the mouse is over it. This effectively masks the fact that the focus is lost on the clicked taskbar window (although the mouse have a slightly different taskbar highlight).