Using WhiteboxTools in QGIS 3.10/3.12

Question: i`m working with QGIS 3.10 and 3.12, trying to use the WhiteboxTools plugin. I followed the WBT-Manual (point 3.4 QGIS Plugin).The Repository details dialog box is mentioned as "https://plugins.bruy.me/plugins/plugins.xml" but it creates the Error:
"Error transferring https://plugins.bruy.me/plugins/plugins.xml?qgis=3.12 - server replied: Not Found"
Is there a new link needed?
My friend got the same problem. Worked 1 month ago, but now he has the same error.
I'm using Windows 10.
Comment: I have been getting the error for a while now every time I look at the plugins in my QGIS (I added Bruy's repository in the settings some time ago) but haven't found any explanation.  To get the plugin you might try GitHub: https://github.com/alexbruy/processing-whitebox
Comment: The author deleted a related issue in his github repo: https://github.com/alexbruy/processing-whitebox/issues/28 so I guess he withdrew the plugin.
Answer: They updated the repo link.
 The following repo link should be used (https://plugins.bruy.me/plugins/plugins.xml). This fix is also mentioned here
 Note that QGIS 3.8 or higher is required to successfully load the plugin.

Using WhiteboxTools in QGIS 3.10/3.12


Why does Cersei have to be defended by a knight of the Kingsguard?

Question: When Qyburn first brings news to Cersei of an invincible champion they agree that as queen she must be defended by a knight of the Kingsguard. Why? At this point Tommen has already married Margaery Tyrell so he is the king and she is the queen, not Cersei. Cersei is arguably still Queen Regent but, after her imprisonment and confession, Ser Kevan becomes King Regent so there is no interpretation at all by which she is still the queen. And yet everyone seems to still think she can only be defended by a Kingsguard member and so needs Ser Robert Strong appointed.
Answer: She still is the Queen mother, giving her most rights of a queen. Besides, in the eyes of the public she still is a queen, so must be defended by the Kingsguard.
Answer: Ser Kevan becomes Lord Regent, not King. That would also have been Eddard Stark's position if... well... you know. That is, the "Queen/Lord" and "Regent" parts are independent.
In my understanding, Cersei retains her formal dignity as "Queen" for as long as she is the wife or widow of Robert. (I do not know what would happen if she remarried, but I do not think that is going to come up).
However, another part to the question is "Why must a Queen be championed by a member of the Kingsguard in case of a trial by combat?" - remember that in ASOS, Cersei was championed by Gregor Clegane, who was not a member of the Kingsguard at that time.
That comes down to Cersei's plan to ensure Margaery's condamnation: in order to prevent Margaery from being innocented by a trial by combat, she arranged that only Kingsguard members with passable swordsmanship (Blount, Trant) or strong unsuitability (Kettleblack) would be present and healthy in King's Landing, and she arranged with the High Septon that the Queen could only be championed in a trial by combat by a member of the Kingsguard. Little did she know that the High Septon intended to apply every provision put forward by Cersei for Margaery's trial to Cersei's own.
Comment: Yes, Cersei has been trapped by her own web!
Answer: The Kingsguard are bodyguards to the King and his family, not just the queen. Since she is the mother of King Tommen her protection falls under the responsibilities of the Kingsguard. This includes representing her in a trial by combat.
Comment: This is not an implies-and-implied-by situation. The Kingsgaurd must defend Tommen's family, but this doesn't mean that it _has_ to be one of the Kingsguard who defends a family member in a trial by battle. On the other hand, it _has_ to be a Kingsguard member who protects Margaery/Cersei
Comment: If you are Cersei, would you want your personal thug to have the added sheen of authority of "Kingsguard," or just some dude? I don't think anyone is saying it HAD to be, but certainly, if she could choose, why wouldn't she have that designation put on him?

Also, if it comes down to conflict, that's one less potential Kingsguard on the other side.
Answer: It seems to be a tradition that the Queen (or former Queen) be championed by the Kingsguard. In the case of Cersei naming Gregor in the trial of Tyrion, that time Cersei was the prosecutor (so to speak) with Tyrion being the defendant.


Inquiry on Schengen visa

Question: I really love to visit Denmark by June. But I was refused and I dont have any idea why. Can I inquire to the Danish Immigration Services the reason why I was refused? They have this website www.newtodenmark.dk/contact-us where there is a contact form.
Comment: Please upload a scan of the refusal letter. You can see a manual on how to do it here: https://travel.meta.stackexchange.com/questions/4089/how-do-i-upload-an-image/4090#4090
Comment: Do you have the refusal letter?..
Comment: You should have a refusal letter with specific reason(s) provided for the refusal, which you should include in your question.
Comment: @JonathanReez Yes, I have. I wanna know the main reason because I want to re apply or appeal.
Comment: Which is better to re apply or to appeal?
Comment: The refusal gives you the reason you were refused. Now Schengen refusals are not very detailed unlike UK refusals so without a background of your case there is very little we can glean from it to advise you.
Comment: @JonathanReez I really dont know to upload the file. Is there any other way that I can upload the file?
Answer: In the question you asked yesterday, you said that you did did not submit all the required documents, that you failed to include a letter of approved leave. The rejection notice you received should tell you what you can do next, including appealing or reapplying. If you were rejected solely because of a missing document, the application can be re-opened. You can use the link below to email Immigration.

Appeal
Danish embassies and consulates occasionally reject visa applications. These decisions can be appealed to the Danish Immigration Service.
The rejection notice will indicate whether the decision is to be appealed to the Danish Immigration Service, the Immigrations Appeals Board or to the Ministry of Immigration and Integration, how to appeal, and whether there is deadline for appeal.
If the Danish Immigration Service rejects a visa application, the decision can be appealed to the Ministry of Immigration and Integration. The Immigration Service's rejection notice will provide instructions for appealing.
The vast majority of rejections issued by an embassy or consulate are automatically sent to the Danish Immigration Service for appeal. The applicant does not need to request an appeal.
Re-opening applications
An application can be re-opened if it was rejected due to insufficient information.
The applicant or the Danish host can submit a request to re-open an application, together with the additional documentation, to the organisation that issued the initial rejection.
If the new information is sufficient, the application will be re-opened. Please note, however, that an application can only be re-opened if the new documentation relates to the information that was available at the time the decision was made.

Here is the page with an online form to email the Immigration Service regarding your application.

Inquiry on Schengen visa


A question concerning fundamental groups and whether a map is null-homotopic.

Question: Is it true that if $X$ and $Y$ are topological spaces, and $f:X \rightarrow Y$ is a continuous map and the induced group homomorphism $\pi_1(f):\pi_1(X) \rightarrow \pi_1(Y)$ is the trivial homomorphism, then we have that $f$ is null-homotopic?
Comment: This is definitely false, e.g. take the identity map on any simply-connected space.  However, you're coming right up against a much deeper problem: based on Whitehead's theorem, you might expect that if $f:X \to Y$ induces isomorphisms $\pi_n(f) : \pi_n(X) \to \pi_n(Y)$ for all $n$ (and at any basepoint), then $f$ is a (weak) homotopy equivalence -- or just a homotopy equivalence if $X$ and $Y$ are CW-complexes.  [cont.]
Comment: But this isn't known to be true, even when $X$ and $Y$ are *finite* CW-complexes!!  In fact, this is the statement of the *generating hypothesis*, which has been an open question for something like half a century.  Which feels like it should be rather embarassing for algebraic topology as a field, but apparently many very smart people have devoted many years to trying to prove this conjecture, and so far they've all been unsuccessful.
Comment: @Aaron:  What am I missing?  If $X = T^3$ and $Y = S^2$, then the composition $T^3\rightarrow S^3\rightarrow S^2$ given by first collapsing the 2 skeleton of $T^3$ to a point, the using the Hopf map is known to be essential, and yet induce $0$ maps on all homotopy and homology groups (for trivial reasons.)  Why doesn't this apply to the generating hypothesis?
Comment: @JasonDeVito: Good point!  Actually, I've only heard the generating hypothesis posited *stably*: if $X$ and $Y$ are finite CW-spectra, then $[X,Y] \to \mbox{Hom}_{\pi_*S^0}(\pi_*X, \pi_*Y)$ is injective.  In the case of your example, $T^3 = (S^1)^{\times 3}$, but stably finite products and coproducts coincide, so $\Sigma^\infty T^3 \simeq \Sigma^\infty S^1 \vee \Sigma^\infty S^1 \vee \Sigma^\infty S^1$, and so the map must be trivial by cellular approximation (i.e. since $[\Sigma^\infty S^1,\Sigma^\infty S^2]=0$).
Answer: Take $X=S^{2}$, $Y=S^{2}$, and the map $f(x)=-x$. This map has degree $-1 \neq 0$, therefore it is not nullhomotopic. However, $\pi_{1} (S^{2})$ is trivial, so the induced map will be between trivial groups, and is thus trivial.
The claim you're making is too strong because it asserts that whenever $Y$ is simply connected, then any continuous map into $Y$ is null homotopic.
Answer: Not at all.
For example, the identity $Id_ {S^2}: S^2\to S^2 $ induces trivial homomorphism in the fundamental groups - but it is not null homotopic.
In fact, this identity is the generator of the second homotopy group of the sphere, which is not trivial.
Answer: Perhaps, I can add more examples.
First of all, a generalization of my previous answer: choose a space simply connected space $X$, such that $X$ has some nontrivial homotopy group.
Any covering map $p:X\to B $ is a morphism such that $p$ induces trivial morphism between the fundamental groups, but it is not null homotopic. Why? Because it induces a isomorphism between the higher homotopy groups - and, therefore, assuming that there is a nontrivial homotopy group of $X$, we get that $p$ induces a nontrivial homomorphism between homotopy groups...
Here, you might conjecture that what you said is true for spaces that aren't simply connected. But it is not true either.
Let $X$ be the wedge between a sphere and a circumference. You may define a map
$T: X\to S^2 $ induced by $Id_{S^2} $ and the inclusion $S^1\to S^2$. Then, compose this map with the covering map $S^2\to\mathbb{R}P^2 $.
We get, thus, a map $X\to\mathbb{R}P^2 $. This map induces trivial homomorphism between fundamental groups, but it induces isomorphisms between nontrivial higher homotopy groups.
And the fundamental group of both $X$ and $\mathbb{R}^2$ are nontrivial - the first one has $\mathbb{Z} $ as fundamental group and the secondo one has $\mathbb{Z} _2 $ as fundamental group.


Ruby 2.3.0 gem pg version 0.18.4 install error El Capitan

Question: After "bundle install", I keep getting this error for many times.
Errno::EACCES: Permission denied @ rb_sysopen - /Users/daisukeishii/tasca-     io/vendor/bundle/ruby/2.3.0/gems/pg-0.18.4/.gemtest

An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.

gem install pg keeps giving the same error
-ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
-psql (PostgreSQL) 9.5.0
-Mac El Capitan
-I checked all related posts in stackoverflow but could not solve this.
Tried to uninstall/install PostgreSQL through brew.
Tried to uninstall/install Ruby

Do you have any idea to solve this?
Answer: I had problems installing the pg gem and for me this did the trick:
ARCHFLAGS="-arch x86_64" gem install pg

However, looking at your error message it actually seems to be about not having write permissions to the gem directory. Maybe you have tried to install the gem as root with sudo gem install pg and it left behind a directory under your home directory having root as owner instead of your regular user.
Remove the directory using:
sudo rm -rf /Users/daisukeishii/tascaio/vendor/bundle/ruby/2.3.0/gems/pg-0.18.4

And then try installing again using the ARCHFLAGS above.
Note that your post has some sort of copy paste problem in the path so the path in this example might not be correct.
Answer: In my case, the pg gem was looking for a PostgreSQL installation in the wrong place, so I runned
bundle config build.pg --with-pg-config=/usr/local/Cellar/postgresql/9.4.5/bin/pg_config
which was where my PostgreSQL installation actually was, and then
bundle install


Can I use an air compressor outdoors in freezing temperatures?

Question: I need to do several days of outdoor work with a nail gun (framing/roofing a shed) in freezing temperatures this fall. I have an inexpensive oil-free 6 gallon Rigid compressor for the job. I can bring it indoors overnight, but will I have any issues using it in ~25 degree weather during the day?
Comment: Just a comment because I've never used one. But a quick look at the manual has no mention of operating temperature, just about overheating (which should be *less* of a problem in cold weather). My hunch is as long as it doesn't get wet (which you wouldn't want anyway) 25F is no big deal.
Comment: When it's cold the compressor will draw more amps. If you're using an extension cord that makes it worse. If you've used it before without issue then if you bring it in overnight you should be fine.
Comment: I mean, one sees plenty of construction going on in the cold…
Comment: The danger is that moisture will condense inside the unit.  But this depends on a number of different factors.
Answer: Warning: speculation from first principles:
Compressing air produces a lot of heat, so I suspect the compressor would be fine if it starts at all, which it should. If there's a lot of humidity in the line and you don't have an air dryer, there might be an issue at the tools, for the reverse reason.
And again, if there's enough humidity to cause serious build-up of water in the tank that might eventually be an issue if it freezes and can't be drained until the tank warms back up.
But in most places winter air tends to be relatively dry anyway ..
Comment: I would not worry about it. Humidity should not be a problem, and less of a problem then when using in warmer weather. Cold air does not hold as much moisture as warm air. I pump air to my fish pond 24/7 and when it got maybe 10 to zero the underground line froze from moisture. I changed it so it would use outside air and no problems since. It gets well below zero F here.
Comment: The tools, +1. A cheap compressor is fine, but you'd better **have good hoses**; the rubber ones, not that plastic crap that never really relaxes from its own coil, and certainly doesn't at 25 degrees.
Answer: Compressors vary, but my experience is that some compressors really don't like the cold. Storing warm overnight is good. Leaving it in the sun during the day probably helps. Running it regularly during the day (ie, drain/refill) might help. Definitely don't use an extension cord for power. Use extension hoses if you need distance. Yours is oil free, so I won't suggest an oil change, but for posterity, that might help others.
Answer: There should be no problem using that compressor in 25 degree weather. Let it run for a few minutes after start up to let it get up to operating temperature. It's air cooled so it will probably run better than it would at 90 degrees since it has a high temp reset cutout. Since the air could be more humid, you might have to drain the condensate more frequently than normal and remember to drain it at night in case to forget to bring it indoors.
Comment: Actually air likely *less* humid. Cold air can't hold as much water as hot air. That's why people add humidifiers to run during heating season - moderate humidity cold air gets heated up and then feels super dry.
Comment: @manassehkatz-Moving2Codidact  Right you are. That's why I said "could".  Just something to be aware of since the OP's using it in abnormal conditions, moving it indoor to outdoors, etc.
Comment: As long as it's actively being used and cycles occasionally, you should be fine. Like others have said, compressing air tends to create heat which would prevent freezing. Bringing it indoors at night would prevent freezing of the condensate....still probably a good idea to drain it every morning before starting work.
Comment: Cold air holds less air than hot air, so it might take longer to get up to pressure, but that's probably not a bad thing as it will help keep it warm.


programmatically add an existing entity reference autocomplete field in custom form

Question: I need to create a custom form and add an entity reference field to it. The field uses autocomplete with a view for entity selection. The field already exists on a node but i also need it in a custom module. Is there a way to add this field in a custom module with MYMODULE_MYFORM_form()?
Answer: If you are using the references module's node_reference field, then, in your custom form, you'll want to create a field that uses the node_reference's autocomplete, like so:
$form['referenced_field'] = array(
  '#title' => 'Referenced field title',
  '#description' => t('Referenced field description.'),
  '#type' => 'textfield',
  '#autocomplete_path' => 'node_reference/autocomplete',
  '#required' => TRUE,  // Optional depending on your circumstance.
);

See node_reference.module line 892 for more details on parameters, etc.
Comment: i am using the `entity reference` module and since there wasn't a replay for a couple days, i've implemented this in a different way. didn't managed to get it to work within the form. thanks anyway for your help


Find numbers of necessary edges of a graph for all Minimal Spanning trees

Question: Given a undirected weighted graph, it's easy to find one MST(Minimal Spanning tree) by Kruskal's or Prim's algorithm. Consider all MST, there are three types of edge in the graph, edges that exist in all MST, edges that exist in at least one MST but not all MST and edges that do not exist in any MST.
Is there any algorithm to find numbers of three types of edges not using recursion?
Answer: Definitely there is a simple approach to classify each edge $e$. Firstly build MST $T$. Then delete $e$ from the graph, and build MST $T'$ again. If it has greater weight $w(T') > w(T)$, then $e$ has the first type (appears in all MSTs). Otherwise, contract ends of the edge $e$, and build MST $T''$ in the new graph. If $w(T'') + w(e) = w(T)$, then $e$ has the second type (appears in at least one MST, but not in all), otherwise it has the third type (doesn't appear in any MST). It takes $\mathrm O(m^2 \log n)$, where $n$ is the number of vertices and $m$ is the number of edges.
However we can do it faster. Let's modify Kruskal's algorithm in the following way. Firstly sort all edges in non-decreasing weight order. Then every time we do the following. We add all edges of the same minimum weight together. Now all bridges have the first type, all other non-self-loops have the second type and all self-loops have the third type. After that we contract every component to a single vertex (using disjoint set data structure) before considering the next portion of edges. If we keep a list of non-isolated vertices, then we can classify all $m_i$ edges of the same weight using $\mathrm O(m_i \cdot \alpha(n))$ of time, where $\alpha(\cdot)$ is inverse Ackermann function. Here the total time is $\mathrm O(m \log m + \sum_i m_i \alpha(n)) = \mathrm O(m \log n + m \alpha(n)) = \mathrm O(m \log n)$.


Toroidal transformer

Question: I  have a toroidal transformer ac 230v  with x2 25v.
 I am trying to power an old ham amplifier  witch takes 28v 8amp (transistor) (blw77).
I have now linked the transformer to an 8 amp bridge rectifier  with a 35v 10000μF capacitor  and are getting 35.7v dc.
What kind of voltage drop would I get as the  transistor (blw77) should only take 28v 8amp.
I don't mind it not being on full power as I do not want to blow it up.
Answer: This is a tricky one. The max rating of the BLW77 is realistically 35 volts but lowering the voltage reasonably under 35V to (say) 32 volts by a resistor is going to dissipate a lot of power in the resistor at 8 amps current.
Power in resistor will be V.I = (35.7 - 32).8 = 29.6 watts.
Dropping it to 28 V is going to dissipate about 62 watts so I believe your best bet is to construct a buck regulator to drop anything between 30V to 40V down to a regulated 28 volts. Maybe one of these: -

You can set the output voltage to be 28V by adjusting the potential divider on the Vfb pin. For alternative try Linear technology and use their technical search engine for narrowing down results. TI also have a great range of buck regulators too.
Answer: the lowest voltage of ripple means deltaV=Approx = I/(2*f*C) for full wave bridge rectifier.
If the supply freq. is 60Hz delta V= approx. 7.7 Volts..means Max V=35.7,,Vmin=29Volts.
VTIngole
Answer: IF your volts under load is too high measured by dummy resister load 28 volt 8 Amp ie 3.5 ohm then you better not connect your expensive transistor PA.Now you could do a  really close in discrete buck convertor with S TRAP switching because the orthodox easy to buy buck chips probably wont have the voltage headroom and could go unstable on say below 31 volts. SO maybe the simplest thing to do is place inductance in the input you can use paralleled lamp ballasts in series to reduce the volts to 28 and you should find that the ballasts will generate a tenth as much heat as a resistor AND it will make the transformer run slightly cooler OR if this is still too much you can wind a turn on your toroid with any 10 amp insulated wire and connect to buck the secondary reducing the volts maybe you will need more than one turn FINALY is your ripple going to be low enough to not transmit hum remember that more capacitance may slightly raise dc volts and choke filter schemes will reduce it

Toroidal transformer


Why was Epaphras in prison?

Question: Philemon 1:23

Epaphras, my fellow prisoner in Christ Jesus, sends you greetings.

What was the charge?
Comment: As far as I am aware, the scriptures give no additional information as to why Epaphras was imprisoned.
Comment: Another question for which there is no Scriptural data whatever.
Answer: Paul was not in chains, locked in a prison building. It was more like house-arrest. Even with guards, there was still some freedom of movement within the house. Back in those days, prisoners did not get meals provided by the prison authorities! Relatives or friends had to supply such necessary items. Or, if the prison guard was not above a bribe, a prisoner might 'grease his palm' in order to get food or drink.
Even with house arrest, Paul would still rely on others to keep him supplied with food and so Epaphras would be a voluntary companion to Paul, who might have been in chains in a house but Epaphras would not be in chains as he was not charged with anything.
Answer: Background: Paul may have written his letter to Philemon at the same time as he wrote to the Colossians.  This would be during his house arrest in Rome.  We know that Philemon, a believer in Colosse, was a slave owner and that Onesimus had run away from him.  Onesimus came to saving faith in Christ and Paul instructed him to return to his master.  Tychicus accompanied Onesimus.
Additional information on Epaphras: While in Rome and writing to the Christians in Colosse, Paul speaks of his "fellow prisoner Aristarchus" and of Epaphras as "my fellow prisoner in Christ Jesus" (Colossians 4:10-12).

Epaphras, who is one of you [the church in Colosse] and a servant of Christ Jesus, sends greetings.  He is always wrestling in prayer for you,that you may stand firm in all the will of God, mature and fully assured.  I vouch for him that he is working hard for you and for those at Laodicea and Hierapolis.

We know from Acts 20:4 that Aristarchust (a Macedonian from Thessalonica) and Tychicus were with Paul in Greece.  Acts 27:2 tells us that Aristarchust accompanied Paul on his trip to Rome.  However, there is no mention of Tychicus.
Paul's companions seemed to have volunteered to accompany Paul to Rome and were content to be confined with him under house arrest.  We know that Onesimus and Tychicus delivered letters written by Paul - Onesimus to then remain with Philemon in Colosse.  What we know about Epaphras (a Colossian) is that he was a faithful servant of Christ Jesus.
Was Epaphras locked up in prison?  It is possible that the expression "my fellow prisoner in Christ Jesus" does not infer being held in prison by the secular authorities.  Are we not all prisoners of Christ Jesus, our Lord and Saviour?  Perhaps the only charge against Epaphras was that he was a faithful servant of Christ Jesus.

Why was Epaphras in prison?


Unfinished Video help?

Question: Does anyone have a clue how to edit an unfinished video? I had recored an hr long event for my kid but in between the camera hung. The format is a MOV. I downloaded the file on my Mac but it shows the dimension and duration of the video to be 'fetching', which I presume means it has no ending tags to indicated the length and end points of the video. I would love to recover at least part of the video if not all. Any ideas / help would be highly appreciated.
Comment: ffmpeg might be able to fix the video, if you can get it installed on OS X
Answer: This is a tool that can repair corrupted MOV files which are " truncated, broken, corrupt or damaged".
http://grauonline.de/cmsimple2_6/en/?Solutions:HD_Video_Repair_Utility
http://www.videohelp.com/tools/Video_Repair_Tool
They have a free demo, but it has limitations.  You can try the demo and see if it fixes your file, but you may have to buy the paid version to fix the whole file.

Unfinished Video help?


SSH to local ip in external network

Question: I know there is a lot of information about this subject but still I do not understand something.
We have internal wiifi network that include 4 desktops, each one has internal local ip address.
The router get external static ip addres .
I want to connect from my home laptop (different network) to each one of these desktop by their local ip users and passwords.
I understand how to create port forwarding from my router, but I want to keep it dynamic and connect by ssh to diferent desktop each time...
How can I do it?
There is any command similar to ssh username@local-ip external-ip ?
Answer: You can specify port forwarding for incoming ports to forward to port 22 on each of the computers.
Say you have 4 computers on this network. We will call them A, B, C, and D. You have a laptop on a different network and you want to connect to computer A, B, C, or D.
Set incoming port forward on port 55555, for example, to forward to computer A on port 22.
To connect to computer A on port 22, you would connect to the external IP on port 55555 which will forward to computer A on port 22. The command to connect would read like so:
ssh username@externalIP:55555

example:
ssh firstname.lastname@example.com:55555

Set up to forward all incoming connections on port 55556 to computer B, port 22 and so on and so forth.
Comment: Thanks for your detailed replay. Any way create connection without port forwarding?
Answer: if you have 1 static ip then you can NAT that to a local.
you can ssh to that (ssh username@publicip) "public server" and from there you can jump to another local computer via ssh username@localip.
Comment: So should I connect to the external network, and then to the local ip address?

SSH to local ip in external network


Sitecore JSS next.js headless Experience Editor not working in html mode

Question: I'm facing the issue that Experience Editor is loading with components, ribbon and all kind of stuff. Components are selectable but no interaction in ribbon is working whenever I would expect some Modal Dialog like: add component, Presentation Details, Switch Language and so on.
The request for that are sent and I receive 200 status codes with data of the dialogs eg: add component) but nothing is displayed and no console errors appear.
In Horizon everything works fine, there I'm able to add components etc.
Are there any ideas what could be wrong.
The page itself is really simple only the Sitecore JSS layout with a next.js Layout.tsx which have the three placeholders jss-header jss-main jss-footer. But even here I have the problem behavior.
Answer: Usually, it takes a lot of time during opening a dialog first time in Experience Editor due to MVC component precompilation. It requires warming up and then it will work much faster.


ogr: what is the advantage of using `geom.Clone()` over `geom`?

Question: What is the advantage of using geom.Clone() over geom?
Simple example:
geom = link_feat.GetGeometryRef()
newfeature.SetGeometry(geom.Clone()) # or
newfeature.SetGeometry(geom)
layer.CreateFeature(newfeature)

Answer: From my experience the difference is subtle in that GetGeometryRef() will store a reference to the geometry which will be removed when the underlying feature is destroyed. If you use Clone() when storing the geometry you can access it and its methods even after destroying the feature.
To highlight this, suppose you want to open a shapefile, read a feature geometry, and print its WKT string.
# Open shapefile for reading and get layer object
import ogr
pth = r"C:\points.shp"
driver = ogr.GetDriverByName("ESRI Shapefile")
ds = driver.Open(pth,0)
lyr = ds.GetLayer()

# Get the first feature and print its WKT string
feat = lyr.GetNextFeature()
geom = feat.GetGeometryRef()
print geom.ExportToWkt()

# Destroy the feature and print its WKT again
feat.Destroy()
print geom.ExportToWkt()

The first print statement will successfully print the geometry's WKT string. That feature is then destroyed and, as a result, the following print statement will not work and Python may crash.
Now suppose the geom variable is set as follows:
geom = feat.GetGeometryRef().Clone()

In this case both print statements will be successful as the geom variable is storing a copy of the geometry itself. You can therefore destroy the feature and you will still be able to work with its geometry.
In your particular case, SetGeometry(geom) and SetGeometry(geom.Clone()) do the same thing since you do not destroy your link_feat. That said, were you to destroy link_feat before setting the newfeature geometry, neither of your SetFeature() calls would work because they themselves reference geom, which references link_feat, which would no longer exist.
Hope that helps. It really comes down to whether or not you want to work with the geometry after the feature has been destroyed.
Answer: In addition to @Ali's answer...
My guess is the Clone() method calls for a deep copy of the object.  Where the other method provides a shallow copy.  The differences come as one only copies the memory pointer while the other copies the entirety and stores it in another memory location.  Since OGR is a C++ library, you can check out this tutorial on C++ shallow vs deep copying to get an idea.  To go further, there may be some custom logic in the copy constructor defined for the OGR geometry class, which wouldn't be replicated in the shallow copy (probably using the default constructor).
In any case, when you're just copying the reference and the original object is destroyed, the deconstructor is called and that bit of memory gets wiped, so your other variable would come up as a None type.  Doing a deep copy would be more taxing on the system since it allocates more memory for your application and then needs to maintain another pointer, but it helps keep a clear separation of concerns.  If you wanted to edit the geometry or otherwise modify it, Clone() is the better idea.
Answer: According to the docs, it seems there is no difference.
SetGeometry "updates the features geometry ... and does not assume
ownership of the passed geometry, but instead makes a copy of it."
so, in the case of SetGeometry, both
newfeature.SetGeometry(geom)

and
newfeature.SetGeometry(geom.Clone())

do the same thing.


SDK 2.0: Way to get to highcharts directly

Question: I've tried to do some charting with the SDK 2.0 chart object, but its a new feature and the I don't think the doc has caught up yet.  As such, I'd like to just chart directly into highcharts and skip the Rally Glue for now.  How can I get the right libraries loaded to accomplish the following:
<code>var chart = new Highcharts.Chart();
</code>
Answer: Right now the highcharts library is only loaded on demand when you create a Rally.ui.chart.Chart and render it.  In the future we may make highcharts directly available.


Having some trouble with Grease Pencil

Question: I'm not entirely sure whats happening but every time I try to use Grease pencil on my mesh it comes out all scrambled and weird. Posting pic for more information,.
Comment: It is possible that this is connected to the add-on, and not directly a problem in Blender. Try disable SpeedRetopo and see if you can use the grease pencil as intended. If it is connected to the working of the add-on  I suggest you rephrase your question... or ask the creator directly: http://www.pitiwazou.com/contact/
Answer: So apparently I had bsurfases added twice. I just had to delete one of the installations. Now everything works fine

Having some trouble with Grease Pencil


Convert apk to aab

Question: I have compiled my app as an apk, but Google Play rejected the format saying that I need to optimize it. Now I know I have to upload an aab file. How can I convert my apk file into an aab one?
Warning message
Answer: You can convert apk to aab without source from apk but its long process

1.decompile apk with apktool

copy res folder and AndroidManifest.xml to another folder

use aapt2 compile command to compile each resources one by one and it will convert every .png .xml file to .flat file

4.Use aapt2 link to make apk that contain resources in protobuf format
5.Extract resources.pb from apk and AndroidManifest.xml and res folder
6.Make base.zip and use build-bundle command to create aab
or upload your apk here apktoaabconverter.com they will convert apk for you
Answer: The warning if you don't upload an AAB is not blocking the release. If you can't publish, there must be another reason: go back to your store listing or distribution options to make sure you have filled out everything.
I know this doesn't answer directly your question, but uploading an AAB will not help you since you'll be stuck at the same place (you won't have the warning anymore but you still won't be able to publish).
Comment: Makes sense... Thanks a lot!
Answer: You can use aapt2 tool present in android_sdk/build-tools/version/ and then follow aapt2 convert --output-format proto -o <output path to aab file> <path to apk file>

Convert apk to aab


In an experiment, why can you select your own alpha level for significance testing?

Question: From what I have learned, the alpha level tells you that if you repeat the experiment a bunch of times, then (alpha x 100)% of the time you will have a false positive. I'm confused though on if you're the one who gets to pick the alpha level, then how is this always the case? Like if my alpha is 0.05, 5% of the time I will have a false positive (FP), but then if I want to use alpha = 0.5, then 50% of the time I will get a FP. Why is this?
Comment: You can also pick $\alpha = 100\%$, but then would anyone trust your significant results? :)
Answer: When you conduct a statistical test, basically it outputs a p-value that you do not choose.
This p-value ($p$) tells you that if the null hypothesis is true and the test assumptions are met, then you'd see a result at least as extreme as the one you're seeing $p \times 100$% of times, if you were to repeat the experiment a lot of times.
The alpha level ($a$) you choose before conducting the test is not the p-value that the test outputs. Your question seems to assume that $p$ and $a$ are the same, but they are two separate things.
Alpha is a threshold that you choose, and use to decide if the p-value returned by the test is significant or not. Ideally, this threshold should make sense and be relevant.
An alpha level that makes sense depends on the context of the study you're conducting. In particular, you should think about the consequences of choosing an alpha level that is too conservative or too liberal (e.g. would some people get hurt if you incorrectly reject the null hypothesis and then take some decision based on that? Would the study cost too much to conduct if you set a too small alpha level? etc.).
Here is a simple example that hopefully should make things clearer if your confusion came from the difference between $p$ and $a$:

You decide to use an alpha level of 0.05 before conducting your experiment and statistical analysis, based on your knowledge of the consequences that this alpha level would have in your specific situation.
Then, you conduct your experiment, and after that you conduct a statistical test on the data you collected.
The statistical test returns a p-value of 0.00001: the result is significant according to the threshold you pre-specified, as
$0.00001 < 0.05$. Had the test returned a p-value of 0.3, the result would have not been significant according to the criteria you pre-specified, as $ 0.3 > 0.05$.
Answer: The premise of your question is not quite right. Alpha is the fraction of the time you'll have a false positive only if:

The null hypothesis is assumed to be true. Usually, this means assuming (for the sake of argument while interpreting alpha or p) that the two populations have the same mean (or proportion, or survival curves...).
All the assumptions of the analysis are correct. Often this means assuming the population follows a normal distribution and the deviation of each value from the mean is due to independent random reasons.

Your overall question needs clarifying. Alpha is a cutoff for making a conclusion, so it has to be set to a value. If not chosen by the experimenter, then by who?
Addendum Feb. 25, 2023: Maybe this will help. If you choose a large value for alpha, you'll have a larger chance of obtaining a false positive but a smaller chance of a false negative. If you choose a small value for alpha, you'll have a smaller chance of obtaining a false positive but a larger chance of false negative. It's a tradeoff. That is why there is a choice.
Comment: Could be set by a regulator, reviewer, funder…
Comment: *February* 25, 2023?
Comment: I meant in anticipation of what a reviewer might say to a paper claiming something like "significance at the $\alpha = 0.9$-level". // That could make for a good posted question, though I suspect we already have one.
Comment: @Dave "By a reviewer" assumes that $a$ would be set *post-hoc* (assuming we're talking about someone reviewing a paper submission, i.e. after the test has been conducted). Isn't it a problem, in particular relatively to publication bias?  Genuine question. I'm wondering if I'm missing something here out of ignorance, or if you were just describing how things are (regardless of how they should or should not be).
Comment: Oh yes I meant if you assume the null is true, and I was just wondering because sometime's in problems I've been able to select alpha myself, and other times it's given but I know when I can select alpha, I can choose any value like 0.05 or 0.1. So then I was wondering why do you get to randomly choose what value will be the fraction of false positives
Answer: UNDER THE NULL HYPOTHESIS, THE P-VALUE HAS A UNIFORM(0,1) DISTRIBUTION.
That's really all there is to it, but I believe that a simulation and a picture can help unpack that sentence.
UNDER THE NULL HYPOTHESIS means when the null hypothesis is totally, 100% true, along with all other assumptions (such as normality for a t-test). Consequently, what ever p-values we simulate should happen for tests of true null hypothesis. In this case, we will use a one-sample t-test to test if the mean is zero, simulating independent draws from a $N(0,1)$ distribution. Thus, all standard assumptions of the t-test are satisfied: independence, equal variance, and normality. The simulation repeats this $10000$ times to get an entire distribution of p-values.
library(ggplot2)
set.seed(2023)
N <- 1000
R <- 10000
p <- rep(NA, R)
for (i in 1:R){
  x <- rnorm(N) # Simulate the distribution
  p[i] <- t.test(x, mu = 0)$p.value # Calculate the t-test p-value
}
d0 <- data.frame(
  p_value = p,
  CDF = ecdf(p)(p),
  Distribution = "p-value Distribution"
)
d1 <- data.frame(
  p_value = p,
  CDF = qunif(p, 0, 1),
  Distribution = "U(0,1) Distribution"
)
d <- rbind(d0, d1)
ggplot(d, aes(x = p_value, y = CDF, col = Distribution)) +
  geom_line() +
  theme(legend.position="bottom")

As you can see from the lines overlapping so nicely, when the null hypothesis is true and the other test assumptions are met, the p-values generated by a t-test do generate a $U(0,1)$ distribution.
What this means is that, if you reject the null hypothesis when $p\le0.05$, you will reject in $5\%$ of these cases where the null hypothesis and other test assumptions are true, since $P(p\le0.05)=0.05$. If you reject the null hypothesis when $p=0.5$, as is suggested in the OP, you will reject in $50\%$ of these cases where the null hypothesis and other test assumptions are true, since $P(p\le0.5)=0.5$.
In general, for a $U(0,1)$ distribution, if $0\le\alpha\le 1$, $P(p\le\alpha)=\alpha$. That's really the defining characteristic of the $U(0,1)$ distribution. In that sense, by picking the $\alpha$-level for the test, you pick your tolerance for rejecting when the null hypothesis is true.
However, note that rejecting in this case is a mistake. By the simulation, the null hypothesis is correct, and rejecting the null hypothesis is a so-called type I error. Errors are bad, and we like to minimize them. Consequently, it is typical to set $\alpha$ low, often around $0.05$ or lower, in order to keep from having a bunch of false positives.
You can take it it to the extreme to see why we don't want a high $\alpha$-level: if you set $\alpha = 1$, your test always rejects. Is a rejection by a statistical hypothesis test that always rejects, no matter what, any kind of evidence of a discovery? I say it is not. That is equivalent to the function below that makes absolutely no use of the data.
worthless.test <- function(input_data){
    print("Reject the null hypothesis!")
}

Comment: `worthless.test` reads like `conspiracy_theory.test`.
Comment: This is also discussed in the paper [*Duncan J Murdoch, Yu-Ling Tsai & James Adcock (2008) P-Values are Random Variables, The American Statistician, 62:3, 242-245, DOI: 10.1198/000313008X332421*](https://www.jstor.org/stable/27644033).
Answer: Alpha is a decision threshold of how "sure" you need to be that an observed result is incompatible with the null before you conclude that the null is indeed false. For a typical alpha like 0.05, only 5% of the time will you reject the null when it's actually true - you'll get very few false positives, since you require pretty strong evidence to reject the null. For an uncommonly permissive alpha like 0.5, you'll incorrectly reject the null 50% of the time - you'll make many mistakes by rejecting the null since little evidence is required at that threshold.
Alpha = 0.05 is a typical threshold where most people agree that "statistically significant" is generally useful and not a meaningless statistical fluctuation. But each researcher is free to choose their alpha, which in a way represents how much evidence they require to be convinced - in other words, how skeptical they are. A high-alpha individual will spuriously reject many nulls but will rarely miss a true effect, while a low-alpha individual will find fewer true effects overall, but at a higher rate.
Imagine the Bigfoot enthusiast who accepts a grainy photo as sufficient proof of cryptozoology. He has a high alpha threshold, willing to reject the null with little evidence. He will not, however, ever be proven wrong by claiming that cryptids do not exist when they actually do. In contrast, a scientifically rigorous biologist may have a much lower alpha threshold, requiring more evidence to reject the default state of knowledge that there is no Bigfoot. The scientist's skepticism may lead him to disregard evidence of cryptids that truly do exist, but when the scientist claims that one exists, he's more often correct.
There is not one "optimal" alpha that is universally agreed upon for all scenarios. At the one end, a person who uses a very high alpha threshold regularly makes false findings based on little evidence, but at the other end, a person who uses a very low alpha regularly fails to acknowledge real effects because they deem even strong evidence insufficient. What alpha to use depends on your goals and how you perceive the relative costs of false positives versus false negatives.
Alpha represents a decision threshold for whether you deem an observation to be a result of random chance or a true effect. The question could be rephrased as, why am I allowed to decide for myself how much evidence will be convincing? Although there are common standards, it's a personal choice.
Answer: The optimal alpha value depends on many factors of the specific research area. It can't be fixed a priori by mathematics alone, and there's no universal consensus on what the "best" value is, nor can there be. Here's a recent paper in PLoS One that tries to grapple with this issue:

Miller J, Ulrich R. The quest for an optimal alpha. PLoS One. 2019 Jan
2;14(1):e0208631. doi: 10.1371/journal.pone.0208631. PMID: 30601826;
PMCID: PMC6314595.

The abstract:

Researchers who analyze data within the framework of null hypothesis
significance testing must choose a critical "alpha" level, α, to use
as a cutoff for deciding whether a given set of data demonstrates the
presence of a particular effect. In most fields, α = 0.05 has
traditionally been used as the standard cutoff. Many researchers have
recently argued for a change to a more stringent evidence cutoff such
as α = 0.01, 0.005, or 0.001, noting that this change would tend to
reduce the rate of false positives, which are of growing concern in
many research areas. Other researchers oppose this proposed change,
however, because it would correspondingly tend to increase the rate of
false negatives. We show how a simple statistical model can be used to
explore the quantitative tradeoff between reducing false positives and
increasing false negatives. In particular, the model shows how the
optimal α level depends on numerous characteristics of the research
area, and it reveals that although α = 0.05 would indeed be
approximately the optimal value in some realistic situations, the
optimal α could actually be substantially larger or smaller in other
situations. The importance of the model lies in making it clear what
characteristics of the research area have to be specified to make a
principled argument for using one α level rather than another, and the
model thereby provides a blueprint for researchers seeking to justify
a particular α level.

Link to the article.
Answer: There are some excellent answers, but none discuss risk.
Often, stats are used for practical reasons.  We can talk about the probability that two people in a particular group weigh within a kilogram of each other, or we can talk about the probability that a vaccine has a potentially deadly side effect.  We may use similar tools, but it should be apparent that making a poor decision concerning the latter has ramifications above and beyond messing up on the former. If you tell the FDA that you tested the RSV vaccine for the side effect of Guillan Barre Syndrome at $\alpha=0.05$, the FDA may well turn your application down (as soon as they finish laughing).
Thus, we can choose alpha based upon how certain we need to be.  In fact, when you present a reviewer with the results of your test and the alpha you used, you tell the reviewer what they need to know to make a decision about whether your statistical methods have an appropriate level of conservatism for a given situation.
Answer: When you do a statistical test (any kind of yes/no test, really), you can have two kinds of errors (wrong results): false positives (test says yes but real answer is no), and false negatives (test says no but real answer is yes).
The catch is that it's very easy to skew (non-technical term) your test one way or the other simply by making the test more likely to give one or the other answer - make a "yes" answer more likely, and then you get less false negatives, but more false positives, or make a "no" answer more likely, and then you get more false negatives, but less false positives.
So, how do you know that your test has a good yes/no balance? There's no "default" or "neutral" setting - there's nothing we can look at and definitively say "this is a fair test". Setting alpha=0.05 is setting your test's skew so that if the real answer is no, your test gives a false positive result 5% of the time. That seems fairly reasonable, so they do it. I don't think there's any reason why 5% is so common, rather than say 2% or 10%, other than gut feelings.
You only get to set one knob - all the other "skew parameters" are determined based on the one you control, and the quality of your data. You can't say you want 1% false positives and also 1% false negatives. If you want very few false positives, and your data is crap, you're going to get very few true positives as well.
Why do we choose to set the percentage of the time we get a false positive when the real answer is no, and not some other statistic, like the percentage of the time we get a false negative when the real answer is yes? Well that just happens to be something that's easy to control.


UICollectionView as UITableView subview flow layout loop

Question: I have an UITableView and I want to add a UICollectionView with a horizontal flow layout as subview in the backgroundView of the tableView, to do the same effect of the AppStore. Here I have the implementation code:
in the viewDidLoad:
UIView *tableViewBackgroundView = [[UIView alloc] initWithFrame:self.view.bounds];
    self.tableView.backgroundView = tableViewBackgroundView;

// HighlightView heightFactor returns the reason which is  9.0/16.0
    CGFloat headerViewHeight = CGRectGetWidth(self.view.frame) * [HighlightView heightFactor];
    self.tableView.contentInset = UIEdgeInsetsMake(headerViewHeight, 0, 0, 0);
    self.headerView = [[HighlightView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), headerViewHeight)];
    [tableViewBackgroundView addSubview:self.headerView];

The HighlightView is a view with a collectionView inside.
But I'm having an issue, when the user interacts with the collectionView I start to receive this log:

Please check the values return by the delegate. the behavior of the
  UICollectionViewFlowLayout is not defined because: the item height
  must be less than the height of the UICollectionView minus the section
  insets top and bottom values.

And this becomes a loop that doesn't stop even when the user stops to interact.
HighlightView (CollectionView) code:
override init(frame: CGRect) {
    super.init(frame: frame)
    self.viewModel.delegate = self
    self.configureHighlightsCollectionView()
}

func configureHighlightsCollectionView() {

    let flowLayout = UICollectionViewFlowLayout()
    flowLayout.scrollDirection = UICollectionViewScrollDirection.Horizontal
    flowLayout.minimumInteritemSpacing = 0
    flowLayout.minimumLineSpacing = 0
    if systemVersion > 8.0 {
        flowLayout.estimatedItemSize = self.frame.size
    }
    flowLayout.itemSize = self.frame.size
    self.highlightsCollectionView = UICollectionView(frame: self.bounds, collectionViewLayout: flowLayout)
    self.highlightsCollectionView.frame = self.bounds
    self.highlightsCollectionView.scrollsToTop = false
    self.highlightsCollectionView.pagingEnabled = true
    self.highlightsCollectionView.registerClass(CachedImageCollectionViewCell.self, forCellWithReuseIdentifier: "ImageCell")
    self.addSubview(self.highlightsCollectionView)

    self.highlightsCollectionView.invalidateIntrinsicContentSize()

    self.highlightsCollectionView.dataSource = self
    self.highlightsCollectionView.delegate = self
    self.highlightsCollectionView.backgroundColor = UIColor.greenColor()

    self.highlightsCollectionView.snp_makeConstraints { (make) -> Void in
        make.top.equalTo(self)
        make.bottom.equalTo(self)
        make.left.equalTo(self)
        make.right.equalTo(self)
    }

}
//Mark: UICollectionViewDataSource
    public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return self.viewModel.highlightsArray.count
    }

public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
    let cell = collectionView.dequeueReusableCellWithReuseIdentifier("ImageCell", forIndexPath: indexPath) as! CachedImageCollectionViewCell
    cell.highlightData = self.viewModel.highlightsArray[indexPath.item]
    return cell
}

public func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
    println(self.frame.size)
    return self.frame.size
}

The viewModel is a class who controls the data flow of the collectionView.
Comment: Why not directly using the headerView property of your tableview ? If you're using Auto Layout you have to set constraints to your views.
Comment: Because the animation effect, when you use the Header, it scrolls with the content, when you use as background, the content scrolls above of it. And yes, I've set the constrains, and even without any kind of auto layout, the problem happens
Comment: Sure. Anyway your problem comes from your UICollectionView and its layout, you should put some code about it
Answer: First I don't think it's a good idea to put your view as datasource and delegate of your UICollection inside your UIView subclass. You're not respecting the MVC pattern. Learn more informations about it at Introducing iOS Design Pattern . You should set your controller as it.
The problem is you're setting the itemSize of your UICollectionViewFlowLayout in initFrame: based on the frame of your view. In that method, the frame of your UIView is not correct since you're using AutoLayout. You have to wait until AutoLayout calculates the layouts of your views so when layoutSubviews: is called. Learn about UIView and AutoLayout in the Matt's book. It's for iOS 6 and in Objective - C but still great.
Comment: Hey, I've tried to change the code to layoutSubviews or drawRect(), the result was the same, the loop keep happening. Thanks for your help, i I'll study these articles. I think the problem is the TableView/CollectionView scrolls hierarchy
Comment: Do you set the sectionInset of your collection view to UIEdgeInsetsZero ?
Comment: No, should I? What this would do?
Comment: https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/UsingtheFlowLayout/UsingtheFlowLayout.html#//apple_ref/doc/uid/TP40012334-CH3-SW1 at "Using Section Insets to Tweak the Margins of Your Content"
Comment: Unfortunately, the default edge insets are all set to 0. So that can not be the problem.
Comment: I found it... and it's stupid: flowLayout.estimatedItemSize = self.frame.size, this line, it's the source of all evil, lol. Well, there's no apparent reason which that should be the problem, but when I commented it, the bug was gone.
Comment: Where do you put itemSize = self.frame.size ?


What are the advantages of segmentation?

Question: Suppose you want to fit a regression model. You have a data set with multiple attributes. What would be the advantages of segmenting the data set and fitting a regression model to each of the segments?
Comment: You may want to clarify whether you mean segmenting according to some variable(s), e.g. splitting the data according to high or low values of X, or segmenting at random? I interpreted it as the former, but evidently it's possible to interpret it as the latter.
Comment: I consider prevention of overfitting an advantage, yet my hasty answer lacked both literature as well as explanation, which is why i deleted it.
Answer: By "fitting a regression model to each of the segments", I suppose you mean trying to do something like a Piecewise Linear Representation of a long time-series, as described in this paper: Segmenting Time Series: A Survey and Novel Approach. As quoted straight from the paper:

...this representation makes the storage, transmission and computation of the data more efficient. Specifically, in the context of data mining, the piecewise linear representation has been used to:

Support fast exact similarly search [13].
Support novel distance measures for time series, including "fuzzy queries" [27, 28], weighted queries [15], multiresolution queries [31, 18], dynamic time warping [22] and relevance feedback [14].
Support concurrent mining of text and time series [17].
Support novel clustering and classification algorithms [15].
Support change point detection [29, 8].

In summary, it can be seen as a type of data preprocessing so you can train some kind of machine learning algorithm more easily/accurately (such as your regression model) or if you prefer, as a type of feature extraction.
Comment: +1 but, I think OP is trying to build multiple models for each subset of data, instead of a piecewise linear funciton
Answer: By doing "segmentation" and build multiple models for each subset of data, you are essentially increase the model complexity, and may lead over fitting (So, it is not guaranteed to have advantage, but may also have disadvantage.)
I would suggest you to check the Bias-Variance trade off and understand if you are under fitting or over fitting.

If you are underfitting, "segmentation" and build multiple models for each subset of data, will help you. By increase the complexity of the model.
If you are over fitting, "segmentation" and build multiple models for each subset of data, will make things even worse.


independence of $\ell$ of characteristic polynomial of Frobenius on $\ell$-adic Tate module of Abelian varieties over number fields

Question: I am looking for a reference for the independence of $\ell$ of the characteristic polynomial of the Frobenius $\mathrm{det}(1-|\kappa(v)|^{-s}\mathrm{Frob}_v \mid (V_\ell A)^{I_v})$ acting on the $\ell$-adic Tate module of an Abelian variety $A$ over a number field (you may assume $v \nmid \ell$).
Comment: With $v \nmid \ell$, see Application 1 in section 4 of http://math.stanford.edu/~conrad/BSDseminar/Notes/L3.pdf Hopefully someone knows a published reference (e.g., somewhere in Exp. IX of SGA7?).
Comment: Serre asserts this in "Examples" on page I-12 of Abelian $\ell$-adic representations and elliptic curves.
Comment: @JeffYelton: Those "Examples" in Serre's book don't address the characteristic polynomial on the space of inertial invariants at bad $v$ (as one varies $\ell$), which seems to be the main focus of the question.
Answer: This follows from Grothendieck's semistable reduction theorem -- the precise reference is SGA 7, Exp. IX, Thm 4.3(b).
The idea is to express the characteristic polynomial of Frobenius in terms of the special fiber of the Néron model of $A$ and then to write this special fiber as an extension of an abelian variety $B$ by an algebraic group $G$ which is itself an extension of a unipotent group $U$ by a torus $T$. We are thus reduced to show the independence of $\ell$ for $B$ and $T$, which basically follows from the Weil conjectures.


Using Custom Login Form (Vaadin Components with Spring Security/ROO

Question: I have completed setting up Spring Security using the roo shell as a guide and it has generated several views, amongst them is the login.jspx. I am trying to create a custom login form using Vaadin's Visual editor and Eclipse, how can i redirect the user to my login form and then use Spring Security to validate and authenticate the user as well as start a session management? I am really trying to avoid JSP since the rest of my application is using Vaadin as its Core Front-End
Answer: vaadin has some limitations on the login form.
Have a look at: https://vaadin.com/book/-/page/components.loginform.html so you will notice what I mean.
You can also have a look at the vaadin wiki (https://vaadin.com/wiki). There are several articles on your topic. You may find your solution there :)
kind regards
.zip
Comment: almost a year since i asked this question. But i found a better solution that allows me to build my own front end login form with vaadin using Apache shiro as my security. Works much better


Why don't people use their own random noise to counter adversarial attacks on computer vision systems?

Question: Why couldn't you take the image an AI is given and apply several different random noise filters to the image and take the democratically most common response and use that for the output of the AI. As it stands adversarial attacks require the noise they add to the image to be very specific, but if you just applied light noise that disrupted the attack while using multiple versions so you don't disrupt yourself, couldn't that counter the attack? And since the noise is runtime random the attacker would have no way of working around it.
Answer: Adding noise to the signal after training:
It might disrupt attacks unaware of the noise, no guarantees.  Hopefully the adversary doesn't wise up to the noise and train their model with the noise in mind.  Enter a cat and mouse game.  Noise of course can reduce accuracy of some models.
Adding noise to the signal during training:
Accuracy in the face of noise is a bigger problem than accuracy without noise.  Bigger problems generally requires a bigger models.  Depending on the platform there may not be budget for a bigger model (car ECU, phone, etc).
And of course it's hard to tell the difference between generalizing to all noise versus generalizing against specific noise.  If the model is not generalized against all noise, there is possibly noise that still exists that causes undesirable behavior.  Welcome back to the previously discussed cat and mouse game.
Comment: How do you train a neural network generating images to remain adversarial in the presence of random noise? Like how does it train the work around random values when it doesn't know what they're going to be?
Comment: Neural networks can be described as making simplifying assumptions driven by the constraints under which it was trained.  It has not seen every car, yet it can identify a previously unseen car because of it's simplifying assumptions.  A network hellbent of causing another network to misclassify something, given the constraint that there will be noise, will make a simplifying assumption that it's perturbations must survive noise.  It may not work on all noise just as the same as a classifier might miss a car but it could still be effective enough.
Comment: The adversary's life will be made much easier if they happen to know what type of noise will be inserted (by reverse engineering, etc) so this can be included in training.


How did Aristotle or St. Thomas resolve the liar's paradox?

Question: How did Aristotle or St. Thomas Aquinas (such as in one of his commentaries on Aristotle) resolve the liar's paradox?
Comment: See Paolo Crivelli, [Aristotle on the Liar](http://link.springer.com/article/10.1023%2FB%3ATOPO.0000021383.64906.79) : it seems that "The only passage from Aristotle's works that seems to discuss the paradox of the liar is within chapter 25 of *Sophistici Elenchi* (180a34–b7)."
Answer: Aquinas doesn't have anything to say about the liar's paradox, to my knowledge (informed, but finite) knowledge. However, a slightly later medieval philosopher named John Buridan certainly does.
Take a look at Gyula Klima's paper on the topic to get a sense of his solution here. In essence what Buridan does is say that the Liar sentence is false, but then he attempts to block the inference that falsity of the Liar sentence entails that the negation of the Liar sentence is true. See Klima's paper for details on how this is supposed to work.
Answer: This is the closest I've been able to find in St. Thomas, where he discusses whether truth is immutable (Summa Theologica I q. 16 a. 8 ad 3):

A proposition not only has truth, as other things are said to have it, insofar, that is, as they correspond to that which is the design of the divine intellect concerning them; but is said to have truth in a special way, insofar as it indicates the truth of the intellect, which consists in the conformity of the intellect with a thing. When this disappears, the truth of an opinion changes, and consequently the truth of the proposition. So therefore this proposition, "Socrates sits," is true, as long as he is sitting, both with the truth of the thing, insofar as the expression is significative, and with the truth of signification, insofar as it signifies a true opinion. When Socrates rises, the first truth remains, but the second is changed.

And from his Quæstiones Disputate De Veritate a. 6, on whether truth is immutable:

The truth of a thing is the cause of the truth of a proposition, for a statement is said to be true or false insofar as a thing exists or does not exist.

and

it is essential to a proposition that it signify that which it has been made to signify.

Thus, according to St. Thomas, the liar's paradox "propositions" are not real propositions at all because there is no corresponding thing for them that "exists or does not exist" and they do not "signify that which" they have "been made to signify."
Comment: Excellent! I am glad to see my answer is the same as his. I was thinking "this sentence" (in 'This sentence is false') doesn't convey any proposition to be true or false, and the only semantic way to interpret it is recursive nonsense of the form If A Then Not A.
Comment: @InternetUser cf. [_The Mediaeval Liar: A Catalogue of the Insolubilia-literature_](https://isidore.co/calibre#panel=book_details&book_id=5568)
Answer: Aristotle's Sophistical Refutations said "The argument is similar too concerning the same man's lying and speaking the truth at the same time" lead an Archbishop of Canterbury, Thomas Bradwardine (c. 1300–1349), to write his Insolubles at Oxford between 1321 and 1324.
"Insolubilia and Bradwardine's Theory of Signification." Medioevo: Revista di storia della filosofia medievale, 7: 115–34. claims:

For the opinions mentioned above were those of the old [logicians], who understood little or nothing about insolubles. After them there arose the prince of modern philosophers of nature, namely Master Thomas Bradwardine. He was the first one who discovered something worthwhile about insolubles.


Is ThreadedCoreData example (from Apple) creating NSManagedObjectContext on main thread?

Question: From http://goo.gl/MkV8V
You must create the managed context on the thread on which is will be used. If you use NSOperation, note that its init method is invoked on the same thread as the caller. You must not, therefore, create a managed object context for the queue in the queue's init method, otherwise it is associated with the caller's thread. Instead, you should create the context in main (for a serial queue) or start (for a concurrent queue).
From http://goo.gl/6CMO4
In ConnectionDidLoading method:
ParseOperation *parseOperation = [[ParseOperation alloc] initWithData:self.earthquakeData];
[self.parseQueue addOperation:parseOperation];
[parseOperation release];   // once added to the NSOperationQueue it's retained, we don't need it anymore

ConnectionDidiLoading is being called on the main thread. Now Inside the ParseOperation::initWIthData method we have something like this : (See ParseOperation.m file)
    // setup our Core Data scratch pad and persistent store
    managedObjectContext = [[NSManagedObjectContext alloc] init];
    [self.managedObjectContext setUndoManager:nil];

    SeismicXMLAppDelegate *appDelegate = (SeismicXMLAppDelegate *)[[UIApplication sharedApplication] delegate];
    [self.managedObjectContext setPersistentStoreCoordinator:appDelegate.persistentStoreCoordinator];

#
My understanding is that this managedObjectContext is still created on the main thread.
Would appreciate if someone clarify or correct my understanding as it is quite unlikely that sample code from Apple is not correct.
Answer: Good point here. Seems the code is not correct (but maybe I'm wrong). Based on my experience you should create the context within the start method (for example) or something strange could happen.
The other rule is that you cannot pass NSManagedObject among treads. Pass NSManagedObjectID instead. Before passing them, you need to save to disk.
These rules habe been enforced in iOS 5. Starting from iOS 5 you could take advantage of Core Data new API for creating context in a private queue (there is also a main queue) and perform long running calculation there. In addition if you pass NSManagedObject between threads exceptions occur.
Answer: In my opinion you are correct. Apple seems to break their own rules in this sample code. However it seems in practice, and this is not much advertised, that as long as the managed object context is used only on one single thread, you are safe, regardless on which thread the context was created.


doppler tolerant phase coded waveforms

Question: how do i conclude a waveform shows doppler tolerance, say polyphase code-frank code, without the use of ambiguity diagram? we know that it is doppler tolerant and if we check the frequency spectrum of output of matched filtering, it will show the shift right? so how do i differentiate it from 13bit barker code?
i'm trying to implement this on matlab, but, i need to get my theory right first.
Comment: Why do you not want to use an ambiguity diagram? That is the easiest way to determine doppler tolerance.
Comment: @Ian I think there is more here for me to understand with regards to Frank codes and related Doppler tolerance so I deleted my answer to attract other better ones.
Comment: I second @Baddioes question. Are you trying to avoid using a built-in function to produce the ambiguity diagram? Or is there something about the theory that maybe needs more explanation before you use one for analysis in general?
Answer: You should really read this paper, Phase Coded Waveforms for Radar, on doppler tolerance and phase coded waveforms.
I'll summarize section 5 on doppler intolerance for phase coded waveforms. PC waveforms are broken up into "chips", where each chip is the original signal with a phase offset. Each chip has a separate phase offset from the previous chip. It could be the same, it could be different.
Frequency is the derivative of phase. So, if you have a target at a constant radial velocity inducing a doppler shift $f_{d}$, a linear phase shift across your pulse will be induced. For short pulse widths, it's likely a good enough approximation that the phase will be linear even if there is some non-zero acceleration.
For an uncompressed phase coded pulse, the phase shift experienced by each chip is
\begin{equation} \phi_{n} = 2\pi \frac{nf_{d}\tau}{N-1} \end{equation}
where $N$ is the number of chips, $\tau$ is the pulse width, and $n \in [0,N-1]$.
If you want to figure out doppler tolerance for phase coded waveforms, and not use an ambiguity function, you can compare the output of the matched filter with an input signal not affected by doppler shift with the output of the matched filter where the signal has suffered a doppler shift. You can use, for example, a $3 \, dB$ criteria to determine at what doppler shift is there too much degradation to be considered doppler tolerant. Usually, doppler tolerance is defined for a range of doppler frequencies.
A way of compensating for doppler with phase coded waveforms is to design a "mismatched" filterbank. Mismatched filters compensate for the doppler shift by applying a linear phase across each chip. This is also discussed in section 5 of the paper. You can attempt to get a good pulse compression by compensating for the doppler shift in the matched filter coefficients.
Comment: To compensate you want to separate the returns by angle/Doppler prior to removing the waveform. If the same waveform is repeated on each pulse, this can be achieved by a simple keystoning of the data. If the waveform changes from one pulse to another, things get more complicated but it is doable. Using a bank of filters that are offset in frequency from one another just introduces redundancy into your output, which then has to be dealt with using detection or some other non-linear process.
Answer: The ambiguity diagram is used to analyze the result of pulse compression when receiving a Doppler-shifted version of the original waveform. I am not sure why you want to avoid the ambiguity diagram itself. The ambiguity function for a waveform $s(t)$ is given by:
$$A(\tau, f_D) = \int_{-\infty}^{\infty}s(t)e^{j2\pi f_Dt}s^*(t-\tau)dt$$
When you are looking at the output of a nominal matched filter, you're really looking at the zero-Doppler slice. If you consider $f_D=0$ then
$$A(\tau, 0) = R(\tau) = \int_{-\infty}^{\infty}s(t)s^*(t-\tau)dt$$
Which is exactly the autocorrelation function of $s(t)$, which is what the matched filter nominally yields. By analyzing the output of the matched filter, you're looking at a single slice of the ambiguity diagram. Repeating the operation for all considered Doppler frequencies $f_D$ allows you to build the full ambiguity diagram. The diagram will then show you what the output of the nominal matched filter looks like when the return signal has a Doppler shift. There are other aspects of the waveform that can be analyzed, such as range and Doppler resolution, but we won't go over that here.
Doppler Tolerance
There are multiple metrics that define "Doppler tolerance", and are dependent on what is important for a specific application. These include:

SNR loss (or loss in the peak output)
Side-lobe levels
Other characteristics such as any time-shifts (e.g., when considering the LFM waveform)

As you already know, some classes of waveforms are more Doppler tolerant than others. In other words, some waveforms deviate less from the nominal matched filter response when a Doppler shift is induced.
Let's consider three pulse types: rectangular (aka unmodulated), linear frequency modulated (LFM), and Barker-13 (phase modulated). From worst to best, their Doppler tolerances could be ranked as

Barker-13
Rectangular
LFM

The following example uses the same pulse width for all pulse types. The LFM and Barker-13 have the same bandwidth, which is greater than the rectangular pulse, hence why the responses are sharper.

The plot shows the nominal baseband pulse, the ambiguity function, and the matched-filter output which is taken from the zero-Doppler slice and a slice taken at a Doppler of 664 kHz (which is aggressive).
In the case of the Barker-13, not only is the peak response much lower, but the overall structure of the output is destroyed. Similarly with the rectangular pulse, but depending on your needs, is not "as bad". The LFM waveform however maintains a higher peak when compared to the nominal output, and the sidelobe structure is better maintained. It does however shift in time, which is known as range-Doppler coupling, but can be easily corrected.
Relative to the other pulses, we say that the Barker-13 is Doppler intolerant, and conversely that the LFM pulse is Doppler tolerant. You will read in literature that phase-coded waveforms are intolerant, and that is due to the discontinuities inherent to their phase modulation, which wreaks havoc once a Doppler-shift is induced. Additional techniques must be employed to compensate, such as a series of matched-filter banks that have been matched to the nominal waveform and a particular set of Doppler frequencies.
Comment: i wanted to get my theory right, thus was avoiding ambiguity diagram
Comment: @ian If you're comfortable with the matched filter, then extending to the ambiguity diagram is a simple step. You just repeat applying the matched filter, but shift the input waveform by a Doppler shift to fill each column.
Answer: To add together with the other answers provided for further intuition, note that correlation as a function of frequency generally follows a Sinc shape with the first null at $1/T$ where $T$ is the duration of the matched filter. This applies when the underlying waveform is constant over the duration of the correlation interval. The graphic below is one I have demonstrating correlating to a 3 Hz tone ($e^{j2\pi 3 t}$) buried in noise over a 1 second time duration, but we can see from the other posts that this result of correlation magnitude decreasing versus frequency offset would apply to the other waveforms shown.

This is corresponding to the magnitude at the correlator output at 0 delay offset, and Doppler offset alone. For example with Envidia's example, T= 1 us and Doppler offset = 0.664 MHz. The Sinc shape would have it's first null at 1/1us = 1 MHz, and at .664 MHz the scaling would be given by $sinc(T f_{dopp}) = sinc(0.664) = 0.417$. Observe that this is the magnitude at Delay = 0 for all three of Envidia's results.
This is also consistent with all waveforms being constant envelope and thus this correlation result is the Fourier Transform of a rectangular window (as a Sinc), which also has the tightest frequency resolution. Windowing any of these waveforms would decrease the sensitivity to Doppler at the expense of SNR at the correlator output as demonstrated below using Envidia's Chirp example:

The blue trace shows how the magnitude out of the correlator decreases versus Doppler frequency offset for the LFM Chirp as given (and we further confirm here that at 664 KHz the magnitude is 417/1000 = 0.417 as predicted). The orange trace shows the same result if the LFM Chirp was first multiplied with a simple cosine window. The overall magnitude is decreased (SNR penalty) but the sensitivity to Doppler is also significantly reduced.
Reducing the total time duration (as first introduced) would also decrease the Doppler sensitivity as well as decrease SNR, and this typically would be the better option when reduced Doppler sensitivity is required for any waveform.
Comment: hey! so the spectrum of output of matched filter does show a shift in frequency right? peak at f_doppler=1kHz for v=50, wavelength=0.1 for a frank code? or is the peak supposed to be at 0Hz because its doppler tolerant?
Comment: Assuming a particular result with 0 offset, the spectrum of the resulting signal at the matched filter output after the input signal changes by delta f will have changed by delta f. What this graph I present shows is how the signal level will decrease due to frequency offset, assuming we are doing a correlation operation in the matched filter over time duration T.

doppler tolerant phase coded waveforms


c++ Design pattern for CoW, inherited classes, and variable shared data?

Question: I've designed a copy-on-write base class. The class holds the default set of data needed by all children in a shared data model/CoW model.
The derived classes also have data that only pertains to them, but should be CoW between other instances of that derived class.
I'm looking for a clean way to implement this. If I had a base class FooInterface with shared data FooDataPrivate and a derived object FooDerived. I could create a FooDerivedDataPrivate.
The underlying data structure would not effect the exposed getters/setters API, so it's not about how a user interfaces with the objects. I'm just wondering if this is a typical MO for such cases or if there's a better/cleaner way?
What peeks my interest, is I see the potential of inheritance between the the private data classes. E.g. FooDerivedDataPrivate : public FooDataPrivate, but I'm not seeing a way to take advantage of that polymorphism in my derived classes.
<code>class FooDataPrivate
{
public:
  Ref ref; // atomic reference counting object
  int a;
  int b;
  int c;

};

class FooInterface
{
public:
  // constructors and such
  // ....

  // methods are implemented to be copy on write.
  void setA(int val);
  void setB(int val);
  void setC(int val);

  // copy constructors, destructors, etc. all CoW friendly
private:
  FooDataPrivate *data;

};

class FooDerived : public FooInterface
{
public:
  FooDerived() : FooInterface() {}

private:
  // need more shared data for FooDerived
  // this is the ???, how is this best done cleanly?
};
</code>
Answer: Here's an implementation of Copy-On-Write for C++.


ArcObjects - IFeature HasOID property returning false when there is clearly an OID

Question: When inspecting features in my featureclass, I am checking to see if a feature has an OID using the HasOID property. Even though the feature(s) clearly has an ID on visual inspection (via ArcMap), the property is returning false. When inspecting the value for the objectID it is reporting nothing.
The featureclass is stored in an SDE instance on SQL Server. The ObjectID exists in the featureclass and is populated when viewing in ArcMap.
Answer: The ObjectID wasn't found in my feature, because when querying the featureclass prior to viewing the features, I removed the objectid from the subfields list. Added it back in and it worked fine.


How to override search request? Magento 2

Question: Tell me, please, how can I programmatically override the search query? For example: the user enters "Any word" in the search field, and the search is performed using the "Custom word". And as a result on the search page we get the goods found on the query "Custom word".
Comment: Hi Artem, thanks for posting. You will get more replies if you ask specific questions, maybe tell what you have tried so far. maybe read up on plugins (http://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html) to override things or controller overriding: https://magento.stackexchange.com/questions/76720/overridden-customer-template-file-not-showing-in-magento-2
Comment: Question needs more clear
Answer: Assuming you are using MySQL search provider.
Create a plugin and use the around Plugin Function technique.
class Match extends \Magento\Framework\Search\Adapter\Mysql\Query\Builder\Match {

In the aroundBuild method you can get the query value
$query->getValue()

And perform the queries you need there.
For much more information see these:
https://webkul.com/blog/how-to-replace-magento2-default-search-engine/
http://www.ibnab.com/en/blog/magento-2/magento-2-get-one-search-result-by-sku
In Magento 2's default search provider, special symbols '-+~/\<>\'":*$#@()!,.?`=%&^' are replaced with an empty space ' '.
This would lead to each space delimited search term being treated as "OR" conditions which I think is the thing you are trying to avoid.

If your looking to match exactly the ibnab in one of the attributes then the "get one search result by sku" may be a good starting place.
Do your query first for the exact match for a particular search query on a specific attribute id or column and if it has results set the match query to a SQL "in" condition on those id's?
$matchQuery = 'data_index IN('.implode(",", $result_id_array).')';

Answer:
Create a Custom Module:
First, create a custom module in your Magento installation. You'll need to set up the necessary module files, including registration, configuration, and code files.

Override Search Model:
Create a plugin or interceptor for the search model to modify the search query. In Magento, the search query is typically handled by the Magento\Search\Model\Query class. You can use a plugin to intercept the getQueryText() method and replace the query with your "Custom word."

Define the Plugin:
In your module, define the plugin in your module's di.xml configuration file. This tells Magento which class and method to intercept.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Search\Model\Query">
        <plugin name="custom_search_query_override" type="YourVendor\YourModule\Plugin\Search\QueryPlugin" sortOrder="10" />
    </type>
</config>

Create the Plugin Class:
Create the plugin class that will modify the search query.
// app/code/YourVendor/YourModule/Plugin/Search/QueryPlugin.php
namespace YourVendor\YourModule\Plugin\Search;

class QueryPlugin
{
    public function beforeGetQueryText(\Magento\Search\Model\Query $subject)
    {
        // Modify the search query here
        $customQuery = 'Custom word';
        return [$customQuery];
    }
}

Clear Cache:
Clear the Magento cache to ensure your changes take effect.

With this setup, when a user enters any search term, your plugin will replace the entered query with "Custom word" before the actual search is performed. This approach allows you to programmatically control the search query without affecting the frontend user experience.


If software requires a modified (linux) kernel to function, is it considered a derivative work of the linux kernel?

Question: I'm writing a userspace driver which requires some modifications to the Linux kernel to function.  The modifications expose new functionality by the sysfs interface.  I understand that the modifications to the Linux kernel have to be licensed under the GPLv2, but is the userspace software (which relies on the modified kernel to function) considered a derivative work of the kernel?
Comment: I think this is just a case of two separate programs on the same computer. Of course, if you distribute your kernel modifications you must publish the source code to them, but you should be able to license the driver under whatever you want.
Comment: @EMBLEM I guess what I'm worried about is that, since the program requires the kernel modifications, they might be considered a single work for the purposes of the GPL.
Comment: "I guess what I'm worried about is that, since the program requires the kernel modifications, they might be considered a single work for the purposes of the GPL." --> my take and I have quite a bit of experience in that domain is that it depends: what is the new functionality you expose `sysfs`?
Comment: @PhilippeOmbredanne The kernel driver exposes a very low-level interface to a hardware device, basically translating sysfs read/writes into SPI commands and keeping a FIFO full/empty.  The userspace program interacts with the sysfs interface to expose a higher-level interface to access the hardware device.
Comment: This looks to me as a bona-fide use case then. And in which @MadHatter response would apply
Answer: Your kernel modifications pretty clearly create a derived work of the kernel, so they will almost certainly need to be distributed under GPLv2.  In addition, deciding to do so helps the analysis in the next paragraph enormously.
As for your userspace software, it is certain that proprietary software, public domain software, and other non-GPL'ed software makes use of the regular kernel all the time without being covered by the kernel's licence.  Since that is true for a GPL'ed, stock kernel, it will also be true for your modified, GPL'ed kernel, because it is the same licence that covers both works.  I believe that your userspace software can be distributed under any licence you choose.
Comment: +1; To put it another way: if your modified kernel *became* the mainline kernel (because Linus decided to pull your changes in), the project's decision to include your changes (or not) doesn't alter your legal rights or responsibilities in any way. Thus, using your own modified kernel is the same as using the mainline kernel. As stated here, there is a strong longstanding precedent that kernel licensing does not impact userspace licensing.
Comment: Yes, I think that's another way of looking at it.  Hopefully it is a better way, at least for some!
Comment: Your answer generally makes sense BUT if the kernel changes in questions are significant enough it could be that the user space code could be impacted too. Creating "non-standard" interfaces to the kernel could be such a grey area.
Comment: @PhilippeOmbredanne I tend to side with apsillers point above that *there is a strong, longstanding precedent that kernel licensing does not [bleed] into userspace*, and that the GNU GPL's obligations are met by sharing your kernel code, and thus your *non-standard interfaces*, with everyone.  Could you provide a counter-example, where other changes-of-sufficient-significance have engaged such a bleed, and *required* userspace-only code also to be GPLed?
Comment: For an unmodified kernel, licensing "does not bleed" into userspace as you put it. But some mods could bleed in userspace. For instance, say you create a simple hook module that would expose network packets in userspace and allow to do packet filtering in userspace when you would have to do it using kernel space code otherwise. Several lawyers I have consulted with would consider that userspace code using this newly added funky kernel facility would have to be licensed under the same terms of the kernel proper.
Comment: Why?  **Both modified and unmodified kernel are under the same licence.**  If you can use the unmodified kernel from userspace under the GPL, what is *qualitatively* different about the usage of the modified kernel, that makes the GPL not apply in the same way?  Are you claiming that the userspace tool becomes a derivative work of the modified kernel?


The condition that wind would effect indicated airspeed

Question: What is the one condition that wind does effects our indicated airspeed?
Comment: Can you be more specific? There is no one such condition, but rather many.
Comment: If your question is "does wind variations affect indicated airspeed in flight?" then yes, but only momentarily due to the aircraft inertia. The aircraft tends to remain at the same groundspeed while its speed relative to the wind has changed. However it quickly gains or loses groundspeed to mach the same previous IAS as engines can create only a move which is relative to the ambient air speed (via propeller or jet).
Answer: There are many, but most obvious is when the aircraft is on the ground.


How to prevent runny nose when eating spicy foods?

Question: This question is slightly less about cooking and more about delivery. Myself and some of my guests love spicy food, but get terribly runny noses when eating it. What are some tips to help prevent the runny-ness of the nose, or otherwise reduce the disgust of needing to blow the nose when eating spicy food?
Comment: Some pre-first course Mucinex?
Comment: Why is this a problem?  I thought clearing out the sinuses was one of the *benefits* of eating spicy food.  At least, it is for me.
Answer: Basically you can't prevent this from happening as it is a physiological (part of your body's natural function) reaction to an irritant - in this case the chemical capsaicin in the chili fruit stimulating the trigeminal nerve.  There is such a thing as building tolerance, but I don't know if this will reduce the physiological effects, or just that you have more fun when eating spicy food.
However, there are some things you can do to lessen the effects:
Capsaicin is soluble in oils - which is why it gets taken up very effectively by the tissues in and around the mouth/nose - these parts contain essentially exposed cells covered in a mucus layer.
If you want to dilute this effect to some extent, you can use products with oils in them. Milk and milk products like yogurt are especially effective  as they contain oils that are very similar to those we have in our cells. This is one of the reasons milk products like Lassi are often served with Indian cuisine.
Apparently sugar can help too - the sugar undergoes a chemical reaction with the capsaicin and results in a lessening of the heat.
Comment: In my experience, building up a tolerance to spicy food does not make my nose run less. I've had people tease me and say the food I'm eating is clearly too hot even though it doesn't seem all that spicy to me.


Extracting features to feature classes from a REST service

Question: I've seen this done before but I can't figure that out how to do it. How do you extract features from a REST service to a feature class (or shapefile)? I believe it involves adding a REST service link to a map in ArcGIS Online (AGOL) then opening in ArcGIS Desktop. Anybody know how to do this?
Comment: [ArcREST](https://github.com/Esri/ArcREST) can be used to extract features from a REST endpoint plus a host of other functionality.
Answer: If the service is registered with OpenData, the service's OpenData page will allow you to download the data in a variety of different formats including Shapefiles.
Another way to do this would be to query all the features and save the resulting JSON (see sample JavaScript code), then use the JSON to Features geoprocessing tool tool to create a feature class.


How do protons and neutrons interchange?

Question: I recently read in a book that a nucleon with +1/2 isospin is a proton and if the isospin is changed to -1/2, it is a neutron, so it is the same particle in different states. If a proton has a different quark configuration $uud$ than a neutron $udd$, what happens to the quark composition when the isospin changes from +1/2 to -1/2?
Answer: Isospin is an approximate symmetry of nuclear interactions.  Roughly, the "x" component of isospin consists of changing u quarks to d quarks and d quarks to u quarks.  Because u quarks and d quarks are very similar - have different charges but about the same mass and reasonably precisely the same interactions with gluons and other quarks, you can quickly summarize the properties of various baryons and mesons in terms of this approximate symmetry.
The neutron and proton are not really the same particle in a different state.  Rather, they are two very similar particles, which would have the same masses and other properties if there were no mass difference between the d and u quarks and there was no such thing as electromagnetic or weak interactions. If this were the case, they would be as similar (and as different) as an electron with spin "up" and an electron with spin "down", at least if you had experimental knobs (like the magnetic field for ordinary spins) that rotated the isospin of the particles.  Such a knob would be (sort of) the W and Z fields.
Answer: Like spin, isospin cannot change in isolation: an intermediate particle is required.  For spin that particle is most frequently the photon: if you want to reorient a particle in a magnetic field, the correct model to use is absorption or emission of a virtual photon from the magnet.
The most important isospin-changing particle in the nuclear force is the pion, a triplet of particles with charge ±1 or 0.  The $\pi^±$ are the isospin raising and lowering operators that you're interested in: the reactions $\rm p\leftrightarrow n\pi^+$ or $\rm n\leftrightarrow p\pi^-$ rotate the isospin of the nucleon but preserve quark content.


Is it a problem if BIGINT data type parameter gets passed into a table for join with INT data type?

Question: We have an application that has been developed in Hibernate and the SQL's are all inline from the app. There are no stored procedures. The problem I see is the way parameters are being passed in the queries that are formed in Hibernate. As an example, CustomerID is defined as INT column in the table. However, Hibernate passes the @CustomerId input parameter as BIGINT.Is that an issue on SQL Server end that I should be concerned about while troubleshooting performance problems ?
Answer:
Is it a problem if BIGINT data type parameter gets passed into a table for join with INT data type?

It can be, from a performance perspective, yes. When there are different data types being compared in a predicate, the SQL Server Engine will implicitly cast the lower precedence data type to the higher precedence one. Here's a list of the data type precedences. The INT data type gets implicitly casted to BIGINT.
Implicit conversion can cause cardinality estimate issues which affect which operations (for example, scanning the entire table vs seeking to only a few rows) are chosen when the execution plan is being generated. With a poor enough cardinality estimate, less efficient operations may be chosen for the execution plan, causing the query to take longer to execute.
Additionally, a poor cardinality estimate could also cause the execution plan to under- or over-request hardware resources, such as Memory, also causing the query to take longer.
You should always aim to keep your data types consistent when they're predicated on.