Have we managed to make a perfect vacuum?

Question: Have we managed to make a device without any atom inside it on earth?
I was reading about vacuum here, and I found in the examples part here that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them?
Comment: No. Every vacuum is measured with the scale given http://en.wikipedia.org/wiki/Free_space#Measurement, not being "Perfect Vacuum".
Comment: In most UHV (ultra high vacuum) systems, including mine, the main component is by far hydrogen molecules (H2). They're light and very difficult to pump out. For that reason, many pumps in the UHV range focus solely on pumping hydrogen (e.g., titanium sublimation or non-evaporable getters).
Answer: As zonk said, there is no perfect vacuum. Even the 'vacuum' of space contains a few atoms per cubic meter on average.
In the lab, the lack of a high vacuum usually results from not having a pump that can effectively extract enough of the particles inside the chamber you're trying to evacuate.
There are several different kinds of pumps used, depending on how 'good' of a vacuum you want: mechanical roughing pumps, ion pumps, turbo-molecular pumps among others. Each works either by transferring gas particles or by capturing them. Since transfer works by preferentially forcing gas molecules in a certain direction, it cannot remove ALL the particles (as in the electrons inside a wire: on average, you can force the current preferentially in the direction of the applied voltage but each individual electron will zip around in all directions). A capture pump is better at removing particles, but it is still limited by how many materials they have already captured and can saturate.
Even if we had a perfect pump, you would still need to be careful about what is inside the chamber or what the chamber is made of. Fingerprint grease, zinc (and brass), and plastics actually out-gas under high enough vacuums. This means that the particles normally trapped under atmospheric pressures can break loose and rattle around inside your vacuum if you're not careful.
Also, pumps such as mechanical pumps use lubricating oil to function (though some fancier ones such as the ion pumps do not) and that can get into the chamber as well and increase the number of particles.
That's probably more than you wanted to know, but there you have it.
I do not think the tag 'particle physics' is accurate. Particle physics generally refers to subatomic physics and encompasses things like quarks, QED, and the Higgs boson. Perhaps 'experimental physics' would be better?

(Adding another answer as my response to Hurricane's question is too long for comments)
Glad it helped. Richard Terrett is correct, (charged) anti-matter is confined in a magnetic trap in as high of a vacuum as we can get. Uncharged anti-matter must be contained using laser traps ('optical tweezers' is something to look into if you're curious).
There will still be some particles in the antimatter container but, contrary to the DaVinci Code and popular perception, when one particle of anti-hydrogen meets a particle of hydrogen, the energy released (according to E=mc^2, which I believe is correct) is 3*10^-10 Joules or 0.3 nanojoules.
To give this a sense of scale, Wikipedia says a nanojoule (10^-9 Joules) is equal to 'about 1/160 of the kinetic energy of a flying mosquito'. So an antihydrogen annihilating with a stray hydrogen in the vessel would be have less of an effect than a mosquito bumping the outside of the container, energetically speaking.
Now, we can also determine how many particles would be in a container. Let's take the highest vacuum rating; ultra-high vacuum, which is classified as having a pressure under 10^-7 pascal, with 10^-10 pascal (10^-12 torr) being the golden standard among people who care about excellent vacuum vessels. A lot of UHV systems operate at very low temperatures, but let us take the temperature of the inside of the vessel to be room-temperature, T=293 Kelvin. We can use the ideal gas equation if we know the volume of the container, PV=nRT. Plugging in the pressure, room temperature, and assuming a container size of a rubik's cube [V=(5.5*10^-2 meters)^3=1.66*10^-4 meters^3], we arrive at a number of particles of n=6.83*10^-18 moles or 4.113*10^6 molecules. To put this in perspective, at standard pressure and temperature in the same size vessel (STP, 101325 pascal, 293K), we would have 4.155×10^21 molecules. So UHV is a pretty damn good vacuum.
Comment: @Hurricane - Antimatter can be stored in a [Penning trap](http://en.wikipedia.org/wiki/Penning_trap).
Comment: @RichardTerrett, Wikipedia says it is used to store charged particles like antiprotons, so does this also apply for complete atoms like antihydrogen ones since atoms are not charged ?
Comment: Great answer, tag edited too.
Now one last question since you seem to know much about this. I have asked earlier about the mass of these particles still in there. Wikipedia mentioned molecules but I don't know molecules of what. Anyway to clarify this, I asked this question to know if there is 100% safe place to store antimatter when we somehow get to know how. So now the important thing is about the mass of these "molecules" or particles, have you got any idea about how many are left in these different vacuum methods and what the mass of them is ?
Comment: @Hurricane You should ask that as a new question (assuming it doesn't already exist on this site).
Answer: The current record vacuum, made at CERN, is around 1000atoms/cubic cm
For comparison intersteller space (well away from the solar system) is around 1 atom/cc and deep intergalactic, really empty, space is around 0.001 atom/cc
The bits of space we can reach, in Earth orbit, are only about the sort of vacuum you can get in an ordinary lab vac pump.
Comment: `in Earth orbit` Could you please say whether that would be low-earth orbit (LEO) or geostationary orbit (GEO), thanks.
Comment: Upto about 600km (LEO) it's the atmosphere reducing in density with height. Above that (MEO and GSO) it's mostly ions from the sun - don't remember the figures
Answer: I'd like to add another dimension to this discussion.  Even if we were to hypothetically evacuate all atoms from a certain region of space, quantum field theory tells us that there would still be something there, namely the "zero point" energy corresponding to the ground state of fields.  So in this sense, at least as far as I am aware, our current model of fundamental physics renders the existence of a region of space with "nothing" there an impossibility, even in principle.  http://en.wikipedia.org/wiki/Zero-point_energy
Cheers!
Comment: Plus a bath of photons from the walls.
Comment: -1: The "zero-point energy" is referring to *virtual* particles, not real particles.
Comment: @JohnRennie: First sentence of question: "a device with no ANY atom inside it" ... atom... not fake particle.
Comment: @ChrisGerig I think you make a good point that my answer isn't immediately relevant to the body of the question, but that's why I added the phrase "add another dimension to this discussion;" I simply thought certain people might find this, admittedly somewhat tangential, answer interesting given the broader scope of the question title.  Oh btw I was a physics/math undergrad at Cal; I'm not surprised you left physics for math.  Cheers.
Comment: @ChrisGerig: true, but the Casimir effect shows there is *something* there so I think your downvote is unkind.
Answer: It is really really really difficult to get a vacuum of 1E-10 Pa at room temperature when surrounded by a 1E+5 Pa atmosphere (sea level on Earth). The answer referring to Penning Traps needs to be understood in the context of the life-time of the antiprotons being on the order of seconds or less. So, unless your story has a method of creating and isolating a whole lot of antimatter (so that the losses due to leakage are negligible), you're not going to be storing it for very long. OTOH, it isn't obvious to me that if you made your equipment in outer space (or say on the Moon or an asteroid) that the problems would be nearly as difficult to solve. The easiest place to store antimatter would be in outer space (more specifically, in the void between the cosmic filaments far away from any galaxy or star). On Earth, even stainless steel acts like a "wet sponge" when we're concerned with ultrahigh vacuum. We have to bake everything to drive the volatiles (water but especially gasses like hydrogen, helium, argon, nitrogen, CO2, methane, CO, etc.) out of all of the equipment. This would be easier in outer space (or the surface of the Moon). Note that even there there will be some gas molecules (atoms) around contaminating things.
Comment: But this suggests that you could create a vacuum in a container by putting it on a satellite and use the vacuum of space to evacuate it, close it and then bring it back to Earth.


Shower Base over or to the side of tiles

Question: I am tiling my bathroom floor and putting in a new shower base.
What do i do first?
Do I put tiles on the whole floor and then but the base over it?
or put the base and then put the tiles to it?
Comment: You need to give more data. Is the new shower base a "ready-to-use" fiberglass or plastic pan? That would be very different from the prep required for a hot-mop/dry-pack type shower pan set up.
Answer: You should put tub and tile backer board down on the floor where the shower will be and then once the tub is installed tile up to the edge.  You dont want tile underneath as it may or may not end up level, it may or may not come loose after weight is put onto it, and most importantly grout is not waterproof...it will absorb water and you definitely dont want that under the shower.
Answer: Basically if you want to do it the easiest way and right - the shower base or tub is the second thing installed in a bathroom.  The first being the basic framing for the bathroom.
Exit plumbing, thinset under base (for some), whatever you need to do get the base/tub set up in stone.  The next steps include prepping the rest of the floor for the tile and tiling.  The only time that this would differ is if you were doing a clawfoot tub.


Actionscript (Flex) streamed upload to Django

Question: I want to upload large image files from actionscript from Flex. The file upload tutorial https://docs.djangoproject.com/en/dev/topics/http/file-uploads/ handles streamed file upload from a form so the file is transformed in request.FILE['name'], but I don't know how to replicate this in actionscript. I tried also to transfer the file as POST argument, but I get error:
in handle_uploaded_file for chunk in f.chunks():
AttributeError: 'unicode' object has no attribute 'chunks'

Is it error in my python code that I have to use only request.FILE or is it problem in my actionscript? What is the proper way to upload file without form. Here is my actionscript code:
var upload:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(UploadURL+"?var="+Math.random());
var sendVars:URLVariables = new URLVariables();
var header:URLRequestHeader = new URLRequestHeader("enctype", "multipart/form-data");
upload.dataFormat = URLLoaderDataFormat.BINARY;
upload.addEventListener(Event.COMPLETE, image.uploadedEvent);
sendVars.file = image.getBytearray(); // image is a JPEG encoded ByteArray
request.data = sendVars;
request.method = URLRequestMethod.POST;
request.requestHeaders.push(header);
upload.load(request);

here is django part:
def upload_file(request):
  if request.method == 'POST':
    handle_uploaded_file(request.POST.get('file'))
  return HttpResponse()

def handle_uploaded_file(f):
  destination = open('file.dat', 'wb+')
  for chunk in f.chunks():
      destination.write(chunk)
  destination.close()

Thanks
Answer: You do understand that streaming is not equal to HTTP upload right?  Have you even tried to debug at all?  I would imagine that your file f is the full file image and doesn't have chunks because it was never streamed in the first place.


Contacts recall with mult numbers

Question: How do find out which number you dialed after the call when a contact has multiple numbers associated with it. On an iphone
Answer: Go to the Phone app and tap on the Recents tab.  You'll see incoming and outgoing calls there.  The outgoing calls have a little phone handset icon with an arrow going up.  When you click on the information icon, the 'i' inside the circle, you'll see details of the call.  It will also say 'incoming' or 'outgoing'.
Comment: If I go into Recents tab in the Phone app, I see the blue circle. When I touch it, it brings up the contact of the person who called, but it doesn't say which of the 3 numbers I have for them (home, work, cell) they called from. Can you be more specific, please?
Comment: On the *Recents* tab under the contact name will be the label of the specific number called. For instance, if a contact has a *Mobile* and *Home* number in the Contact and I called the *Mobile*, it will say 'mobile' under the name. Tap on the Info circle and see the contact info and the number associated with 'mobile'.
Comment: Got it! Thank you for your patience. I understand now.
Comment: NP, I should've been more clear in my answer.

Contacts recall with mult numbers


How to implement followers for users, as in twitter

Question: I have a social network that I am making using php and mysql. I am trying to figure out how to make followers for each user. Should I create a table in mysql with a list of followers for each person, and create a table for everybody they follow? How should this work? How should I set up my data structures? Please help.
Answer: Table `followers`

id
user_id
follows_id

If a user follows another, add their ids to this table where user_id is the user that follows and follows_id is the user he's following.
Answer: You should look into ERD. You are right though. You have a table with users. Users have a many-to-many relationship with users, so create a table that contains that relation. It should have at least two fields; "user" and "follower", and you store the id's of the respective entities.
Comment: At first I thought I was going insane when I clicked on that link. Then I realized my insanity was unrelated...
Comment: Maybe you could UML that for me? Some nice state machine perhaps?
Answer: This certainly is a many to many relationship and i would use a composite primary key.
Instead of using an explicit id column i would make the combined columns of user_id and follower_id the primary key for the followers table. This would avoid any entries from being duplicated.
Also i have added a foreign key constraint so that if the user is deleted in the users table then all the users entries will be deleted from the the followers table;
create table followers
(
     user_id int unsigned not null,
     follower_id int unsigned not null,
     primary key(user_id,follower_id),
     foreign key(user_id) references users(id) on delete cascade on update cascade
);


differentially expressed intron analysis?

Question: I have used Deseq for estimating the differentially expressed introns for the RNA seq data using the UCSC intron bed file. can Deseq be used for differentially expressed intron analysis?
Comment: Welcome to the site. You write Deseq in the question but you tagged with deseq2 (of the DEseq2 package). Which one do you really use? Also if you did it can be used, but it seems like you have problems with the results or something, if this is the case, you will need to provide more of information like the relevant part of the code used
Answer: Typical tools to use for this would be the DEXseq packages (as done here) or rMATS, which will calculate intron retention rates.
I would generally suggest not summing intronic counts by gene and using that in DESeq2 (I assume that's what you meant by DESeq, since there's no reason to use the original DESeq for anything). What you'd be getting if you did this is less expressed introns and more sample-specific bias in enriching for mature versus pre-mRNA.
Comment: Thank you Ryan. Yeah, I will use either DEXseq or rMATS in that case.


How to remove Background in multiple and make it white in just one click or automate

Question: I have more than 40 pictures of which I want to remove background and make them white background. I cannot do it one by one as its gonna take a lot of time even days. I want to automate the process is. Kindly help me if there is any possible way to do this.
Comment: There are online services that do very good background removal. Most of them give you a few test shots to try out their algorithm for suitability before you commit to their pricing. Most of them can batch too. Most of them are surprisingly good these days, better than a human without an hour to spare.
Answer: The latest version of Photoshop CC 2021 has a new one-click Remove Background feature. It's not quite as good as preparing your own mask manually, but it seems to do a fairly decent job.
To use it:

Open an image, and click on the Background lock icon in the layers panel to convert the image to a normal layer. Also note, the following procedure won't work on a Smart Object, you'd need to rasterize the Smart Object first.

Open the Properties panel, and scroll down a bit until you see Quick Actions and the buttons located underneath.

Then hit the Remove Background button.
Comment: I've never used Adobe products. Does that require internet connection to work?
Comment: @OK-Validation - Photoshop doesn't generally require an internet connection on all the time. From time to time however the software needs to connect to the internet to validate the licence. Also for some of the newest AI features, an internet connection is required if you want to use them.
Answer: You can try using the website: https://huggingface.co/spaces/gaviego/removebg. I found someone on Reddit who made this online tool using stable diffusion. The website allows batch uploads. I had really good success with removing backgrounds that were mostly white but had shadows in the background.
You can also try Adobe Express Remove Background tool: https://www.adobe.com/express/feature/image/remove-background
But this does not allow batch upload at the moment.


What is albedo and how to use it and how to prepare materials for games?

Question: The main question is: how to prepare materials for games? Say I model an asset. Bake all material textures (diffuse, AO, specular etc.) into one diffuse, bake normals from a high poly version of the model into one normal map. Is that correct? Or should I do it differently, say prepare separate texture for specular. I read somewhere that in games there are actually no materials, only textures. Is that right? Also I came across the term albedo and that it is used in games/game engines? What is it exactly and how to do it in Blender?
Comment: Albedo is a Diffuse/Color map but without additional lights and shadows (AO) as @metaphor_set said. I've found a tutorial recently showing how to prepare a map like this using Photoshop: https://www.youtube.com/watch?v=VBoHh6CR-kM May be helpful for you.
Answer: IMHO there is no single right or wrong way in how to prepare materials for games. Sometimes the engine dictates what you should prepare and often you just follow personal preferences.
Your project might also require different types of spec maps, for dry and rainy weather, for example. Cavity maps can produce all sorts of fancy effects like dirt, dust, worn edges, snow on top of rocks...
I am a big fan of model recycling. Sometimes it's only a single part of a mesh, a fancy cycles material, but I also reuse complete models with textures. To get the necessary flexibility I bake huge textures and  separate maps - sometimes even for cavity.
Albedo is basically the new diffuse ;-) Since many people started baking all kinds of effects into their diffuse maps it just seems to make sense to give the plain color without lights, ao, whatever a new name. Basically it's a "normalized" version of the "modern" diffuse map.
Edit: You might watch Joel Burgess's GDC presentation about modular level design in Fallout 4. It's a great source of what can be achieved by reusing meshes with different material setups
Comment: Not normalized. Albedo is reflectance, and real world materials don't absorb or reflect light completely. Allegorithmic published a nice PBR guide which covers what Albedo is and included some "safe" values in case you don't have the information about the albedo value of the actual real world material.
Comment: @Gez - not in general. It depends on the material type. Not every render engine uses PBR and reflectance is done differently on different game engines. Even Allegorithmic doesn't use the term "albedo" consistently in their documentation.
Comment: That's why I mentioned the real world materials. If you don't have that data you can generalize a reflectance value. Allegorithmic in their PBR guide suggested some minimum and maximum values for as guidelines (i.e.: don't go below or above them respectively), but of course albedo depends on the actual material.
BTW, I was questioning your use of the word "normalized" in this context, as in "normalization".
Comment: Link to the PBR Guide @Gez was referring to: https://academy.substance3d.com/courses/the-pbr-guide-part-1


Burning Smell and Slight Rattling

Question: I just had new tires put on my 2016 BMW x3 about 3 weeks ago. There is a soft on and off rattling coming from the front of the car. Recently  I've noticed when I stop at a light there is a burning smell. Similar to the new car smell when you drive it the first few miles. Today I came home from work parked in the garage and went back to the garage about 5 min later, and noticed a bad burning smell. Not sure if this is all related to the new tires?! Any insight? I am planning on taking it back to the shop.
Answer: The first thing I would do is check to make sure your handbrake (i.e. emergency brake) is completely off, if it's partially applied the brake shoes will constantly rub against the drums and the overheating will cause a smell as you describe.
Otherwise a strong burning smell could be many things, for instance an oil leak or insulation burning, however my money would be on a stuck brake caliper or something rubbing on a tire. You may be able to determine the cause with your nose, smell each individual wheel and see if the smell is stronger with one wheel.
If the smell is strong with both rear wheels that would indicate the problem is with the handbrake, if it's a single wheel it's most likely the caliper in that wheel. If it's a caliper then it could be caused by something done during the tire change, especially if it was straight after the change, although it could still be a coincidence. If it's something rubbing on a wheel then it's definitely something they did. If it is something else entirely it's unlikely their fault.
In any case you should get it looked at, there's no benign reason for a burning smell.
Answer: How many miles are currently on the vehicle? Based on the 7 year age, 120k miles would be average depending on your region. Do you have any aftermarket add-ons to the engine, exhaust, intake, or other items that may ring a bell? Check engine/MIL, DTC indications? I would suggest to look around the brake rotors and note detail of 'hot-spots', 'glassing', grooves or discoloration in appearance. Also, do you feel pulsations in the brake pedal while coming to a slightly aggressive yet gradual stop from a highway speed? But, from experience, the upper pan on the old girl is pouring oil at an increasing rate every lube and oil change. Getting new tires usually creates heightened awareness of the vehicle, and that means you just might be smelling a 'familiar' 'new car' type of aroma, even though the concern is not particularly 'new'. If I had to bet my last ticket and flag those hours of diag in the shop, Id honestly place my chips on the catalytic-converter bet. I'm no psychic and more data would yield more detailed methods of diagnosis. However, experience tells me, engine oil leaking faster due to older leaks increasing from higher pressure within the block from more blow-by, while the exhaust is getting more restricted from deteriorating cats, MAP is on the rise, leaks become more aggressive, excess heat due to engine under more load and higher frictions due to heat. All this means more oil is now dripping onto your increasingly hot exhaust. I could, and very well may be entirely and absolutely wrong. I do hope that you find some of the info provided helpful in making decisions regarding your four wheeled friend. :)
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Burning Smell and Slight Rattling


Creating a field for Account Team Members

Question: Does anyone know of a way where I can get all of the account team members into a custom field on the account page. So if John Doe and Jane Doe were on Account ABC, is there a way I can get those names into a custom field called Account Team? My end goal is to be able to filter the field on the dashboards. Thanks!
Comment: Once this field is populated it still might not do what you need. E.g. "Jane Doe,John Doe", you couldn't do a filter for "Jane Doe" since dashboard filters don't let you do contains (at least last I'd checked).
Comment: Might be good to update your question with what you're trying to accomplish with the dashboard, might help get some more out of the box ideas for how to address your core need.
Answer: You'd have to write code to do this, however, you can't put a trigger on the Account Team Member object so this would be tricky.
One solution might be a Scheduled batch that rolls through your Accounts and Account Team Members on a schedule and concatenates their names into a field.
You could also add a trigger on to the Account that queries the Account Team Members and adds them to the field but adding/editing/removing Account Team Members wouldn't invoke that trigger. You'd have scenarios where the field wasn't updated until the next DML operation (save) on the Account.
You should vote for this -> Allow triggers on Account Team Member Object
Answer:
Apart from Batch solution suggested ,You can build an Inline Visualforce to Add Account Team Member and getting rid of Standard one and that would allow to update the Parent Account fields as well.
If you are thinking of out of box report would recommend double checking as show filter on reports has Account Team Members I believe and you can use that report to build dashboard


Outstanding order in the Selling process in Degiro

Question: If I sell my share with Order duration GTC (Good till cancelled), the order will became an Outstanding order. When it will be active to sell? Do I need to make any action to continue the selling process?
Answer: A GTC order implies you set a limit order, you want to sell at a certain price, higher than what it was trading at.
There's nothing to do except watch your account. GTC is usually good for 90 days, not an indefinite time.
Comment: If I want to sell on "Market" type what is the Order duration I should use?
Comment: Market sells at the best price at the moment, i.e. the bid/ask. A market order is just a day order. Unless there's zero volume, which might apply to a bankrupt stock.
Comment: With "day order" it is really working perfectly.
Comment: I am glad our answers here were able to help you
Answer: When you submit a GTC order, it goes on the order book in Price and Time priority.  The order's duration varies from broker to broker.
Make sure to keep track of your open orders because if the price is reached, your order will be filled.  That's no problem unless you manually filled your order prior to the execution of your GTC order.
Comment: It's clear now that using GTC order the "Limit" is needed to fill in.
Answer:
If I sell my share with Order duration GTC (Good till cancelled), the order will became an Outstanding order.

Correct.

When it will be active to sell?

The order will be 'active' immediately.  However it will be a limit order, which means that it will not execute unless the limit price is reached.  Depending on how far away the limit price is from the market, it could be a short period of time or a long period of time, if at all.

Do I need to make any action to continue the selling process?

Generally no.  The order will sit in the order book until the price is reached.  However, some brokers will place a limit on the duration of GTC orders (such as 3 months), or if the exchange is updating their systems, they may cancel all the GTC orders on their exchange before the system change.  Usually you will be notified of these types of events. It doesn't hurt to periodically check the state of your GTC orders.
Effectively GTC limit orders are no different from typical Day limit orders, with the exception that a Day limit order is cancelled at the end of the trading day whereas GTC orders are saved and re-inserted into the order book the next business day when the exchange comes back up for trading.


Move window to another monitor in Ubuntu using keyboard

Question: In Windows 7, you can press Shift++←/→ to instantly move the current window to the next/previous monitor. Is there an equivalent feature in Ubuntu 11.04? I poked around the Keyboard Shortcuts dialog but didn't see anything relating to moving windows among multiple monitors.
Comment: Related: https://askubuntu.com/q/141752/13330
Answer: Compiz and Unity will be soon obsolete.

On Plasma 5 (KDE) it can be set from default keyboard shortcuts list.
On Gnome 3 shift + meta(super/windows) + arrows. For putting to corners you need additionally https://extensions.gnome.org/extension/39/put-windows/ .
Comment: best answer!!!!
Comment: This worked for me on Ubuntu 18.04! No additional setup/configuration needed
Comment: meta + left right moves in a single window but this fills in the gaps.  I couldn't make sense of the extension though - it was moving other windows around in a strange way aswell and there seems to be no documentation
Comment: @JonnyLeeds Disable unused shortcuts the may overlap.
Comment: It's quite new but available and easy.
Answer: What you need:

wmctrl (sudo apt-get install wmctrl)
The dimensions of each monitor

How to do it:

From the terminal, run gnome-keybinding-properties and click "Add"

Name the entry something like "Move to left monitor" and enter this command:

wmctrl -r ":ACTIVE:" -e 0,0,0,1280,1024

You can change ":ACTIVE:" to ":SELECT:" and wmctrl will wait until you select a window
The values for -e are gravity,x-coordinate,y-coord,width,height. I have gravity set to 0, which is default (I don't actually know what gravity does), x and y-coordinates set to 0 and 0, and the width and height are the dimensions of the left monitor: 1280 and 1024. Change this to match your configuration.

Click where it says "Disabled" and press the same keyboard shortcut as in windows, i.e. Shift+Super+left
Make another entry for "move to right monitor"

wmctrl -r ":ACTIVE:" -e 0,1280,0,1366,768

Where I have "1280", put the horizontal resolution of your left monitor. The vertical resolution can be more tricky if your monitors have different resolutions, and especially if they aren't lined up along the top or bottom. Mine are aligned along the top, so the vertical-coordinate value is "0".
My right monitor is 1366x768, so replace those values with the appropriate ones.

Map the shortcut-key sequence and you're finished!

You may have to tweak the coordinates and dimensions to account for the top (usually 24px tall) or side panels.
For more reading on wmctrl, check out http://movingtofreedom.org/2010/08/10/arranging-windows-from-the-gnulinux-command-line-with-wmctrl/
I hope this helps!
Comment: I recommend using -1 in the last two fields to leave the windows dimensions unchanged when it moves (e.g., wmctrl -r ":ACTIVE:" -e 0,0,0,-1,-1)
Comment: As per this https://askubuntu.com/questions/75631/how-do-i-install-the-gnome-keybinding-properties-program answer. For current versions of gnome/ubuntu after installing wmctrl use: "gnome-control-center keyboard" or via GUI "settings -> devices -> keyboard" and then click the "+" in the bottom.
Answer: If you use Compiz as the window manager on your Ubuntu installation (Which I believe comes pre-installed with 11.04). Open Compiz Config Settings Manager (do a sudo apt-get install compizconfig-settings-manager if you don't have ccsm installed.)

Go to Window Management -> Put
Enable the Put plugin.
Give your required key combination for the Put To Next Output option in the Bindings tab.

This will allow you to get the same functionality as what you require. The Put plugin has loads of other productivity increasing options too. Enjoy.
Comment: If you haven't got the Pug plugin, you can install the package `compiz-plugins-main` which also installs [some other plugins](http://wiki.compiz.org/PluginsMain). I also had to restart X after I had set a shortcut.
Comment: It appears that put was removed/omitted in 13.04.
Comment: This works great for me on Ubuntu 12.04 64bit with Unity. Remember though that Compiz is a dangerous tool, many of its (seemingly harmless) options can easily break your setup, so don't mess around with it unless you've got backups and/or are sure your steps are safe.
Comment: I think that this should be the accepted answer.
Comment: works fine on ubuntu 18.04 + unity
Comment: this should be the accepted answer
Answer: If you're using Budgie or Linux Mint Cinnamon Desktop Environment,
then the default shortcut for moving window into monitor is Shift + Super + Arrow.
Answer: On a fresh install of 20.x.x.x
Windows + Shift + Left
Worked just like it would on a Windows machine.
Comment: Yep this works on Ubuntu 20.04!!
Answer: If you use Xfce as your desktop environment in Ubuntu or Linux Mint, you can obtain a script, "move-to-next-monitor" from GitHub:
https://github.com/jc00ke/move-to-next-monitor
There are two dependencies: "xdotool" and "wmctrl".
You can assign any key combination to execute the script. I use the same key combination as the Windows shortcut. I have been using this script for several years on various generations of Ubuntu and Linux Mint with the Xfce desktop.


What does it mean when it says on a grad school application to choose recommender "familiar with the candidate's scholarly abilities"?

Question: I'm applying to graduate programs in Biomedical Engineering. The University of Pennsylvania application says the author of one letter of recommendation must be a faculty member who is familiar with the candidate's scholarly abilities. In layman's terms, does this mean they want a letter from a faculty member who has served as my research advisor?
Comment: We don't want your athletic coach, minister, or boss at your part-time job -- all of which we've seen.
Answer: It doesn't necessarily mean your research advisor. It could be a faculty member you've taken classes with, someone you've worked on a project with, etc.
What the admissions committee is looking for is evidence that you will succeed in graduate school - and that means evidence that you can think independently, tackle difficult problems, and so on. Choose faculty members who can speak to your abilities as a student and a (future) researcher.
When I asked for LoRs, I asked (1) a faculty member I had taken several classes with and with whom I was working as an undergraduate research, (2) another faculty member I had taken several classes with and had a good working relationship with, and (3) a faculty member who I was currently taking a class with (and who admittedly was an alumnus of my top school) :-)
Answer: It means, well...that it should be a faculty member familiar with your scholarly activities.
That can be your research advisor, and if you have one, they're likely a good faculty member to choose. But really what they're working for is someone who can speak to your scholarship as a whole, and is familiar with it past "He/she did well on some multiple choice exams...". So a faculty member who you've taken several essay heavy courses with might also be a worthwhile recommender.
What they don't want is someone who will just be providing a narration of your transcript.
Comment: Faculty in essay heavy courses may not necessarily be the best recommenders for grad programs in biomedical engineering.
Comment: @RoboKaren That very much depends on the course. I took a very writing intensive course in microbiology


Reading source code of QGIS plugins in Processsing Toolbox?

Question: I want to use the code snippets of "Generate points(pixel centroids) inside polygon" plugin in Processing Toolbox of QGIS. I tried searching in QGIS github, but couldn't find it.
Answer: I think this is the GitHub page of the tool you're looking for:
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PointsFromPolygons.py

You can also find this in your QGIS directory. For example, in my QGIS 2.16.1 standalone directory, it is located in:
<code>C:\Program Files\QGIS 2.16.1\apps\qgis\python\plugins\processing\algs\qgis\PointsFromPolygons.py
</code>
Comment: @SaiKrishna - In [line 48](https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PointsFromPolygons.py#L48) of the link, you will see that it is named "Generate points(pixel centroids) inside polygon" in the menus, the script is not called that. You can also note the input parameters in the script which matches the same parameters when you run the tool in QGIS :)
Comment: It is enlightning to know the directory where the source code for processing algorithms are ! But I noticed that there is no algorithm named "Generate points(pixel centroids) inside polygon" or with similar name.. Does this mean that the plugin uses multiple algorithms?
Comment: @SaiKrishna - Most welcome and don't worry, I did too =)


"On short notice" vs "At short notice"

Question: What's the difference between those two? I've tried to ask Google but got very mixed results -- some people say it's the same, some that one of them is illegal and the rest offer other explanation, for example "on" means immediately, without any time for preparation and "at" with some time for preparation.. what's the truth?
Comment: FWIW, "illegal" is not the word you're looking for.  There exist no grammar police with any authority of law.  "Incorrect" or "wrong" would work better here, as would "non-idiomatic", "jarring", or "weird".
Answer: I have heard both, and probably use both myself undistinguishly. My usual sources conflict on that one, actually. The New Oxford American Dictionary, which is, well, American, says:

at short (or a moment's) notice
  with little warning or time for preparation: tours may be canceled at short notice.

On the other hand, Merriam-Webster's says

(US) We can be ready on short notice. = (Brit) We can be ready at short notice.
(US) Thank you for meeting with me on such short notice. = (Brit) Thank you for meeting with me at such short notice.

The Corpus of Contemporary American English agrees with the latter, as it gives 33 hits for "at short notice" against 187 hits for "on short notice". Google ngrams gives the same picture, but slightly less contrasted:
Comment: There is no greater area of divergence between British and American speakers than with prepositions. To some extent I think it was the Irish influence; and that successive waves of non-English speakers to America, never really bothered much with the correct 'little words', such that many discrepancies became established.
Answer: To put someone 'on notice' usually means telling them that they are going to lose their job after the passage of the duration of time that is specified in their contract.
Generally, I would take 'on notice 'as notification of something that is definitely to come.
'At notice' can refer to something that has already happened or to something that may or may not happen
Comment: "on notice" is not at all the same thing as "on short notice"....
Comment: @Hellion, American english is not the only english

"On short notice" vs "At short notice"


How to select different objects and name them in blender 2.76b

Question: I am new to blender and learning from a few tutorials. But the tutorials are of the older versions. I am having difficulty selecting and naming different objects. If I want to select a particular object, how will I do it?
Answer: In Blender, by default, selection is done by right clicking on an object.  (It seems weird but there are some good workflow reasons for this.)  You can change this under File > User Preferances (or Ctrl+Alt+U) > Input tab.

You can change the name of an object at the top of the Object properties tab.
Answer: I thought it would be worth pointing out also, that by pressing N to open the properties panel, you can scroll down to rename the object with it selcted.
Answer: You could use the Outliner:

Click LMB (Left Mouse Button) the name to select the item.
Shift + LMB to add selection,

Double click LMB to rename.


Microphone for Meggilah

Question: Can one be Yotzeh Meggilah on Skype or  webcast or through a microphone or telephone is there a difference between each? Does a Hearing Aid disqualify a person from being Yotzeh the Laining?
Answer: R' Shlomo Zalman Auerbach1 discusses the entire issue of recreated sounds in Shu"t Minchas Shlomo siman 9. His basic synopsis is that since the sound is being converted from sound waves to electrical signals and then converted back into sound waves, the sound one hears is not the original sound in any form.
Therefore, he concludes that one may not fulfill mitzvos dependent on hearing through any means of electronic reproduction, such as radio, microphone, or hearing aid. He instructs that hearing aids be removed in order to hear shofar or megillah. 2
One may answer Amen to a blessing heard over a microphone (for technical reasons, only if the person is not obligated in that blessing themselves) because the digital reproduction does serve to make the person hearing know that a blessing is being said, like in the Talmudic example of the synagogue in Alexandria, where a flag was raised to signal that a blessing had been made.

1 My personal education was that R' Shlomo Zalman was the most reliable and accepted authority of his contemporaries in the area of halacha relating to technology, and most specifically electricity, as he spent much time becoming proficient in the technological side of technology issues.
2 As an aside, I read in Hanoch Teller's biography of R' Auerbach that he was personally very pained to make this ruling, because he himself had sacrificed greatly to acquire a hearing aid for his own mother. Nonetheless, he felt this was the halacha.
Answer: Rav Moshe in IG"M O.C.(2) siman 108 and O.C.(4) siman 126 notes that "some experts" say that the sound produced by a microphone is not the actual person's voice magnified, rather it's a new sound. However, he says it seems to still be mutar, m'ikar hadin since you only hear the microphone as a direct result of the person lainig.
However, since it is not clear, and it is a new thing, it should not be done, even if it will result in a delay, and less people there (which would be a chisaron in b'rov am ahdras melech).
(any mistakes are mine alone, as are parentheses)
Comment: +1 Great answer with sources, but the other seemed to contain more details.
Answer: Semi answers:
1) http://www.chaburas.org/ramkol.html
2) http://www.ou.org/torah/article/grunfelds_daf_yomi_megillah/
3) http://waterburyyeshiva.org/highlights/2011/02/microphone/
4) http://hirhurim.blogspot.com/2006/11/can-one-fulfill-mitzvah-through.html
5) http://wap.torah.org/advanced/weekly-halacha/5758/toldos.html
6) http://www.yasharbooks.com/grayexcerpt2.pdf
A very decisive Psak seems That someone who hears the Megilla via radio, telephone, or microphone does not fulfill his obligation. (Shearim Mezuyanim Bahalacha 141:6)
Overall it Seems that it is not Allowed
Comment: Broken links, would be nice to summarise the sources
Comment: apparently the Minchas Elezar allowed through the Phone see here:

http://www.5as.org/content/default.asp?artid=298
Answer: https://cloudfront.yiddish24.com/KM_N114_21_1583717123.mp3
פסק פון הגאון הגדול רבי ישראל יעקב פישער זצ"ל ראב"ד עדה החרדית
Sorry its audio, but he says when there is no other option you can be Yotzeh over the phone, and should read along if possible.

Microphone for Meggilah


How to prove membership of NP

Question: My tutor often says that proving membership of NP is the easy part of proving that a problem is NP-complete, and that this should only take a minute. What I don't understand is what exactly you're suppose to do at this step   I understand that you're suppose to verify the correctness of a solution but how do I do that?
Comment: Your question didn't make a whole lot of sense to me. I think I know what you were asking about so I edited the question to be about that. If I got it wrong, please undo the edit (click the "edited however long ago" link and then the "rollback" link for revision 1.
Comment: Techniques to prove a problem is in NP are covered in [our reference question](http://cs.stackexchange.com/q/9556/755); I recommend you take a look at that, and edit your question or post a new question if some specific aspect remains unclear.
Answer: Here are several examples:

MAX-CLIQUE: The witness is a set of vertices of given size. The verifier checks that edges connect all pairs of vertices in the set.
SAT: The witness is a satisfying assignment. The verifier checks that it satisfies all clauses in the formula.
3COL: The witness is a 3-coloring of the graph. The verifier checks that all edges connect vertices of different color.
SUBSET-SUM: The witness is a subset of the set. The verifier checks that the subset sums to the target number.

How to prove membership of NP


Should "Magic Mousse" be grainy?

Question: For a treat for my lunch, having bought a bunch of Jell-o brand instant flavored gelatin mixes, my husband decided to follow a recipe for "magic mousse", as printed here, involving "Cool-whip" whipped topping and Jell-o mix (gelatin, not a pudding mix). The final product came out fairly grainy, however, a texture I found somewhat offputting. Is this expected due to the ingredients in the recipe (clearly chosen for convenience rather than quality), or is this some problem with his technique?
Comment: Its probably an artifact of the pudding, as I recall from my childhood, but I don't remember what causes it.  Come to chat and we can talk about simple, wonderful mousses with just two ingedients:  real whipped cream and chocolate.
Answer: It could just be that it wasn't mixed thoroughly - little droplets of dissolved gelatin intermingled with the cool whip would certainly give you a grainy texture. Whisking thoroughly, or even using a hand mixer, could avoid some of this.
But failing that, it's possible that it's simply prone to separation. Cool whip is a sort of fake cream, emulsified fats and water, and the dissolved jello is pretty much water. They might tend to separate a little before the gelatin makes it all set up. If that's the case, you probably have to work a little harder for your mousse; if the gelatin is added straight to the creamy/custardy base, there's no water-gelatin mixture to separate out.
Answer: The grainy texture you tasted could be one  of two things:

The Gelatin pack wasn't stirred thoroughly enough.
The Gelatin pack was old and didn't have all of it's dissolving properties.

Either way it's easy to fix.

Should "Magic Mousse" be grainy?


Maximum Voltage Input and output current for transistor pnp and npn

Question: How can I know the maximum voltage input for transistor. I look at datasheet. But confusing me little bit. Which is for maximum voltage. Afraid that might burn the transistor. Btw, my input circuit is 48V and current needed is 30mA.
Answer: The parameter that matters is collector-emitter voltage (Vceo). This is listed at 25V. You will need a different transistor to work with 48V.
Emitter-base voltage won't be much more than 0.7V normally.
Answer: Use Vceo for general purpose requirements.
That kind of 8050-type transistor is optimized for lower voltages.
If you actually need to switch the 48V at low current, then a 160V MMBT5551 is a reasonable low-cost and multiple-sourced choice.
If your input is 48V and you are switching lower voltage than 25V (minus a safety margin) then the one you've shown will work, but as always, you will need a base resistor to limit the current since the Vbe will be about 0.7V when on (and applying much more than that will destroy the transistor).


What artifacts to save for a nightly build?

Question: Assume that I set up an automatic nightly build.  What artifacts of the build should I save?
For example:

Input source code
output binaries

Also, how long should I save them, and where?
Do your answers change if I do Continuous Integration?
Comment: You only need to be able to identify your source code reliably.  Depending on your VCS, that may mean using copies, but a specification of the source code may be adequate.  Also, in days when you can buy 2TB of disk drive for $200, maybe you do keep the source (compressed, even now).
Comment: 2TB of disk for $200? Do you mean buying two 1TB drives at $100 ea, or do you think you can get a 30% discount at newegg? http://www.newegg.com/Product/Product.aspx?Item=N82E16822136344
Answer: You shouldn't save anything for the sake of saving it. you should save it because you need it (i.e., QA uses nightly builds to test). At which point, "how long to save it" becomes however long QA wants them.
i wouldn't "save" source code so much as tag/label it. I don't know what source control you're using, but tagging is trivial (performance & disk space) for any quality source control system. Once your build is tagged, unless you need binaries, there really isn't any benefit to just having them around because you can simply re-compile when necessary from source.
Most CI tools let you tag on each successful build. This can become problematic for some systems as you can easily have 100+ tags a day. For such cases I recommend still running a nightly build and only tagging that.
Answer: Here are some artifacts/information that I'm used to keep at each build:

The tag name of the snapshot you are building (tag and do a clean checkout before you build)
The build scripts themselfs or their version number (if you treat them as a separate project with its own version control)
The output of the build script: logs and final product
A snapshot of your environment:

compiler version
build tool version
libraries and dll/libs versions
database version (client & server)
ide version
script interpreter version
OS version
source control version (client and server)
versions of other tools used in the process and everything else that might influence the content of your build products. I usually do this with a script that queries all this information and logs it to a text file that should be stored with the other build artifacts.

Ask yourself this question: "if something destroys entirely my build/development environment what information would I need to create a new one so I can redo my build #6547 and end up with the exact same result I got the first time?"
Your answer is what you should keep at each build and it will be a subset or superset of the things I already mentioned.
You can store everything in your SCM (I'd recommend a separate repository), but in this case your question on how long you should keep the items looses sense. Or you should store it to zipped folders or burn a cd/dvd with the build result and artifacts. Whatever you choose, have a backup copy.
You should store them as long as you might need them. How long, will depend on your development team pace and your release cycle.
And no, I don't think it changes if you do continous integration.
Answer: This isn't a direct answer to your question, but don't forget to version control the nightly build setup itself. When the project structure changes, you may have to change the build process, which will break older builds from that point on.
Answer: In addition to the binaries as everyone else has mentioned I would recomend setting up a symbol server and a source server and making sure you get the correct information out and into those. It will aid in debugging tremendously.
Answer: We save the binaries, stripped and unstripped (so we have the exactly same binary, once with and once without debug symbols). Further we build everything twice, once with debug output enabled and once without (again, stripped and unstripped, so every build result in 4 binaries). The build is stored to a directory according to SVN revision number. That way we can always retain the source from the SVN repository by simply checking out this very revision (that way the source is archived as well).
Answer: A surprising one I learned about recently: If you're in an environment that might be audited you'll want to save all the output of your build, the script output, the compiler output, etc.
That's the only way you can verify your compiler settings, build steps, etc.

Also, how long to save them for, and where to save them?

Save them until you know that build won't be going to production, iow as long as you have the compiled bits around.
One logical place to save them is your SCM system. Another option is to use a tool that will automatically save them for you, like AnthillPro and its ilk.
Answer: We're doing something close to "embedded" development here, and I can tell you what we save:

the SVN revision number and timestamp, as well as the machine it was built on and by whom (also burned into the build binaries)
a full build log, showing whether it was a full/incremental build, any interesting (STDERR) output the data baking tools produced, a list of files compiled and any compiler warnings (this compresses very well, being text)
the actual binaries (for anywhere from 1-8 build configurations)
files produced as a side effect of linking: a linker command file, address map, and a sort of "manifest" file indicating what was burned into the final binaries (CRC and size for each), as well as the debugging database (.pdb equivalent)

We also mail out the result of running some tools over the "side-effect" files to interested users.  We don't actually archive these since we can reproduce them later, but these reports include:

total and delta of filesystem size, broken down by file type and/or directory
total and delta of code section sizes (.text, .data, .rodata, .bss, .sinit, etc)

When we have unit tests or functional tests (e.g. smoke tests) running, those results show up in the build log.
We've not thrown out anything yet -- given, our target builds usually end up at ~16 or 32 MiB per configuration, and they're fairly compressible.
We do keep uncompressed copies of the binaries around for 1 week for ease of access; after that we keep only the lightly compressed version.  About once a month we have a script that extracts each .zip that the build process produces and 7-zips a whole month of build outputs together (which takes advantage of only having small differences per build).
An average day might have a dozen or two builds per project...  The buildserver wakes up about every 5 minutes to check for relevant differences and builds.  A full .7z on a large very active project for one month might be 7-10GiB, but it's certainly affordable.
For the most part, we've been able to diagnose everything this way.  Occasionally there's a hiccup on the buildsystem and a file isn't actually a the revision it's supposed to be when a build happens, but there's usually enough evidence of this in the logs.  Sometimes we have to dig out a tool that understands the debugging database format and feed it a few addresses to diagnose a crash (we have automatic stackdumps built into the product).  But usually all the information needed is there.
We haven't had to crack the .7z archives yet, to mention.  But we have the info there, and I have some interesting ideas on how to mine bits of useful data from it.
Answer: Save what can't be reproduced easily.  I work on FPGAs where only the FPGA team have the tools and some cores (libraries) of the design are licensed to compile on only one machine.  So we save the output bitstreams. But try to check them over one another rather than with a date/time/version stamp.
Comment: I had to look it up. FPGA = Field Programmable Gate Array. http://en.wikipedia.org/wiki/FPGA
Answer: Save as in check in to source code control or just on disk? Save nothing to source code control. All derived files should be visible in the file system and available to developers. Don't checkin binaries, code generated from XML files, message digests etc. A separate packaging step will make these end products available. As you have the change number you can always reproduce the build if necessary assuming of course everything you need to do a build is completely in the tree and is available to all builds by syncing.
Comment: I used to think this too, but after working for a client that did keep all binaries and other generated artifacts in the version control system, I recommend putting it all in version control system.  It's really easy to grab *everything* for a particular release and debug it with minimum fuss.
Answer: I would save your built binaries for exactly as long as they have a chance to go into production or be used by some other team (like a QA group). Once something has left production, what you do with it can vary a lot. For a lot of teams, they'll keep just their most recent prior build around (for rollback) and otherwise discard their builds.
Others have regulatory requirements to keep anything that went into production around for as long as seven years (banks). If you are a product company, I'd keep around any binary a customer might have installed in case a tech support guy wants to install the same version.


Do pre-washed and packaged vegetables and greens fall under a miut she'eno hamatzui?

Question: Does anybody know if the tolaim level in triple-washed lettuce bags is a miut sh'eino hamatzoi. I am specifically asking regarding the popular company "Organic Girl" which is sold in every heimesh supermarket, and I know many frum people who use it without checking for bugs, including some who said they heard they don't have to be checked from very respected roshei yeshiva.
Thank You
Comment: As a mashgiach, I can say this: triple-washed does not mean bug-free and we don't trust it where I work, as it still requires checking and occasionally shows tola'im
Answer: Possible Answer: From Star K Website,
With a vegetable cleaning system, the means of creating a chazakah is to see if the system can effectively clean three batches of lettuce, or any other leafy vegetable, that you know was previously contaminated. After going through the wash system three samples are checked. If the samples are found to be free of infestation, a chazakah on the system has been achieved. It can now be assumed that the system can effectively clean the vegetables and no more checking is required!
Of course, periodic inspections have to be done to be sure that the system is still cleaning properly so that the chazakah can be maintained. Different conditions, seasons, or different sources of supply can affect the status quo as well, so, again, the system must be monitored constantly. At times, due to atmospheric conditions, high humidity, heavy rain, or seasonal change, there is an increase of insect presence in the fields. Of course this means that there will be more toloyim in the leafy vegetables. This manifests itself with a higher insect presence in the vegetables when the company tests the quality of the unprocessed lettuce before it is brought into the facility for further washing and processing. During these times, the wash system may not effectively clean for toloyim, and the certification is removed until the field conditions normalize so that the wash system will do an effective job. Often this occurs around Pesach when the consumer will not see the Star-K symbol on the date code for a prolonged period until conditions normalize.
Occasionally a consumer will call the Star-K and report that an insect was found in their vegetable salad. Not pleasant. However, this would not break the chazaka, nor should the bag of salad be discarded. If this happens, a good insurance practice would be to check the remaining salad. The next bag does not require additional checking.
I would only suggest to CYLOR!
Comment: Thank you, so I'm wondering if someone or some organization has done this chazaka check on this company which doesn't bear any hashgacha marking, which everyone seems to assume is safe


Wifi event automation software

Question: I am having issues on my Asus F555UB-Laptop with the WiFi. As a workaround I have written a shell script that restarts the Wifi Adapter
<code>#restart network adapter
Disable-NetAdapter -Name WLAN -Confirm:$false
Enable-NetAdapter -Name WLAN -Confirm:$false
</code>
However, it needs more automization. Because right now I have to execute the script myself when the signal is lost. It would be great if the script gets triggered when the WiFi gets disconnected, and after restarting the adapter it should automatically reconnect to an available WIfi I have a password stored for. So my Questions are:

How can I trigger the script to run on a "lost wifi signal event"?
How can I automatically connect to my Wifi?
Answer: Create task, inside Task Scheduler, set task trigger to:
"On an event"

Log: Microsoft-Windows-NetworkProfile/Operational
Source: NetworkProfile
EventID: 1001

Task Action - task can call your PS script.
Comment: thank you very much :)
Comment: @cowboy_patrick Don't forget to accept the answer if it helped you, that way other people searching will know this answer is correct, and give credit to the person that took their time to answer.

Wifi event automation software


Meaning of "parallel" in the context of arrows and functions (category theory)

Question: I haven't been able to find an explanation of the term "parallel" in the context of (category theory) arrows and functions.
For example, in the statement "given arrows f and g with domain A and codomain B" are f and g necessarily considered to be "parallel arrows"?  Or, would the addition of the word "parallel" (as in "given parallel arrows f and g with domain A and codomain B") indicate some additional semantics of f and g?
In the context of category theory, I sometimes see the same terminology applied to functions as well.  I assume the term "parallel" has the same meaning for functions in this context, but would like to be sure.
Edit: In looking back over the examples of "parallel functions" (in Topoi and Category Theory in Context) I notice that they are used primarily in examples of the Set category and occasionally in other categories where the arrows represent functions.  The surrounding discussion does not seem to use any other qualities of these functions other than their domain and codomain.  Therefore, to update the second half of the question:
In the context of a category where the arrows are functions, does "parallel functions" have the same meaning as "parallel arrows?"  If not, can you give an example of a category where the term "parallel functions" conveys more information than both functions have the same domain and both functions having the same codomain?
Comment: "Parallel" here means "same domain and same codomain" so yes to your first question, no to the second one
Answer: In a comment, user Max said:

"Parallel" here means "same domain and same codomain" so yes to your first question, no to the second one.


What is the standard way to distinguish the errors associated with sampling and measurement in statistics?

Question: This is probably a very basic, yet not easy, question in applied science. I was just wondering, what are usually the standard ways to deal with it? Any pointers to further references are greatly appreciated.
Or maybe let's start with the difference between sampling and measurement? Or is it because there are different ways to deal with different practical situations? I believe this is a very challenging question.
Answer: In a nutshell, in order to account for errors associated with sampling and measurement, you need to define a statistical model that describes both processes and how they interact.  The $Likelihood$ framework allows you to take that statistical model and then compute the estimated errors with some assumptions.  When you are defining your statistical model you will have invoked parameters that represent your sample size and measurement error.  These parameters will show up in the computations in the $Likelihood$ and you can see how the total error is affect by each processes.
This is how i would break down your question:
1) first I would want to understand how the heck do I even derive estimated errors.  There are several ways to go about this, but the $Likelihood$ approach is the most principled.  AWF Edwards gives a clear introduction in his classic text.  There is even a $Bayesian$ way about it, and I find Sivia to give a clear exposition.
2) Then i would go through a classic derivation of estimating the sampling error given normally distributed data.  (i think this example is covered in both Edwards and Sivia, plus there are tons of online resources)  Your goal is to understand where standard error of the mean comes from.
3) Then I would figure out how measurement noise affects your data.  A classic derivation is additive Gaussian noise to your measurement.  It would look something like this: $Z=X+Y$ where $Z$ is what you measured, $X$ is your true sample, $Y$ is your additive Gaussian noise.  At this point you should have a new formula that almost looks like standard error of the mean, but additional components coming from your measurement error.  (Sivia or Edwards might have already done these derivations for you)
Comment: The model is certainly part of it; it is good to be reminded of that.  But more importantly in applications is the experimental design: one looks for assignable causes of components of variance and then makes sure to achieve enough *replication* that these components can actually be estimated.


4-year-old pomegranate that it only blooms but has never set fruit and the branches are very long and not sure how to prune it

Question: I pomegranate is 4 years old has never set fruit as lots of blooms The branches are very long and leggy My tree is about 5 to 6 ft tall. Question on why it's not setting fruit and how to trim it back.
Comment: Please [edit] your post with a photograph of the plant in question, and let us know what variety of pomegranate, how and where the plant is growing -- climate, soil type, amount of sun it gets -- and its growing conditions -- in a pot or in the ground, watering schedule, feeding schedule, etc. Thanks and welcome to the site.
Comment: Do you have pollinators? That's how flowers set fruit. Pruning is art, and you have to use your eyes. A good start is shortening all long branches to a roughly round shape, say, 4' across. A pomegranate is naturally a shrub, not tree.
Comment: 4 years? You may need to wait more (my experience, with a possibly not-ideal climate, OTOH no consistency between different plants).
Answer: Most pomegranates are self-fruitful, that is, they have all the flower parts necessary for producing fruit successfully under ideal conditions. Let's think positively and assume that your plant is one of these; if purchased from a reputable supplier you might check this with them. Plants which are not self-fruitful are normally sold with a proviso that you need two distinct compatible varieties for fruit to appear. If there was no warning you should be okay.
So if these plants are producing flowers then something must be interfering with the process. A couple of examples might be: too cold when the blooms open, or not handled roughly enough. For example apples which are self-fruitful or not may be pollinated but the process does not complete correctly if there is a period of cold weather at bloom time, and tomatoes which are self-fruitful may not set fruit if there is no shaking movement to dislodge the pollen and allow it to fall or blow onto the receiving parts of the flower. The shaking is normally not a problem in a windy location or in frequent rain events.
So your challenge is to think of all the ways that pollination might actually happen but not be successful.
When pruning, try to make sure that some active shoots are left on the branches.


How does one manually restart graphics drivers?

Question: I'm suffering from the dreaded Radeon mouse cursor corruption. The problem is intermittent and can be "solved" by putting the computer to sleep or restarting it. I hope simply restarting the graphics drivers will remove the symptoms of the problem. This question would seem to indicate that restarting the graphics drivers is possible in Windows 7. My question is: how?
Comment: Disable and re-enable the graphics adapter in the computer management screen? Not at my Win7 machine to check at the moment...
Comment: That seems to revert back to the Microsoft stock driver, but I don't know enough about how display drivers work to know if upon re-enabling the device the driver has been restarted from scratch or if it retains some of its state. It didn't solve my problem unfortunately.
Comment: To be more specific, the problem goes away while using the Microsoft driver, but returns upon re-enabling the AMD drivers.
Answer: To reset the graphics stack in Windows, press Win+Ctrl+Shift+B.
Comment: works in win10: http://superuser.com/questions/1127463/what-does-ctrlwinshiftb-do-in-windows
Comment: Nothing happens, with desktop focus.  Windows 7 x64.
Comment: The question was about Windows 7, not Windows 10.
Comment: Hmm. That opens the FF bookmark windows here ...
Comment: +100 this works! It is really hard to use the most upvoted answer above if all you see is a black screen.
Comment: This fails with a beep if the graphics card has had issues and Windows has disabled it for you
Comment: @DavidPostill It does work but you have to be on the desktop.
Comment: Is there a commandline to do this?
Comment: This. Confirming this shortcut works in latest Win 10 v1909 build.
Answer: If anybody is still searching for simple answer, then in Windows 7 it's as follows:

Open Device Manager
Expand Display adapters
Right click on a graphic card and choose Disable
Wait till the screen goes back and repeat step 3 with Enable.

That's it.
Comment: Mind that the screen might not go back on.
Comment: Following on from clorz's point, I'd recommend turning the Narrator feature on prior to performing these steps. Then even if the screen doesn't come back immediately, you can use Narrator's prompts and the keyboard to re-enable the driver.
Comment: I'm not sure why the screen would *ever* go back on when you've just disabled the thing sending data to the screen. I tested this on Windows 7 x64 SP1 and, as expected, it did not. I thought I might be able to re-enable the driver using the keyboard (context menu key, down, down, Enter), but no, that didn't work. I had to power off and restart in Safe Mode to re-enable the drive. -1 from me.
Comment: @EM0 It should revert to the basic display driver, not turn off completely. At least if your Windows logo and BIOS prompts show up on that display.
Answer: I had a similar problem on windows 8 and found that just changing the screen resolution and changing it back again resolved the corruption.
Answer: You could also use ToastyX's awesome restart utilty.
Inside the CRU zip file downloaded from the link above, you'll find two utilities named restart.exe and restart64.exe that can be used to restart the graphics drivers. Use restart64.exe if you're on a 64-bit version of Windows and the regular restart.exe otherwise.
Comment: AMD driver just died after using it, the screen went black and didn't return. Had to restart PC.
Comment: Proper WDDM drivers shouldn't crash the system even if you were to uninstall them without rebooting. If that happens, it's a bug on amd part.
Answer: You could also try:

Go to Device Manager > Display Adapters
Select "Scan for hardware changes"

If I leave my Win 7 machine on overnight at work, the resolution drops on one of the monitors. Altering the resolution doesn't work directly, but using the "Scan for hardware changes" seems to do the trick.
Comment: Worked for me on Win10


Can an S-Corp pay the sole owner/employee with a 1099?

Question: Suppose a person has a one-person S Corporation, and the corporation is paying the owner/sole employee with a 1099.  The owner then pays Self-Employment tax on a Schedule C when filing.  Is this compliant?
Comment: I have edited your question for clarity.  Please make sure that this new wording accurately reflects what you really want to ask.  If it does not, please edit the question again.
Answer: No. S-Corp owners should be paid W2 wages and distributions. Here's a pretty good explanation as to why you can't use a 1099. Some notable quotes from the article:

IRS FS-2008-25 states that corporate officers are specifically included within the definition of an employee for FICA (Federal Insurance Contributions Act), FUTA (Federal Unemployment Tax Act) and FIT (federal income tax) withholdings under the Internal Revenue Code.

and

What many employers do not realize is that even though the "independent contractor" who is paid via a Form 1099 pays all of the self-employment, Social Security and Medicare taxes, that the payment of self-employment taxes is a different tax than payroll withholding taxes even though they are both taxed at 15.3%. Thus, the employer could still be found liable for payment of the employer and employee share of Social Security and Medicare taxes (Western Management case).
Comment: @user104071 if a CPA recommended 1099-misc, I'd ask why. They may be able to explain the pros and cons. (One of the cons is probably the risk of audit and how much it could cost you if they do.) Something that isn't covered in that article is what would happen if an audit reclassified 1099 income as W2. You'd have to (re)pay payroll taxes, but I assume you could also amend your personal return to undo the self employment tax due to the 1099, which is basically a wash.
Comment: Does this answer apply to a single person Corp or only s-Corp?
Comment: If a CPA recommended 1099 misc for the s-Corp owners compensation, what options does the s-Corp owner have
Comment: @user104071 the linked article specifically uses a single owner s-corp as an example, so I'd interpret it to apply to all s-corps, including single owner.
Comment: I mean single person C Corp vs S Corp
Comment: @user104071 I'm pretty sure a c-corp should also issue W2 to owners that do work. Even a single person owner.


Probability $X_1+X_2+X_3\leq a$ by Laplace transform

Question: If $X_1,X_2,X_3$ are independent random variables then can we write the probability $$P(X_1+X_2+X_3\leq a),$$ as the product of the Laplace transforms of the random variables $$P(X_1+X_2+X_3\leq a)=\mathcal L_{X_1}(a)\mathcal L_{X_2}(a)\mathcal L_{X_3}(a)$$where $a$ is a constant and $\mathcal L_{X_i}(a)$ is the Laplace transform of $X_i$ evaluated at $a$. I saw  it in a paper but they do not provide the derivation. The random variables in that paper are exponential but not sure if they use that fact in this probability.
Comment: This seems doubtful. Which source?
Comment: @Did I replied. Hope it worked.
Comment: It did. Will have a look in a while.
Comment: @Did I found another paper which does something similar. It is available on arxiv. http://arxiv.org/pdf/1103.2177.pdf Page 9 equation (15). But this new paper has a Poisson point process mixed up in the equations too, but nevertheless they also use a similar result to the previous paper.
Comment: @Did (re-comment) It was Appendix A equation (22) in the previous paper to which I sent the link.
Answer: Mixing somewhat the notations in the paper with the notations in your question, one considers a random variable
$$\gamma=\frac{h_0}{X_1+X_2+X_3},
$$ where each $X_k$ is almost surely positive and $h_0$ is independent of $(X_k)$ and standard exponential. Thus, for every $x\gt0$, $P[h_0\gt x]=\mathrm e^{-x}$ and, for every $a\gt0$,
$$
P[\gamma\gt a]=P[h_0\gt a(X_1+X_2+X_3)]=E[P[h_0\gt a(X_1+X_2+X_3)\mid X_1+X_2+X_3]].
$$
First by definition of the distribution of $h_0$ and second by independence of $(X_k)$, this yields
$$
P[\gamma\gt a]=E[\mathrm e^{-a(X_1+X_2+X_3)}]=E[\mathrm e^{-aX_1}]\,E[\mathrm e^{-aX_2}]\,E[\mathrm e^{-aX_3}],
$$
which is the formula in the post. Later on, the specific distributions of the $X_k$ are used, but this is another story...
Answer: Isn't this just using the fact that the Laplace transform of a convolution is the product of Laplace transform (the distribution function of a sum is the convolution of the distribution functions of the summands...)? Now, granted there is a Laplace transform missing on the LHS somewhere...
Comment: Yes the sum of independent RVs has the distributions convoluted. But I don't see how the probability comes. Thanks.


Moving at constant speed and angle

Question: The picture illustrates
I cannot figure out the math on this. The "arrows" should move at the same speed in both examples.
Answer: You are moving at a constant speed in terms of the y-axis. To move a constant speed in terms of the vector direction, you would need to calculate the distance to be traveled (in purple in your first diagram), and if you know how far you want to go per run, divide the total distance by that distance to get how many loops it will take to traverse the vector to the goal position. Now divide the y-change by that number of loops and you now know the amount to add/subtract from the y in every increment. Now, use your formula: y=mx, and instead of incrementing y by 1, increment it by that incement value you just found. I hope you can understand all that.
The formula for distance is sqrt(|x1 - x2|^2 + |y1 - y2|^2).

Moving at constant speed and angle


"Participating" Proposals button on Area51 homepage sidebar

Question: Whenever I want to check up on proposals I'm following on Area51, I have to go to Area51, go to my user page by clicking my profile icon at the top of the screen, switch to the "Info" tab, and then scroll down to find proposals I'm following / committed to. It's not too much work, but it seems like more work than necessary for the most frequent thing you'll do on Area51 (check up on proposals you're interested in). It'd be nice if there was a "Participating" button on the sidebar for a quick way to get a breif overview of all of the proposals you were following, because, to my knowledge, the next quickest way to do that is to visit the Info section of your profile.
Here's some concept art:
Answer: I think that would turn out to be logically inconsistent with the way any other site works. If you want to see your own content, you go to your profile.
You are picking out a very specific preference and asking to make a button for it. But if someone else wants to see their favorite questions (for example), or their own questions (for example), or their latest activity (for example), we would be sprinkling profile stuff all over the main page.
If you want to go to a particular page more often than most, I would suggest bookmarking the page and saving it in your browser… or dropping it on the tool bar or even right on your desktop. That way we can let everyone customize the experience for themselves rather than cluttering up the main page with a lot of links already organized elsewhere.
That's just my opinion: The current setup seems more organized, flexible , and logical than bringing bits and pieces of the profile out to the main page.


Input checkboxes wrapped inside

Question: I usually tend to wrap my checkboxes and radio button inside their respective labels and was wondering whether this is considered a good UX practice.
Pros/cons ?
One of my main reasons is that it helps with element alignment as we are mainly using only one element for positioning, whilst having checkboxes/radiobutton outside of the label, creates two elements that often go side by side, thus creating a problematic layout where they both must be wrapped inside a parent element to maintain block status with other form elements.
Comment: possible cross site duplicate of: http://stackoverflow.com/questions/774054/should-i-put-input-tag-inside-label-tag
Answer: Wrap the label around the checkbox. This makes it much easier to click the button.
If the label is separate from the control, then there is often a non-clickable gap between them.
<input id="click-me" name="click-me" type="checkbox"/>

    Click me

download bmml source – Wireframes created with Balsamiq Mockups
Wrapping the label around the control removes this gap.

    <input id="no-click-me" name="no-click-me" type="checkbox"/>
    No, click me

download bmml source
Comment: Even more infuriating than a gap are the installers that make it deliberately difficult to click a checkbox that opts out of optional downloads.
Comment: With the wrapped version, there's no need to link the label to it's associated input with `for` and `id`.
Comment: @Colin'tHart Yes, I think you are right. When I wrote that answer all those years ago, I *think* the `id`/`for` were still required on some browsers even in the nested case.
Comment: **You don't need the** `for="no-click-me"` nor the `id="` if you wrap into `` your INPUT
Comment: @RokoC.Buljan Yes, Colin'tHart already pointed that out. It was necessary 7 years ago but probably not so much today.
Answer: 4 good reasons to wrap both <input type=radio> and <input type=checkbox> within their .

Usability: Bigger "hit zone" = better.
Styling : You create a context that is easy to isolate in a CSS cascade. input{width:X%;} label>input{width:auto;}
This technique passes W3C validation.
I can't think of a good reason for not doing it.
Comment: Some minor reasons against doing it: 1. The input inherits the default styling for labels, most notably `font-weight: bold`, so you usually have to override that. 2. The input appears inside the label, but semantically it is not a label. (If anything, the label should belong to the input!) 3. If you are arranging labels and inputs using a grid layout, then you cannot nest them like this, so don't get too attached to it.
Comment: The question is not about whether or not label should be used at all, but which style of mark up to use for labels.
Comment: Reason for using it: You can skip specifying `for` and `id` attributes. (Although as noted elsewhere, that is not considered good practice due to older accessibility devices.)
Answer: This may not be the best answer, but I don't think it's intrinsically good or bad. However, one pro of wrapping the form element in a label tag is that you can greatly expand the area of the clickable object via stylesheets.
It's worth noting that, for accessibility purposes, wrapping the element in a label tag isn't always enough. You should always give your elements an ID, and you should always use the for attribute in the label tag. Some screen readers won't link the label to the form element correctly without it.
Other than that, I think you can do it either way.
(I apologize if this answer was more technical in nature - but then, I'm a developer, not a designer.)
Comment: @Shaun For what it's worth, the tag provides that functionality whether or not it's wrapping the form element. For instance, a user could click on the label next to a checkbox to select it, even if the label didn't wrap the checkbox.
Comment: This is the best reason to wrap inputs in labels. Being able to click anywhere in the label to toggle the selection rather than just the box/circle enhances usability of the form element.
Comment: True, if the for attribute is used properly. :)
Comment: "Some screen readers won't link the label to the form element correctly without it." <- Do you have a source for this?
Comment: I'm afraid I don't have a direct source for problematic devices. But the developer of the popular eslint-config-airbnb package has [repeatedly](https://github.com/airbnb/javascript/issues/1885#issuecomment-413343258) [asserted](https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/302#issuecomment-351857632) that for the _broadest compatibility_, you should use `for` and `id` attributes **and also** nest the `` inside the ``
Answer: Here's the relevant section of the html5 reference:
https://html.spec.whatwg.org/multipage/forms.html#the-label-element
It says the following:

The label element may contain at most one descendant input element, button element, select element, or textarea element.
The for attribute of the label element must refer to a form control.

So you can wrap it around a single form element, and if you use the for attribute it has to refer to a form element, but you don't have to use the attribute and you don't have to wrap.
From a structural point of view, I prefer to think of the label as a separate element that is actually just the label. If you need something to contain both of them, I'd prefer to use a container div. That way, you can style labels in a general way without worrying about any form elements contained within them. Of course the basic form elements don't tend to inherit styling so the distinction is largely academic.
Comment: If you're talking a11y, you *must* use the `for` attribute on labels and properly associate them with the related input. See: [WCAG 2.0 - Using label elements to associate text labels with form controls](http://www.w3.org/TR/WCAG20-TECHS/H44.html). Valid HTML isn't always accessible.
Comment: That's true. Wrapping will still allow the user agent to associate the label with the input, but there's less of a guarantee that they will, and you're not following WCAG.
Answer: The only issue I can see arising when wrapping an input within a label is styling the label when the input state is true (checked). Typically this can be easily accomplished with CSS input:checked + label - when the input nested you'll need to use Javascript to style the label which seems pointless to me.
The example here (https://www.piccolino.com/collections/gliders) shows color swatches in the filter menu which displays a background image, hover state, and active state using the label - while the input is hidden and merely used to capture model data.
Also, see Bootstrap for some good examples of how to avoid the cross browser, click and other issues pointed out in the statements above.
Answer: One reason not to wrap a label around an input is because an input field is not a label. Semantically, I don't think it makes sense to put an input inside a label. It wasn't intended to be used in that way.
Answer: Wrapping checkbox inside LABEL tag is a good markup, since clicking 'label' will trigger the checkbox click even in IE8.
Otherwise you will need to use JavaScript workaround to fix the same, which is additional code to your website.
Answer: Check this video for implicit labels on screenreaders: https://youtu.be/F02AWoK9dXo on article http://usability.com.au/2013/04/accessible-forms-1-labels-and-identification/
Comment: Could you add in some of the relevant points?

Input checkboxes wrapped inside


If Israel is at war with Palestine, then why would they announce military attacks beforehand?

Question: According to Benjamin Netanyahu source, Israel is apparently at war with Palestine, if that's really the case, then why would they announce their attacks and bombings beforehand to Palestine?
Comment: Are they? A number of press reports interviewing Palestinians in this war say they had no warning of individual strikes. Dropping leaflets asking 1 million inhabitants to evacuate is not the same thing.
Comment: Warnings of coming attacks [can be used as a form of psychological warfare](https://en.wikipedia.org/wiki/Airborne_leaflet_propaganda). Although speculating about the reason behind Israeli actions in the current conflict is probably only going to be speculation rather than fact, making it off-topic and unsuitable for answers.
Comment: The answer is, this practice was ceased. Instead, it was announced, that if you are aware of any military activity, you should stay out of it. Specifically, if there is a military target in your building - leave it now. Anyone, who do not leave military base [i.e. military target inside a building makes it a base] is a militant, and not a civilian.
Comment: It seems it is sometimes giving forewarning and sometimes not.  Sometimes a warning that is not given early enough to reasonably alert and evacuate everyone in a building.  Israel does want to *manage* civilian casualties -- not too little, not too much -- because there is actually a limit to how much slaughter Israel's essential sponsor, the US, will tolerate.
Comment: Because there is a huge international audiences right now. For the sake of political showmanship, BN has to show his side is the most just one, which means he needs to do this seemingly counterintuitive thing, and when the attack comes and there is a huge amount of palestinian casualty, he can blame hamas for using human shield. It happens before with the whole "I can't forgive them for forcing us to kill their children" speech by past Israel leaders
Comment: @dEmigOd if that is the answer then you can post it in the answers section below, rather than as a comment.
Answer: Israel has been deeply criticized in the past for civilian deaths, especially in Gaza. Hamas is notorious for intermixing military equipment and personnel with civilians. Amnesty International had this criticism in 2021

The organization has documented four deadly attacks by Israel launched on residential homes without prior warning and is calling for the International Criminal Court (ICC) to urgently investigate these attacks. The death toll in Gaza continues to climb with at least 198 Palestinians killed including 58 children and more than 1,220 injured. Ten people in Israel, including two children, have been killed and at least 27 injured by Palestinian attacks.

Israel tries to avoid such deaths by issuing warnings ahead of time (from May 2023)

An owner of a five-story Gaza apartment building said he was warned by the Israeli military on Thursday to evacuate before an airstrike hit and demolished it, as Hamas and Israel continue to launch rockets and airstrikes.
"The building is residential, what is in to hit?" said the owner, who preferred to remain anonymous for his security. The Israeli military later said the building contained intelligence offices of Hamas, an Islamic militant group. The firing of rockets began on Monday, and Israel has since destroyed three high-rise buildings it believed had Hamas offices, after telling civilians to leave the area.

Part of this is pragmatic. Dead Palestinian civilians do not serve any purpose for Israel. But there is a political aim as well: Hamas openly uses its civilian population as a shield. In 2014 it was revealed that Hamas had its headquarters beneath a Gaza City hospital

So why isn't the fact that Hamas uses Shifa Hospital as a command post making headlines? In part, it's because the location is so un-secret that Hamas regularly meets with reporters there. On July 15, for example, William Booth of the Washington Post wrote that the hospital "has become a de facto headquarters for Hamas leaders, who can be seen in the hallways and offices." Back in 2006, PBS even aired a documentary showing how gunmen roam the halls of the hospital, intimidate the staff, and deny them access to protected locations within the building—where the camera crew was obviously prohibited from filming.

Or hiding munitions inside schools

The United Nations has found troves of rockets hidden in three of its schools since the conflict began. "We condemn the group or groups who endangered civilians by placing these munitions in our school," Chris Gunness, spokesman for the U.N. Relief and Works Agency, said in statement published Wednesday by the Times of Israel. "This is yet another flagrant violation of the neutrality of our premises. We call on all the warring parties to respect the inviolability of U.N. property."

Even longtime critics of the IDF have admitted the IDF values life

Israel cannot win this war just by killing all the terrorists. It is determined to break the power of Hamas, and in that effort it deserves the support of the United States and the rest of the world. But it can succeed only by upholding the rules and norms of behavior that Hamas so wantonly ignores. What Israel is fighting to defend is a society that values human life and the rule of law. To do that, the means and the ends of its military response must be consistent.

And

Hamas is known to hide its fighters among civilians, and an indifference to their suffering is central to its brand of terrorism. Hamas is using the people of Gaza as human shields against Israel's bombing campaign, and as Gazans try to escape, Hamas still holds the hostages who were kidnapped last Saturday. The group has threatened to kill them one by one with every airstrike that hits Gazans in their homes.
Answer: This may show that Israeli actions are still pragmatic rather than emotional.
There is nothing really useful for them from killing lots of civilians, unless they really plan to kill a sizeable percent of two million population. There is also obvious harm: this builds up the negative reputation worldwide that may result less countries supporting them, and still supporting countries providing less support.
While civilian casualties are inevitable in any war, a competent commander in would usually avoid very extreme disproportion. This would also explain why they are not always doing: may depend on the military context, how much it is critical to have the attack really unexpected.
Comment: Also, by doing so they signal a clear difference to what Hamas did, who definitely did not warn any Isreali civilians before their recent attack.
Answer:
Roof knocking (Hebrew: הקש בגג) or "knocks on the roof" is a term
used by the Israel Defense Forces (IDF) to describe its practice of
dropping non-explosive or low-yield devices on the roofs of targeted
civilian homes in the Palestinian territories as a prior warning of
imminent bombing attacks to give the inhabitants time to flee the
attack. The practice was employed by the IDF
during the 2008–2009 Gaza War, Operation Pillar of Defense in 2012,
and Operation Protective Edge in 2014 to target the homes of police
officers or Hamas political or military leaders.
Roof knocking occurred during some strikes in the October 2023
Gaza−Israel conflict.
During the 2023 Israel–Hamas war, CNN reported that many people in
Gaza said the IDF had abandoned the "roof knocking" policy. In
October 2023, a senior Israeli official stated that the practice would
no longer be the norm and would only be used under certain
circumstances. An IDF officer told the New York Times that instead
of the "roof knocking" policy, Israel is issuing mass evacuation
orders and leaflets stating that "anyone who is near Hamas fighters
will put their lives in danger."

https://en.wikipedia.org/wiki/Roof_knocking
Answer: Adding on to the other answer here, I don't think they have a reason to hide it.
Israel's current plan is quite clear even if the intention is still debatable. Bomb Gaza pretty much everywhere. They have dropped more than 6000 bombs already and as of writing this, there's no sign they're stopping.
Considering the bombing appears to be targetting most of Gaza, with bombs targetting the Rafah Crossing, schools, universities, UNRWA offices, the north (most clearly), etc., it turns the whole "element of surprise" angle quite meaningless. Add onto this the fact that the whole Gaza strip is landlocked and sealocked, so there's nowhere to escape to.
All of that to say that Israel has no reason to hide where they're going to bomb since it's not like Hamas can up and leave, and the stated goal is to cause as much damage as possible (to places where Hamas operates, supposedly) which is also not going anywhere.
Now the reason they would prefer to actively notify residents is because it reduces international backlash and gives them the argument that they notified the affected civilians before doing it.
However, keep in mind that Israel has not and does not always notify civilians before doing this. Whether that's because they don't care to or for the sake of having the element of surprise, we can't know for sure.
Comment: Notifying civilians is not required by international law, as long as there is reasonable military necessity to execute the operation. However, Israel does notify civilians before attacking targets that can probably not be moved, like terror infrastructure. Israel does not notify anyone, when the target is a high ranking terrorist who needs to be sent to...
Comment: @Jacob3 Indeed, my intention was not to claim that they "should" notify, but rather correct the somewhat subtle implication in the question that they always do. Also, my statement was specifically regarding notifying civilians, I do no expect anyone to notify the enemy they are striking before they strike them.