Why are there BMX off road races

Question: I was always curious about this, but I never found the answer. Originally I only knew freestyle BMX bikes, but then found there are official races offroad. What is the idea behind this? Sounds like racing giro d'italia on downhill MTB.
Comment: How hard did you look?   That is the origin of BMX.
Comment: Why do a lot of unintuitive sports exist? Because enough people thought it was a fun/good idea.
Answer: BMX was originally (and still is) run on smooth dirt track that have obstacles such as jumps and whoops (also know as the rhythm sections).   Because the tracks are smooth a small fully rigid bike works amazingly well when ridden appropriately. The BMX bike and track evolved together emphasizing a riding style that is about timing and body position. All of this took off in around the mid-70's just as Mountain biking was in its infancy with the Repack rides.  The end result is that BMX bikes are really the optimal form factor for BMX tracks.
For example, whoops are a series of smooth small mounds that are typically part of a track's rhythm section.  By  pulling back and up on the bike as you approach the crest and pushing down on the downside you can actually gain speed through this section without pedalling.  If you can continue pedalling while doing so you can gain even more speed.  Some advanced riders may even jump some or all  the whoops, others may manual or wheely through.   The commonality, is controlling your center of gravity so that you body position changes as little as possible while moving the bike over the terrain.
Similarly jumps have smooth lead ups and transitions.  Learning body position, timing and  pumping are some of the techniques used to ensure you land smoothly on the transitions on the backside of each jump.  Good riders will look like they never stop pedalling from when they leave to when they land on the transition.  Advanced riders also do some other pretty impressive things such as rear wheel dabs mid-flight to help control their flight paths and where they will land.
Speed and smoothness is the goal in BMX dirt track racing.  Because the tracks are so controlled, once the various skills are learnt a small rigid bike like a BMX bike is literally the fastest way around the track.
Starting in the 90's many BMX clubs started introducing MTB bike categories to encourage cross-overs. Having ridden both on the tracks, the smaller BMX bikes are faster. Things such as suspension are not needed.  The tracks are smooth and jumps are landed on the transitions (hopefully!).  Suspension just ends up just adding  weight, and can interfere with techniques such as pumping the bike.
Comment: Suspension does more than add weight, it absorbs kinetic energy.
Comment: @ChrisH - agreed, that is why I said suspension can interfere with techniques such as pumping the bike.
Answer: More than existing, BMX off road racing is actually an Olympic sport.
According to Olympic site on this sport:

Bicycle motocross (BMX) started in the late 1960s in California, around the time that motocross became a popular sport in the USA. The motorised version of the sport was the inspiration for the human-powered competition.

And had an international federation created in 1981:

In April 1981, the International BMX Federation was founded. BMX rapidly developed a unique sporting identity and it became evident that the sport had more in common with cycling than motorcycling. This was officially recognised in 1993 when BMX was fully integrated into the International Cycling Union (UCI). The sport made its Olympic debut at the 2008 Beijing Games.
Comment: It is hard to answer, but according to Wikipedia it began when "young cyclists appropriated motocross tracks for fun, racing and stunts, eventually evolving specialized BMX bikes and competitions". So I guess they had BMX's already and just took them to motocross tracks, as you say, for the lols :) Never underestimate the lolz, think that they created a lot of sports, mainly the most extreme ones :)
Comment: But why would a BMX be used for this, instead of a hardtail/ full suspension ? Does the BMX frame provide something that a standard MTB doesn't ? Or is it just for the lolz ? :P
Comment: Partially the same reason they use cyclocross frames for cyclocross races.  That's the way it's always been in that sport.  BMX has been around longer than suspension in any usable race form.
Comment: The key you're missing, is that BMX bikes were originally for BMX racing. The tricks didn't come until much later.
Comment: @Giannis  - The BMX (dirt track) form factor was around long before mountain biking and suspension.  By the time MTB came around BMX bikes and categories (i.e., wheel size) were highly standardized.  Tracks were also highly tailored to the BMX bikes by this point too.  Starting in the 90's many BMX clubs even introduced MTB bike categories to encourage cross-overs.  That said, on a BMX dirt track a BMX bike is faster.  Smaller BMX bikes are easier to manual and pump the whoops. Suspension is not needed either as the tracks are smooth and jumps are landed on the transitions (hopefully!).
Comment: Don't forget that general public adherence and sport marketing also play a big part, and that is why old modalities disappear and new ones surface. It's not only a question of: this is the best vehicle for this type of track.

Why are there BMX off road races


If the status date does not change while an article is under review, does it mean things aren't moving along?

Question: Initially, it took a very long time for the editor to finally screen the article and invite reviewers. My concern is that some reviewers will decline to review, and the editor will not invite new ones quickly at all...it seems like they check in the system very infrequently (once every month or two). If the status date is not changing while under review, could it be that reviewers haven't accepted? This is the Elsevier system.
Comment: How long is a "very long time"? It is not unusual to take a month or two before you get through the desk, depending on discipline and journal.
Comment: Elsevier's system varies between journals. Also, they have 2 different platforms for journal management, depending upon the journal.
Comment: Actually the main cause of delays isn't reviewers *declining*; it's reviewers ghosting editors and not giving an answer, even after two-three weeks and multiple reminders.
Answer: Like for so many other questions about the status of submissions on this forum (search!), there is just no way for you to know. It may be that the editor has found the requisite number of reviewers but reviewers are taking their sweet time to get their assessments written; or that the editor is sitting on their hands and not doing much; or or or. You just can't know, and it's a waste of your time and energy to wonder about it.
Relax, move that paper to some archive storage place in your brain and be productive on something else until the paper comes back for something you actively need to do.
Answer: The answer to the title question is "no". Many editorial management systems will not change the status date unless the status itself changes. If reviewers decline to review and the editor invites new reviewers, the status stays as "under review", and the status date stays at the date at which the first reviewers were invited.

My concern is that some reviewers will decline to review, and the editor will not invite new ones quickly at all.

Even if this is the case, you can't do anything about it. There's nothing to do except wait.


Difference between Activity diagram and normal flow specified in Use case specification table

Question: I'm studying use case and activity diagrams and I get confused about the difference between activity diagram and the normal flow specified in the use case specification table, aren't both of them specify the flow of our system ?
Comment: Please post text as text rather than images - images are neither accessible nor searchable.
Answer: UML does not have strict rules for writing a use case description, and it does not have strict rules for creating activity diagrams. It is up to the analyst or architect to pick a useful level of abstraction and to make a decision about when to draw a diagram and when not. If in your working context (or learning context?) someone gave you the task to create this kind of use case spec table, the "flow of events" could be a candidate for the basis of an activity diagram, which might lead to some overlap, that should be quite obvious.
Whether you actually need to model this flow of event as an activity diagram when you already have a verbal description, or whether you think the verbal description is sufficient, depends mainly on what you choose to put in them. And for choosing, you should ultimately take into account which audience you are adressing with these models.


It shouldn't take a fool to see that I believe. Meaning

Question: "It shouldn't take a fool to see that I believe".  Trying to understand this phrase from  Iron Maiden's song. I can't catch the meaning of it. It shouldn't be "No need to be fool to see that I believe" or should it?
Comment: Maybe : "Even a fool sees that I believe"?
Comment: Remember that song lyrics are often written to better fit the rhythm of a song than to be grammatically precise. However, in this case, I think the original is better written than your alternative, even from a purely grammatical perspective.
Comment: I still don't understand the meaning of it, completely don't
Comment: Usually one would say something like "It doesn't take a rocket scientist to understand X" implying that one does not need the genius that rocket scientists supposedly possess to understand X.  One would expect fools to misunderstand X, so why would you take a fool for this task?  But it is a song lyric so....
Answer:
It shouldn't take a ladder to see over the hedge.

take = require.
The hedge is not so tall that a ladder would be required  in order to see over it.
The relationship of ladder here to hedge is clear. A hedge can have height. Ladders allow us to climb to a height.
However, in your quoted lyric, we can only guess at the relationship between fool and believing, and it doesn't take a genius to see that guessing would be off-topic for this site.


Wordpress API response filter by ACF value

Question: I'm building a site with wordpress API. I'm using Advanced Custom Fields, and also ACF to Rest API plugin to expose ACF data in API: https://github.com/airesvsg/acf-to-rest-api
Now I'm trying to filter the response by ACF values. I was able to find this piece of code that helps with that:
add_filter( 'rest_product_query', function( $args ) {

    $ignore = array('per_page', 'search', 'order', 'orderby', 'slug');

    foreach ( $_GET as $key => $value ) {
      if (!in_array($key, $ignore)) {
        $args['meta_query'][] = array(
          'key'   => $key,
          'value' => $value,
        );
      }
    }

    return $args;
  });

Now I'm able to filter queries like so: https://example.com/wp-json/wp/v2/product?length=Customizable
The problem with this is that, now I'm not able to access api pages like https://example.com/wp-json/wp/v2/product?page=2, which I need to be able to do.
Any way to refactor this to still be able to use default wordpress API filters/search behavior?
Or, any alternative better way to do the same thing?
Answer: OK, I realized I should just add every default WP key it to the $ignore array, like this, I added 'page':
$ignore = array('page', 'per_page', 'search', 'order', 'orderby', 'slug');


Can somebody please explain where these numbers in survival analysis Life Tables come from?

Question:
Specifically, the Cumulative Proportion Surviving at the Time. I've tried reading elsewhere but can't seem to wrap my head around it.
Answer: That's just the standard Kaplan-Meier survival estimate, perhaps a bit disguised with the way the data are presented. It's the fraction of the original group that is estimated to survive longer than the indicated time, with censoring taken into account.
The trick with this type of data format is to consider the number of cases still at risk just before each event time. Just before time = 2 there were 78 at risk, of whom 2 had events at time = 2. A fraction of 0.02564 (2/78) of those at risk had the event then. No one had the event previously, so a fraction of (1-0.02564) = 0.97436 survived past time = 2.
Just before time = 3 there were 72 still at risk. Of those, 1 had the event at time = 3, or a fraction 0.01389 of those still at risk then. A fraction (1-0.01389) = 0.98611 of those at risk just before time = 3 survived past that time. As a fraction 0.97436 of the original group was estimated to have survived past time = 2 up to just before time = 3,  0.97436 * 0.98611 = 0.96083 is the estimated fraction of the original group surviving past time = 3.
I suspect that the corresponding standard error estimates are based on Greenwood's formula but I haven't checked directly.


What principle of quantum mechanics tells us that harmonic fluctuations of a field act like localized particles?

Question: "Quasiparticles" are ubiquitous in condensed matter physics, e.g. magnons and phonons, and more generally all particles in quantum field theory are considered the elementary harmonic excitations ("vibrations") of the quantum fields. The classical analogues of these concepts are plane-wave excitations which are manifestly non-local (again, thinking of magnons and phonons as examples). Although localized instanton solutions do exist in classical gauge theories for example, they are not considered to be the classical analogues of particles in QFT's. So in what way can we see that the low-energy modes of a quantum field should be particle-like? Of course we always have particle-wave duality (which to me still feels like a phenomenological property rather than something we "see" at the level of field theory, say), but classically there are only waves, and there are no particles. Why can the harmonic (i.e. low-energy, quadratic) quantum fluctuations of fields be thought of as particles localized in space? What is the "extra ingredient" that quantum theory adds to the classical picture that "localizes" excitations?
Comment: The "shape" of point particles (and what it means to say that a particle is "point-like") is discussed in https://physics.stackexchange.com/q/119732/50583, https://physics.stackexchange.com/q/277565/50583 and their linked questions. "Point-like" is an independent notion from "localized"!
Comment: 1. It is not clear to me why you compare a localized particle with a classical plane wave, and not with a classical Gaußian wave packet, which is similarly localized. 2. Related/possible duplicate: https://physics.stackexchange.com/q/127141/50583, https://physics.stackexchange.com/q/163691/50583
Comment: @ACuriousMind okay but I don't think that when most people say "an electron/quark is a point-particle" they mean it's a gaussian wavepacket, am I incorrect? I suppose part of the problem here is jargon, which is in a way why I'm asking this question for clarification.
Comment: @ACuriousMind thanks for your help, I missed the second link in your original comment, I think that it answers my question well enough for now, so this can probably be closed as a duplicate
Answer: There is a collection of concepts here that do not necessarily have anything to do with each other. Quasi-particles in condense matter physics and particles in quantum field theory are different things. The different quasi-particles are caused by the diverse dynamics that one finds in condense matter scenarios. They usually have a finite size and are seldom point-like.
On the other hand, the fundamental particles in quantum field theory are believed to be point-like. However, one needs to distinguish between the concept of a point-like particle and the elementary excitations of a quantum field. These two thing are not necessarily the same thing. Often when people refer to a single-particle state, they are referring to its wave function, which would in general not be point-like or localized in any way. The point-like particle nature is not given by any localization of such a single excitation. In fact, we cannot say anything about the point-like existence of particles unless we perform measurements. As a result, we can argue that it may be the measurement process itself that causes the point-like nature. It is the interaction of the field with measurement apparatus that exchanges a quantum of the field al a Planck's relation at a given localized point that gives this point-like observation of the particle. On the other hand, the natural evolution of quantum field without measurements is better described by the evolution of a wave function as given by the equations of motion and has nothing to do with point-like particles.
Answer: In homogeneous system the eigenstates of the Hamiltonian are typically plane waves and therefore not localized nor point-like. However, we can construct localized quasiparticle excitations out of them when the Hamiltonian is simple enough. One can simply form new eigenstates out of these plane waves by taking a linear superposition. When this is the case, one can form "wave packets" (typically a Gaussian superposition) which are localized and have a finite size. When is the Hamiltonian simple enough? At least in the cases where it contains no interactions: this is when the superposition principle holds and the wave packet can be easily constructed. Another way to phrase this is to say that the equations of motion are linear, as opposed to non-linear. In the non-linear case (i.e. when Hamiltonian has interactions) the different components of the wave packet will influence each other and scatter off from each other, creating a mess.


Creating shapefile from a table based on "county name" field, while there are multiple counties

Question: I have ArcGIS 10.1. I am trying to make a shapefile out of an excel sheet that has county level data. I can't join this data based on the 'county' field to a county shapefile because I have multiple records in the same county (same county is repeated with a different information in other fields) . I tried the Join One to Many but you perform this tool on an excel sheet. Any suggestion?
Comment: County name isn't a particularly good join column, since many states have the same county names.  FIPS code (5 digit identifier) is a much better join column
Comment: If it truly has multiple records, it might be better as a relate than a join but you said "same county is repeated with different information in other fields". If the information is in other fields, of course, that is not a problem.
Comment: Thanks for your responses. I need the table that I have to be converted to shapefile. The table contains point data. The only spatial information that I have is the 'County Name'. and in one county, there are multiple points.
Comment: I'd suggest importing the Excel sheet to a csv or dbf first. Sometimes Excel sheets have quirky, unseen things that can interfere with joins.
Comment: What @Vince said, unless this is just a learning exercise, joining based on just county names will lead to error due to duplicated county names in different states, does the excel data have additional information on state name or code, if so it is best to use it along with the county names.
Comment: @yanes asI mentioned in my previous comment, the only spatial column is the 'County', and I am working in only 1 state.
Comment: Can you post your spreadsheet? I wonder if it's the way the spreadsheet is organized? Also, you can use an attribute query to restrict the tabular data to just 1 state, then join.
Answer: If you do not mind multiple counties that relate to the different duplicated information you have for each county in your excel data...

Convert your data in excel into a csv file (excel sheets can now be directly imported to ArcGIS but CSV has less issues).
Import your csv table into ArcGIS and Join it to your county shape file data. Make the county shape file a target and the table the join. To avoid confusion during the join, check the box (Keep only joined records) that retains only joined counties.
While the table is still joined with the shape file right click on the layer and export it in to a new shape. This is important as it is after you export it into another shape file you can obtain your 1:many joined shapefile.

Check the number of features in your newly exported file and see if it matches the records in your table. Remove the join on your original county shapefile.
Comment: The problem is that I have multiple data within the same county (I have mentioned this in my original question). After join, I will only get 1 record for 1 county... which means I am loosing all other data that is in the same county. Sorry if I caused any confusion. Thanks.
Comment: no you will get all the joins, once you did step 3 above. Just after the join that is after step 2, all you see is the join without the duplicates. I do not know why ArcGIS doesn't show the one to many join in the native shapefile where the table is joined. But as soon as you export the joined shapefile, it will give you the multiple records. I've done it multiple times, unless it is a version difference it should work. let me know.
Comment: It might be version problem that I am not getting all my 8800 records from my table in the state's shapefile. I just get one polygon per each record after I export my shapefile (total of 250 counties). Thanks anyways.
Comment: did you export it after joining the shape with the table, while it is joined? what version do you have? mine is 10.0. right after the join you will see 250 counties or less (if you used keep only matching option). Then when you export it you will get the full 8800 (or the ones that actually matched, as there might be a spelling difference, matching strings can be tricky). The export should happen from the geometry (right clicking the layer) not from the table of the joined shape. I've just done it now, just to make sure on a sample table and it worked. Also  it doesn't work from model builder.
Answer: If you want multiple records created for each county, and therefore multiple county points, you can do this by:

Creating a geodatabase
Import your excel table into the GDB as a table
Import your county data as a feature class
Join the table data to the county data
Export as a featureclass into the GDB

This should create multiple points for each county with the excel data.
Try the following script:
<code>import os
import arcpy

folder = r"/path/to/folder"
result = arcpy.CreateFileGDB_management(folder, "my_gdb")
gdb = result.getOutput(0)
arcpy.env.workspace = gdb

excelfile = r"path/to/excel/file"

sheet = "sheet_name"
table = arcpy.ExcelToTable_conversion(excelfile, "exceltable", sheet)

counties_shapefile = r"path/to/shapefile"
fc = arcpy.FeatureClassToFeatureClass_conversion(counties_shapefile, gdb, "counties")

temp_fl = arcpy.MakeFeatureLayer_management(fc, "temp_fl", "", "in_memory")
arcpy.env.qualifiedFieldNames = False

arcpy.AddJoin_management(temp_fl, "COMMON_FIELD", table, "COMMON_FIELD", "KEEP_COMMON")
arcpy.env.qualifiedFieldNames = False

arcpy.CopyFeatures_management(temp_fl, "counties_table_data")
</code>


Android Browser will refresh when going back into the web broswer

Question: I have a website that is designed to run on a mobile phone.  We are seeing an issue with Android based handsets.  My application is wizard driven a user will log in to the site and start filling out our wizard driven form.  Towards the end of our form we require the user to use his handset to take a picture and upload it.  The issue we are having is that when users return to the browser at time it will automatically refresh the web page. By design we return the user to the main main if it is a new request.  Is it possible to stop this behavior we would simply like the user to return to the browser after taking a picture ortaking a phone / call or text.  We don't need the browser to refresh the user has already entered data.  We would prefer the user to manually refresh if they need to or just hit the next button in our application.  Thanks !
Answer: I think you have to use a cookie to bring them back to the previous session.
The problem in android is that an app can be killed at any time (including the browser), depending on the resource requirements of the phone.  This also depends on how the user operates their phone.
You cannot assume that the browser can be kept open, you must engineer your solution accordingly.


Longitudinal/Lateral CG envelope for hoist operations

Question: Does a Rotorcraft hoisting CG chart show what the CG will be as the load is hoisted from top to bottom or vice versa?
Comment: Can you give an example of a "Rotorcraft hoisting CG chart", or a link to one? Is this just a hypothetical thing that you are imaging might exist, or something that you've actually seen?  (See last para of my answer as to why such a thing might exist.)
Answer: Presuming that the winch is in a fixed location, (not on a track that allows it to move fore and aft or sideways) the longitudinal and lateral center of gravity of the helicopter would not change as the load is raised or lowered.
Answer: The dynamics of an aircraft with something dangling from a single long line have little in common with an aircraft with the same object attached below the aircraft by a completely rigid (long) rod or pylon.
So we won't find any chart that treats raising or lowering an object with a hoist, as being equivalent to a vertical shift in a helicopter's CG.
Incidentally, that's why hang gliders, where the pilot suspension system can be modeled as a single flexible line, at least when the pilot is not using his or her muscles to make a control input, don't have the same hands-free pitch and roll stability as do paragliders, where the multiple suspension lines keep the pilot essentially rigidly fixed in position relative to (and well below) the rest of the aircraft.
In the hang glider case, when the pilot exerts no muscle force with his arms, or releases the control bar completely, he is free to swing fore and aft and side to side and so his weight acts as if it is located at the point where the flexible tether (called a "hang strap") connects to the rigid structure of the glider.  Not as if he is rigidly fixed in position below the glider.
The same will be true during helicopter hoisting operations, at least as long as the hoisting rate is constant, and assuming that the object is not "penduluming" or swinging wildly, which can change the object's apparent weight due to centrifugal loading.  If the object is simply dangling at the end of a line which is fixed or being raised at lowered at a constant rate, for stability purposes the object can be viewed as being located at the upper end of the hoisting line, i.e. at the point where the hoist line meets the pulley of the winch.
For a given hoist location, one might well imagine that only a certain part of the total allowable helicopter CG envelope might actually be compatible with hoisting operations, and that this might vary according to the weight of the object being hoisted.  Is this perhaps what you've seen a chart relating to?  If so, the length of the hoist line would not matter, so nothing changes as the object is raised or lowered, due to the dynamics explained above.


Is it necessary that hydrolysis of ester will only take place in excess of water?

Question: I was given a question on chemical kinetics in which the statement was given-
"The Concentration of water in hydrolysis of ester does not change to much extent"
I marked the statement to be false because I thought that the hydrolysis need not take place in excess water, there might be a condition where I could take 1 mole water and 1 mole of ester and still carry on the reaction.
Although it might be that the hydrolysis may not go in forward direction to much extent in such a case, but still reaction would take place.
Comment: Water excess helps in equilibrium shifting.
Answer: No, it is not necessary to have excess water for reaction to occur. Yet usually what books and sources mean by hydrolysis means that water as a solvent reacts with the compound. As you may know without large excess of water you wouldn't be able to go very far with the reaction (Low Yield due to equilibrium).
This is a reason why ester hydrolysis is also a pseudo first order reaction due to large excess of water which does not change effectively as reaction proceeds. Just know that hydrolysis requires excess of water. That is what is meant by hydrolysis. As for your question in the book, it is useless to spend time on such questions demanding plain answers without reasoning.


open problems in Seiberg-Witten Theory on 4-Manifolds

Question: What are some of the open problems in Seiberg-Witten Theory on 4-Manifolds.I tried googling but couldn't any. I tried googling it, but couldn't find any resources.The places where I can a survey or review of them would be welcome.
Comment: Since you are interested in Ncg, I want to make the remark that a former fellow PhD student of mine - Vadim Alekseev - has studied a non-commutative generalization of Seiberg-Witten invariants, i.e., defined in the context of spectral triples. Here is the link to his PhD thesis: http://webdoc.sub.gwdg.de/diss/2011/alekseev/
Answer: One basic structural problem about the SW invariants is the question of simple type: suppose that $X$ is a simply connected 4-manifold with $b^+>1$, and $\mathfrak{s}$ a $\mathrm{Spin}^c$-structure such that $SW_X(\mathfrak{s})\neq 0$. Must $\mathfrak{s}$ arise from an almost complex structure? This is true when $X$ is symplectic (Taubes in  "$SW\Rightarrow Gr$") but open in general.
The 11/8-conjecture (that for a closed Spin 4-manifold $X$ of signature $\sigma$, one has $b_2(X)\geq 11|\sigma|/8$) is open. SW theory has yielded strong results in this direction (Furuta's 10/8 theorem); proving the conjecture via SW theory is very hard but might be possible.
Essentially all of the fundamental questions about the classification of smooth 4-manifolds, or about the existence and uniqueness of symplectic structures on them, are open.  We do not know how much Seiberg-Witten theory sees. For instance:
Suppose $X$ is a closed 4-manifold with an almost complex structure $J$. Let $w\in H^2(X;\mathbb{R})$ be a class with $w^2>0$. Is there a symplectic form $\omega$ with compatible almost complex structure homotopic to $J$ and symplectic class $w$? The "Taubes constraints" are the following necessary conditions, which constrain the SW invariants in terms of $w$ and $c=c_1(TX,J)$ (see e.g. Donaldson's survey on the SW equations): (i) $SW(\mathfrak{s}_{can})=\pm 1$ (the sign can be made precise) where $\mathfrak{s}_{can}$ is the $\mathrm{Spin}^c$-structure arising from $J$; (ii) $-c\cdot w\geq 0$; and (iii) if $SW(\mathfrak{s})\neq 0$ then $|c_1(\mathfrak{s})\cdot [\omega]| \leq -c \cdot [\omega]$, with equality iff $\mathfrak{s}$ is isomorphic to $\mathfrak{s}_{can}$ or its conjugate. The question is: if $X$ is simply connected, are these sufficient conditions? (Example: Fintushel-Stern knot surgery on an elliptically fibered K3 surface along a knot with monic Alexander polynomial.)
Comment: I omitted to say that the Taubes constraints apply when $b^+>1$, and the question I mentioned at the end concerns that case.
Answer: One basic problem is determining the relationship between Seiberg-Witten invariants and Donaldson invariants of $4$-manifolds. Witten himself proposed the precise relationship between the two in the original paper Monopoles and 4-Manifolds, but as far as I know the relationship has not been proven in general. Witten's conjecture has been proven in many cases, however. See the answer to this question for a good overview of the current status of this problem.
Comment: it's just amazing to see the witten's works.thanks for the link.
Answer: It might be useful to generalize a theorem of Donaldson and Sullivan, that the Donaldson invariants are defined for quasi-conformal 4-manifolds, to the category of Seiberg-Witten invariants. More generally, one would like to know which smooth invariants of 4-manifolds are defined for quasi-conformal 4-manifolds.


What are the security implications of disabling SELinux?

Question: Is there any attack that would be possible just by disabling SELinux? Particularly on a server running http and ssh services?
Comment: This is very broad - is there something specific you are concerned about?
Comment: @schroeder no. just some examples of how this could be exploited
Comment: You left a weak PHP contact form on your site. An attacker wants to use it to send spam. SELinux is stopping it with the [httpd_can_sendmail = false](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/sect-Managing_Confined_Services-The_Apache_HTTP_Server-Booleans.html) boolean. You disable SELinux. Your server becomes a spam source. (That's assuming your question isn't the slightly tautological *"Assuming my server starts by being secure without SELinux, would it be secure without SELinux?"*)
Answer: SELinux is largely about confining processes to specified resources and not allowing them to access other resources.
SELinux knows what Apache is, what files it should be able to access, what ports it should be able to bind to, etc. If someone exploits a vulnerability in your website and trys to read or write to files that aren't part of the webroot, SELinux will actually stop it from happening even if you've screwed up on your permissions and left it vulnerable (and it will send up a nice loud error too).
This is especially useful when running websites or other applications that may or may not be safe, due to dumb customers or old software that people are scared to update (or often exploited platforms like Java). It doesn't generally stop an exploit, but it does mitigate the damage afterwards and is supposed to keep the security problem contained to the exploited process.
Another example for desktops: Web browsers. Should they be able to read ~/.ssh? No! There's never a reason for a web browser to go in there, unless that web browser has been taken over by an attacker. SELinux will stop web browsers from accessing ~/.ssh, even though the browser is running with your user privs (as it probably should be).
EDIT: Many people turn off SELinux because things don't work when they turn it on. This is because SELinux expects things to be configured "like we told you to configure it in the Red Hat docs" (in the case of SELinux on EL systems), which means you run things on standard ports with standard file paths and don't do weird stuff. If you want to do weird stuff, audit2allow is your friend and you can build SELinux policies for whatever you need to do.
Comment: "SELinux knows what Apache is" - no, that's the job of the policy implemented by SELinux, and its my experience that the targeted policy which ships with Redhat doesn't cater for many of the things which Apache is expected to do in different applications.
Answer: As long as your server is patched and up to date, then there is no known vulnerability which SELinux protects against. There may be windows when this is not the case - but these are infrequent and short. This is the banner slogan for SELinux: it (might) protect you against zero-day attacks.
IMHO, SELinux is counter-productive for Security (except possibly if you are in the business of producing appliances running Linux) it consumes lots of time and effort without giving significantly better results than other approaches.
However I can't tell whether this applies in your context. An out-of-the-box configuration with SELinux and the distributor's policy enabled is more secure than one without.


Looking to download excel to external hard drive for use on a raspberry pi

Question: I have a raspberry pi that I put windows OS on and I want to use excel. The problem is that the SD card that came with it for booting does not have enough space for downloading excel. I bought a hard drive to keep excel files on, is there a way to download the software to the hard drive? Another option is to copy the excel software I have on my computer to the hard drive, is that possible?
Answer:
I have a raspberry pi that I put windows os on

I think you are perhaps mistaken about that.  If you are positive, leave a comment and I will delete this.
Note that even if you did, an excel binary from a normal Windows computer cannot be run on it because the Pi hardware has a different instruction set.  You'll need a version that was compiled for it, which is probably going to be hard to find if it wasn't already part of whatever Windows version you did install.

The problem is that the SD card that came with it for booting does not have enough space

That's because there are actually two partitions on it.  The first one is quite small (a few hundred mb) and v-fat formatted. It contains only a minimal amount of software sufficient for beginning the boot of the OS. The second one is much bigger, probably the rest of the card, formatted ext4, and contains all of the user software.
The reason you have not found the second partition is because you are looking at the card in a Windows computer, and Windows does not, without additional software drivers, recognize the ext4 format.  Ext4 is the native format used by GNU/Linux systems, and the OS on the card is almost certainly Raspbian/RpiOS or some other GNU/Linux variant.
Unfortunately, you cannot run Windows software such as excel on such a system, and there is currently no version of Windows you can install on a Pi to usefully do this.
There is spreadsheet software available for linux, I think most notably via the OpenOffice or LibreOffice suites, that can read (possibly only older) excel files.  However, a better place to research that -- if you can't find enough existing documentation online, and don't search "raspberry pi excel", search for "open libre office excel" -- is our big sibling site   Unix & Linux.
LibreOffice is a fork of the original OpenOffice which should be more up-to-date as the development of the latter ended a number of years ago, although there is another fork, Apache OpenOffice, which is current.
Answer: As @goldilocks has stated, your idea for installing Excel on Raspberry Pi is not workable at the present time (nor any future time I hope). If this "is the only reason I bought the raspberry pi.", then you must now declare yourself as disappointed - sorry.
However, this need not place your end objective at risk; I assume that objective is to do calculations on numbers stored in tables? Two options come to mind:

Recall that Excel happily imports csv file formats (comma separated variables). Therefore, you can create csv on RPi, and have your Windows PC access these files via Samba server on your RPi.

There are numerous applications and libraries available for Raspberry Pi that can operate on .csv files. Anything (any calculation I mean) that Excel can do, can be done in open-source software that runs on Linux - for example.

My answer for you is to declare your independence from big tech cartels.


Can I place a link to a package file (.m) in my Applications folder

Question: I am developing a package and would like to be able to test it without having to copy the package file to my $UserBaseDirectory/Applications folder for each change, so it would be convenient for me to just create a Finder link or symlink pointing back to my working file. So far I have not been able to convince Mathematica to treat the link as a package file.  Am I missing a subtle technique that may make this possible?
Comment: For development purposes, I would just add the location of your file's directory to `$Path` via `AppendTo[$Path, directory-with-your-file]` - I think that's simpler.
Comment: Wolfram Workbench might be handy too
Answer: I had the same problem with the addition, that I have several machines (home, work, laptop) where I develop. What I wanted to have was a GetDev which works like the usual Get with the difference that it looks in my development folder for the package when it cannot not be loaded.
Therefore, I'm using the following function GetDev when I want to load my package which is in active development. It consists of two definitions. The first one extracts the dev-folder for the appropriate machine
GetDev::unknMach =
  "The computer `1` is not known as development machine.";
GetDev[package_String] :=
  Switch[$MachineName,
        "myMachineName",
        GetDev[package, FileNameJoin[{$UserDocumentsDirectory, "workspace"}]],
        _,
        Message[GetDev::unknMach, $MachineName]
];

Here you can define dev-folders for each machine you have. Then GetDev is called again but with the path to the dev-folder. First it tries to load the package with the normal Get. We suppress the Get::noopen message but use Check to test for it. When the call to Get fails, we append the dev-folder to our $Path and try again.
GetDev[package_String, devpath_String] :=
  Module[{},
   Quiet[Check[
     Get[package],
     (AppendTo[$Path, FileNameJoin[{devpath,
             StringReplace[package, "`" -> $PathnameSeparator]}]];
      Check[
        Get[package],
        Message[General::noopen, package],
        {Get::noopen}
      ]),{Get::noopen}],
   {Get::noopen}]
];

Some important details:
I'm using the usual Wolfram Workbench application structure. So if I develop a package Blub then the code for it is located in mypath/workspace/Blub/Blub. Important are the two nested Blub folders. This is why I'm not simply appending my development folder but instead, I use the package name as folder in this line:
AppendTo[$Path, FileNameJoin[{devpath, StringReplace[package, "`" -> $PathnameSeparator]}]

If you are using only one development machine, then you can define the dev-folder to be fixed. Btw, this is only a hacked version. If I would have to write it again, I would add some details like removing the added path, when the package could not be loaded.


Translate INCAR to Python script using ASE

Question: I am considering using ASE to translate my old work into a Python script. I already have the INCAR and POSCAR KPOINTS files. Is it possible to let ASE read these files and generate Python scripts that include the key information?
For example, I have an INCAR file like:
INCAR:
Global Parameters
ISTART =  1            (Read existing wavefunction; if there)
ISPIN  =  2            (Non-Spin polarised DFT)
# ICHARG =  11         (Non-self-consistent: GGA/LDA band structures)
LREAL  = .FALSE.       (Projection operators: automatic)
ENCUT  =  520        (Cut-off energy for plane wave basis set, in eV)
PREC   =  Normal       (Precision level)
LWAVE  = .TRUE.        (Write WAVECAR or not)
LCHARG = .TRUE.        (Write CHGCAR or not)
ADDGRID= .TRUE.        (Increase grid; helps GGA convergence)
# LVTOT  = .TRUE.      (Write total electrostatic potential into LOCPOT or not)
# LVHAR  = .TRUE.      (Write ionic + Hartree electrostatic potential into LOCPOT or not)
# NELECT =             (No. of electrons: charged cells; be careful)
# LPLANE = .TRUE.      (Real space distribution; supercells)
# NPAR   = 4           (Max is no. nodes; don't set for hybrids)
# Nwrite = 2           (Medium-level output)
# KPAR   = 2           (Divides k-grid into separate groups)
# NGX    = 500         (FFT grid mesh density for nice charge/potential plots)
# NGY    = 500         (FFT grid mesh density for nice charge/potential plots)
# NGZ    = 500         (FFT grid mesh density for nice charge/potential plots)

Static Calculation
ISMEAR =  0            (gaussian smearing method)
SIGMA  =  0.05         (please check the width of the smearing)
LORBIT =  11           (PAW radii for projected DOS)
NEDOS  =  2001         (DOSCAR points)
NELM   =  60           (Max electronic SCF steps)
EDIFF  =  1E-04        (SCF energy convergence; in eV)

I'd like to translate this INCAR into something like:
from ase.build import bulk
from ase.calculators.vasp import Vasp

si = bulk('Si')

mydir = 'bandstructure'    # Directory where we will do the calculations

# Make self-consistent ground state
calc = Vasp(kpts=(4, 4, 4), directory=mydir)

si.calc = calc
si.get_potential_energy()  # Run the calculation

# Non-SC calculation along band path
kpts = {'path': 'WGX',     # The BS path
        'npoints': 30}     # Number of points along the path

calc.set(isym=0,           # Turn off kpoint symmetry reduction
         icharg=11,        # Non-SC calculation
         kpts=kpts)

# Run the calculation
si.get_potential_energy()

```

Comment: Can you give some additional details?  Do you need to do this once or many times?
Comment: @TristanMaxson,I just add some example files.
Answer: There seems to be a function to read INCAR files in ASE however in the code it mentions that the functions "are under early constructions". You can give it a try though and it might work well enough:
from ase.calculators.vasp import Vasp
calc = Vasp()
calc.read_incar('INCAR')

Alternatively, you could move over to Pymatgen which has a more thorough pipeline to parse Vasp files: https://pymatgen.org/pymatgen.io.vasp.inputs.html
Good luck!
-Peter


How close could a binary pair be to our solar system without having already been detected?

Question: Self-explanatory. After my previous question about a sextenary star system and a black hole, I decided to dial back to just two parent stars and a planet. How close could they be if we in the real world still haven't detected them by the early to mid-21st century? The 23rd? I'm assuming they'd have to be farther than Alpha Centauri A and B, since they're the closest stars to us period and were "officially" discovered back in 1592.
Comment: This depends, almost entirely, on how bright the stars are. However, you may wish to consider the distinction between "detected" and "noticed there's something interesting about them." Astronomers are far more interested in unusual stars than mundane ones, and binary pairs are very common.
Comment: Can you tell us anything about the stars of the pair? For a start, what's their respective [magnitudes](https://en.wikipedia.org/wiki/Star#Magnitude)?
Comment: How dim are the stars?  Ask on [Astronomy.se] for information on the dimmest that can be seen, and then you can plot distance for star's brightness.
Comment: Funny how three people asked for basically the same clarification within the space of two minutes...
Comment: I haven't really decided on that yet, but since the planet needs to support life, at least one of the stars should be similar to our Sun.
Comment: Can one of the stars be a brown dwarf? Also, do both of the stars have to be undetected? If a star of normal luminosity has a very faint companion, we might not know it was a binary system even if we already knew about the bright star.
Answer: The first thing to realise is that binary stars are not at all rare. About one-third of the star systems in our galaxy, the Milky Way, are "multiple star systems", of which the vast majority are binaries. This means that about half of all the individual stars in the galaxy are part of a binary or a more complex system.
If a star is like our sun, it's visible with the naked eye out to about 55 light years. By 1995, the whole sky had been surveyed with sufficiently capable telescopes to spot a star like the sun out to at least 35,000 light years. So a star remaining undiscovered into the future while still being practical to reach via slower-than-light travel isn't plausible.
Hiding the star behind a cloud of dust isn't very plausible either, because there aren't any in the "Local Bubble" region of the galaxy that we're in. Even if there were, stars hidden behind them would be detected by infra-red sky surveys, such as the Two-Micron All Sky Survey, which was completed in 2001.
So having your star be undiscovered isn't plausible. However, just because a star is known, that doesn't mean very much is known about it. What we know about most nearby stars would fit on a sheet of paper for each one. Have a look at the Wikipedia page for Alpha Centauri, specifically the data boxes on the right of the page. That's what we know about the nearest star, which has been studied intensively.
If your star isn't that close by, and isn't especially interesting, it might not get studied intensively. What are the things about it that you want not to have been noticed until your story starts? Why is it important that those things are newly discovered?


Can DNA on drugs be used as evidence even if the drugs weren't in anyone's possession at the time it was found? (Canada)

Question: Can DNA found on drugs be used as evidence in court or is that unconstitutional? DNA can be transferred from different sources so it doesn't necessarily mean the DNA holder has come in direct contact with the drugs, correct?
Comment: Also see [Willow Martin Charged in Arson](https://heavy.com/news/2016/07/willow-martin-breonna-constantino-stripper-photos-pictures-facebook-boyfriend-arson-fire-connecticut-ct-twitter-instagram/2/). Apparently the couple burned down the business and stuffed a potato in a company van tailpipe. The DNA on the potato led to a registered offended, who was the boyfriend of the female arsonist. (The stripper burned down the business of the father of another stripper).
Answer: Yes, DNA found on drugs could be used as evidence in court, although, by itself, it might not be sufficient to support a conviction.
Generally speaking, otherwise duly authenticated physical evidence is admissible when it is "relevant" and it is is "relevant" when it makes it more likely that an element of the crime (in this case, possession) is true than would be the case in the absence of this evidence. There are specific exceptions that disallow the introduction of relevant evidence, the most general of which is that it would be unduly prejudicial to admit the evidence which is otherwise of only marginal relevance, but in practice, I think that the DNA evidence would pass this test.
It is more likely that someone whose DNA is found on drugs had something to do with the drugs than if their DNA was not on the drugs, even if it isn't absolutely certain that the person was actually in possession of them, so it would be admissible.
Comment: @ATomz: you seem to be confused about 'evidence' and 'conviction'. The police can (subject to the prosecutor) charge you with possession of drugs, and offer in evidence the DNA. That is unlikely to be enough to convict you, but it is up to the court (presumably a jury given directions about the law by a judge).
Comment: Let me give you an example. I had a roommate in university who heavily smoked marijuana. We had a spat near the end of the term before we moved out and to get back at me he took some of my DNA (skin cells, saliva, hair cells, etc.) from the bathroom and put it into a plastic bag, contaminating the marijuana with it and left it there to be found. Can the police convict me for possession because my DNA was on/around it? Could it be defensible to say that DNA can be moved around objects without direct contact so DNA alone isn't enough to prove that I was actually in possession at any given time?


iPhone Application Development on Windows

Question: As I've seen many questions related to this topic but this is a completely different question. I wanted to ask if there is any header file or anything else which will help me to program iPhone Application on Windows using Visual C++ 2008 and then test it on my phone (and not really make it open to the real market) ?
Comment: possible duplicate of [iPhone SDK windows ?](http://stackoverflow.com/questions/2086871/iphone-sdk-windows)
Answer: Unfortunately there isn't any way to develop native iphone applications on Windows. OS X is required to develop iOS applications.
There are third party tools, such as Corona, and Monotouch, which will allow you to write you application in languages other than objective-C, but in order to test in the simulator or on a physical device, you again need OS X, and the iOS SDK, which require Apple hardware (you can attempt to use a hacked PC to run OS X, but it's not without it's own issues).
Comment: And I think "Hackintosh" is also illegal, so... the cheapest entry is the Mac Mini I think (I might be wrong, not following it closely).
Comment: Not illegal, per se. Installing OS X on non-apple hardware is against the OS X' EULA. So its a violation of the license agreement, but that in and of itself is not illegal.
Answer: With Airplay SDK, it is possible to use Visual Studio and C++ for iPhone development. It allows deployment to device on Windows. However to create properly signed apps for AppStore submission, OS X is required.
Since Airplay SDK is a multi-platform development environment focusing on games, it is not intended for applications using iPhone API's directly. So when using it, developer is actually writing Airplay application that just happens to work on iPhone too. For something like games using OpenGL ES written in C++ this is not a problem. But "productivity" applications using native iPhone UI components are out of question with Airplay SDK.


Water supply tube elimination in the refrigerator icemaker

Question: Is it possible to eliminate water line, supplying the ice maker in the refrigerator, with a refill system similar to the coffee makers? It would be a lot safer not to use leaking faucets and free moving to any spot in the room, not stuck with the water line.
Comment: If a manually fillable reservoir for an icemaker was considered a viable usage model you would already see this available as a product option. Refrigerators and icemakers have been around for many decades and I have to see or hear of such feature.
Comment: You'd need at least 10-15PSI water for the valves to work properly, which either means your reservoir is pressurized, or is a floor or two above the fridge.
Comment: Volume for an ice maker is significant, and not as directly user-driven as a coffee maker. Typically you want to have the ice maker several cycles ahead of ice usage, and be able to catch automatically when you use a lot of ice. Plus most people have the refrigerator along a wall and rarely move it.
Answer: There is no such device. However, when my step-son got married and had no ice maker in his refrigerator he asked us what he could do. I told him that we all used ice trays. when I was growing up. I was shocked when he asked us, "What's an ice tray?". I only mention this because I am not sure of your age. I am certainly not trying to be funny or offend.


Generator for $\mathbb{Z}[x]$ ring?

Question: Is the polynomial ring $\mathbb{Z}[x]$ generated exclusively by $\langle 1,x\rangle$? Or has to be generated by more or less elements?
My intuition is that you can generate any of the "$x$'s" polynomials with just multiplying and adding $x$ to the equation but you need the "$1$" to generate the coefficient with degree $0$.
Comment: As a ring with unity, it is generated by $x$ alone. As a ring (not necessarily with unity) it is generated by $1,x$.
Answer: Your intuition would be correct. The only way to generate $\mathbb{Z}\subset \mathbb{Z}[x]$ is by having 1 in your ideal. Similarly, you must have x in your ideal to generate all the polynomials.
Comment: Thank you very much! I've just read a powerful tool to prove that this specifically ring cannot be Principal; **from the Dummit Abstract Algebra:** Let $a,b \neq 0 \in R$. if $d$ is the unique generator for $R$ then the greatest common divisor is a power of $d$. However, when you use $[a = x \land b = x^2]$ or $[a = x \land b = 1]$ you see there're 2 generators 1 and x.

Generator for $\mathbb{Z}[x]$ ring?


Any volume form on a smooth $n$-dimensional manifold is locally a pullback of the standard volume form $dx_1\wedge ...\wedge dx_n$ on $\mathbb R^n$?

Question: Let $M$ be an $n$-dimensional smooth manifold equipped with a volume form $\omega$ , and let $\omega_0:=dx_1\wedge ...\wedge dx_n$ be the standard volume form on $\mathbb R^n$ , then is it true that for every $a \in M$ , there exists an open set $U$ containing $a$ in $M$ and a diffeomorphism $g:U \to \mathbb R^n$ such that $\omega = g^*\omega_0$ ?
Comment: @AmitaiYuval : um no
Comment: Are you familiar with Moser's trick, which is used in the proof of Darboux theorem for symplectic manifolds?
Comment: @AmitaiYuval: You are right, I apologize. I'm writing something right now in response to this and it is not very technical yet.
Comment: @AmitaiYuval: I don't think this is nearly that difficult. The OP is just asking whether n-manifolds are locally isometric to $\mathbb{R}^n$.
Comment: @FaraadArmwood No. The answer to the question you're talking about is negative, of course. However, volume preserving is weaker than being an isometry.
Answer: The following is a variation of Pedro's answer (which doesn't work in my opinion, as explained in Ted's comment).
Take a coordinate chart around $a$ and write $\omega=fdx^1\wedge\ldots\wedge dx^n$. Try new coordinates as follows: $y_1=gx_1,y_2=x_2,\ldots,y_n=x_n$, where $g$ is some smooth function. Then$$\begin{align}dy^1&=\left(\frac{\partial g}{\partial x^1}x_1+g\right)dx^1+\frac{\partial(gx_1)}{\partial x^2}dx^2+\ldots+\frac{\partial(gx_1)}{\partial x^n}dx^n,\end{align}$$and so,$$\begin{align}dy^1\wedge\ldots\wedge dy^n=\left(\frac{\partial g}{\partial x^1}x_1+g\right)dx^1\wedge\ldots\wedge dx^n.\end{align}$$Hence, in order for the $y$'s to be good coordinates, we need to solve $$\frac{\partial g}{\partial x^1}x_1+g=f.$$ For convenience, we may assume that $x_1$ does not vanish, and then the above first order linear equation is easy to solve.
Edit: In second thought, the computation is even easier when guessing a coordinate change of the form $y_1=g,y_2=x_2,\ldots,y_n=x_n$, where $g$ is a smooth function (here, $g$ replaces $gx_1$). Now we have $$dy^1\wedge\ldots\wedge dy^n=dg\wedge dx^2\wedge\ldots\wedge dx^n=\frac{\partial g}{\partial x^1}dx^1\wedge\ldots\wedge dx^n,$$and so, the function $g$ only has to satisfy $\frac{\partial g}{\partial x^1}=f.$
Answer: It's true. If you choose coordinates $x_1, \ldots, x_n$ in $M$, the volume form will have the form $f dx_1 \wedge \ldots \wedge dx_n$, with $f$ non-vanishing. So just make the coordinate change $y_1 = x_1/f$ and $y_2 = x_2, \ldots, y_n = x_n$. Then in these coordinates the volume form is $dy_1 \wedge \ldots \wedge dy_n$ as you wish.
In fancier language: orientations are really $\text{GL}^{+}$-structures, and these are always integrable (as the argument above shows).
Comment: Not so fast, @Pedro. First, I think you meant $y_1=fx_1$. But, regardless, what happened to the $-\dfrac{x_1}{f^2} df\wedge dx_2\wedge\dots \wedge dx_n$ term? Your trick only works if $f=f(x_2,\dots,x_n)$, which is highly unlikely.
Comment: Ah, I knew there was some messing around you could do once you knew that locally you could write that  form as $f dx^1 \wedge \cdots \wedge dx^n$. Thanks for seeing what I couldn't.
Comment: @Pedro : um so could you just please point out what is $g$ ?
Comment: This coordinate change only works if $f$ is constant in $x_1$. Otherwise, it doesn't.
Comment: @TedShifrin You are right, of course. Would like to hear your opinion on my answer, which is an adjusted version of Pedro's attempt.
Comment: @Amitai: Seems fine to me.
Comment: Integrability of an orientation is trivial. A volume form, however, is stronger than an orientation. It is an $SL$ structure. And it turns out that such a structure is also always integrable (even though your specific argument is wrong).
Comment: @TedShifrin Don't you find it appropriate to at least down vote this answer? This bothers me very much, because I think the post addresses an interesting issue, and it would be great if many users could benefit from it. However, the fact that a wrong answer (or rather, a right answer with wrong reasoning) is currently leading turns my feelings about this post upside down.
Comment: @Amitai: I normally give people a chance to remove/correct before downvoting. Soon I will.


I am having trouble finding the first derivative of $R(P) = (Pe^r)(1-\frac{P}{K})$

Question: I am having trouble finding the first derivative of $R(P) = (P\textrm{e}^r)(1-\frac{P}{K})$
I am told to use the product rule for this. The first part of it $(P\textrm{e}^r)$ I believe will remain the same for the derivative of it. I am struggling on the $(1-P/K)$.
Answer: The derivative of the function $R(P) = Pe^r\left(1-\frac{P}{K}\right)$ with respect to $P$ can be found by applying the product rule, as follows
\begin{align}
\frac{d}{dP}R(P) &= \left(\frac{d}{dP}Pe^r\right)\left(1-\frac{P}{K}\right) + Pe^r\frac{d}{dP}\left(1-\frac{P}{K}\right)\\
&= e^r\left(1-\frac{P}{K}\right) + Pe^r\left(\frac{d}{dP}1 + \frac{d}{dP}\left(-\frac{P}{K}\right)\right)\\
&= e^r\left(1-\frac{P}{K}\right) + Pe^r\left(0 - \frac{1}{K}\right)\\
&= e^r\left(1-\frac{P}{K}\right) - \frac{Pe^r}{K}\\
&= e^r\left(1-\frac{2P}{K}\right)
\end{align}
A lot of the times, if one does some simple manipulations initially, the amount of work required can be greatly reduced. Notice that $R(P) = Pe^r\left(1-\frac{P}{K}\right) = e^r\left(P-\frac{P^2}{K}\right)$. Now the derivative is simply
\begin{align}
\frac{d}{dP}R(P) &= e^r\frac{d}{dP}\left(P-\frac{P^2}{K}\right)\\
&= e^r\left(\frac{d}{dP}P-\frac{d}{dP}\frac{P^2}{K}\right)\\
&= e^r\left(1-\frac{2P}{K}\right)
\end{align}
Comment: The origional function Pe^r is being multiplied by (1-P/K) not divided
Comment: @AmandaSmith Thanks for pointing that out!
Comment: okay that makes alot more sense now! thank you so much
Comment: what happens to the e^r at the end of e^r(1-P/K)-Pe^r/k
Comment: @AmandaSmith There's a little intermediate step there, expand it all out: $e^r - Pe^r/K - Pe^r/K = e^r - 2Pe^r/K$ then factor out the $e^r$ in common with both of the terms to get $e^r(1-2P/K)$.
Answer: You may use product rule on $R(P)=e^r(P-\frac{P^2}{K})$ as follows:
$R'(P)=e^r\frac{d}{dP}(P-\frac{P^2}{K})$$+(P-\frac{P^2}{K})\frac{d}{dP}(e^r)$


How to dynamically resize parent DIV?

Question: Basically I have float divs with fixed width of 250px. I need to make it so that the width of a parent div and the width of the browser resize automatically based on the amount of float divs i add.
For example: if my browser size is 800px wide and i have 2 float divs which combined are 500px wide than there will be no horizontal scroll bars because 500 fits inside 800. But when i add 2 more float divs the total width of all float will be 1000px which is bigger than my browser width thus creating horizontal scroll bars and making the browser resize automatically.
Right now when i try to do it, float divs that dont fint inside 800px just drop down instead of adding on the side.
I could specify fixed width of parent container but the whole point is to make float add to the side dynamically.
Any suggestions? If CSS can't do it maybe Javascript can.
Is there a Javascript that will explicitly add width to the parent div whenever child divs are added?
Thanks.
Answer: use width:reminder; to the parent DIV.

How to dynamically resize parent DIV?


Can I wear pendant that's symbol of peace?

Question: A year ago I bought one and I just got it is NDC (Nuclear Disarmament Campaign). I don't mind but I wanted feeling peace through everything what I need to having it. And soon I'm gonna practicing vipassana meditation.
Can I wear pendant that I have ?
Comment: Is this a question about protocol at a retreat or a question about orthodoxy with respect to amulets? (Amulets are a big part of lay Buddhism in Thailand for example) If it is about protocol, check with the retreat center, they vary widely.
Comment: Hi and welcome to Buddhism SE. We have a [Guide](http://meta.buddhism.stackexchange.com/questions/1502/i-am-a-new-user-here-at-buddhism-se-what-should-i-know-before-i-post?cb=1) and a [Resource tab](http://buddhism.stackexchange.com/help) for new users that you might like.
Answer: That is in harmony with nonviolent Buddhism however on a vipassana retreat there is noble silence, and anything worn that said anything would be as distracting as spoken words.
Comment: What is nonviolent Buddhism, Mr Uilium and could it be that he does misunderstand the Hippy-movement with dhamma? And does ones beard speaks?
Answer: If Mr/Mrs user73898 is doing meditaion seriously in one stream, its would be out of any benefit, if it is done without taking the 8 precepts. Beautification is one Sila of it. Its not proper and every fellow yogi, next to the reality would just think "Oh dear, how mindful... how serious".
If you find a mediation group that has no propel with that, or does not urge Mr/Mrs., run away, all they are doing is for their livelihood and without compassion for Mr/Mrs, without any benefit. Withdraw from sensual pleasure and outwardly notions of conceit (Sila), are prerequisite of meditaion (Samadhi). Not done the raw stuff, how would you waste time in grinding the tree in the forest for getting a nice chair.
(Note: this answer has not been given with the agreement to be means of trade or the purpose of/for trade and/or keep people trapped and bound. How you handle it lies in your sphere, but does not excuse the deed here either.)
Comment: Thank you so much @-}-- Your guideline is treasure. I'll keep it all in my mind. I wouldn't do without knowing and without Buddha's path. Monks helping me too. Seriously I'll do as you guided. I wanted learn Buddhism ultimately. Even I need start , my knowledge isn't enough to get peace in my mind. Thank you so much @-}--
Comment: Mr/mrs User73989 may, if he/she likes, take the five or eight precepts for him/her self, which is very useful to train, even in "normal" life. If doing a retreat, it should be done anyhow, and as told, don't access communities who do not do such. It's how ever of great use, if approaching a monk or a non, or somebody who knows well about silas and also practices them, and request the precepts. It goes deep and so it has its deep impact and benefit, as righteous prerequisite and security of having best and even real fruits.
Comment: Not much knowledge required to come to peace: [The rewards of virtue](http://zugangzureinsicht.org/html/ptf/dhamma/sila/index_en.html), and the [The Eight Precepts](http://zugangzureinsicht.org/html/ptf/dhamma/sila/atthasila_en.html) Mr/Mrs @user73898
Comment: As I'll start to learn and will find monk I'll learn about sila and eight precepts and as you said it'll deep and will deep impact and benefit I'll have treasure through. Thank you so much @-}--
Answer: What you ware does not effect your path or your practice. In Lord Buddha's time people reached Nirvana while wearing nothing,While working and etc.
Focus on your path do not take concerns about these minor things.
Answer: For sitting meditation, you can't go wrong by simplifying.  Just wear simple, loose clothing, and leave the rest in your bag (good) or at home (better).
You can always wear whatever you like outside.  Inside, be non-distracting:  it's just a question of politeness to your fellow meditators.
Answer: For practising any other branch except that of Mahayana / Vajrayana, no restrictions for mundane practitioners' outfit exist, to the best of my knowledge.
However, if you are practicing in any Vajrayana lineage, you should ask your lama, because bearing a visible jewelery / amulet could be a potential obstacle to keeping layman'v vows on Mahayana Sojong days.
Comment: Thanks all of you people reaching for help me. Thank you so much @-}-- L<3ve Buddha @-}--


How can I fetch details from SharePoint list in infopath form from textbox

Question: I am creating a infopath form where ID textbox gets populated from the query string. Now the problem I am facing is, I am not able to fetch and populate the remaining textboxes such as "UserName", "FirstName", "Address", "Block No" from the sharepoint list based on the ID textbox that gets populated from query string.
I have googled around the internet, but I am not able to understand the procedure to get the desired result. Also fetching of the details are done on the dropdown and not on the textbox.
Since I am new to infopath form designing. I am not able to find the proper methods as well.
Answer: Create datasource to the library/list, filter data by your ID, get values from it.
Here is example with getting data from SP list
HERE is article about it.
HERE is example but with User Profile (you will do the same, connection to library, set value of InfoPath fields with value from DataSource, filtered by ID.
Comment: Do you have any steps or procedure/link for the same ?
Comment: Edited an answer.


Why are all my buildings suddenly disappearing in Cities: Skylines in this one district?

Question: Suddenly, the houses in my district started disappearing in quick succession. It's not related to this bug or this one, so what could be the cause?
Comment: Self-answering because it wasn't easy to find this answer, hope it'll be useful to others
Answer: In my case, the reason was that I had accidentally changed the building style for this district, which, without mods, results in Cities: Skylines deleting all the houses in quick succession until there are none left which have the wrong style. (After which the zoned area will slowly be settled as usual (but with different-style buildings), if there is enough demand.)

Changing the building style back will stop the rest of the houses from unspawning. In my case, the game was paused when I accidentally changed the style and I saved before unpausing, so I was able to go back to an older save, quickly pause it when it had loaded and change the building style back before the homes vanished.
In case you still want to change the building style
This mod lets you change the building theme for a district with existing buildings without despawning them. I haven't personally tested it, though.


What features should I check on my VPS in order to have a secure box?

Question: I have a VPS with Ubuntu 12.10 server edition, an I connect to it from public/university. I host some web applications on it. I have always been concerned with security issues. What features is needed to be checked in order to have a secure VPS?
Answer: Implement the hardening techniques outlined in the CIS Benchmark guides for:

Apache
Debian
MySQL - if you are running this in your instance.

I would also run a vulnerability scanner such as Nessus against it to determine any additional security weaknesses that may exist.


Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'

Question: Just updated pods for xcode 9 and I'm getting the error below for Cosmos.

Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'
Comment: Share your pod info and swift language version. You've add a tag for swift3, so is it exact swift3 or swift3.x?
Answer: Note: Ensure swift language version of your project. Here is how you can see/check your swift language version.

You have two options as solution to your query:

If your project has Swift versio 4.0
- You should choose/download POD compatible to your project's swift language (Share me POD info and swift version, so I can provide you exact pod version version for your pod library suitable for project).
If your project has swift version below 4.0
- You need to migrate your project into Swift 4.0 (if you've not migrated it). Here is ref question and answer, how to migrate from swift (below) <4.0 to 4.0.

Xcode 9 Swift Language Version (SWIFT_VERSION)

According to tag added by you in your question - Swift3 is your current project language version and pod 'Cosmos', '~> 12.0' is supporting swift 4.
pod 'Cosmos', '~> 12.0'

Here is list of previous release supporting Swift version below 4.0.
https://github.com/evgenyneu/Cosmos/releases
Try previous release of cosmos like:
pod 'Cosmos', '~> 11.0.3'
// or
pod 'Cosmos', '~> 11.0.1'
// or
pod 'Cosmos', '~> 11.0.0

'
Answer:  attributes: [NSFontAttributeName: label.font]

it's seem okay with swift 3.2 .
i fixed with paging menu viewcontroller library.
Answer: In My case
I replace This Code
[NSAttributedStringKey.font : font]

by Code Below
.size(attributes: [NSFontAttributeName : font])

Hope it Helps.
Comment: Just noting that this is only Objective-C.  NSFontAttributeName isn't available in Swift.
Comment: @Brad it is for swift. It is available in Swift.
Answer: You must need to update swift version to 4.0 from Xcode.
Use below step
1) Choose Your Project from project manager (left top from Xcode)
2) Choose Build Settings
3) Search "Swift language"
4) Change "Swift Language Version " => Swift 4.0
Answer: let label = UILabel()
label.font = UIFont.preferredFont(forTextStyle: .subheadline)

Comment: Thank you for this code snippet, which might provide some immediate help. A [proper explanation would greatly improve its long-term value](https://meta.stackexchange.com/q/114762/206345) by showing _why_ this is a good solution to the problem, and would make it more useful to future readers with other, similar questions. Please [edit] your answer to add some explanation, including the assumptions you've made.
Answer: let percentOff = NSMutableAttributedString(string: "\(productOff ?? "0")%OFF",
attributes: [NSFontAttributeName: UIFont(name: "Montserrat-Regular",
size: 13)!,NSForegroundColorAttributeName: UIColor.black,
 NSBackgroundColorAttributeName: UIColor.black])
    lblPriceDetail.attributedText = percentOff

This worked for me in swift 4.2
Answer: Your pod might have a wrong swift version, not the project settings.
To change the pod swift setting, go in the file navigator (left of the screen) to Pods (blue icon) and select the pod you're having problems with. Then go to build settings and go to Swift Language version. Select Swift 4.


Cannot deploy SCCM 2012 client

Question: I'm attempting to get System Center Configuration Manager 2012 up and running for my organization, but my attempts to roll out the client don't appear to be successful within my test group.
My current installation attempt is on a Hyper-V virtual machine. I have both the Configuration Manager instance and it's MS SQL 2014 instance running on the same VM.
This is the first time I've dealt with anything System Center, so I've been following a guide here, Except for the WSUS section (we already have that set up elsewhere). I've been able to successfully install SCCM.
I believe I have all the correct ports open in the firewall (HTTP, HTTPS, File and Printer sharing, etc...). In the SCCM console, I have AD System, Forest, Group and user discovery set up, It has detected all of the separate subnets our equipment are one, I've connected it to our Exchange server and I have a single site set up for our whole company.
Looking in the Assets and Compliance, all of the computers and users in our organization are showing up, but the computers report "No" in the client column.
The account I've specified for all SCCM tasks, including client deployment is in the local "Administrators" group of my test machines. It is also part of our "Domain Admins" group, which has almost completely free reign of all machines.
SCCM is currently set to automatically deploy the client on any and all machine's it finds. Most of those report errors in "ccm.log" except for my test machines with proper tweaks to their firewalls via group policy. The installations appear to kick off in the background properly. On a test machine, I can open task manager a few minutes after manually triggering deployment and find the "ccmsetup.exe" process running.
I've searched arround quite a bit for a solution and made some troubleshooting tweaks I can't remember now to describe here. Any input would be much appreciated. I can provide individual logs or details if it helps.
Answer: https://www.windows-noob.com/forums/topic/4045-step-by-step-guides-system-center-2012-r2-configuration-manager/
You may need to use the ccmsetup.exe installation properties. Please follow the guide above as well as the ccmsetup.exe properties below to get the agent installed.
https://technet.microsoft.com/en-us/library/gg699356.aspx

Cannot deploy SCCM 2012 client


Hard warm start

Question: I have a 97 Chev K1500 with a 5.7L gas engine. When it is cold it starts right away, when warm it has to crank lots. It runs fine other than this. The fuel injector spider was replaced two years ago. It has a new cap, rotor, wires and plugs. I'm thinking maybe the temp sensor, but is there any other suggestions on what to look for or check?
Comment: Welcome to Motor Vehicle Maintenance & Repair! You might want to check the fuel pressure when it does this to see if it is up to snuff. I believe it should be at ~43.5 psi.
Answer: The engine may get flooded.  On a warm engine, left off for 20 minutes, remove the induction tubing, open the throttle body shutter and smell for raw gasoline.  If heavy odor is detected, fuel pressure regulator is leaking internally or fuel injectors are leaky.
The engine may get starved of fuel.  As commented by Paulster2, connect fuel pressure gauge and watch for a drop in pressure over 20 minutes with the engine off.  Now, here's a quick test for low fuel pressure.  When engine is off and warm, turn ignition key "on" but do not start engine (you should here the fuel pump for 1-2 seconds in a quiet garage).  Repeat this key cycle 2-3 times, then start engine.  If engine starts immediately, without long cranking, fuel pressure is seeping.  Check the following:  weak fuel pump, leaking fuel lines, leaking fuel injectors, leaking fuel regulator on the return side (remove vacuum line with engine off and watch for fuel drips).  See this video for more details.
Comment: Thanks.  It turned out to be the fuel pressure sensor in the spider.
Comment: Thank you for sharing the resolution to your issue.  I didn't know there was a fuel pressure sensor.

Hard warm start


Error with Virtualbox

Question: I have a PC with Windows 8 4GB RAM 500GB HD and use Virtualbox 4.2.18 (current), however, already downloaded several types of isos of Ubuntu to virtualize and none of them got success. It takes forever to install and when it says that the machine needs to be rebooted to start using Ubuntu a message: virtualbox-O stopped working windows searching for a solution to this problem... and finally lose everything and does not install anything. Already downloaded several isos and also already tested in other versions of virtualbox and nothing's right. What can I do? What is the solution? Isos used: 12:04, 12:10, 13:04.
Comment: AAh English Bro,English!!
Answer:
try reinstalling virtual box
try using some prebuilt virtual box images from the internet
enable 3D acceleration, hardware-vt/amd-v, pae/nx, nested paging. Let your VM have atleast 2GB of ram for ubuntu. after installing ubuntu run the following commands : (otherwise ubuntu will be very slow)
sudo apt-get install dkms virtualbox-guest-dkms virualbox-guest-x11 virtualbox-guest-utils

Error with Virtualbox


"[name] was here" (or concept)

Question: Is there a word for specifically leaving behind a trace of yourself for others to find?  Conceptually, something between a time capsule and geocaching.
Comment: When I first saw the title of this question, "Kilroy was here" immediately sprang to mind.
Comment: Do you have a flaaaag?
Comment: @tenfour That must be an Eddie Izzard reference. Very funny! But no, I don't think the OP means leaving a trace as in marking territory.
Answer: If you write your signature (or "[name] was here") as graffiti on a wall, that is a tag, and the action is tagging.
I have heard the term leave-behind for an object that you give away so that people will remember you (for example, salespeople leaving trinkets). This is marketing jargon, though, so it doesn't seem to match what you're looking for.
I can think of several nouns that could describe the thing or sign that is left (memento, trace, sign, mark, ...) but I can't think of a verb that describes the action of leaving it, in the sense that you seek.
Answer: There are a few words that denote the idea of a personal mark or signature that could encapsulate one's name. The idea of marking something or leaving a trace behind is very similar to the idea of signing.
Further than that, however, are the following concepts:

breadcrumbs — a trail of such marks intended to lead someone somewhere
inscription — typically a carving intended as a unique signature; it can also refer to calligraphy
epigraph — "an inscription on a building, statue, or coin"
easter egg — in addition to the holiday game, easter eggs also refer to hidden features or signatures in software, film and books
reference — a less peculiar version of the concept
Comment: +1 for epigraph and easter egg. I think *easter egg* is particularly apt for geocaches, since the contents are usually a surprise.
Answer: Legacy seems a good choice, given OP's requested "time capsule" connotation.
The word has become a bit tainted of late, because of all that legacy computer code. But it still has plenty of positive associations, and leaving a good legacy for the next generation is dear to the hearts of many.
Answer: After reading an article from The Atlantic on the topic of latrinalia, the term 'presence identifying' came up to refer to people writing their names or expressing a form of 'presence', so that could be applied to people writing 'was 'ere' too I suppose.

"[name] was here" (or concept)


Regarding emailing to prospective Professors after submitting application

Question: I have applied to a US university for Fall 2023. I have mentioned 4 Professors name in the SoP though I haven't contact them before submitting application. Now I want to email them to inform them that I am interested to working with them. If they read my application, Will they mind if they see that I have mentioned other Professors name also? Will that have a negative impact on the outcome?
Answer: Until you get accepted there is little point in it and the most likely outcome will be either "ignored" or "Lets talk if you get accepted."
In most fields, individual professors aren't likely to be on the admissions committee, though a few will. They are unlikely to interfere in the process either positively or negatively. So, with a few exceptions, your mail is just a distraction; a bit of noise.
You might be better to wait until you actually start in the program, ask around about how the professors treat students and have a sit-down with the most likely people, asking about possible topics.
If you have only a bachelors at the time you start, there is no real need to have that conversation in the first year or two while you are preparing for comprehensive exams (most places, most fields).
No, it probably won't have a negative effect, but not positive either.
See: How does the admissions process work for Ph.D. programs in Country X?
Comment: Thanks for this insightful answer. However, I am from Agricultural Sciences background where it's more likely to be funded by the Professors rather than the department. That's why, I am concerned as I didn't communicate with them before submitting the application.


How to make a simple grafical interface in C# for DCRAW

Question: i have a problem. I need to make a simple GUI in Visual Studio 2008 using C Sharp that uses a Dave Coffins DCRAW written in C but I don't know how to "connect" dcraw.c (DCRAW source code) file with Csharp... UFRAW is the example of grafical interface that uses dcraw but I can't find it's source code. My application should be very simple: to recognize raw file on digital camera or any disc and uses one interpolatio algorithm on that raw file.
Answer: you must compile the c code into a dll. this dll can be used through pinvoke from c#
you could also make a managed c++ project and convert the c code into native c++ code. in managed c++ there is a very easy way to access the native code.


When is it good to use a tableview vs a dashboard?

Question: I have some iphone apps, and if I have few elements, I'm wondering what I should think about in terms of design when I'm deciding to use a dashboard ala http://mobile-patterns.com/dashboard-navigation vs a tableview http://www.freeimagehosting.net/uploads/c2036dee19.png.  For instance, say I have an app where users view and select their breakfast, lunch, dinner, and snacks for the day.  How would I decide on whether to use a tableview vs a dashboard?
Comment: Why would you pick green over red? Why choose Helvetica over Myriad? This is really your choice and there's no way anyone can answer this question for you.
Answer: There are some iOS Design guidelines that might interest you as they cover a lot of that.
To answer your specific question:
Table for long lists because you can scroll fast.
Dashboard for a small selection.
Thats how they are used in most apps.
Answer: Personally, I really don't like dashboard-style navigation for apps (it's good for iOS's springboard though). I think there's always a better way to build your navigation and hierarchy.
A tableview might be a good approach, as might something else. Mike Rundle has written a solid article on most of the ways you can tackle it.

Displaying a list of available features of your iPhone application so the user can navigate through your app is a common practice. But given the variety of ways to display structured information in an iPhone app, which is the best way? What's the best way to present entry points to an app's main features? There is no best way but there are a variety of established patterns you can learn from.

Article: iPhone Application UI Design Patterns
The article is old, but the patterns still fit and the advice is great. Basically, it all depends on how many items you have and how your hierarchy needs to be structured.
Getting this right is really, really important. I strongly recommend mocking up a few different options and seeing which best fits your needs. If you're struggling to fit everything in, then there's a chance you may be trying to build an app that's too big for a mobile device.


How to boot into Windows after installing grub?

Question: I did this very clever decision to set windows 7 bootloader to ubuntu. Now I cannot boot back to windows.
If I try to boot via grub it shows the windows bootloader for half a second and goes back to grub. Also the safemode of windows ceased to work, so I cannot go back and change the settings. I am totally screwed here and would not want to install the OS (both of them) again...
Comment: have you tried `sudo update-grub`?
Answer: I have had similar issues before. the solution was to grab a Windows install CD, and to boot to it.
choose your language and press next.
click "repair your computer"
follow the on screen instructions and it will try to locate issues and repair them.
I have had similar issues when setting up dual boot, or expanding my win7 partition. good luck!
Comment: I tried that today, it made a system restore, but it did not affect the bootloader sequence, still keeps booting straight to Grub.... I fear i have to make a clean install, only because i clicked on a box...(they should have put some warning in cases like this).
But thanks for the advice, i also tried to enter command prompt and set the bootloader to default but did not succeed


Get rid of abandoned SSH processes

Question: I have a Linux machine running dropbear as its SSH server. I open many SSH sessions
from a client towards that machine, meanwhile the sessions are active I pull out the Ethernet cable from the server machine's DCN port so it is not possible to SSH to the server any more. But previously created SSH processes on the server keep wandering around in the system and show up in ps command etc (causing memory leak) until I reboot the machine. Is there a way to automatically clean them up and get rid of those processes in situations same as the above without doing a reboot?
Answer: This might be useful for others:
I solved this by adding -K SECONDS flag to the start script of dropbear.
This way after three tries (1 min approximately) dropbear gives up on that connection which is dead hence it will kill the associated process on the server side. See here for more info: dropbear man page
Answer: Two options:

You can just kill these processes. If you have their PIDs, just use the kill program (which you may need to run as root) to end them.
Since you just pulled the cable, these processes aren't receiving any data from the remote end of the connection anymore. After a while, they will notice that and die by themselves. How long this takes depends on a few configurable parameters, but by default this is about two hours
Comment: I modded your answer up. If remote sessions of the same user, which is the probability, you do not need root; PIDs are not the best, you can also kill by pseudo-tty which is far less error-prone; I would clarify about where you got the two hours (keepalive), I would add the option about TMOUT in bash. I would also introduce the user to the  `screen` command. I simply have not got the time right now. Cheers
Comment: I didn't know the how long is the time-out value. Instead I used the flages -I and -K of the dropbear in order to solve the issue. They make it possible to fix the time-out according to the needs.
Comment: Can using `wall` to broadcast a message to all terminals speed up the process because tcp write timeout is 1 minute?
Comment: I should add that I was not clear enough in my question. I wanted to clean up the processes automatically not manually using `kill` command!

Get rid of abandoned SSH processes


"Efficiency" of Switching Power Supplies and Theoretical Energy Loss

Question: I have heard that switching power supplies that convert, say, 110 VAC to 12 VDC, are very efficient. I understand that the power transistor that is regulating voltage is either on or off and spends very little time in its linear range, thus it doesn't burn much of the energy. Also I understand the principles of converting AC to DC via a full wave bridge. After the AC voltage is rectified, however, given that the voltage drops from up to 110VDC to 12VDC that energy (above 12) has to go somewhere. If the electrons coming from the AC are merely regulated down to 12 then I don't understand what happens to the lost energy. It has to go somewhere. In a very efficient system I would think that a small amount of current at high energy going into the AC input should produce low energy with higher current according to the equations. So I should be able to get by with a smaller gauge wire going to the input (at high voltage) of my switching power supply while having to use a heavier gauge wire for the output (at lower voltage). My problem is that I can't see how reducing the amount of energy on the same electrons can't result in some sort of heat generation. Where does the energy go? Can someone please explain?
Comment: Energy is not voltage
Answer: This is a much simplified answer: -
There is this thing called a transformer - it has two coils that are closely magnetically connected. The two coils are called primary and secondary. If the primary has 1000 turns and the secondary has 100 turns it will step-down an AC voltage of 120V to 12V. There will be a slight power loss but usually transformers are better than 90% efficient. If we assumed near 100 % efficiency it follows that if we step down the voltage by ten times we also can step-up the current by ten times so, simplistically: -
\$V_{in} \cdot I_{in} = V_{out} \cdot I_{out}\$
The transformer is at the heart of an off-line switching power supply but instead of the transformer being fed with raw AC at 60Hz or 50Hz it is fed at a much higher frequency and this means a much smaller transformer can be used.
So the incoming 110V AC is rectified and smoothed (not to 110V DC) but to a voltage more like 154 volts DC. This feeds a power oscillator (that might run at 100kHz) and this drives the transformer primary.
On the secondary (the low voltage side) there is another rectifier and more smoothing capacitors. There may also be a feedback system that keeps the output closely regulated. Here's a typical block diagram: -

(source: philpem.me.uk)

So I should be able to get by with a smaller gauge wire going to the
  input (at high voltage) of my switching power supply while having to
  use a heavier gauge wire for the output (at lower voltage).

Correct!
Comment: Yes. I know about transformers. They are the primary element in a linear power supply (AC to AC converter). What I didn't realize is that switching power supplies still use them, though in a different form. Thanks. This answers my question.
Answer: There are many different topologies for switch-mode power supplies. I think you might be getting some of the concepts mixed up.
First off, in all cases that I know of, AC is converted to DC using a rectifier of some sort. The AC isn't connected to the switching element.
There's a family of SMPS called off-line converters. These connect the high-voltage rectified DC and the switching element to a transformer. This provides two major benefits. The first is that a high switching frequency lets you use a smaller transformer. (That's how they make those iPhone chargers small enough to fit inside a power plug.) The second benefit is isolation from the mains voltage, which is a safety requirement.
More basic SMPS are often called DC-DC converters, and I think these are really what you're asking about. You can think of these as energy relays. They use an inductor to store and limit the flow of electrical energy based on the duty cycle of the switch. Look at a buck-boost converter -- there's never a conducting path between the source voltage and the load:

A lot of people think that energy = voltage, and then get confused when inductors show up. Remember, just because there's a current and a voltage drop, it doesn't necessarily mean the energy is lost.
Answer: In switchmode supplies, the energy lost (heat generated) is in the freewheeling diode, and in the inductor/capacitors used, and as you mentioned, the switching element.
The combination of ESR from the capacitors, forward voltage drop from the (always a Schottky diode) freewheeling diode during the off cycle, and the inductor's DC resistance are what combine to make the efficiency losses.
The important thing is also the max/min duty cycle of the converter, and some are not as good at keeping low duty cycle conditions. They may be very inefficient at very high or very low duty cycles (usually determined by the input voltage or the difference in input/output voltages) and more energy than usual is burned through the diode.
You may want to refer to an animated diagram showing a buck converter with diode and inductor and capacitor setup and see where the current flows during the cycle, and see where the losses occur.


Update on Ubuntu - coloured lines around everything

Question: Everyday I check for updates on Ubuntu 16.04 LTS. I updated to 4.4.0-65-generic today and now on everything I'm getting thick rainbow coloured lines around every dialog box in every program. My setup is pretty standard. Skylake i5-6500, Nvidia 950gtx. Does anyone know how to fix it?
Comment: This is a known bug. Remove drivers from the PPA and install the default `nvidia-367`. The latest drivers are not always the best.
Comment: Thanks. Is there a guide on how to do this?
Comment: OK. I will write an answer.
Answer: This is a bug with unofficial Nvidia drivers that you installed from a PPA.
The 375-378 drivers my be recommended by Nvidia at their site, but they are not tested for Ubuntu and not recommended by Canonical.
Run in a terminal
<code>sudo apt install ppa-purge
sudo ppa-purge ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-367
</code>
and reboot.
Comment: Will this cause a problem with CUDA and tensorflow? I'm having the same problem but I rather see this than not have tensorflow working!
Answer: I was facing the same issue. I have Nvidia Quadro 600. It was using Proprietary  driver version 375.39. Then I reversed back to an older version 304.135. and the issue was solved.


Google API for Python

Question: I want to exploit Google services like Gmail, maps, search, buzz from Python on the client side. Anyone who has any experience working with any Library / Toolkit, please suggest me some
Answer: What about Google's very own libary?
This is the list of supported API's. As for e-mail, I would stick with POP3 / IMAP / SMTP...
Comment: @Shatu: 2.7 is the latest in the python 2.x branch, so it's reasonably up to date unless you insist on using python3.
Comment: @JimmyKane - Indeed, this is why I recommended to use IMAP/SMTP in my original answer.  I don't really think a gmail API ever existed, as my understanding is that all functionality provided by gmail is in fact simply IMAP (this is why desktop mail clients can tag/untag correctly the messages, for example). Hope this clarify the issue! :)
Comment: Yeah... i checked out the documentation for that. Just wanted to have some reviews about it and to know about other similar libraries people use to get the work done.

And i hope that its inability to support anything above version 2.7 won't be a big problem, is it?
Comment: Hi @mac, I don't seem to find any source in the links regarding the Gmail API.
Comment: You are right to use googles own library... It looks better than the other stuff I found. I think you may want this url now though, the one you posted actually no longer contains the library: https://github.com/google/google-api-python-client
Comment: Also I might as well add an easy way to find the docs in case anyone wants them. Right here: http://google.github.io/google-api-python-client/docs/epy/index.html

Google API for Python