Vertex Connectivity of the Hypercube

Question: I am revising my lecture notes about connectivity, but I am stuck regarding proof of $κ(Q_d) = d$ Then I took a look of the proof by induction in D. West's book. For $d\leq1$, $Q_d$ is a clique with $k+1$ vertices and connectivity $k$.Can anyone visualize that statement about $k+1$ vertices? Also, it would be great if you have another proof or explanation to articulate my understanding of it. Thanks
Comment: Did you mean "$Q_d$ is a clique with $d+1$ vertices and connectivity $d$?
Comment: What is hard to visualize about the graphs $Q_0=K_1$ and $Q_1=K_2$?
Answer: You can connect any two vertices by $d$ vertex-disjoint paths directly. If they differ in $k$ coordinates, $k$ paths will be in the $k$-cube in which they are opposite (use coordinates in the cyclic order). The rest are formed by moving along extra coordinate axis to an adjacent $k$-cube, going to the opposite vertex in it, and moving along the extra axis backwards.
Answer: We can define the Hypercube $Q_{k}$ recursively, as follows. We let $Q_{0}=K_{1}$ and $Q_{k}=Q_{k-1}\square K_{2}$, for all $k\geq1$. Let us observe that $Q_{k}$, $k\geq1$, is obtained from two disjoint copies of $Q_{k-1}$ by joining their corresponding vertices.
Now, we prove that $\kappa(Q_{k})=k$. We proceed by induction on $k$. The equality is obvious for $k=0$ and $k=1$. In such cases the Hypercube is isomorphic to $K_{1}$ and $K_{2}$, respectively. Now let we have the equality for all Hypercubes of order less that $k$ and prove the equality for a Hypercube of order $k$. We now consider the Hypercube $Q_{k}$. It is well-known that $\kappa(G)\leq \delta(G)$, for all graphs $G$. Therefore,
\begin{equation}\label{Q1}
\kappa(Q_{k})\leq \delta(Q_{k})=k.
\end{equation}
Suppose to the contrary that $\kappa(Q_{k})\leq k-1$. Let $G_{1}$ and $G_{2}$ be those two copies of $Q_{k-1}$ as subgraphs of $Q_{k}$. Let $S$ be a $\kappa(Q_{k})$-set. We consider two cases.
Case 1. $S\subseteq V(G_{1})$ or $S\subseteq V(G_{2})$. By symmetry we may assume that $S\subseteq V(G_{2})$. Since $|S|\leq k-1\leq2^{k-1}$, the graph $G-S$ is obtained from a copy of $Q_{k-1}$ by adding $2^{k-1}-|S|$ new vertices such that every new vertex has exactly one neighbor in $V(Q_{k-1})$ (note that there are some possible edges among the new vertices). So, $G-S$ is connected which is a contradiction..
Case 2. $S\cap V(G_{1})\neq\emptyset$ and $S\cap V(G_{2})\neq\emptyset$. Then, $|S\cap V(G_{1})|<k-1$ and $|S\cap V(G_{2})|<k-1$. Therefore, both $G_{1}'=G_{1}-(S\cap V(G_{1}))$ and $G_{2}'=G_{2}-(S\cap V(G_{2}))$ are connected by the induction hypothesis. On the other hand, there are some edges with one end point in $V(G_{1}')$ and the other in $V(G_{2}')$. This shows that $G-S$ is connected, a contradiction.
Therefore, $\kappa(Q_{k})=k$.

Vertex Connectivity of the Hypercube


Make Gist embed scrollable

Question: is it possible to make gist embed script have vertical scroll bar? I want to embed my gist to my blog post, but it's a long code. I want my gist look like this in my blog post :

Answer: The easiest solution is to add the following code to your CSS:
<code>.gist-data{
    height:250px; // Any height
    overflow-y: visible;
}
</code>
This will limit the height of the gist's container, I tried other wrappers around it and this was the first one to limit the height.
Depending on specificity, you may need to add <code>!important</code> in your styles.
Comment: I prefer to use `max-height: 250px;` to avoid short gists to be expanded.
Answer: One WordPress project which provides that kind of feature would be "Embed GitHub Gist / Gist height (7 posts)".

I wanted to add a gist height for really long gists that would result in a scrollbar for the embed.
  Here's the patch to achieve this for the current trunk using a height parameter to the shortcode.

The most recent version is at this project.
Some of that work might have been included in "dflydev/embed-github-gist".

Make Gist embed scrollable


Movement of electrons in conductors and insulators

Question: In conductors, the electrons can easily move unlike in insulators that prevent them from moving. What properties in conductors and insulators make them act in such way? Is it related to the position of electrons? Or there is another reason? Thanks for helping
Answer: In conductors the electrons are loosely bound whereas in case of insulators, this is not true.
The concept comes from what is known as Band theory in metals.
When atoms come together to form a compound, their atom orbital energies mix to form molecular orbital energies. As more atoms begin to mix and more molecular orbitals are formed, it is expected that many of these energy levels will start to be very close to, or even completely degenerate, in energy. These energy levels are then said to form bands of energy.
The valence band is the band of energy where all of the valence electrons reside and are involved in the highest energy molecular orbital.
The conduction band is the band of energy where positive or negative mobile charge carriers exist.
According to the band theory, metals will actually act as insulators at absolute zero. Above this temperature and yet still staying below the melting point of the solid, the metal would act as a semiconductor.Semiconductors are classified by the fully occupied valence band and unoccupied conduction band. With the small band gap in between these two bands, it takes a certain amount of energy to excite the electrons from the valence to conduction band.As stated previously, continuous bands of energy are formed due to the combinations of molecular orbitals close in energy. Of course, due to the mass amounts of different molecular orbital mixings, bands of varying energy will form. The difference between these band energies is known as the band gap.

In insulators, the electrons in the valence band are separated by a large gap from the conduction band, in conductors like metals the valence band overlaps the conduction band, and in semiconductors there is a small enough gap between the valence and conduction bands that thermal or other excitations can bridge the gap.
You can also consult from this pdf if you want added information or details.
Answer: Metallic elements are elements on the left side of the periodic table, elements which have outer shells with a low number of free electrons in their outer shell. The free electrons can easily detach themselves from the atom. Metals naturally tend to form crystals containing free electrons.


Probability with birthdays in a specific time range

Question: Out of a group of 71 people, how many of them would have a birthday through July 16th- July 31st? I'm not looking for just one persons probability in the group of having their birthday during that time, more like an overall probability. I have the probability of one person having their birthday during that time, which is 2.12%, but that doesn't tell me about the other 70 people.
Comment: You might ask about the probability that at least one of them had a birthday in that range. Or you could ask about the *expected* number of them that have a birthday in that range. (The expected number may not be an integer!) Or you could ask about the *most likely* number of people with a birthday in that range (the "mode"). Do you know the way to calculate any of these?
Comment: Also, half a month should be around $4\%$ of the year, not $2\%$.
Comment: This range is $\frac {16}{365}$ of all the birthdays so you expect $\frac{16}{365}$ of the people to be in that range.  So you expect $71\times \frac {16}{365}$ people to have birthdays in that range.
Answer: Assuming the people's birthdays are independent and uniformly distributed throughout the year, then the number of birthdays can be modeled as a Binomial random variable
$$X \sim \text{Binomial}(71,(31-15)/365).$$
The expected value and variance of this random variable are
$$E[X] = 71 \cdot \frac{16}{365} \approx 3.11$$
$$\text{Var}(X) = 71 \cdot \frac{16}{365} \cdot \frac{350}{365} \approx 2.98,$$
so we should expect to have the number of birthdays to be in the range $3.11 \pm \sqrt {2.98}$ with high probability (68%).
Comment: Simulation suggests $3\pm 2$ at $86.7\%$
Comment: You could add some statistics about twins, but that would depend on the situation. In a school class you would have quite a few twins.


blender 2.8 beta doesn't find opengl

Question: Blender 2.8 doesn't load on my windows 7 notebook. It only says several times:
"Warning! Ignoring untested OpenGL context profile mask bits. Warning! OpenGL core profile not available."
I already updated my Nvidia graphics driver. Is that still a development problem or is it my computer?
Answer: I had a similar problem, where it requires OpenGL 3.3 and the GPU doesn't support that version. Please provide GPU information to confirm, but if you've updated your driver, then it's probably an OpenGL issue.
How to check your GPU: https://www.quora.com/How-do-you-check-what-graphics-card-you-have-on-Windows-7

blender 2.8 beta doesn't find opengl


How can I protect a wall from flames of a gas hob?

Question: The flames of our gas hob scorches the wall behind it and the chipboard panel next to it. Is there any material I can affix to those sides to stop this potential fire hazard from happening?
Comment: You should probably move the hob. If it's close enough to scorch things, it's too close to them.
Comment: It's built into the surface and therefore impractical
Answer: Some sort of tile would do the job. If ceramic is too thick, or hard to install, adhesive stainless steel squares should be nicely heat conductive, thin, and easy to put up.
Example: https://www.google.com/search?q=Stainless+Peel+Stick+Tile.
Comment: If it's heat conductive, won't it just heat up the wall behind it?
Comment: It'll spread the heat out. A single sheet would be best, but even w smaller tiles you should get enough of a spread to reduce scorching temps at any one point.
Comment: Thank you. That sounds worthwhile trying out. The wall is too flimsy to hold ceramic tiles
Answer: The range in our kitchen is pushed up against a wall (the chimney is behind it) so the back burner is in a corner.  When I installed a ceramic tile backsplash I wrapped it around to completely cover this corner since I was noticing some discoloration of the paint from the gas burner.  So far this seems to be working fine.


IValueConverter - Get source object at Convert method

Question: Is there a way to get the source object in the Convert method of a Converter class. I know how to get the converted property but is it possible to get the object that the property belongs to?
Answer: As Darin says, this isn't possible with an IValueConverter. You can't assign it to ConverterParameter either because it's not a dependency property. However it is possible if you go down the route of MultiBinding. That way, you can actually bind to your calling object, and the IMultiValueConverter will receive the object in the binding value array. This MSDN thread has a quick example...
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/9f3e4f6d-20d2-4c13-90a2-7c157ed4f8c3/
Comment: Thanks Tom. I can get the object with MultiValueConverter as you said.
Answer: No, it is not possible. This information is never passed to the Convert method. Also a value converter works by specifying a source and destination type. If you need to access the parent object define the source type one level higher in the object hierarchy.


Python Colon operator

Question: I am trying to port some Python code and I am a little lost on small issue which I would appreciate some advice.
I understand the in operator but I am a little unclear on what the : operator does in this example.
if foo in bar[i][:2]:
    # do something

In http://docs.python.org/tutorial/introduction.html#strings it states that the : operator makes the first two characters only if this is a string. However when used with a list like this is that what will happen as well? So does this just mean the first 2 characters of the string in th
Comment: For a more in-depth understanding of how slices can be used via __getitem__, including Ellipsis, see http://stackoverflow.com/questions/509211/pythons-slice-notation
Answer: This is called list slicing, you already link to the proper part of the documentation in your question. If you find documentation confusing, there is a video tutorial for that:
http://www.youtube.com/watch?v=iD6a0G8MnjA
Answer: The behaviour of the operator doesn't depend on where its operands come from - it doesn't matter whether it was a literal, a variable, or a complex expression. The operator does its thing because its operand is a string, not because it was computed in a particular way.

Python Colon operator


How can a DoS attack be used as part of the 'Gaining Access' phase of a hack?

Question: I'm doing some revision for an exam and I've made a note to look at how DoS attacks can be used to gain access to a system. I can't find anything online but I found a reference to the fact here.
I hope one of you can enlighten me
Comment: One interesting but rare case: Server behind stateless firewall using SYN cookies to protect against SYN flooding. Under normal circumstances an attacker cannot connect to ports blocked by the firewall because the firewall blocks all SYN packets from attacker. Attacker then starts SYN flood against open port, server switches to SYN cookies to protect against SYN flood. Attacker then sends ACK to port supposed to be filtered, firewall being stateless lets packet through. If attacker guessed correct sequence number connection to filtered port has been established.
Answer: DoS attacks can be used in several ways as part of gaining access:

Overwhelming primary defenses. when you are conducting a DoS attack, the primary defense mechanisms get caught up in it too. They can be overwhelmed and as a result, they may: a) not respond appropriate b) can hang altogether c) the watchers watching them are distracted, or your efforts are lost in the DoS logs. In addition, if the primary systems are rolled over to secondary systems (which often happens) those may not be up-to-date configurations, or you could catch the roll-over in a time-gap whereby the synchronization of everything is not current.
Overwhelming primary systems may expose flaws. A DoS attack may be used to expose flaws that could be exploited. Could be procedural flaws, it could be system flaws. It could be that as a result of a DoS attack you force the organization to upgrade, and during the upgrade you take that window of opportunity to exploit.
The DoS attack is a decoy. Classic attack... What magicians do all the time. Watch the left hand while I steal with my right. The DoS has so much focus of the organization, secondary routes into the system (physical, social, or technical) could be undermanned, provisioned or systems can be more easily by-passed without being noticed.
DoS attack could be a plant. I once heard of hacker who conducted a limited DoS attack on organization A, because he had done his research, and the CIO from organization A was very close to organization B, and both organizations were in the same general business arena. So he suspected that if he could get organization A to adopt a specific technology to thwart his rather crude DoS attack, that organization B would do the same - thinking they might be next. He was very correct, as organization B did. Why? Well the hacker had an 0day exploit in the piece of technology and he wanted to attack organization B.
Secondary Route/Bridging Exploitation. An extended DoS attack that can be sustained, can force business units within the organization to move to secondary systems paths (networks) to keep critical business going. While some of these secondary paths may be well-planned and secured, many are not. For instance a business unit may stand up a wifi, or mifi device and start using it as their business network without any security infrastructure. If an attacker is actively monitoring and profiling, they may be able to capture and attack these very vulnerable paths and now you have a direct, totally unsecured bridged network into the organizations intranet.
Answer: There's a perfect illustration in this movie and an even better in that movie.

Spoiler alert (although if you have not seen these movies yet, then you must have spent the last three decades frozen in a glacier or whatev)
In the first movie, the bad guys simulate a terrorist attack (which can be thought of a massive DoS) so that the authorities apply their anti-terrorist procedures, which imply shutting down power -- which automatically opens the strong room that the bad guys wanted to enter in the first place.
In the other one, the newer bad guys simulate another terrorist attack, this time with actual bombing (there is nothing more DoSing than high explosives), because then the whole anti-terrorism scheme allocates all police forces to a bomb-seeking race (that's one effect of DoS: to divert defence resources from their normal stations) and the explosion itself overwhelms vibration detectors in the bank which is the true target of the villains -- who can then make a big hole in the strong room wall with bulldozers, undetected by the said detectors.
In a network+computers environment, you can think of a DoS as triggering abnormal conditions, under which normal defence mechanisms are less effective.
Comment: I like those examples. die hard 4 as well...sort of....the fire sale was a distraction to get them to download that stuff to woodlawn. (Was on last night)
Answer: I don't believe DoS attacks are traditionally utilized to gain access to the system per se.  It is more of a tool utilized to confuse the system or flood the system with irrelevant requests and deny legitmate traffic access to the system.  That can in turn facilitate the use of vulnerability exploits to actually gain access to the system.
Denial-of-Service attacks by definition is simply denying authorized users or devices access to the specific system or network.  It could be utilized in conjunction with another exploit, say a buffer overflow, to get the required result of penetrating the system.
Also the DoS attack can thwart IT pros and security pros from focusing on the real issue at hand is that someone is exploiting their system.  A lot of pressure is placed on the IT department by senior management when they can not get to or access certain pieces of technology.  So while they are attempting to fix and resolve the DoS issue the hacker goes by completely obscured.  Additionally, trying to sift through the plethora of log files that will have been created while it was going on leads to a difficulty in tracking a breach has ever occured.
Answer: A DoS attack can crash the server causing it to reboot and execute assets that the attacker previously compromised.
For example, the attacker compromised the cron table or a script called by cron. When the server reboots the corrupted cron is invoked.
Could even take the DDoS to a whole new level if the corrupted script overruns the drive partition.
Answer: A DoS attack may force a system's IPS to fail open the traffic towards internal recources. That is a configuration option on many defence in depth appliances and overwhelming them will lead to either service unavailability or degradation of security. If the service availability of the organization is more improtant than the security of the data provided by the service, the system is configured to fail open, meaning that security will be degraded by accepting all connections.


Which test to use for generalizations

Question: I'm currently conducting a research in linguistics. The goal is to show the audience preference when it comes to different translation strategies in subtitling. The experiment design has one independent variable with two levels (2 different translations of the same clip), and the dependent variable is the reception (like it, don't like it). The expected number of participant is 100. As I am a complete novice in statistics, which test would you suggest to use to make generalizations and test hypothesis?
Answer: You will get a 2x2 table as a result of the experiment. If each person in your sample sees only one version, you could use the chi-square test.
If you get the same 100 people watch both translations and rate them, you might use McNemar's test.
You could read more here: What is the difference between McNemar's test and the chi-squared test, and how do you know when to use each?

Which test to use for generalizations


Attribute Query for First/Last record and every nth inbetween

Question: I have a feature class with over 5000 points.  There are too many to label so I would like to be able to grab the first, the last and every 30th or 50th in between.
Comment: What software are you using?  I do not see any tags or any information concerning that.
Comment: THAT WORKS GREAT!!! I was wrestling with this issue all day. However it uncovered a much harder problem to solve: the polygons I am trying to isolate are not numbered in a pattern that would result in a uniform grid. Figuring out how to force this is goign to be an interesting exercise.
Comment: this is not an answer. please restrict comments to the comments sections and either edit the original post or mark answers as complete (select the checkbox).
Answer: If you're using ArcMap, you can use a SQL query to select a subset of features to label, as long as you have the "Define classes of features and label each class differently" method selected (rather than "Label all features the same way").
To display the labels for the first record and every nth one after that, you'll have to create a class with a SQL query like this: MOD("OBJECTID"-1, n) = 0, where n is replaced by the number of features you want to skip, and "OBJECTID" is the name of the OID field of your data. The -1 is what ensures the first record is displayed, since the OID field typically starts numbering at 1, not 0.
I'm not sure how you'd ensure the last record gets labeled in addition to these, though.
Edit: I suppose a hack-y way to include the last record would be to add an OR "OBJECTID" = m to the end of the expression, where you figure out what m should be by selecting "OBJECTID" in the field list and clicking "Get Unique Values", then scrolling to the bottom and seeing what the maximum value is. Obviously, this would have to be done separately for each layer you're trying to label this way.
Comment: that would assume that your oid is in the order. of the objects straight down the line.


Should taping prefill overlap be removed before taping?

Question: When you prefill gaps in drywall, do you sand the excess that is on the wall outside of the gap completely off before applying tape and mud or will the new mud and tape adhere to the prefill?
Answer: New mud will adhere to old mud. Just scrape off any excess to make the next coat smoother.
I have done those two steps right after each other. Fill in the gaps, add a narrow skim coat, 3 or 4", add and smooth out tape. Wait for it to dry and then use larger knives to build up and feather out.
Answer: I assume you are prefilling because the gap is too wide. Say we start from that if it be the case, otherwise there would be no need to prefill.
If you are prefilling due to large gap between two sheets etc, use the proper mud, i.e. quick drying mud.  From 10 minutes to 1/2 hr time frame drying time depending on which mud you like to buy. These muds are of course the type you have to mix.
Keep the mud on thicker side.  Do not add to much water.  Just a comfortable thick consistancy depending on the gap.  You have to judge what you got there.
With this set up, just fill the hole/gap only and no more.  Scrap off excess, there should be no problem doing it.
However if the holes or gaps are too large, that is another story, it would need backing. If not. just realize to scrap off all the excess mud.  Why?
Because naturally you will be applying mud again before you apply the tape over it.
After you apply the mud and the tape over it, scrape off any excess beyond the tape gently, not as crucial as you would think.  Do not press too much on the tape.  If you notice the tape getting fuzzy on top, it means you are pressing the knife too hard and or too many time.
All that translates to that you applied too much mud to begin with before you applied the tape. This means do not apply too much mud in the first place. In other words the purpose of the mud was just to keep the tape in place. You do not want fill the area with mud but to only secure the tape.   You can always put more mud later as things dry and so on.
At this stage you can move on with your life until the next day.  Or you can apply a thin coat over the tape if you like and taper the mud out with a larger knife.
And there you have it. Easy as pie.
Take care.
Comment: @AloysiusDefenestrate, those times refer to _working_ time, not setting time.
Comment: "Quick drying mud" is also known as 'setting compound' or 'hot mud'. As noted, it comes powdered. Around here it's "5", "20", "45", and "90", referring to set time. No need to go with something as fast as 5.


Use cases to define a variable as `protected`?

Question: I understand that one should use protected when one wants to make the variable visible in all classes that extend current class, but what does that mean exactly?  What are the most common use cases?
I suppose another way to frame the question would be, what are the key cases when you would want a class variable to be visible from the class' children but not from external classes.
Comment: As an aside, protected in java also exposes the variable to all classes in the same package, which significantly lessens its protection.
Comment: @Niko - thanks for the pointer, but the answers don't really give use cases.
Answer: Most of the use cases of the 'protected' access modifier I've encountered, are instantiations of the 'Template Method' pattern.
In this pattern, a detail of an algorithm is delegated to the subclass.
In effect, protected access creates a hole in your class invariants: a subclass may abuse the member in such a way that your invariant doesn't hold anymore.
Most of the time, there are better design alternatives than protected access, dependency inversion being the first one coming to mind.
My advise?  Don't publish your object's internals to anyone you don't trust.  Use 'protected' with caution!
Answer: Protected variables help effectively access the variables of base class without going through the get / set constraints.
The usefulness of protected variables are significant in development of libs which are supposed to serve in other applications. It helps you freely use the variables in the environment of lib without making them public and when you finalize the inherited class, they are barred to outside environment.


External flash making pictures darker and doesn't fire in manual mode

Question: I have a Canon rebel and bought a Focus external flash for it. When I have it set to ETTL, the pictures come out really dark. It's like it's thinking that since there is a flash, the camera is adjusting to compensate and the exposure isn't enough. Doesn't matter if I make the exposure length really slow.
The other problem is that if I put my flash in manual mode, it won't even fire even though it's still attached to the camera.
Comment: If your camera is in Av or TV mode, see: [EOS Flash confusion](https://web.archive.org/web/20080126153043/http://photonotes.org/articles/eos-flash/index2.html#confusion). What model camera body, which model flash, and how is the *camera*'s flash mode set?
Comment: What specific camera? What specific flash? What exposure mode is the camera set to use? What exposure times (shutter "speed") are used for your dark photos? What are the camera's flash settings?
Comment: It's a rebel T100 aka 4000D. The flash is a Focus IFTTL, a cheap flash. Based on your link, the shutter speed can be no quicker than 1/90 second. But when it's in one of the automatic modes like Auto or portrait, I can't set the speed. In the manual modes, I've set the speed for slower than 1/90 and they are still too dark.
Comment: When I try to use the manual mode on the flash, it won't even fire, except when I have it detached and use the built in flash on the camera to fire off the external flash. But it won't fire when in the hotshoe in manual or multi mode.
Comment: How many contacts are on the base of the flash? How are they arranged? Do they line up with the contacts on your camera? Does your camera have a large contact in the middle of the hot shoe? Or only the pattern of four smaller contacts in a square pattern near the back of the hot shoe?
Answer: There are two different issues coming into play here:

Your Canon Rebel T100/4000D does not have a standard hot shoe with an ISO compliant contact in the center. Canon started doing this with the lowest priced models a few years ago. You can't trigger standard manual flashes directly with this hot shoe. There are a few workarounds that require hardware made specifically to work with the Canon cameras that have this partially disabled shoe. I call it a "semi-lukewarm" shoe.

We've had a few previous questions about this issue here at Photo SE:
How can I make use of a speedlight that does not work with the non-standard hotshoe on lower-end Canon cameras?
Is a Yongnuo YN560-TX compatible with Canon SL3 or T100?
What speed lights are compatible with canon 2000d? I can't find any
Canon EOS 4000D Hot Shoe for Sync (with Studio Flashes)

Many third party flashes don't work very well in E-TTL mode if the Canon camera's flash metering is set to Evaluative. Try setting the flash metering mode to Center Weighted Averaging, or partial. Please note that Flash metering mode is a different setting than regular Metering mode.

We've also had a few previous questions regarding this issue here at Photo SE:
Flash intensity levels aren't the same across consecutive photographs
Yongnuo YN-685 underexposure issue in bounce mode at longer focal length
Why does my pictures becomes darker while using external flash 😓?
Answer:
I have a Canon rebel [T100] and bought a Focus [IFTTL] external flash for it. When I
have it set to ETTL, the pictures come out really dark. It's like it's
thinking that since there is a flash, the camera is adjusting to
compensate and the exposure isn't enough.

If you use aperture priority (Av) mode, by default, the camera always tries to use the flash for fill, rather than as the main source of illumination. The assumed usage is firing a pop-up flash to illuminate shadowed faces when people are backlit by the sun. Your iso, aperture, and shutter speeds are kept relatively near where they would have been without using any flash.
See also: The EOS 'Bible': EOS Flash Confusion

Doesn't matter if I make the exposure length really slow.

Shutter speed doesn't have any effect on the flash portion of an exposure because a flash burst (at or below sync speed) will be faster than any shutter speed you can use. Leaving the shutter open for longer doesn't gather any more light from the flash.  But I suspect your flash isn't actually firing in sync because...

The other problem is that if I put my flash in manual mode, it won't even fire even though it's still attached to the camera.

You have a T100. It is, unfortunately, one of the three camera models (the SL3/250D, T7/2000D, and T100/4000D) where Canon removed the central sync contact on the flash hotshoe. This is the contact that sends the main "fire" signal to the flash.
Only third-party flashes with eTTL II capability can deal with this missing sync contact, and only if they're firmware upgradeable so that they can deal with the communication protocol changes the missing contact needs to fire and control the flash. The main 3rd-party brand that does this is Godox. I would look to see if your Focus flash has a USB port, and whether there are any firmware updates you can apply to your flash for communication with the T100. But it's likely that your flash is simply incompatible with a T100, while it would work fine on a non-T100/T7/SL3 Canon dSLR body.
Comment: @Greg, it's possible some other 3rd-parties have updated their flash firmware the way Godox did, but Godox is the most popular and widespread choice and was the first to do so, so most of us stopped searching after that. :)  Godox also has a lot of other advantages to other brands: built-in remote radio control, cross-brand TTL/HSS support, li-ion options, and expansion options that include AC manual monolights, IGBT TTL/HSS battery-powered monolights, and two pack and head systems.
Comment: Thank you. This is very helpful. What I get for going cheap.
Comment: So, basically only canon and godox flashes will work correctly with my camera?


How to change safari search engine Mac OS

Question: I want to change safari default search engine by native app or safari extension however it's possible.
I have tried to change preference (com.apple.safari.plist) file but there is no key to related safari search engine.
I also change in .globlerpreference.plist but no effect on safari browser is there any file appear in finder thats content safari default search engine.
Comment: What version of macOS are you using?
Comment: currently I using high Sierra but I give support 10.9+
Answer: You might find this Stack Exchange Answer provides a solution:
There are two places to select the search engine. Setting the search engine from Safari's URL bar overrides whatever's set in Safari > Preferences > Search. My Safari had Google set from the URL bar, and whatever I set in Safari Preferences was immediately reverted to Google.
To reset the default search engine in Safari's URL bar, click on the magnifying glass icon, which appears at the left side of the URL bar when no page is displayed. A dropdown appears. Then select which engine you'd choose. Luckily, I was content with DDG, one of the only four choices presented.
Answer: If you go to Safari > Preferences > Search there is a pop-up that lets you select the search engine from a pre-defined list.
Unfortunately I have no idea how to change that pre-defined list (if that is what you need), perhaps it is somewhere inside the .app package(?)
Comment: I already find in .app package but there is nothing related to change search engine but thanks to your opinion


Why doesn't my delete button work in PHP?

Question: I'm just starting out with PHP and am a bit lost. I feel like it's probably something small I'm missing but when I click the delete button it does not work. It doesn't give me any errors, the button just clicks and does nothing. Any ideas why? I've spent hours trying to figure it out but I have come up with nothing. I've done add user and show users in much the same way and it works but this has me stumped. Thanks in advance :)
users.controller.php
static public function DeleteUserController(){

        if(isset($_GET["userId"])){

            $table ="users";
            $data = $_GET["userId"];
            var_dump($data);
            $answer = UserModel::DeleteUserModel($table, $data);

            if($answer == "ok"){

                echo'';

            }

        }

    }

users.model.php
static public function DeleteUserModel($table, $data){

        $stmt = Connection::connect()->prepare("DELETE FROM $table WHERE id = :id");

        $stmt -> bindParam(":id", $data, PDO::PARAM_STR);

        if ($stmt->execute()) {

            return 'ok';

        } else {

            return 'error';

        }

        $stmt -> close();

        $stmt = null;
    }

users.js
$(".btnDeleteUser").click(function(){
    var userId = $(this).attr("userId");
    var username = $(this).attr("username");

    swal({
        title: 'Are you sure you want to delete user?',
        type: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#3085d6',
          cancelButtonColor: '#d33',
          cancelButtonText: 'Cancel',
          confirmButtonText: 'Confirm'
        }).then((result)=>{

        if(result.value){

          window.location = "index.php?route=users&userId="+userId+"&username="+username;

        }

    })

})

users.php
<button class="btn btn-danger btnDeleteUser" userId="'.$value["id"].'" username="'.$value["user"].'"></button>

users.php
<?php

  $deleteUser = new ControllerUsers();
  $deleteUser -> DeleteUserController();

?>

index.php
<?php

require_once "controllers/template.controller.php";
require_once "controllers/products.controller.php";
require_once "controllers/sales.controller.php";
require_once "controllers/users.controller.php";

require_once "models/products.model.php";
require_once "models/sales.model.php";
require_once "models/users.model.php";

$template = new TemplateController();
$template -> tempController();

Answer: I see a few issues going on in this script that we can start with. First, it's public static function, not static public function as per the documentation, php Static. Next, you are instantiating the ControllerUsers with new ControllerUsers() and calling the DeleteUserController as an instantiated method. When you use static methods or variables, you do not instantiate the class, you call it directly using ControllerUsers::DeleteUserController(). Again, see php Static from above. That's the purpose of using static methods, you can call them without instantiating a class.
My recommendation is to not use static methods at all when you are first learning PHP unless you are familiar with other programming languages and their use of Static Methods. Static methods are generally frowned upon and have limited real world use anyway, so it's best to instantiate the class and work with methods that way instead.
Anyway, back to the script. When you are creating a program to delete a user, it is more accepted to use POST instead of GET, as it does not transfer data in the URL, which makes it more secure. I would recommend switching to a POST action instead of a GET action.
Also, can you post the index.php file? I am curious to see how these routes work in the context of your program.
Let's start with these before continuing.
Update:
So, if you click the Delete User Button and nothing happens, not even any errors, there can be a few different reasons for that. The first big one is that the users.js file has not been added to the page that has the Delete User button, so make sure that it's been added to that page.
Next, you need to make sure that the page is loaded before using the click function in Jquery. Check here for reference, Jquery Click.
For me personally, I have had issues using the .click method in Jquery, so I normally use the .on method instead. It's a newer method with better functionality, I've found, so give it a try as well. An example can be found in Jquery Click from above as well for you.
Comment: Thank you. I just added my index.php. I will work on your suggestions now
Comment: From what I saw in your users.php file, it seems like you are adding HTML elements inline to PHP using `echo` most likely. What you can do in addition to that is echo out  `users.js` as a script tag. Check https://www.w3schools.com/tags/att_script_src.asp to see how to make a script tag and simply echo that script tag similar to your Button element. Make sure the source path in the script tag is correct and relative to your user.php file. Check here for relative paths, https://www.w3schools.com/html/html_filepaths.asp
Answer: Thanks for all your help. It was, as I said, a simple error. I didn't link the Javascript file in my template.php file:


50 amp breaker being replaced by a 60 amp breaker

Question: I have a 50 amp breaker that runs the auxiliary heat on our heat pump.  It keeps tripping.  Can I replace it with a 60 amp breaker?
Comment: Probably not, depends on the wiring, and your tolerance for burning down your house. If this is new behavior, it's probably better to find out why the breaker is suddenly tripping, there may be a fault in the heater (or less likely, a fault in the existing breaker)
Comment: This is analogous to using a penny in place of a fuse. One dumb move.
Comment: If you suspect its a problem with the breaker, why not replace it with one of the same size?  Of course the equipment should be checked first.
Comment: Can we have a nameplate or make/model for your heat pump air handler unit?  Also, what gauge of wire was run for this circuit?
Answer: Larger amperage requires larger wiring.  It's possible but probably not likely that the existing wire can handle the larger current.
The heater is probably not rated for the larger breaker, so even if the wire is big enough, still might be a real bad idea.
Comment: BP's right here. A 60 amp breaker would require #6 wire. Is that the size of your wiring? If not you would be risking the fire and death Tester speaks of. If you do have #6 wire you could still be risking the aforementioned blaze if the equipment is malfunctioning and that is why it is tripping. You need to get more information and take an amprobe reading while it is operating.
Answer: No, almost certainly not.  The heat pump documentation specifies the breaker and conductor size, and that's what must be used.
Increasing the breaker size could lead to damage to the equipment and/or property, injury, death, and fire.
If the breaker is tripping, it means there's a problem with the equipment.  Locate and fix the problem, or replace the equipment.
Answer: Only if...

The heat pump auxiliary load is actually listed to take a 60A breaker. AND
All the wiring between service panel and heat pump is listed for 60A

First clue: the heat pump auxiliary heater is tripping a breaker often.  That shouldn't happen at all.  I've never heard of a 50A auxiliary heater, but I often hear of 60A and 70A units.  I suspect you have one of those, and that's why it's tripping, and this is an improper install, which is just typical of HVAC people. They're not electricians.
The wire size is a really big deal.  My sources are telling me that to have a bigger breaker than 50A, the cable must be 4 AWG copper, or 2 AWG aluminum (which is totally OK to use) - however in that case you are good for 60 or 70 amps.
Usually heat pump cable travels through unimproved areas, so you can inspect/replace without tearing up a bunch of drywall.
You might contact the heat-pump manufacturer and ask them if the heating unit can be "split" and powered off two 30's or a 30 and a 40.  Then you could use the existing 6AWG run for the 40, and run a new 10AWG for the other 30.
Lastly, this is an absolutely crazy option, but think about how a heat pump works. It takes heat from outside, and moves it into your house.  It quits working when it's very cold, because there isn't any heat out there.  Okay, so build a shed around it... and heat the shed.  You laugh, but that's exactly what they do in large installations, the heat pumps interchange with service water instead of air... in the winter, a central boiler heats that water to 70F using fuel, which is cheaper than electric.  And the heat pumps run very efficiently, since there's plenty of heat in that water.
Comment: downvoter explain?


Can I claim if Customs open & damage my parcel even though contents clearly labelled & nothing was found

Question: A model train was sent from Canada to UK & clearly marked. It took a year to make & was then sold. It has been drilled by customs from bottom to top & the buyer no longer wants it. He was charged £101 when delivered for the pleasure of having his train ruined.
Can I claim compensation?
Answer: You may be entitled to compensation according to HMRC. The page gives addresses to send complaints to.


Can Katarina's ultimate be stopped by roots?

Question: When Katarina activates death lotus, can people like Morgana or Ryze or Maokai stop her channel?
Comment: Slightly related, I think using Anivia's wall interrupts the animation *but not the actual effect*, which may confuse Kat players and get them to move and actually cancel it themselves.
Comment: @NickT Or conversely confuse the enemy team and cause them not to run away ;)
Comment: Not very related but, I play Maokai a lot, and never notice Twisted advance stop Kat's ult (I will test tonight if no one does before me). But Knock back does, like arcane smash.
Comment: Anivia's wall and Trundle's pillar both stop Katarina's ult. They cause a slight knockback which will stop the channel.
Answer: Short answer: Morgana can stop a Katarina with the stun off of her ultimate but not her snare. Ryze cannot stop a channeled ability. Maokai can use his knock up to stop channeled abilities.
Snares and roots are considered movement modifiers. They cause the target to "halt movement entirely, whilst still allowing auto attacks and abilities that do not require movements." Source (For further reference here is a full list of all the CC types and their effects).
Further information about channeling spells:

All channeled abilities can be interrupted by enemy champions using any "interrupt" crowd control effect on the channeling champion. Interrupts do not include slows, blinds, or snares. They can also be interrupted by the player by giving orders such as walking away or activating another ability. Using most summoner spells will not interrupt channeled abilities.
  Source


Locating current mysql my.cnf

Question: I'm trying to determine which my.cnf mysql is using.  Is there a command or something for mysql or mysqladmin that shows which one is being loaded?
Answer: On my linux servers in the startup script (/etc/init.d/mysql) it defines
CONF=/etc/mysql/my.cnf

that it uses to start MySQL daemon
EDIT:
also running
mysqld --verbose --help

shows the following info:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf

So if run as a daemon through init script it will look into /etc/mysql/my.cnf and if started from the command line it will look there only on the second attempt.
Answer: the command

SHOW VARIABLES

Will give you a list of variables the current instance of mysql uses.
In the version of mysql I am currently running there is no trace of a my.cnf variable though, so thats not much help
You can always set one of the variables to a different value in each of your my.cnf's, restart the server and use the above command to figure out which configuration it loaded.

Locating current mysql my.cnf


Can I publish something which is more like a study and which does not contain any concrete results?

Question: I am a theoretical physics researcher. I have not published any papers yet, so I do not have that much experience in publishing a paper. Though I am a Ph.D. student, I am also working independently on another topic of interest (physics only) and trying to find out something. This topic is different from my Ph.D. topic, and I am doing this research on my own without anyone's help.  I have collected information from google (mostly some websites and from a few research papers), and based on this information, I am trying to do my research. My doubt is - if I didn't get any concrete results, can I still publish my work just as a study? Like publishing some article with the title - "Study of ----"? What if it is just collecting data from different sources and gathering it in one place, what if I didn't find anything new from my data analysis? Can I still publish it?
Comment: Are you trying to make a survey paper since you don't have results? These are fairly common in mathematical physics.
Comment: @CameronWilliams Are you saying review paper? No, I am not doing a review paper.
Comment: For the wrong reason, there is something called vanity press, where you publish a book on your own. The name is quite derogatory, but this way of publishing is not a bad thing by itself.
Your research without results fits in publishing a book on the topic, a kind of PhD thesis without results.
Answer: This seems unlikely if you mean publish with a reputable publisher. The difficulty will be finding someone, other than yourself who will publish it.
You can, of course, publish it yourself on arXiv or similar, though you may need some help from a professor to get an account there. Your university email address may be enough.
But formal publishers are looking for novel results and advances to the state of the art, which you don't seem to have at the moment.
Talk to a professor or to so that you understand the possible consequences of publishing early. On the one hand, your ideas get out there attached to your name. But on the other hand, others are also free to extend your work, even before you do.


Is it fine to say "completely" to lay stress on relativity of something

Question: Please note the wording bellow.

It seems completely relatively great but actually its final impact is
  not that great.

Or

Relatively speaking, It completely seems great but actually its final impact is
  not that great.

Do they sound natural?
Comment: I won't *mix fire+water!* Completely+relatively!
Comment: could have better words but of course, quite okay than the first one! There are many superfluous words in the sentence (for example completely great...)
Comment: **relativity** not **relativeness**.
Comment: @MaulikV Thanks :) Is the second one fine?
Answer: Completely can be used as a modifier, but it's not a very good modifier for the word great. NOAD has a good example sentence:

The fire completely destroyed the building.

Moreover, I think utterly may sound more natural in some contexts:

That was utterly stupid of you to go throw eggs at our neighbor's house!

Here's a good test to use: Only use completely when you could also use a little. In other words:

I was a little skeptical...  vs.
  I was completely skeptical...

Those are okay, but it's hard to imagine contexts where we'd say:

It was a little great.

or

It was completely great.

In several contexts, I think using "complete" as an adjective might be a better way to go; for example, although both are grammatical:

That operation was a complete disaster.

sounds better than:

That operation was completely disasterous.

As for your sentence, I'm having trouble squeezing the word completely in there; I'd suggest:

It seems great on the surface, but the actual impact isn't so great.

As for how to work completely into that context:

I was completely fooled at first – I thought this was the best thing ever! But then I realized this wasn't really so great.

(We can use completely fooled because we can also be a little fooled.)
Comment: In the case of "great", I object to "completely great" not on grounds of whether or not you can say "a little great", but because greatness is an open-ended concept. I suppose plenty of people believe that God is "completely great", but short of that there is no standard of absolute greatness. There is a standard of absolute having-been-destroyed.
Answer: "Completely" and "relatively" do not go together. If it is "relatively great", then it's not "completely great", and vice versa. "Relatively" in such a context means "only in comparison to others". Like if I say, "He was a relatively honest man", I mean that he wasn't very honest, but compared to other men, he was okay. That is, other men aren't very honest either, so he was average or maybe a little above average. "Completely" means almost the opposite, that something is true to an extreme. Like if I say, "He was a completely honest man", I mean that he was 100% honest, that he was as honest as one could possibly imagine. So you can't be "completely relatively" something. That doesn't make sense.
As others note, "completely" doesn't really go with "great". Neither does "relatively". "Great" implies an extreme, so to say "relatively great" is something of a contradiction. You could say "relatively good" to express the idea that something is good, but only when compared against other things that aren't all that good either. "Completely great" is redundant. I guess you could use it as an intensifier, but it just isn't something that fluent speakers often say.
I think what you are trying to say is something more like: "It seems good, but its final impact will not be that great." Or if you're trying to say that it seems to be very very good but really isn't, maybe "It seems great, but its final impact will not be so good." I wouldn't use "great" twice in the sentence on the general principle of avoiding using non-trivial words repeatedly.
Comment: @GATA You're welcome! Related to this question, I made a barista laugh yesterday by ordering an "extra medium" coffee.
Comment: Like I read somewhere, in a discussion of Aristotle's theory that "virtue lies in moderation", that "Aristotle took moderation to an extreme".
Comment: @TylerJamesYoung Thank you I've been googling for awhile now to find out how we can use "finally" there, you saved me :) and also thank you Jay for your detailed answer it was really informative.
Comment: Oh, I finally realized the mistake @TylerJamesYoung was pointing out. Yes, I meant "it's final impact", not "it's finally impact". Typo. One should be very careful about typos on a language site. Sorry.
Answer: I don't think that  " completely" fits the sentence.
I'd suggest:
"It seems great, but it's final impact  is not what we expected, on a relative base"
Answer: I hope that I understood what you mean to say.
I'd make it simple to understand without superfluous words.

It seems (relatively) perfect but it's final impact is not that (or does not seem to be) great.
Answer: In your first sentence:

It seems completely relatively great but actually its final impact is not that great.

I cannot clearly see which word "completely" is intended to modify. I doesn't seem possible that it modifies "great" because then "completely" and "relatively" are almost contradictory modifiers.
From your second sentence it would appear that you want it to modify "seems". You can modify a verb with a following adverb, as in "I run quickly", but I suspect it's archaic to do that other than at the end of a clause, and it's very confusing to do it immediately before another adverb that applies to something else.
It's also possible that "completely" is intended to modify "relatively", which is the other side of that confusion.
So I'm afraid the sentence come across as confused/ambiguous. And therefore wrong even if you can justify its grammatical construction one way or another. It doesn't sound natural to me.
If you want to emphasise the relativity (as you ask in your title) I think to be clear you must say more. You could say:

Speaking completely relatively, it seems great.

However you run into anther issue there: when you should say "completely" vs. when you should say "entirely". As a native English speaker I unfortunately don't know that rule for that, I just have an instinct that "entirely" would be better.
Getting away from the word "completely":

Applying relative standards, it seems great.

or:

It seems great, but only relatively.
Answer: "completely" does not pair with "relatively", because completeness carries the idea of an absolute measure.
Something is complete relative to an incomplete version of itself, not relative to something else.
It would never make sense to say, "relative to your slow progress, my tasks are all complete".
"Relatively speaking" is usually a rhetorical hedge device. A good test is to ask the question, "relatively to what?" If there is no clear answer, then it is just an empty phrase. For instance, it contributes nothing in the following example:

A: Relatively speaking, orange juice is sweet.
B: Relatively? What do you mean?
A: I mean, compared to, say beer.
B: Well, no kidding! Water is sweet compared to beer, "relatively speaking".

Even if "completely" and "relatively" are used as rhetorical words without a precise  meaning, they are still not compatible.
This is because "relatively" is a downtoner, whereas "completely" is an intensifier: they are essentially opposites.
Also, the word "great" (in our particular usage) is an intensified form of "good". When  speaker calls something "great", it means that it exceeds the speaker's expectations.
Because it is an intensified word, it is not compatible with "relatively": "relatively great" makes no sense and is not used by native speakers, except maybe as a joke.
When a speaker uses "relatively good", it usually means "good, and better than some reference standard such as an average, but leaving plenty of of room for improvement; acceptable, but not necessarily meeting my highest expectations".

The food in this cafeteria is relatively good (but it's hardly gourmet cooking).

"completely great" is funny sounding, because "great" expresses something which has no attainable limit, whereas completeness requires a limit. That is to say, it is not possible for something to be so great that it cannot be greater; yet that is what "completely great" asserts.  The word for something which cannot be further improved is "perfect"; someone who uses "completely great" seems like someone who lacks the vocabulary to use "perfect", or "couldn't be better".
Which is not to say that "completely" can only be applied to objectively measurable situations. For instance, you can be "completely astonished" by something, which means that you feel you cannot be astonished any more than you are. Although astonishment is subjective, it is perceived to have a limit.
"Completely" is also not applicable to situations that are either true or false. For instance, "she is completely pregnant" can only be said as a joke. The situation has to have a gradation of possibilities with a limit. If that limit is perceived by a speaker as being attained, then the situation is "completely" that way.
Someone can be "completely wrong": but not with regard to a simple yes/no proposition or elementary fact:

A: It's Tuesday today, right?
B: * You're completely wrong; it is Wednesday.

A cannot be completely wrong because it is either Tuesday today or it isn't; there is no way to be "half wrong" about that.  Correct example:

Your hypothesis about how the accident took place is completely wrong.  [Not one single one  of the multiple claims in your hypothesis is correct.]
Comment: Although "you're completely wrong; it is Wednesday" might serve as a hyperbole to indicate that the speaker isn't just wrong, but wrong about something that anyone would be expected to know. Basically, "if you don't know *that* then I fear for your whole approach to being right". As with any ironic mode, once you're using hyperbole normal rules of correct usage can bend.
Comment: @SteveJassop Yes; there would have to be some broader situation where other dependent ideas are contingent on that speaker not knowing what day it is.
Comment: @Kaz: I don't think there has to be. If there isn't then it just intensifies the criticism beyond saying, "you're wrong; it is Wednesday".


What is difference between natural response and zero-input response of a system and how to find natural response?

Question: In most books it is said that natural response is another name to zero-input response while in some resources is is mentioned that the classification is based on poles of transfer function and input.As the second definition is more theoretical then mathematical I'am having difficulty in finding natural response of certain systems where system function and input have same poles.
Comment: They are essentially the same - the response to initial conditions, with no input signal(s) applied. Your final sentence does not make sense because the input is zero.
Comment: Related, if not duplicate: [Difference between natural response and forced response?](https://electronics.stackexchange.com/questions/93061/difference-between-natural-response-and-forced-response)
Answer: "Natural response" and "Zero input response" seem to been used as name for the output signal, when the input signal is zero, but inside the system there's some energy stored which causes something non-zero to output
An example: A heater in a room. Input=electricity. Output = How much warmer the room is when compared to the outdoor air. Let's have the input=0, let the room temperature (in centigrade) be = 20 degrees and outdoor temperature = 0 degrees. The room gets gradually colder as the heat escapes through the walls. The cooling curve vs. time is "Natural response" and "Zero input response". Its determined by the system state evolution law and the initial conditions.
I bet you remembered wrongly something when you wrote the last sentence. As already commented, it's nonsense.
If you have only the Laplace domain transfer function, you cannot get the natural response by any means without additional assumptions, because you do not know the structure of the system and how there's initially energy stored inside the system. You must have a (state variable) model which presents the energy storing subprocesses as integrators and how much they have charged content at t=0.
Of course you can find an equivalent state variable presentation for the s-domain transfer function and assume some initial state - not only for output, but also for every integrator inside the system. But that's not a truth of the modelled physical system, for ex. an electric circuit. To be truthful, the state variables must be the outputs of the real energy storing components ie. capacitor voltages and inductor currents.
The poles in linear system function: If you calculate the impulse response of  the s-domain system function by taking the inverse Laplace transform, you get a sum of complex exponentials determined by the poles. Heaviside's general inverse Laplace transform formula for rational s-domain functions tells it explicitly. If the natural response for t=0 is seen as an extension of response to non-zero input before t=0, your last sentence has at least a couple of right words. The response after t=0 with zero input is a sum of the same complex exponentials which occur in the impulse response. A simple example is a filter with a resonant circuit. It oscillates with same frequencies which are included to the impulse response and they decay like in the impulse response. Their strengths depend on the state at t=0.
If you can simulate your system, let the input to be =0, but put some initial values to integrators. In a circuit simulator you must set the initial values for capacitor voltages and inductor currents. The zero input response is the result of the simulation. Delay lines make the case complex. You must define the signals which fill the lines at t=0.


How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?

Question: I need to do this to enable advanced styling options via css, the one a class the headers are wrapped in isn't adequate to do the type of styling needed. Thanks!
Comment: admin menus = backend menus for posts, settings, etc. There isn't anything like that in themes
Answer: Since the admin back-end menus do have li tags you can use that if you want. but as far as adding divs you will need to hack the core files directly. That is if you are talking about the back-end.
Answer: Short of removing everything and recreating it all, I think the only solution is jQuery.
add_action( 'admin_head', 'wrap_menu_div_wpse_19814' );
function wrap_menu_div_wpse_19814()
{
    ?>

    <?php
}

Answer: dont know of anything like this but what you can often do sometimes is to target this specificity of a particular div, for instance if you have a div which is included in a
 which is included in a

 and  but the div has no class or id then you can still target it by using
table tr td p div{
}
and it will often affect that and only that div .... it's not foolproof but it works a lot of the time .... you often need to use !important though and sometimes you need to go back very far along the page even back as far as the html and body sometimes
sometimes pseudo like firstchild help too
hope this helps
good luck


How Jacobian matrix helps optimization faster?

Question: I tried some python optimization functions and some of them needed Jacobian matrix prior for faster convergence. I understand Jacobians are basically transformation matrices that data from one space to another or carrying gradients information. Can someone explain me with some literature references, how the speed up is achieved?
Comment: Read any book on numerical optimization (my favorite is the one by Nocedal and Wright) to learn about the difference between gradient optimization and Newton-type optimization.
Comment: What you are asking is not very precise, it will be difficult for us to help you. Could you tell us more about what you try to optimize and which articles you read ?
Answer: You haven't told us exactly what optimization routine you're using, so it's difficult to provide a very specific answer to your question.
However, if you don't supply your own Jacobian function then the optimization routine that you're using is presumably approximating the derivatives using a finite difference approximation scheme.  Computing finite difference approximations to the derivative requires many function evaluations and this slows down the optimization process.  Furthermore, the inaccuracy of such approximate derivatives can cause the algorithm to require more steps to converge to an optimal solution and thus run more slowly.
The advantages of using exact analytical derivatives rather than finite difference approximations are discussed in most textbooks on nonlinear programming.  See for example Practical Optimization by Gill, Murray, and Wright.
Answer: even in very simple example you can see decrease of time execution, or speed up of the code's execution
import time
import numpy as np
from scipy.optimize import minimize

# Define the objective function
def objective(x):
    return np.sum((x - 1)**2)

# Define the initial guess
x0 = np.array([0.5, 0.5])

# Optimize without Jacobian matrix
tic = time.time()
res1 = minimize(objective, x0, method='Nelder-Mead')
tac = time.time()
print('>> It took %.3f s. to compute without the Jacobian matrix' % (tac-tic))
print(res1.x)

# Optimize with Jacobian matrix
def jacobian(x):
    return 2*(x - 1)
tic = time.time()
res2 = minimize(objective, x0, method='BFGS', jac=jacobian)
tac = time.time()
print(res2.x)
print('>> It took %.3f s. to compute with the Jacobian matrix' % (tac-tic))

P.S.
can test (in Colab) your keras_model speed with jacobian use like here - jacobian is being calculated fast enough
import numpy as np
import time

N = 500  # Input size
H = 100  # Hidden layer size
M = 10   # Output size

w1 = np.random.randn(N, H)  # first affine layer weights
b1 = np.random.randn(H)     # first affine layer bias
w2 = np.random.randn(H, M)  # second affine layer weights
b2 = np.random.randn(M)     # second affine layer bias

## Using Keras, we implement our network as follows:
import tensorflow as tf
from tensorflow.keras.layers import Dense
tf.compat.v1.disable_eager_execution()

# Keras as a simplified interface to TensorFlow: tutorial
# https://blog.keras.io/keras-as-a-simplified-interface-to-tensorflow-tutorial.html
from keras import backend as K
sess = K.get_session()

# sess = tf.Session()

model = tf.keras.Sequential()
model.add(Dense(H, activation='relu', use_bias=True, input_dim=N))
model.add(Dense(M, activation='softmax', use_bias=True, input_dim=H))
model.get_layer(index=0).set_weights([w1, b1])
model.get_layer(index=1).set_weights([w2, b2])

##Let's now try to compute the Jacobian of this model.
## Unfortunately, Tensorflow does not currently provide a method to compute Jacobian matrices out-of-the-box.
## The method tf.gradients(ys, xs) returnssum(dy/dx) for each x in xs, which in our case would be N-dimensional vector containing the sums of the Jacobian rows; not quite what we are looking for (see this issue). However, we can still compute our Jacobian matrix, by computing the gradients vectors for each yi, and grouping the output into a matrix:
def jacobian_tensorflow(x):
    jacobian_matrix = []
    for m in range(M):
        # We iterate over the M elements of the output vector
        grad_func = tf.gradients(model.output[:, m], model.input)
        gradients = sess.run(grad_func, feed_dict={model.input: x.reshape((1, x.size))})
        jacobian_matrix.append(gradients[0][0,:])

    return np.array(jacobian_matrix)

##Let's make sure the Jacobian we compute is actually correct by checking it using numerical differentiation. The function is_jacobian_correct() below takes in argument a function computing the Jacobian and the feedforward function f:
def is_jacobian_correct(jacobian_fn, ffpass_fn):
    # Check of the Jacobian using numerical differentiation

    x = np.random.random((N,))
    epsilon = 1e-5    # Check a few columns at random

    for idx in np.random.choice(N, 5, replace=False):
        x2 = x.copy()
        x2[idx] += epsilon
        num_jacobian = (ffpass_fn(x2) - ffpass_fn(x)) / epsilon
        computed_jacobian = jacobian_fn(x)

        if not all(abs(computed_jacobian[:, idx] - num_jacobian) < 1e-3):
            return False
    return True

def ffpass_tf(x):
    # The feedforward function of our neural net

    xr = x.reshape((1, x.size))
    return model.predict(xr)[0]

print(is_jacobian_correct(jacobian_tensorflow, ffpass_tf))
# >> True     ##Very good, it's correct.

# Let's see how long this computation takes:
x0 = np.random.random((N,))
tic = time.time()
jacobian_tf = jacobian_tensorflow(x0)   # , verbose=False
tac = time.time()
print('It took %.3f s. to compute the Jacobian matrix' % (tac-tic))

even faster could be with autograd, or even jax libs for numerical differentiation (res of article's tests):

where our Tensorflow implementation took about 650 ms, Autograd needs 3.7
ms, giving us a ~170x speed increase in this case. Of course, it's not
always convenient to specify one's model using Numpy, because
Tensorflow and Keras provide a lot of useful functions and training
facilities out-of-the-box…

still pure Numpy is even faster (115 µs) [as it is written in C/C++]


Using a reverse SSH tunnel without port forwarding

Question: I have already created a reverse SSH tunnel on Windows using FreeSSHd and am able to connect to it when inside the network. However, my ISP has blocked port forwarding and our internet is behind a NAT. It there any way to connect to my SSH tunnel outside the network without port forwarding. Thanks!
Answer: I will try to answer. I don't have rep to comment.
Your question makes no sense, and i'd have left a comment to say so.

I have already created a reverse SSH tunnel on Windows using FreeSSHd
  and am able to connect to it when inside the network.

That just makes no sense.
If you're inside a network that is behind NAT, then you can connect Out. You'd then create a reverse tunnel but the computer that connects to it is from some other network.
You talk of your ISP doing this/that.
If your ISP is just blocking some port then I guess they might block some incoming.  In which case you can run the ssh server on a port they don't block. I doubt the block outgoing but if they did then the other comp can run its server on an outgoing port that your ISP doesn't block.
If however your ISP is doing ISP level NAT, then AFAIK, you can't run a server.
But if the comp on the other network runs the server, and isn't behind ISP NAT then it's fine. You connect to him.
Answer: In order to do this you will need an SSH server outside your network to which you can create the tunnel, after which you can reverse-tunnel through that IP address.
Alternatively you could use a VPN system (again with the VPN breakout point on a world-reachable IP address).
Answer: There's a service called ngrok that allows tunnels to be set up allowing connections from outside on the internet.


How to manipulate the camera in Fortnite Creative and Battle Lab?

Question: So, I've seen the Fortography challenge results now and then and it's left me wondering exactly how these people take these pictures since I can't find any camera tools in Creative or Battle Lab. The closest thing I've managed thus far is placing my character close enough to an object that it forces the camera into first person, but that only works if there is a large enough object around and it returns to third person as soon as I move. There has to be some way since people are clearly doing it. So, my question is, how do you manipulate the camera in these modes to change the viewing angle or go into first person to get better pictures and video?
Answer: I would guess the best way to take a good picture would be to use the Replay mode

So go in a game, and place yourself how you want to be seen in your photo. Then complete that game (killing yourself is fine)
Then load the game in the Replay mode, and that should give you the possibility to enter freecam mode. Where you can put the camera whereever you want.
So that should give you the possibility to take any shot you want, without having to fuss around to figure how to get the shot in the middle of a game where you get shot.
Comment: Thank you for the reply and that seems like it would work, but there's one problem. The tutorial is for PC. I need to know how to do this on PS4, which I included in the question's tags. I don't have any idea what the guy is talking about when it comes to controls and buttons since they're completely different.
Comment: Usually, all controls should be on the HUD. It should be quite easy to figure out.


What is the right way to compress and decompress UTF-8 data using zlib?

Question: I have a very long JSON message that contains characters that go beyond the ASCII table. I convert it into a string as follows:
messStr = json.dumps(message,encoding='utf-8', ensure_ascii=False, sort_keys=True)

I need to store this string using a service that restricts its size to X bytes. I want to split the JSON string into pieces of length X and store them separately. I ran into some issues doing this (described here) so I want to compress the string slices to work around those issues. I tried to do this:
ss = mStr[start:fin]    # get piece of length X
ssc = zlib.compress(ss) # compress it

When I do that, I get the following error from zlib.compress:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 225: ordinal not in range(128)

What is the right way to compress a UTF-8 string and what is then the right way to decompress it?
Answer: A little addition to Martijn's response.
I read in an Enthought blog a nifty one liner statement that will spare you the need to import zlib in your own code.
Safely compressing a string (including your json dump) would look like that:
ssc = ss.encode('utf-8').encode('zlib_codec')

Decompressing back to utf-8 would be:
ss = ssc.decode('zlib_codec').decode('utf-8')

Hope this helps.
Comment: This is what worked for me, rather than the other answer. Thanks for the epic solution! +1
Comment: @nurettin this code worked on python2 at it was when the question was asked. From your error message, it seems like you are using python3.
Comment: I like this answer for avoiding the separate `zlib` import. I do suspect this penalizes code readability, as the direct use of the `zlib` module is front and center, whereas `zlib_codec` in the above is merely part of a chain. Thanks for the great answer!
Answer: Your JSON data is not UTF-8 encoded. The encoding parameter to the json.dumps() function instructs it how to interpret Python byte strings in message (e.g. the input), not how to encode the resulting output. It doesn't encode the output at all because you used ensure_ascii=False.
Encode the data before compression:
ssc = zlib.compress(ss.encode('utf8'))

When decompressing again, there is no need to decode from UTF-8; the json.loads() function assumes UTF-8 if the input is a bytestring.
Comment: Above only works in Python 3.x since zlib package (finally) takes byte-array as input note a string. In Python 2.7 this won't work because zlib.compress takes a string and uses ascii codec to turn the input into a byte-array - hence the OP's error message.
Comment: @Debriter yes, the problem in the question is unique to Python 2.


VAT on purchasing home abroad (Italy)

Question: I am a US permanent resident considering buying a property in Italy. This will entail a 10% VAT on the home value.
Can I declare this as a tax credit or as a tax deduction for my US taxes? (Please note, this is VAT applied at the time of purchase, so it is a one-off tax, not a property tax, more akin to a sale tax).
Comment: Not sure how italy is supposed t o be so special here, but this applies to germany and poland: THERE IS NOT VAT ON HOME PURCHASES. Normal homes are VAT excempt. What is not VAT excempt are associated costs (agent, notary etc.) but those are generally small compared to the home value. VAT is only extractable and applied for non-homes (i.e. business premises, storage etc.) but NOT long term accomodations.
Comment: @TomTom in Germany, while thee is not VAT on Homes/Poperty, there is "Grunderwerbssteuer" - that is a tax on property purchases that is dependent on the ferderal state where the property is located an is between 3.5% and 6.5%
Comment: Probably the Notary you will be signing the papework with knows those rules very well. Try to ask them
Answer: This is a large transaction and the very best advice I can give you is to pay an expert for an expert opinion.  Such as a tax lawyer with experience in tax implications of international property purchase.
My gut instinct is that VAT is not going to be a tax credit in the way that any income tax paid in Italy would be.  Assuming you are buying the house to occupy as your primary residence, look into the tax code on irs.gov website regarding other deductions related to home buying and ownership, e.g. mortgage interest tax deductions, etc., and try to determine whether the codes say anything about where the house is located.  If the only requirements are that you are a U.S. citizen and that you live in the house, well you may meet those requirements.
Again, due to the likely large amount of money involved, please do get professional help with this issue.  Spending a couple thousand now to set things up right will be worth it in the long run.  You might be able to get away with stealing from the mob, but the IRS always gets their money.
Comment: You can recoup VAT for items you take back to the US. I find it hard to take the house back with me :)
Comment: Primary residences should not occur VAT on the sales price to start with, only on certain secodary costs (notary etc.). At least this is how it is handed in any other EU country I know of.
Comment: Interest and property taxes are deductible, wherever the house might be. I could not find anything about VAt
Comment: I lived in Belgium, Italy, and Germany on US government sponsored visa in each location. An agreement between US Gov't and the host nation addressed VAT, amongst other topics.  I think we had the ability to recoup some VAT, but only on a limited set of items that we could purchase.  E.g. household appliances and electronics.  I never explored whether it covered buying a house.

VAT on purchasing home abroad (Italy)


Is there a way to disable the grid in orthographic view?

Question: I'd like to ask about grid lines in orthographic views. Can we somehow disable them from drawing? Right now I have to turn on "Render Only" which is not the best solution.
Answer: Open the side panel by pressing N and on Display controls just bring down the number of Lines to 0
Comment: To expand on this one, with aligned or un-aligned views you can set the scale to 0 and the grid disappears.
Comment: This doesn't work in aligned views (e.g. top, front, side, etc.), which for some reason is what I thought the OP was asking. But now that I look, it appears that aligned views were never mentioned.. :P
Comment: Looks like this is the most acceptable solution for now. Axis lines have not gone, but I satisfied :)
Thanks guys!
Answer: Open the properties region by pressing N. Then in the Display section uncheck the Grid Floor checkbox to turn off the display of the grid floor.

If you do not want to see the axis lines, untick the X and Y buttons as well.
Comment: @Shader From your comment, I gather that you are actually talking about hiding the grid lines for the alined views. My method *does* hide the gird floor, and in orthographic view.
Comment: It works like a charm in Perspective View, have even hotkey for this. Still the question is about an orthographic views
Answer: For anyone searching this feature in Blender 2.8 and onwards, its under viewport overlays:
Answer: I misread the question, thinking that the OP wanted to hide the grid visible in aligned views like Top, Side, Front, etc. If this is not the case, then David's answer is the optimal solution.

One hack you can do is change the 3D view grid color to match the background color, by copy/pasting the colors in ⎈ Ctrl⎇ AltU> User preferences > Themes:

Unfortunately it's not possible to get rid of the axis lines in the same way, as their color is controlled by a single global preference which affects the axis colors everywhere.
Comment: Yeah, I reached upon such a workaround. Looks like it's time to start IDE and tweak some blender code...
Thanks for that, man.
Comment: @gandalf3 I'd like it if it could work for gradient backgrounds...? An solutions...?
Answer: Check "Grid Floor" > set Scale to zero, the grid is removed.
Answer: Go to the desired view, then press 4 on the Numpad followed by 6.
This makes the view go into an ortographic view about 15 degrees to the left, then back.
Comment: Worth mentioning that this doesn't seem to work in top view, nor if you have *Auto Perspective* enabled in user preferences.
Answer: My hack is a bit basic but it was the only way in 2.76b that I could make it acceptable. Switch the grid floor back on first, then you can change the scale to 20 - trial and error to find a number that works for your model - and the subdivisions to 1:
This seemed to give me the easiest workaround in right, front, top and other aligned views. Note, the scale 20 worked on a small model but chances are good you may need to go up to 1000 to place the lines far enough part to be helpful.
Note, this hasn't gotten rid of all the grid lines in aligned views but spread them far enough part to get them mostly out of my way. It might help one of you here! Also switching grid back off makes no difference once you've done this, you just need it on to work the options.
Answer: The multiplicity of answers stems from loose use of terminology.  Perspective is not a view (point), its a view projection, as is orthographic (projection); however, for many engineering types of folks, saying 'ortho' generally means "orthogonal" i.e. having to do with right angles...which insinuates X, Y, Z (axes) most of the time.   So loose use of the terms "view" vs. "projection" has caused some confusion here....because clearly you can have some arbitrary camera view point in space, but that view can have an 'ortho' projection.  An aligned view in Blenderspeak generally means a camera view that that is aligned with one of the primary orthogonal axes (top, left, front, etc), but note that such a view can be exactly aligned with a primary axes, yet still have either a perspective or orthogonal view projection.  The inference of an 'aligned' view by most folks though, generally implies orthogonal projection, but not necessarily so.  You can have an 'aligned' view with a perspective projection.....technically.  If you look at the blender tip for perspective/ortho under the view menu...the tip does specifically use the term "projection" and not view.
One has to surmise that the original poster was referring to an 'camera aligned with orthogonal (insinuates X, Y, Z) axis view with orthogonal projection'
So all that being said, the correct answer (for blender 2.79 anyhow) is the one with the least votes, by Adam Krol, i.e. set the scale value of the grid to zero.  Do note that you cannot get rid of the primary axes lines in an "aligned view orthogonal projection" in 2.79.  In 2.8, you can get rid of everything in said view/projection by unchecking the 'grid' box...but in doing so, will lose your primary axes lines also.
Comment: Hello and welcome, Tom Kyler. This is obviously a well though out and explained post, but unfortunately it does not technically provide an answer to the original question, only validates the existing ones. It'd be a shame to take it down because of it since there is still valuable information here. If you could somehow rephrase it to address the original question, or provide a new answer (like say how to achieve this in 2.8) we'd be inclined to keep it. Could you do so and ping me so we can lift the flags please?
Comment: I believe the information to be relevant.  I myself followed the 'wrong'  (and most voted on) answer and it took me a 2nd read to understand why folks were voting the wrong answer up.  I had to "try them all" and see which one worked, which is not very efficient.   I won't rephrase it.  Its great info and in the right spot.   I came here to learn and just to read "do this...do that....try this and that"  is not very good I feel.  Fundamental learning of concepts and correct terminology usage is much more valuable.  Feel free to remove it, flag it,  it does not bother me.
Comment: Hi, Tom. You said: "...followed the 'wrong' (and most voted on) answer and it took me a 2nd read to understand why folks were voting the wrong answer up". I beleive you ment answer by cegaton. It IS correct and coincides with your proposal - set scale to zero (watch 2nd gif).


Perfective of "путешествовать"

Question: Neither of my dictionaries gives a perfective for this imperfective.
Is there an appropriate perfective form of this verb, or should I buy better dictionaries?
Comment: Many thanks to you all for responding. I never expected this level of detail and consideration to my daft question.
Comment: if you think one of the posts answers your question, please mark it as accepted answer. Thank you!
Answer: The choice of one aspect over another for verbs belonging to the same root doesn't signal a grammatical change exclusively, but also a semantic one.
Many verbs (but definitely not all of them, and perhaps even not most) do have a sort of default perfective, usually formed with the prefix по-.
If you take the blandest, most simplistic, neutral phrase consisting of a subject and an imperfective predicate in the present tense, in many cases you'll be able to put it into the future tense by replacing the verb with its "default" perfective: я сплю / я посплю, я ем / я поем, я работаю / я поработаю, and most speakers will still perceive it as the same phrase, just with the tense changed.
However, in many other cases, that doesn't quite work. You can say я пишу / я попишу, я хожу / я похожу, я делаю / я поделаю, and those would be valid phrases, but fewer people would feel that it's the same phrase with just the tense changed. Я напишу / я схожу / я сделаю would be more plausible outcomes for "just put this into the future tense". These too are valid perfective verbs, but they have different meanings.
To answer your question: the verb попутешествую is a thing, and it's mentioned in Russian Wiktionary as the "corresponding perfective form" of путешествовать. But there are also many others, and the very semantics of this verb makes it hard to choose the most appropriate candidate for the "default" perfective form.
In Russian, unlike English, "travel", путешествовать is more about the process, so you wouldn't translate something like "I'm going to travel to Rome for a conference" using this verb. It's more like "to be travelling", or "be a traveler", or even "live a nomadic life", if you will. Perfective verbs require a change in state. So what is the "default" change in state for being a traveler? Start the nomadic life (запутешествую)? Have travelled enough to cross it off your bucket list (попутешествую)? Stop being fit for nomadic life (отпутешествую)? There's no uniform answer to that. That's probably why your dictionaries don't cite one single corresponding perfective.
Comment: What an epic answer!!
Comment: @CocoPop: thanks! I'm having trouble parsing "aspect play between like verbs", and I fear I'm not the only one. Is there a way to dumb it down a little bit?
Comment: PLAY is merely another way of expressing the possibility of toggling between two or more options where there's room for several; and LIKE VERBS are verbs belonging to the same root. It reads so beautifully, but if you want to dumb it down, you can say: The choice of one aspect over another for verbs belonging to the same root...
Answer: The perfective form is попутешествовать. But this perfective form does not reflect the classical aspect ratio: prolonged action - result of action. It's this ratio that's considered exemplary and is usually cited in dictionaries. Verbs with a different ratio (and there are many such verbs) are usually cited in dictionaries without a corresponding pair.
Путешествовать belongs to a class of verbs denoting "a social state not tied to a period of time": руководить, управлять, царствовать, воровать, изучать, учительствовать, торговать, вдовствовать, питаться... In these verbs, the рerfective is most often formed with по- (=to do an action for some time); other prefixes change the semantics of the verb.
Answer: If you want to talk about a past trip, these phrases might come in handy:

"I've travelled to Europe" - "Я побывал в Европе" or "Я съездил в Европу"
"I travelled to Europe three times" - "Я бывал/был в Европе три раза" or "Я ездил в Европу три раза"
"During my last trip to Europe..." - "Во время моей последней поездки в Европу..."

Perfective of "путешествовать"


Hardness ratio of gamma-ray busrts

Question: As we know there are two types of GRB (gamma-ray bursts) classes based on their time duration (t90). The presence of bimodality in histograms also verifies it. Also, I have read many papers in which they classified the two classes, using hardness ratio vs. t90/t50 plane. I just want to ask simply: "what is hardness ratio and how can someone calculate the values of the hardness ratio?"  Please reply if you have a partial answer as well.
Comment: Welcome to SE. The points of this site is to gather questions and their answers. So suggesting that answers could bypass the site with emails is really not what Stack Exchange is about...
Answer: "Hardness ratio" is the ratio of the photon counts in two different photon energy bands. It lacks a precise definition. It is dependent on instrumental characteristics and data reduction procedures. It is meaningful for data taken with a particular instrument and reduced in a consistent way.

Hardness ratio of gamma-ray busrts


If a super powerful smelling device existed and could detect marijuana from miles away, would it be illegal for police to use it for that purpose?

Question: If a device that was capable of smelling marijuana from miles away existed and was very accurate (could identify houses where the smell was coming from), would police legally be able to use it for the detection of marijuana in a neighborhood?
Comment: In what country? In what State (if US)?
Comment: I didn't realize it would vary by state. I am mostly interested in the US, although various countries are interesting nonetheless (it's cool to know). I suppose what are a couple examples? I would say non-marijuana states as it makes more sense that way.
Comment: I don't see why they *wouldn't* be able to legally use that against you. They can use drug-sniffing dogs on vehicles without a search warrant (but they need to get one to enter your property, and the dog/device gives "reasonable suspicion").
Comment: While the 4th Amendment principles don't vary by state, the application would vary greatly by state and over time. For example, hemp production is now legal nationally in the U.S. and indistinguishable in smell from marijuana, so a distant marijuana smell would not provide probable cause that a crime was committed. One or two cases at least have been decided on that basis. There is also a fair amount of law as to what tech counts as a warrant requiring search. A supersniffer probably would.
Answer: The relevant case is Kyllo v. US, 533 U.S. 27, where heat emanating from inside the house was detected remotely (without entering the house). The primary question is whether in that case a "search" has occurred. Relying on Katz v. US, 389 U. S. 347 (where sound wave were picked up from outside a telephone booth), there is no search unless the individual manifests a subjective expectation of privacy in the searched object, and society is willing to recognize that expectation as reasonable. "Obtaining by sense-enhancing technology any information regarding the home's interior that could not otherwise have been obtained without physical 'intrusion into a constitutionally protected area' constitutes a search – at least where (as here) the technology in question is not in general public use". In other words, a "search" is not defined in terms of entry into a structure, it is defined in terms of a socially-recognized reasonable expectation of privacy. Accordingly, this magic device conducts searches, which means that a warrant is required.
Comment: I just found Kyllo has a website with some relevant and interesting links.


How to reset split screen to default in Notepad++

Question: Using the compare plugin in Notepad++ splits the screen between the two files being compared. Is there a fast way to revert the screen to have all of the tabs again in a single window, as is the default view upon opening the application?
Comment: TLDR Its Ctrl + Alt + C for notepadd v7.6.3
Answer: Right click on the tab and the choose "Move to Other View"
This works for me on npp v6.6.9
Comment: I had to do this twice.  The first time stopped comparing.  The second time went back to the default view.
Answer: I believe this would be Ctrl + Alt + d.
To get to the split script use Alt + d.
See under Plugins -> Compare.
Comment: That command successfully closes the comparison nav bar, but the split screen divider persists.
Comment: I had an older version of notepad++ when I asked this question. Now that I upgraded, the command you described works perfectly! Thanks again.
Comment: This no longer works in NP++ v6.9. The two solutions below (dragging or right-clicking) do however.
Comment: @ChrisMueller - it does. You need the comparison plugin.
Answer: You can drag all the files from one side to the other side. This will close the window that was left empty.
Comment: For me this is the best answer as I now understand the reasoning behind it. I had several files opened in the split screen. So compare->clear results didn't solve the issue.
Answer: Ctrl + Alt + D will clear the comparison results.
If the split screen remains after clearing the comparison results, this is likely due to still having files open within each of the two split-screened-windows.
To resolve this, close the open files or move them from one of the two split screen windows to the other. Moving them can be done via drag and drop or by right-clicking on the file's tab and choosing 'move to other window". When the last file is moved or closed the split screen will disappear.
Answer: You used Ctrl + Alt + Shift + x and it does not help? Then try this if you use the Document List Panel (Settings > Preferences > General > Document List Panel > [x] Show) instead of the Tab bar (Settings > Preferences > General > Tab bar > [x] Hide), you should move all the files on the side with less files to the other view.

Find out which side has less files open by opening the Window menu once on both sides.

To move a file from one view to the other use View > Move/Clone Current Document > Move to other view or Alt + v m Enter

Still in split view? Switch focus back to the other side using F8 and go to step 2.

Once all files on one side have been moved, the split view will disappear automatically.
PS. I know the question was about "tabs". However I regard the Document List as a better variant of "tabs".
Answer: Under the plugins>Compare>Clear Results is where you will find a clickable menu option to do it aprt from the keyboard shortcut.
Answer: For "Clear Active Compare" - ctrl + Alt + X
For "Clear All Compares" - ctrl + Alt + Shift + X
Answer: If you have disabled the Tab bar (Settings | Preferences | General | Tab bar | [x] Hide) and use Document List / Switcher (Settings | Preferences | General | Document List Panel | [x] Show), what you need to do is to first close all the documents open in the clone/split view. Once all files open in that have been closed, the split view will also close automatically.
Now, unfortunately there is no way(?) to tell what you have open in the split view and the main view. You'll just have to click on the right side split, and keep pressing Ctrl + W until the split view goes away. I guess you could also enable Tab bar for this occasion.
Answer: Plugins--> Compare--> Clear Results
Comment: Welcome to Stack Overflow where answering questions is appreciated. However, repeating an existing answer is not very helpful, it just adds clutter to this site. Please look for other questions and, if you can, provide new answers.