How would Focault's Archaelogy of Sciences view Physics which just attempts to describe physical reality and not turn humans into subjects?

Question: His work i believe is great with Biology and Psychiatry etc. since it elucidates how humans are turned into subjects, but how does he reject grand theories derived from Physics which simply describes objective reality as it can be empirically measured and demonstrably shown to exist via experiments ? How do epistemes subjectify physics ? What dominant discourses of power can be hidden in physics ?
Answer: It depends.
If you are talking about fundamental physics, the object of that program is to boil out any cultural, societal, religious or political content from the sought-after description of the universe so that anyone anywhere will obtain the (same) correct answer to any given question they could pose about the universe. In this sense, there is no power discourse content in fundamental physics.
If you are talking about paying for fundamental physics, the tools required to get those answers are extremely expensive, which excludes all but the most wealthy nations (or in some cases individuals) from the practice. Power relations then determine who gets to host the tools and operate them, even in wealthy nations (see for instance the history of the defunct superconducting supercollider in the US).
If you are talking about training people to design, operate, and interpret the results from those tools, then power relations play a key part in the sense that the schools where the relevant subjects are taught are highly specialized and furnish no immediately useful results to help communities. Decisions on who builds the school and who is allowed to attend it are value-laden, subjective, and controlled by power discourse.
If you are talking about which individuals are qualified to participate in this field, an effortless and entirely natural mastery of the most abstract and subtle mathematics known to humanity is a necessary prerequisite, since the truths of the universe are written in the language of mathematics. Because it relies on people with these extraordinary gifts, the practice of fundamental physics has been criticized as elitist, ableist, and fundamentally exclusionary (all of which criticisms I fundamentally reject as nonsensical).
Comment: And if you are talking about the idea that the truths of the universe are written in the language of mathematics, that is also a power relation. Mathematics is clearly of value in engineering and similar pragmatic disciplines. Whether it is useful in describing unobservable phenomena is, and always will be, a matter of unprovable opinion.
Comment: @DavidGudeman, as far as astrophysics and particle physics are concerned, my assertion about mathematics is indeed true. what in the world does that have to do with power relations? and regarding the "unobservable", *predicting the "unobservable" * (i.e., predicting the existence of a new subatomic particle 10 years before the means to make it observable exists) is the stuff of Nobel prizes.
Comment: "predicting the unobservable" means that someone used mathematics to predict that they would find a certain curve on a photographic plate if they did a certain experiment. What that represents is what is decided by power relationships.
Comment: @DavidGudeman - But consider the physical reductionist hypothesis (expressed by Einstein [here](https://www.site.uottawa.ca/~yymao/misc/Einstein_PlanckBirthday.html) for example) that the behavior any physical system whatsoever, including the Earth and all the people living on it, could in principle be predicted given knowledge of its initial physical state and the laws of physics governing the evolution of arbitrary physical states. Do you think Foucault would see this as definitely wrong, or meaningless?
Comment: I think he would see it as an exercise of skill, "much like prostitution" in his words (by that, he was not using prostitution in a negative sense, only as an example of skill that would shock his readers). In other words, he would claim that they may be right, but they aren't showing a grasp of truth, only a grasp of how things work in their specialization.


.NET version or port of Flying Saucer

Question: Is there any open source .NET project (or port) similar to the Flying Saucer project which renders HTML to PDF using iText?
Answer: I always recommend wkHTMLtoPDF for web->PDF conversions.  It's web kit based though I'm not sure what PDF library it's sitting on.
At any rate, you'll be hard pressed to find something that will render your HTML more accurately (it'll even run script, set innerHtml and so forth).
Comment: I could not find an appropriate .NET download on the wkHTMLtoPDF website so I searched the NuGet library and found **Codaxy.WkHtmlToPdf**. Also available on [github](https://github.com/codaxy/wkhtmltopdf). It would be nice to have a quick example/tutorial to get started with.
Comment: Codaxy.WkHtmlToPdf depends on having the WkHtmlToPdf executable installed on the server which is no use to me so I am using [Pechkin](https://github.com/gmanny/Pechkin) instead. The NuGet package had a problem with the Common.Logging dependency to had to download it from github.
Answer: For a quick-and-dirty solution you could try using IKVM to compile the Java to .NET.
http://www.ikvm.net/
Comment: IMO. Dirty?Yes. Quick?No :)
Answer: Use the Pechkin .NET wrapper for WkHtmlToPdf. The resulting pdf can be outputted as a byte[], filestream or file path.
The NuGet package had a problem so I downloaded it directly from github and it seems to be working now.
Answer: wkHTMLtoPDF is based on WebKit so shares limitations - most importantly for common requirements in converting HTML to PDF as of this date WebKit cannot repeat table headers and footers across pages sans hacks and it does not look like this is going to change any time soon.

.NET version or port of Flying Saucer


Is Iranian rial going to get boosted?

Question: I was reading about the Iran's economy and Iranian rial. I have read the news regarding the lift of sanctions from Ira, which had allowed the purchase of Iranian rial in America.
I was having query whether the current political scenario going to help the in boosting Iranian economy?
Will the current politics will provide an economy growth to the Iran?
If any answer I would appreciate your response.
Comment: Is your question mainly about the strength of the economy of the strength of the currency? Obviously they're not unrelated, but they're also far from equivalent. Regarding the economy, I think it's fairly obvious that the lifting of economic sanctions could only be a good thing. However, low oil prices might limit some of that potential boost. With regards to the currency, it is less obvious to me what effect the lifting of sanctions might have on it.
Comment: @Shane I got your point. But I am expecting more answer.
Comment: @JafferWilson you didn't really answer his question though: Are you literally interested in the future of the Rial, or are you interested in the future strength of the economy? These are two distinct concepts, yet you mix them and ask both. Try to pin down your real (haha) variable of interest.
Comment: @FooBar I know I have mixed the question but I want the answer for both of the question: 1. the future of the Rial and 2. the future strength of the economy. That's the reason for mixing the question
Answer: Getting rid of sanctions will boost the currency because it will allow Iran to export more oil, thus encouraging other countries to buy more rials. It also is a sign of stability, which further appreciates the currency.
However, there is no way for you as an individual investor to know when this will take effect or whether it has been already priced in. So I wouldn't buy rials.
Comment: I cannot except this answer as it look like not satisfying my question fully

Is Iranian rial going to get boosted?


designing image debayer block, how should the testbench be written

Question: A debayer block inputs image from a CCD Bayer filter and then estimates the missing color information for each pixel. The data comes from a camera. How should one go about writing a testbench for something like this?
Answer: First understand what the problem specification (your first sentence) REALLY means.
In other words, given a full colour image(1), what does the Bayer filter generate from it (2)? What information is missing (3)? What can a Debayer generate given only the Bayer filter output (4)? How close to the original image is the Bayer output(5)?
You now have 5 sample images generated from an original - possibly in Gimp or Photoshop or Matlab - or by a VHDL package from an input file (XPM format for simple reading).
Your testbench should at least read file (2) and file (4), feed (2) into the Debayer, and compare its output(6) with (4). If the output and (4) are identical, the testbench has passed. Otherwise, it is often useful to write both output (6) and error (7) = (6) - (4) for analysis in graphics tools.
For example, if the VHDL algorithm rounds differently, the rounding errors are visible in the error output (7).
The above assumes you are only testing the quality of the VHDL implementation of the Debayer algorithm. If you are testing the algorithm itself (which is usually done before the VHDL stage, perhaps in Matlab or Python) then you would also use files (3) and (5) to see how close your Debayer algorithm can get to the original.


Pluto's gravitational pull on a person on the Earth's surface?

Question: My physics teacher stated that Pluto has a gravitational pull on objects on Earth, namely humans. Is this true? What is the free-fall acceleration of Pluto with respect to being on the Earth's surface (i.e. the Earth's free-fall acceleration is $9.8$ m/s$^{2}$)?
Comment: Related: [Am I attracting Pluto?](https://physics.stackexchange.com/q/200635/)
Comment: Hi Zack Zatkin-Gold. If you haven't already done so, please take a minute to read the definition of when to use the [homework-and-exercises](http://physics.stackexchange.com/tags/homework-and-exercises/info) tag, and the Phys.SE [policy](http://meta.physics.stackexchange.com/q/714) for homework-like problems.
Answer: This is true. Newton's law of universal gravitation says everything attracts everything. To get the free-fall acceleration of some object on Earth towards Pluto, take Newton's law and divide by the object's mass to get $$a=\frac{F}{m}=\frac{GM}{r^2}.$$ Subbing in reasonable values - $M=0.002$ Earth masses, and $r$ between 29 and 49 AU you get something like $10^{-14}\textrm{ m s}^{-2}$.
Comment: ah! but the attraction between me and Pluto is symmetric, whereas...
Comment: Next step: compare this to the gravitational attraction between you and that cute member of the apposite sex on the other side of the classroom...
Comment: @dmckee $G (70 kg) / (3 m)^2 = 5 \times 10^{-11} m s^{-2}$, so the attraction is five thousand times greater.
Comment: @Taemyr That's a great point. You should add it as an answer.
Comment: However our frame of reference is the surface of the Earth.  So you need to look at the difference between pluto's pulll on the person and it's pull on Earth.
Comment: Answer added, feel free to review since I could have made a mistake.
Answer: As Emilio points out the gravitational attraction by Pluto is on the order of $10^{-14}\textrm{ m s}^{-2}$.
However this is not an acceleration that can be felt in any meaningful way - in a flat gravitational field movement due to acceleration by gravity is identical to inertial movement.  However as it happens the gravitational field from Pluto is not flat, it's inversely proportional to the square of the distance.  This means that with a suitable reference point it's in theory possible to detect the tidal force that Pluto creates.
For us a suitable reference point would be earth.
We know, from the other answers, that the acceleration from Pluto's pull is
$$a_\mathrm{me}=\frac{GM}{d^2}.$$
Where $M$ is the mass of Pluto and $d$ is our distance to Pluto.
If we assume that we are on the side of the planet facing Pluto, and on a direct line between the center of the planet and the plutoid. We get that the acceleration of Earth due to Pluto is
$$a_\mathrm{Earth}=\frac{GM}{(d+r)^2},$$
where $r$ is the radius of the Earth.
The difference is thus
$$
a_\mathrm{me}-a_\mathrm{Earth}
=\frac{GM}{d^2}-\frac{GM}{(d+r)^2}
=GMr\left(\frac{2}{d^3+d^2r}+\frac{r}{d^4+2d^3r+d^2r^2}\right)
$$
However the radius of Earth is tiny compared to the distance to Pluto so we can approximate the above to
$$a_\mathrm{me}-a_\mathrm{Earth}\approx\frac{2GMr}{d^3}.$$
Plugging this into WolframAlpha tells us that we can perceive a difference in acceleration of roughly
$$a_\mathrm{me}-a_\mathrm{Earth}\approx10^{-19}\mathrm{\:m\:s^{-2}}$$
between us and the Earth. For reference, this is about 7 angstrom per day per day, or 2 inches per second in the current age of the universe. How to actually measure accelerations of those magnitudes is left as an exercise for the reader.
Comment: @EmilioPisanty I did not say that quadrillions planck lengths per second per second is a good unit to measure anything in - note that I did update the answer to your suggestion.  As an accesible value I think 2 inches per second per current age of the universe is about the best one can have.
Comment: This is, of course, the [tidal force](http://en.wikipedia.org/wiki/Tidal_force) exerted by Pluto on the Earth. I think the best expression for this acceleration is one Angstrom per day per day.
Comment: @EmilioPisanty Answer updated.  Though I must say that I quite like 6qdr Planck lengths per second per second.  7 Angstrom per day per day just doesn't have the same ring to it.
Comment: I find both 'quadrillion' and 'Planck length' to be truly inscrutable terms, to be honest. If you're just going to pile zeroes, then why not say one quintillionth of a meter per second${}^2$? On the other hand, I have some vague (and hard-earned) understanding of just how small an Angstrom is, so I can just about comprehend, I think, 1A/day${}^2$.
Answer: I am not a physicist but this will answer your query; According to Newton's law of universal gravitation every point mass in the universe attracts every other point mass with a force that is directly proportional to the product of their masses and inversely proportional to the square of the distance between them.
$F=G\frac{m_{1}m_{2}}{r^{2}}$
for example:
lets say r is the distance between earth and pluto, G the universal gravitation constant, m1 is the mass of pluto and m2 be the mass of a human on earth, we can then calculate the gravitational force exerted by m1 to m2.
you can also refer this site http://www.physicsclassroom.com/class/circles/u6l3c.cfm


Proper use of tenses

Question: When a sentence is formed in past tense every part of it must suggest the past. But here in the sentence  " Perhaps what I wrote would never be published, for the years I would spend in prison were likely to witness even greater convulsions and conflicts than the years of war that are already over."  are suggests the present, therefore according to me it must be were  Please help me if I am wrong.  Thanks in advance
Answer: If every part of a sentence had to be within the same tense, we would not be able to convey many concepts that have already been conveyed.
The quoted sentence is saying, effectively

It's possible that what I wrote would never be published. This would be possibly due to the years I would spend in prison. These years would be likely to witness even greater convulsions and conflicts than the years of war that have already passed.

It feels to me like most of the quoted sentence was written as a hypothetical. "What I wrote" is, in this sense, something that exists in the moment of the sentence. The writing was in the past, but now it's the speaker's written work. But they're considering that maybe it wouldn't be published in the future. The years spent in prison are also in the future as a hypothetical.
It's difficult to tell for certain without the context in which that sentence was written. But I really feel very little of this sentence is about the past.

Proper use of tenses


webgl: bufferData freezes my application, how to do it asynchronously

Question: I am working on a web 2d world generation and simulation. I generate a 2d terrain (different cell shapes and colors) using perlin noise and some random function in different web workers. Those workers feed a cache which contains the different chunks and their data. When a chunk receives data from its worker, it automatically updates its buffer:
(chunk) => {
                this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, chunk.vertexBuffer);
                this.webgl.bufferData(this.webgl.ARRAY_BUFFER, chunk.vertexes, this.webgl.STATIC_DRAW);
                this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, chunk.colorBuffer);
                this.webgl.bufferData(this.webgl.ARRAY_BUFFER, chunk.colors, this.webgl.STATIC_DRAW);
            }

I also have a kind of game loop which calls itself at every requestAnimationFrame and draw its chunk.
    cache.forEachChunk(center.current, scale.current, (chunk) => {
        gl.bindBuffer(gl.ARRAY_BUFFER, chunk.colorBuffer);
        const fillColor = gl.getAttribLocation(shaderProgram, "fillColor");
        gl.enableVertexAttribArray(fillColor);
        gl.vertexAttribPointer(fillColor, 3,
            gl.FLOAT, false, 0, 0);

        gl.bindBuffer(gl.ARRAY_BUFFER, chunk.vertexBuffer);
        const position = gl.getAttribLocation(shaderProgram, "position");
        gl.enableVertexAttribArray(position);
        gl.vertexAttribPointer(position, 2,
            gl.FLOAT, false, 0, 0);

        if (chunk.vertexes)
            gl.drawArrays(gl.TRIANGLES, 0, chunk.vertexes.length / 2);
    })

This works very well ...except that there is a little freeze every time a chunk receives data from its workers: in fact calling bufferData is pretty slow but above all, it is blocking my application. Is there any way to do this in a web worker or any other strategy to be able to send data to my graphics card without blocking my whole application? Blocking it doesn't make sense: the graphics card should still be able to draw the other chunks without worry.
Answer: bufferData creates a completely new data store. Think of it as buffer allocation and initialization. If you just want to update an existing buffer, use bufferSubData (see also Buffer objects). bufferSubData simply writes the data into an existing buffer without re-creating the data store, so it's much faster. Of course, bufferSubData cannot change the size of the data memory and you have to "allocate" the buffer once with bufferData. However, there is no need to pass data to the buffer when you initialize it. This means that the data argument of bufferData can be null.
Comment: But I do not want to update an existing buffer: I have one buffer per chunk with its own set of polygons (which is completely static that's why I can pass the data to it when creating it).


Is there a way to make zsh run a command after REPORTTIME?

Question: If a process takes greater than REPORTTIME, zsh prints the time when it finishes. Is there a way to make it run a custom command in addition to this?(I would like to use notify send to let me know the process finished executing)
Answer: I just had the same thought. Did a quick google and found this; I've adapted it a bit. Shove this into your zshrc:
<code>if [[ -x `which notify-send` ]]; then
    notify-preexec-hook() {
        zsh_notifier_cmd="$1"
        zsh_notifier_time="`date +%s`"
    }

    notify-precmd-hook() {
        local time_taken

        if [[ "${zsh_notifier_cmd}" != "" ]]; then
            time_taken=$(( `date +%s` - ${zsh_notifier_time} ))
            if (( $time_taken > $REPORTTIME )); then
                notify-send "task finished" \
                    "'$zsh_notifier_cmd' exited after $time_taken seconds"
            fi
        fi
        zsh_notifier_cmd=
    }
fi

[[ -z $preexec_functions ]] && preexec_functions=()
preexec_functions=($preexec_functions notify-preexec-hook)

[[ -z $precmd_functions ]] && precmd_functions=()
precmd_functions=($precmd_functions notify-precmd-hook)
</code>
I'm rather happy with it! :)
Comment: FYI it's simpler to add a function hook via `add-zsh-hook` as described here: http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Manipulating-Hook-Functions
Comment: Welcome to Super User! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the [FAQ](http://www.superuser.com/faq) for more info.
Comment: @slm -- that makes a lot of sense. edited


all my previous configurations and settings are gone by using the following command in ubuntu 14.04LTS

Question: I used the command rm -rf ~/.Trash/* to empty the trash but when the command is executed, all my files in Download folder are deleted and all my Ubuntu settings are changed. Can anyone please help, how to get back my files and settings back?
Answer: Gut feeling is you may have had a space after the ~. Is it really only the Download folder ? You should back up everything under home regularly. Add a new user with a similar name and tweak everything back, then copy their ~ to yours.


Frictionless Flow

Question: Suppose we have a water reservoir at some elevation say z and the flow is frictionless then by Bernoulli's equation we have the exit velocity (2gz)^0.5 . This means that the static pressure in the middle of horizontal pipe would always be atmospheric.
Now what if we split the pipe into two at the exit, would the velocity at each exit be the same (2gz)^0.5 ? If so, then this implies that the pressure in the middle of the same horizontal pipe is negative (gauge). Does this make sense ?
Comment: What about the pressure created by the height of the liquid?
Comment: The height of the liquid at the base of the tank (hydrostatic pressure) is converted into dynamic pressure upon the exit in the first case but how would it happen in the second case ?
Comment: What about the liquid at the top of the tank?
Comment: Elevation or potential head, right ?
Answer: Yes.
Conservation of mass dictates that the velocity at an exit with double the area of the upstream pipe is 1/2 the velocity in the upstream pipe. For an ideal fluid in an ideal (horizontal) expansion transition, there is no change in entropy. So Bernoulli's equation gives you the relationship for calculating the pipe's static pressure given that the exit is at atmospheric pressure. This pressure will be the same throughout the pipe, and will be less than atmospheric pressure. We are also assuming an ideal bell transition from the reservoir to the pipe.
Comment: Thanks Phil, I agree but if we take a hypothetical condition in which one of the exit pipes is raised above the tank level, then the pressure in that pipe will be atmospheric. Now let us start cutting the pipe gradually reducing its height, would we get the flow out of that ? If so, at what height ? Isn't it physically misleading ?

Frictionless Flow


restricted-extras available in ubuntu 12.10 demo version

Question: i'm new to ubuntu. before installing, i wanted to try it first. but, whenever i want to play media files using rhythmbox, it says "python (v2.7) requires to install plugins to play media files of the following type: MPEG-1 Layer 3 (MP3) decoder".
i searched a bit on the net, and for that i'm required to install restricted-extras.
but there's no option of "install" in Ubuntu software center.
when i tried through terminal it said, "E: Unable to locate package ubuntu-restricted-extras".
currently, i'm using ubuntu through bootable usb.
so, is the restricted-extras package not available in demo version??? i need to install ubuntu to use them?
Answer: Ubuntu uses several repositories and even ppa to package programs.
See https://help.ubuntu.com/community/Repositories/Ubuntu
https://launchpad.net/ubuntu/+ppas
As with an installation, all these packages are available when running a live CD/USB. The "problemes" you might have are that anything you install will be lost when you reboot and you might run out of space if you install a lot of packages or update.
To install restricted extras , see
https://help.ubuntu.com/community/RestrictedFormats
There is even a link you simply click to install

If you are using regular, stock Ubuntu: Click here to install the ubuntu-restricted-extras package
Answer: go to ubuntu software centre and install unrestricted extras. thats it..
Comment: that's the problem. there's no "install" option. i haven't installed ubuntu yet. i'm just currently using its "try now" option. that's why, i'm asking, are restricted-extras not available for demo versions??? or is there something wrong?
Comment: yeah sometimes its happens even after installing it on HDD, but it can be easily resolved by rebooting your system, faced the same issue with completely installed ubuntu and resolved by rebooting..

well in ur case as u haven't installed it you can not reboot it for changes and yes its certain to have such issues ..for understanding your problem i have checked by using try ubuntu on other system and there too its same i cant install anything from ubuntu software center. that means there nothing wrong with your system or installation . its obvious ....


How does community service work?

Question: When a person is convicted of a crime and required to perform community service, what exactly is involved?
Answer: The underlying law in Oregon is ORS 137.128, which says that

A judge may sentence an offender to community service either as an
alternative to incarceration or fine or probation, or as a condition
of probation. Prior to such order of community service the offender
must consent to donate labor for the welfare of the public. The court
or its delegate may select community service tasks that are within the
offender's capabilities and are to be performed within a reasonable
length of time during hours the offender is not working or attending
school.

And furthermore,

Failure to perform a community service sentence may be grounds for
revocation of probation or contempt of court.

Subsequent sections set limits on hours of service. §137.131 defines the one no-choice case of community service:

(1) The court shall impose community service as a condition of a
probation sentence when a person is convicted of criminal mischief and
the conduct engaged in consists of defacing property by creating
graffiti unless the sentence includes incarceration in a county jail
or a state correctional institution.
(2) The community service must include removing graffiti, either those
that the defendant created or those created by another, or both.

It isn't clear what rules surround the creation of the community service list. Here is the web page for Multnomah County, here is one for Jackson County, and here is a Portland lawyer who has a list of community work service providers. That list provides a little bit of information about what is done, e.g. "serving means", "clean-up". It appears that an organization must be non-profit. The Humane Society page for community service gives a fair amount of detail about what you would be doing, but it is all cleaning up, not e.g. walking dogs.
Answer: It means work serving the community

Community service work can include a range of tasks, from the maintenance of public spaces, to preparing meals for community events. Work can be ongoing, seasonal or one-off, and cannot replace the work of paid employees.
Community Corrections has partnerships with community, government and non-government organisations to provide community service work opportunities for offenders. These organisations are known as 'community service work partners', and benefit from accessing labour for work that would otherwise be unable to be completed.

How does community service work?


What is the difference between juridiction and law in a specific region?

Question: The Wikipedia page of jurisdiction does not help me much to comprehend the concept. In my understanding it basically "law in specific region". I understand the concept is much more than that, but I don't know exactly what. Can you give some examples or analogies? And is there anything that is shared between all jurisdictions?
Answer: "Law" refers to rules; "jurisdiction" refers to the situations in which those laws apply.
For example, the United States Constitution is the supreme law of the United States of America. But for the most part, it only applies within the territorial jursidction of the government that enacted it, i.e., places inside the borders of the United States, or to those over whom the United States has personal jurisdiction, i.e., United States citizens, permanent residents, those currently inside its borders.
So the United States Congress could pass a law outlawing the sale of dogs, but it would have no effect on dogs in Canada, as Congress has no jurisdiction over dogs in Canada. Similarly, if a Canadian terrorist (the most dangerous kind, really) launched a missle over the border into the United States, the FBI could not arrest him in Toronto, as they lack jurisdiction to enforce the law outside the United States.
"Jurisdiction" is also a concept that limits the powers of courts to hear cases. "Subject matter jurisdiction" refers to limits on the types of cases the court may hear, and "personal jurisdiction" refers to limits on whose cases the court may hear.
For instance, if the New York Legislature established a small-claims courts to resolve claims for less than $10,000, your case might be dismissed for lack of subject-matter jurisdiction if you sued someone for $10,001, or it might be dismissed for lack of personal jurisdiction if you sued someone who had no connection to New York.
These explanations are admittedly incomplete and imprecise to provide a basic understanding of the concepts, rather than an overwhelming -- and boring -- exposition of the precise meanings of these terms.
Comment: do legal concepts like [legal capacity](https://en.wikipedia.org/wiki/Capacity_(law) "Capacity (law) - Wikipedia") depend on jurisdiction?
Comment: Worth noting that another sense of the word "jurisdiction" common used at Law.SE akin to but not identical to territorial jurisdiction is in the sense of "an entity, usually a government, with a distinct and specific set of laws".
Comment: @OOker Usually the jurisdiction that you are in determines whether or not you have legal capacity according to its own rules, but a court or entity's jurisdiction over a person or transaction or property does not depend upon legal capacity (with certain exceptions for parts of the subject-matter jurisdiction of probate and juvenile courts).
Answer: LAW is the codified system of rules and processes that permit, regulate, or punish certain activities. It also defines the Jurisdiction where (and by default, where not) these rules etc apply.
JURISDICTION is the extent and limitation (e.g. geographic or procedural) to where certain laws apply. The more common example of 'shared' jurisdiction is international law where different countries agree to incorporate the same, or similar, laws in to their own national statutes.
Comment: You could add that *often* a geographic spot is in several jurisdictions, e.g. a farm in Arizona within the United States of America. And there might be cases where the side initiating a lawsuit can *select* a jurisdiction, e.g. by filing a suit either in New York or in Texas.
Comment: That second sentence would be selecting a *venue*, not a jurisdiction.


Kittens game: what is "Space Paragon"?

Question: My oil production includes "Space Paragon:" +7489%
What is Space Paragon?
Answer: Space Paragon is an attempt to make Hydraulic Fracturers more useful.
Both Hydraulic Fracturers and Oil Wells generate oil. The base oil generation of Hydraulic Fracturers is much higher than that of an Oil Well. The former is also more expensive. This is sensible so far.
However, there are multiple multipliers which can significantly increase oil generation for Oil Well. Before the introduction of Space Paragon in 4.02 or 4.03, these multipliers did not apply to Hydraulic Fracturers. This resulted in Hydraulic Fracturers being almost useless endgame.
Space Paragon fixes this. Most, if not all, of the bonuses to Oil Wells now increase Space Paragon, and thus oil generation from Hydraulic Fracturers.
Some of these bonuses include

Solar Revolution Multiplier
Reactor Multiplier
Magneto Multiplier

I assume the paragon multiplier also helps with space paragon, but I am not sure.
Answer: From what I can tell from the source, it's an arbitrary measurement of how paragon affect auto-production of space structures.
What I'm certain of, is that there is no special kind of paragon.

Kittens game: what is "Space Paragon"?


iOS 17 (possibly) has broken OpenDNS filtering

Question: I have a private server running on my home network that gives out DHCP addresses and uses OpenDNS as a DNS server so I can use its content fitering.
AFAIK it's always worked OK, but I've noticed today that if I go to a site that should be blocked on both my iPhone and iPad the page loads. Both Safari and Firefox show this problem. It's possible this is connected to having been upgraded to iOS 17, but I don't check this kind of thing regularly so that might be a complete red herring.
Here is the weird part:
If I load a page I can see in the logs of my DNS server that it's returning the corrrect address (184.108.40.206 is the OpenDNS blocked site landing page):
<code>Oct  2 11:32:57 dnsmasq[29667]: query[A] vnt.xhamster.com from 192.168.10.215
Oct  2 11:32:57 dnsmasq[29667]: forwarded vnt.xhamster.com to 126.96.36.199
Oct  2 11:32:57 dnsmasq[29667]: reply vnt.xhamster.com is 126.96.36.199
</code>
If I check the DNS entry on my phone using something like the Ping Tool app, I also consistently get a result that matches the IP address above.
So, where is my browser getting the correct IP address from? I have Apple Private Relay turned off, as that's known to interfere with these things. By default, "Limit IP Address Tracking" is on (it's not clear to me what the difference is between this setting and the APR one), but even if I turn it off I get the same problem. Sometimes, the block works so it seems intermittent.
Where else can I look to see where iOS is getting the correct IP address from for these sites?
To add; blocking still works fine on my laptop (Windows 11), and all OpenDNS tests suggest blocking is configured correctly, e.g. visiting internetbadguys.com.
Update: Issue seems to have been resolved in iOS 17.4.
Comment: Reported to OpenDNS and is with their 2nd/3rd line. No updates for a while though. https://support.opendns.com/hc/en-us/community/posts/19706685053076-Blocking-not-working-on-iPhone-since-iOS-17-
Answer: The issue appears to have been fixed in iOS 17.4.


What if we do not end up occupying the property till 6 months as it is a tenant occupied and has lease for 6 months, bought as a primary residence?

Question: We have an offer on a property we intend to live as primary residence. The property is tenant occupied and the tenant has lease for another 6 months and I have to honor the lease as per seller. We like the home and intend to move after the tenant leaves the property. For primary residence homes the expectation from the lender is to occupy the home within 60 days, please advise if there will be any legal consequences as our intention is to occupy after the lease ends which is 6 months.
Comment: You tagged this question as "mortgage", so I assume the question you actually have is how that affects your mortgage eligibility? That's something you should ask your bank about.
Comment: Additionally, if you are in fact concerned about legal consequences, you'll have to tell us where in the world you are, since, laws will vary by country/jurisdiction.
Answer: You need to ask the mortgage company. They are offering you this mortgage as owner occupied. They will have to be willing to accept that this property you are selecting will qualify. The owner occupied mortgages don't lock you in forever, they do allow you to rent the property at some point in the future. The language in the contract should specify how long you must live in the property. They would have to accept that you are expecting to move in in X months, and be willing to risk that you never move in.
There are other things to consider. As a landlord for about 6 months you will have tax issues because it isn't your personal residence. All tax laws depend on the country, but in the United States you will have to keep track of the rent, expenses, and depreciation. You will also have to make sure the security deposit of the renter is accounted for at settlement, because they will want it back when they move at the end of the lease.
Make sure that you understand local tax laws. There are some jurisdictions that give a homestead exemption if the owner lives in the property. Make sure you don't get surprised by a bigger tax bill.
In the United States there can be a situation where a condo complex can have so many rental properties that it can be tough to get a mortgage. The lenders can't sell the mortgage because the belief that too many renters hurts the properties. You may find that you buying the property and keeping it as a rental runs into other mortgage approval rules.
As an option you can offer the tenant money to move early. You aren't evicting them. They are agreeing to move early. You probably can't make the offer until closer to settlement so they move out soon after you purchase the property.


How to tell what MTU is being used in Windows XP

Question: I'm suffering from a really weird problem where I randomly get "The connection to the server was reset" errors when trying to access web pages (HTTP error 12031 according to the Windows network diagnostic tool) - this happens regardless of whether the web page I'm trying to access is on the external internet or even if it's from a local Apache instance running on localhost. It affects all of the computers on our local network (Ethernet, not wireless), all of which are running Windows XP.
It has been suggested to me that it might be to do with the MTU used on network traffic. If I do the Ping Test to find out the largest packet that can go through unfragmented, I can ping the localhost with a package of 1492 bytes (+28 bytes for a header?) and I can ping our router with a package of 1462 bytes (which is 1490 bytes when you include the 28 byte header). If I try and ping something on the outside like Google, I can't get anything through bigger than 1430 (which is 1458 with the header).
I've tried following various sets of instructions to update the Windows XP Registry with this MTU setting, updating HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{AdapterID}\MTU. I've tried no end of alternative values: the most obvious correct value seems to be 1490, but I've also tried 1462, 1458, 1430, etc., etc. When I reboot the computer to make the change take effect, it seems to work for a few minutes (hard to tell for certain since it's always random rather than consistent) but it never lasts long.
Initially, when I was trying 1430 as a value, after a few minutes of working fine, the results of the Ping Test would decrease by 28 bytes - suddenly I'd find that I could only get a package of 1402 bytes through to Google. If I updated the MTU registry setting to 1402, when I rebooted and waited a few minutes, it'd then be 1374, then 1346, etc. etc. Other computers on the network remained unaffected (still at 1430) and removing the MTU setting from the registry would restore things to normal (and still broken).
The thing that I find the hardest about diagnosing all this is that it's very hard to tell if I'm even playing with the correct registry setting. So at it's simplest, my question would be: How can I tell what MTU setting Windows is trying to use?
Also, if anybody has any ideas how to tell why the MTU keeps dropping by 28, that would be useful too (e.g. is there a Windows log file somewhere where it will log something at the point where the value changes?)
Finally, if anybody can tell me definitively how to tell what MTU setting I should be trying to use, that would be great!
Comment: FWIW, in the end it was a dodgy phone line that was the problem. When I plugged a phone in there was no dial tone.
Answer: For Windows 7, Windows Vista and Windows XP, the MTU for various interfaces is available from Windows itself using netsh.
Windows 7, Windows Vista
To show current MTU on Windows 7 or Windows Vista, from a command prompt:
C:\Users\Ian>netsh interface ipv6 show subinterfaces

       MTU  MediaSenseState   Bytes In  Bytes Out  Interface
----------  ---------------  ---------  ---------  -------------
      1280                1   24321220    6455865  Local Area Connection
4294967295                1          0    1060111  Loopback Pseudo-Interface 1
      1280                5          0          0  isatap.newland.com
      1280                5          0          0  6TO4 Adapter

And for IPv4 interfaces:
C:\Users\Ian>netsh interface ipv4 show subinterfaces

       MTU  MediaSenseState   Bytes In  Bytes Out  Interface
----------  ---------------  ---------  ---------  -------------
      1500                1  146289608   29200474  Local Area Connection
4294967295                1          0      54933  Loopback Pseudo-Interface 1

Note: In this example my Local Area Connection IPv6 interface has such a low MTU (1280) because i'm using a tunnel service to get IPv6 connectivity.
You can also change your MTU (Windows 7, Windows Vista). From an elevated command prompt:
>netsh interface ipv4 set subinterface "Local Area Connection" mtu=1492 store=persistent
Ok.

Tested with Windows 7 Service Pack 1
Windows XP
The netsh syntax for Windows XP is slightly different:
C:\Users\Ian>netsh interface ip show interface

Index:                                  1
User-friendly Name:                     Loopback
Type:                                   Loopback
MTU:                                    32767
Physical Address:

Index:                                  2
User-friendly Name:                     Local Area Connection
Type:                                   Etherenet
MTU:                                    1500
Physical Address:                       00-03-FF-D9-28-B7

Note: Windows XP requires that the Routing and Remote Access service be started before you can see details about an interface (including MTU):
C:\Users\Ian>net start remoteaccesss

Windows XP does not provide a way to change the MTU setting from within netsh. For that you can:

follow the instructions in KB283165 - How to change the PPPoE MTU size in Windows XP
use Dr. TCP (Note: Windows 2000/XP only)

Tested with Windows XP Service Pack 3
See also

Configure TCPIP Max Transfer Unit (MTU) size in Vista
Setting The MTU In Windows Vista
Change MTU settings Help!
KB283165 - How to change the PPPoE MTU size in Windows XP
DSLReports - DrTCP

Short discussion on what MTU is, where the 28 bytes is coming from.
Your network card (Ethernet) has a maximum packet size of 1,500 bytes:
+---------+
| 1500    |
| byte    |
| payload |
|         |
|         |
|         |
+---------+

The IP portion of TCP/IP requires a 20 byte header (12 bytes of flags, 4 bytes for source IP address, 4 bytes for destination IP address). This leaves less space available in the packet:
+------------------------+
| 12 bytes control flags | \
| 4 byte from address    | |- IP header: 20 bytes
| 4 byte to address      | /
|------------------------|
| 1480 byte payload      |
|                        |
|                        |
|                        |
+------------------------+

Now an ICMP (ping) packet has an 8-byte header (1 byte type, 1 byte code, 2 byte checksum, 4 byte additional data):
+------------------------+
| 12 bytes control flags | \
| 4 byte from address    | |
| 4 byte to address      | |- IP and ICMP header: 28 bytes
|------------------------| |
| 8 byte ICMP header     | /
|------------------------|
| 1472 byte payload      |
|                        |
|                        |
|                        |
+------------------------+

That's where the "missing" 28 bytes is - it's the size of the headers required to send a ping packet.
When you send a ping packet, you can specify how much extra payload data you'd like to include. In this case, if you include all 1472 bytes:
>ping -l 1472 obsidian

Then the resulting ethernet packet will be full to the gills. Every last byte of the 1500 byte packet will be filled:
+------------------------+
| 12 bytes control flags | \
| 4 byte from address    | |
| 4 byte to address      | |- IP and ICMP header: 28 bytes
|------------------------| |
| 8 byte ICMP header     | /
|------------------------|
|........................|
|........................|
|. 1472 bytes of junk....|
|........................|
|........................|
|........................|
|........................|
+------------------------+

If you try to send one more byte
>ping -l 1473 obsidian

the network will have to fragment that 1501 byte packet into multiple packets:
Packet 1 of 2
+------------------------+
| 20 bytes control flags | \
| 4 byte from address    | |
| 4 byte to address      | |- IP and ICMP header: 28 bytes
|------------------------| |
| 8 byte ICMP header     | /
|------------------------|
|........................|
|........................|
|..1472 bytes of payload.|
|........................|
|........................|
|........................|
|........................|
+------------------------+

Packet 2 of 2
+------------------------+
| 20 bytes control flags | \
| 4 byte from address    | |
| 4 byte to address      | |- IP and ICMP header: 28 bytes
|------------------------| |
| 8 byte ICMP header     | /
|------------------------|
|.                       |
| 1 byte of payload      |
|                        |
|                        |
|                        |
|                        |
|                        |
+------------------------+

This fragmentation will happen behind the scenes, ideally without you knowing.
But you can be mean, and tell the network that the packet is not allowed to be fragmented:
>ping -l 1473 -f obsidian

The -f flag means do not fragment. Now when you try to send a packet that doesn't fit on the network you get the error:
>ping -l 1473 -f obsidian

Packet needs to be fragmented but DF set.

The packet needs to be fragmented, but the Do not Fragment flag was set.
If anywhere along the line a packet needed to be fragmented, the network actually sends an ICMP packet telling you that a fragmentation happened. Your machine gets this ICMP packet, is told what the largest size was, and is supposed to stop sending packets too big. Unfortunately most firewalls block these "Path MTU discovery" ICMP packets, so your machine never realizes the packets are being fragmented (or worse: dropped because they couldn't be fragmented).
That's what causes web-server to not work. You can get the initial small (<1280 byte) responses, but larger packets can't get through. And the web-server's firewalls are misconfigured, blocking ICMP packets. So the web-server doesn't realize you never got the packet.
Fragmentation of packets is not allowed in IPv6, everyone is required to (correctly) allow ICMP mtu discovery packets.
Answer: @ian I'm not so sure that netsh actually shows the currently used MTU.  On my Windows XP Pro SP3 machine, I executed netsh interface ip show interface and it reported the MTU value for the relevant interface as 1500.  I then added the following registry keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\EnablePMTUDiscovery
    value: 0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{ID}\MTU
    value: various (e.g. 1200)

Microsoft says that setting EnablePMTUDiscovery to 0 will set MTU to 576.
Setting the MTU registry entry sets the MTU manually.  I tried several values for the MTU entry (rebooting each time).
In both cases -- adding the first entry, then the second entry -- netsh still reported the MTU as 1500.  Testing with ping confirmed (or at least suggested) that the MTU value configured in the registry was actually being used though.
Also, when I first tried this on my machine, the Routing and Remote Access service was disabled, so I was unable to start it using your instructions.  I enabled it by going to Control Panel > Adminstrative Tools > Computer Management > Services and Applications > Services.  I changed "Startup type" from Disabled to Manual.  I then started the service from that dialog as well.
I'm also not sure that KB283165 is necessarily the correct instructions for changing the MTU.  Aren't those instructions only relevant when running the Windows PPPoE client?  If connecting to the internet through a router where the router is the PPPoE client (as in my case), those instructions wouldn't be relevant, right?
The instructions I followed, which led me to make the above changes to the registry, were in KB900926: Recommended TCP/IP settings for WAN links with a MTU size of less than 576 (methods 2 & 3).

Edit by @ian
Looks like you're right. Configure for 1,200, but netsh reports 1500.

>ping -l 1173 -f obsidian

Packet needs to be fragmented but DF set.

So i guess the answer to the original question is that on Windows XP you have to use trial-and-error with the Do not fragment flag to find the biggest packet you can send is. Then you have your MTU.
Answer: You can find MTU using ping with trial and error approach:
ping <address> -f -l nnnn

Ping:

-f : Specifies that Echo Request messages are sent with the Don't Fragment flag in the IP header set to 1. The Echo Request message cannot be fragmented by routers in the path to the destination. This parameter is useful for troubleshooting path Maximum Transmission Unit (PMTU) problems.
-l Size : Specifies the length, in bytes, of the Data field in the Echo Request messages sent. The default is 32. The maximum size is 65,527.

You will get "Packet needs to be fragmented but DF set" messages when the length is too big.
Comment: This is what I was doing above when I referred to "The Ping Test"
Answer: Microsoft KB314496: The default MTU sizes for different network topologies.
You should not try to play with the MTU configuration in normal network setups.
There is a VB code reference here.
There is also a tool called DrTCP:

In the registry,

Go to HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards
Open the adapter that you are interested in
Copy the ServiceName string
Search that string in HKLM\System; you will match a NetCfgInstanceId key
A little above that will be the MaxFrameSize key (mine shows 1514)

There is also a way to change this with the netsh command.
Also, check your Path MTU Discovery configuration.
Comment: Thanks for that, but ideally I'd be more reassured if I could get Windows to actually *tell me* what MTU it is *actually* using, rather than just what you'd expect the default to be. Maybe this isn't possible though :-(
Answer: See AdapterWatch:

AdapterWatch displays useful
  information about your network
  adapters: IP addresses, Hardware
  address, WINS servers, DNS servers,
  MTU value, Number of bytes received or
  sent, The current transfer speed, and
  more. In addition, it displays general
  TCP/IP/UDP/ICMP statistics for your
  local computer.


How To Get DeleteUrlCacheEntry() Error Codes? (Or additional information on why a particular deletion didn't work)?

Question: Basically, when I call DeleteUrlCacheEntry (which is part of the Wininet.dll API) I either get returned the number 1 (which means, deletion successful) or the number 0 (which meant, deletion didn't work).
My question is, how can I find out why a deletion did not work? (that is, when a 0 is returned). I heard there is a GetLastError() function in C++, however I am using VB6 and apparently the GetLastError equivalent in VB6 is the Err.LastDllError property.
After a DeleteUrlCacheEntry attempted deletion fails (returns 0) I call/query the Err.LastDllError and it always returns 0 - no matter what. It returns 0 even if DeleteUrlCacheEntry returns 0 (deletion didn't work) and even when it returns 1 (deletion did work). I also make the call/query to Err.LastDllError as soon as possible (as in, right after the DeleteUrlCacheEntry call).
I am really confused, because I don't even get a runtime error or any typical exception (or any exception for that matter). I do not have On Error Resume Next to ignore exception anywhere in my application, so every means of an error being reported to me is available but I cannot for the life of me figure out why a particular DeleteUrlCacheEntry() attempt will fail and return 0 (there doesn't seem to be a way for me to find out).
So, my question is, how do I get extended error information from the DeleteUrlCacheEntry() function (residing in the wininet.dll API)?
If you would like more information on the reason why I am looking for extended error information from the DeleteUrlCacheEntry() function, I have another question which details this (together with actual examples of cache items that work and don't work when a deletion is attempted): https://stackoverflow.com/questions/12096546/deleteurlcacheentry-function-of-wininet-api-not-deleting-some-internet-explo
Also, just to add, I am using VB6 - but principally it should be the same across most languages as it is an API call. Here is my declaration in VB6:

Public Declare Function DeleteUrlCacheEntry Lib "WININET" Alias
  "DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long

Also, I am calling it like this:

Dim lReturnValue As Long
Dim cacheFileString As String
' GetStrFromPtrA turns Pointer (Long) to String. cacheFileString is the actual text/string of the lpszSourceUrlName turned from Pointer (Long) to String (human readable cache file name/string). Also, cacheFileString is retreived from FindFirst/NextEntry functions in a loop, so can't be incorrectly formatted or anything, as it also works when deleting most other items.
cacheFileString = GetStrFromPtrA(icei.lpszSourceUrlName)
lReturnValue = DeleteUrlCacheEntry(cacheFileString)

The lReturnValue ends up being 0 if deletion didn't work, and 1 when deletion does work, and that is it. Also, Err.LastDllError always returns 0.
Thank you for your anticipated assistance.
Comment: @KenWhite The reason for the tags is because it applies to both C++ and Delphi as well (usage scenario is the same since it's a wininet.dll api call with error codes usually residing in a c++ .h file. So, it applies to people using these languages and those using these languages will also be able to make a contribution to this post.
Comment: @KenWhite it is not random, this is not a "code" issue just because some people wanted to see the code, it is an error codes issue, which applies to Delphi and C++ especially, notice i didn't include javascript, .NET or Java! Those would be random tags! API is universal across many languages which can hook into the Windows API, such as delphi and C++, which is why I seek the support of those people (getting extended error codes using API, not VB6-specific code). This is why people who are not closely involved in understanding the question should not edit tags or suggest close/delete etc.
Comment: You can call API functions from assembler, too; that doesn't make it an assembly question. And I'm quite familiar, thank you - I'm not exactly new here, if you view my profile and the tags for which I've answered questions. :-)
Comment: @KenWhite You're right, many languages do WinAPI calls, however, I am familiar with delphi, vb.net and c# which is why I was open to solutions in those languages to get a better grasp on the problem, hence my tagging was also a way to make that inference (of me being open to solutions in those languages). I do not know how to use assembler - however, I wish I did :).
Comment: No, you don't. :-) It's pretty nasty to work in. (I'm going to clean up some of the noise here to reduce the clutter.)
Comment: Could this "Protected Mode" issue be the solution? http://stackoverflow.com/questions/4588788/deleteurlcacheentry-doesnot-delete-temporary-internet-files-when-protected-mode/12132269#12132269
Answer: Personally I would set a break point on the call to DeleteUrlCacheEntry(), and step through it observing what the values in the call stack are.
Other than that, there is not much that can be said without a code snippet.
Comment: Hello, thank you for your input, I have added the code you requested (updated main question above), and I'm not sure if we get a call stack in VB6 - but when I set a breakpoint on DeleteUrlCacheEntry, there is nothing to step into since it's an API call, so pressing F8 just executes the DeleteUrlCacheEntry line and proceedes to the next line. What do you think?
Answer: If Err.LastDllError is returning 0 than either GetLastError() really is returning 0, which is unlikely, or VB is not calling GetLastError(), which is more likely.  Such as if the VB declaration of DeleteUrlCacheEntry() is wrong, like it is not setting the DllImport.SetLastError property to true under .NET PInvoke.
Comment: I have updated main question (above) with code and declaration so that you may review it, since I am using VB6 - I'm not sure how (or if) .NET PInvoke would play a part in this. I have diagnostic information on items that are and aren't deleted in the linked example in my main question above, detailing which items it returns 0 on and which items it returns 1 on, if that would be useful for your review, here is the link again: http://stackoverflow.com/questions/12096546/deleteurlcacheentry-function-of-wininet-api-not-deleting-some-internet-explo
What are your thoughts? Thank you (upvoted).
Comment: @KenWHite stop inferring, I am happy to do this in VB.NET as well, in order to understand the problem better, and in C# if I need to, if his suggestion is .NET I will take it, hence my vb.net and c# tags, as I am open to a vb.net and c# solution as well. Hence, you are not involved in interpreting the question, so stop altering it. thank you.
Comment: @RemyLebeau I am happy to consider which-ever type of solution that you provide, as I can code in .NET, if there is any additional ideas you have or information you can shed on this problem, please do let me know, thanks. *listening*
Comment: Under C++ and Delphi, you can call `GetLastError()` directly. Under. NET, you use PInvoke to call API functions so you can use `DllImport.SetLastError=true` and `Marshal.GetLastWin32Error()`.
Comment: MSDN documentation says that in VB6 equivalent is to use the Err.LastDllError (same as using GetLastError()), but when I do this, I keep getting the error code 0, does anyone have any ideas on this or should I start a new question re the Err.LastDllError part?
Comment: [Does this apply to your situation](http://msdn.microsoft.com/en-us/library/yb8afh2h.aspx)? "Smart Device Developer Notes: This property always returns zero."
Answer: This might not be directly relevant, but it seems to me that you are doing an unecessary string copy here. Why not directly use the string pointer you already have:
Public Declare Function DeleteUrlCacheEntry Lib "WININET" Alias "DeleteUrlCacheEntryA" (ByVal lpszUrlName As Long) As Long

Dim lReturnValue As Long

lReturnValue = DeleteUrlCacheEntry(icei.lpszSourceUrlName)

(This is assuming that icei.lpszSourceUrlName is a pointer to an ANSI string.)
Also, you do realise that Err.LastDllError is overwritten everytime a command called via a VB declare or type library declare with usesgetlasterror = true? So, for instance, if I declared APIFunc1() and APIFunc2(), and then called them like this;
nRet = APIFunc1(APIFunc2)

... then LastDllError would reflect only APIFunc1().
Comment: Mark, thank you for the clarification here. So, you're sayign that DeleteUrlCacheEntry accepts both a pointer or the string representation of that pointer, correct? (so, you can pass either one and it accepts)? Also, your note about the func1 and func2 makes sense, never thought about it in enough detail to make that realization but it would have to work in the way you mentioned for obvious reasons, so thanks again for that note, upvoted.
Comment: As far as DeleteUrlCacheEntry() is concerned, you are supplying it a C type string i.e. a pointer to a series of bytes, terminated by a null character. In your original declare, you used "ByVal lpszUrlName As String". In this case, VB interpreted this as "convert the VB string passed to a temporary C type string, call the API function with the pointer to this temporary C string, then copy the C string, converted, back into the original string". In my declarem VB interpreted this as "call the API function with the supplied Long value" i.e your previously received string pointer.
Answer: It's a bit dated ... but I am interested by the subject, so I thought I would share my limited knowledge.
For me, when I called DeleteUrlCacheEntry with a wrong URL, I get an error and Err.LastDllError is set to 2 !


Divergence of inverse of metric tensor

Question: I know that the Levi-civita connection preserves the metric tensor. Is the divergence of the inverse of metric tensor zero, too?!
I'm not so familiar with the divergence of the second ranked tensor. However, I think one can write
$$\nabla_j g^{ij}=\partial_jg^{ij}+\Gamma^i_{kj}g^{kj}+\Gamma^j_{kj}g^{ki}$$
using the identity $g^{jk}\Gamma^i{}_{jk}=\frac{-1}{\sqrt{g}}\partial_j(\sqrt{g}g^{ij})$ and $\Gamma^j_{kj}=\partial_k~log~\sqrt g$, so
$$\nabla_j g^{ij}=\partial_jg^{ij}-\frac{1}{\sqrt g }\partial_j(\sqrt g g^{ij})+\partial^i~log~\sqrt g$$
therefore
$$\nabla_j g^{ij}=\partial_jg^{ij}-\partial_jg^{ij}-g^{ij}\partial_j~log~\sqrt g+\partial^i~log~\sqrt g=0$$
which is weird to me. Where am I doing anything wrong?
Comment: $0=\nabla_k \delta^i_j=\nabla_k(g^{mi}g_{mj})=g_{mj}\nabla_k g^{mi}$
Comment: @AccidentalFourierTransform what I can't understand is the divergence of metric..BTW, why didn't you write the second term?!...
Comment: which second term? $\nabla_k g_{mj}=0$ by definition of $\nabla$...
Comment: @AccidentalFourierTransform ..you mean Levi-civita connection?! I've asked the divergance..BTW, I do not think one can write sth like $\nabla_k (g^{ki}g_{kj})$..it's an abuse of notation..or I don't get your point..
Comment: 1) yes, we are both talking about Levi-Civita $\nabla$ 2) note that once you know what $\nabla_k g^{mi}$ is, you can easily calculate the divergence by contracting the $ki$ indices 3) ... yes, that notation makes no sense, but I never wrote that...
Comment: I'm a bit confused..What do you exactly mean by contracting the ki indices?! Could you write it?! I really appreciate..
Answer: We know that the Levi-Civita connection satisfies $\nabla_a g_{bc} = 0$ and the product rule. The definition of the inverse metric $g^{ab}$ is $g^{ab}g_{bc} = \delta^a_c$. Therefore, we have:
$$\begin{align}
0 &= \nabla_a \delta^b_c \\
&= \nabla_a (g^{bd}g_{dc}) \\
&= (\nabla_a g^{bd}) g_{dc} + g^{bd} \nabla_a g_{dc} \\
&= (\nabla_a g^{bd}) g_{dc} \end{align}$$
Upon multiplying both sides by $g^{ce}$ and renaming indices we get that indeed $\nabla_a g^{bc} =0$. If you want the divergence $\nabla_a g^{ac}$ then it's just a matter of setting $b=a$; we still get zero.

Divergence of inverse of metric tensor


Loop through m4's dumpdef

Question: Is it possible to loop through the list of macro names given by dumpdef? I want to process certain macros which have a certain prefix in their name.
Answer: dumpdef writes the list of macros with their definition into a file. In standard m4, that file is standard error, so the only way to get at it is with a redirection that's external to the m4 script. GNU m4 provides the debugfile macro to redirect the output to a file which can be read back with input, but you can't rely on a specific implementation of m4 in autoconf.
Even if you manage to get hold at the output from dumpdef, the format of the output is not specified. You can use index and substr to break a string into lines, but that assumes that the implementation prints out one macro per line, which isn't guaranteed; furthermore, macro values can contain newlines. With GNU m4, the output is ambiguous: you can't distinguish
define(`foo', `hello')
define(`fooo', `world')

from
 define(`foo', `hello
 fooo:   world')

Assuming that the m4 implementation prints one macro per line and follows the name with a colon, you can gather potential macro names this way and use ifdef to check whether they are indeed macro names. But you're at the mercy of an implementation that doesn't use the same debugging print format.
The best way to solve your problem is probably outside m4.
Comment: You're right, I need fix the higher layers so as not to put the burden of looping on m4. Thanks.

Loop through m4's dumpdef


Orthographic camera in libgdx does not work with constructor when passing viewports size

Question: I am playing around with LibGdx and its OrthographicCamera and notice something, what is really strange for me. I mean if you look into the code below you will see that I am initialising OrthographicCamer without passing arguments (viewportwidth, viewportHeight) and setting up them later, and this code is working properly, I mean it showing me what I have expected I mean smaller area of my map (which is later rendered) in render method.
And I try second way of initialising OrthographicCamera where I pass the same values to the constructor, but this give me nothing. I mean I do not see my map at all just color BLACK(which I pass as ScreenUtils.clear(color) argument) and I am trying to understand the different behaviour of this code which for me should have the same output.
I hope someone will be able to help me understand that, I looked into the LibGdx source code, but I am missing something cause I still not understand why this behaviour is different.
// this is working code
camera = new OrthographicCamera();
camera.setToOrtho(false); // this set Y axis pointing up
camera.viewportWidth = 60;
camera.viewportHeight = 30;

// this code below is not working as expected
camera = new OrthographicCamera(60, 30);
camera.setToOrtho(false); // this set Y axis pointing up

Answer: It looks like you are not actually updating the camera in the first version. You are supposed to call camera.update() if you change those values.
Try commenting out these lines
//camera.viewportWidth = 60;
//camera.viewportHeight = 30;

Does it still "work"? I think your map rendering is relying on the default camera.


What do you use to mud the joins between cement boards on walls?

Question: I am seeing contradictory informations.. .some use drywall mud others say use exactly the same thin set you plan to use for your tiles.
Comment: This article suggests the same thin-set used to attach the tile, not the drywall mud. Also, it suggests taping the seam.  https://findanyanswer.com/how-do-you-seal-joints-on-cement-board
Comment: Does anyone say to use drywall compound?  That seems like a very bad idea.
Comment: That was my impression afyer watching some youtube videos ...I might be wrong because I  judged by color which was white in some cases and greysh in others so I assumed there were two options
Answer: The correct way to "mud the joints" is going to be to use tile thinset and a fiberglass tape made for cement board.  It's similar to the sticky fiberglass tape made for drywall, but its thicker and more abrasion resistant since the thinset has sand in it and can be vary abrasive.

Sample listing, but sold at most places that sell the cement board:
Cement board tape at Home Depot
Answer: You have two situations:
Cement board to cement board

You use thinset with cement board tape (alkaline resistant)... not just "grey" drywall mesh tape.
With a small gap I will push in the thinset with thee index finger into the gap.   If there is no backing... I give it a few minutes to dry out.
then add the cement board tape
WHOA - this is where you forget everything you know about mudding and taping.   You will now put the thinnest coat possible of the thinset.   If done right it will almost come to the top of the mesh backer tape.

Cement board to drywall

Given that you are using the drywall appropriately and it is no longer considered a wet area
you install using cement board tape and your choice of thinset or joint compound.
you will be using the same technique as above, not filling the mesh tape fully.

By not filling the mesh tape (or going over) this should provide the flatest surface possible and with small tile you may need to put less thinset in these areas to negate the slight bump or ridge.   Also there are techniques to smooth this ridge when putting on the waterproofing over the cement board.
Answer: You want to use thinset and tape designed for cement board. These materials are much stronger than their drywall counterparts.


How do sites detect bots behind proxies or company networks

Question: How do large sites (e.g. Wikipedia) deal with bots that are behind other IP masker? For instance, in my university, everybody searches Wikipedia, giving it a significant load. But, as far as I know, Wikipedia can only know the IP of the university router, so if I set up an "unleashed" bot (with only a small delay between requests), can Wikipedia ban my bot without banning the whole organization? can a site actually ban an IP behind an organizational network?
Comment: [The day Wikipedia banned Qatar](https://en.wikinews.org/wiki/Qatari_proxy_IP_address_temporarily_blocked_on_Wikipedia).
Comment: @isanae Related: http://superuser.com/q/1013630/326546
Comment: Better make your bot [indistinguishable from legitimate users](https://xkcd.com/810/)
Answer: No, they'll ban the public IP and everyone who is NAT'd to that IP will also be banned.
Although at least At stack if we think we are going to ban a college or something like that we'll reach out to their abuse contact to get them to track the offender down and stop the issue.
Comment: What Zypher said.  Speaking as someone who used to track down complaints sent to email@example.com, we were usually pretty eager to find the person responsible so they would unblock the public IP.  (College students *love* to share music peer to peer.  RIAA loves to contact firstname.lastname@example.com about it.)
Comment: This doesn't answer the actual title question of how these sites *detect* bots.  In fact, it seems that if you slow down your bot sufficiently (which wouldn't be much), it would in fact be indistinguishable from valid usage by a whole bunch of college students.
Comment: To extend on @KatherineVillyard's comment. Formally overseeing the network of an institution if no one reached out to us prior to blocking, and the resource we were block from was regularly used, we would reach out to them to correct the problem. Usually they were willing to unblock us if we would resolve this from our end. This meant pursing the source of abuse. Being Wikipedia, even if they don't reach out to your institution your institution will likely look into it once they realize they have been blacklisted. That seemingly harmless ban can quickly turn into an expulsion.
Comment: @Wildcard FWIW most places won't tell you how they detect bots simply because that will just get the bot authors they are catching to change things up. That said, there are many other signals besides velocity of requests to detect bots. But most places won't care that much if you are playing nice, not doing something shitty or straining resources. It just isn't worth it to chase every small bot out there.
Comment: ...unless there is something uniquely identifiable about your bot, such as passing an access token or a unique browser id.
Answer: A site cannot directly ban an IP which is behind NAT. It could act on IPs passed through non-anonymising HTTP proxies - when such a proxy forwards a request on, it typically appends that address to an X-Forwarded-For header, so if access from your private network actually has to go via such a proxy the internal IP could be exposed; however most sites (wikipedia included) wouldn't trust the information in that header anyway because it's easy to spoof to implicate innocent IPs or evade bans.
There are other techniques that attempt to uniquely identify users independently of IP address however. You can interrogate a web browser for a lot of information about it and the system it's running on, such as the user-agent, screen resolution, list of plugins, etc. - see https://github.com/carlo/jquery-browser-fingerprint for an example of this in practice. You could use such fingerprints to control access, though depending on site design you may be able to interact with it without engaging with the fingerprinting process, and even if you can't a bot could provide spurious and randomised data in order to avoid having a consistent fingerprint if you are aware this kind of protection is in place. This method of control also runs the risk of false positives especially when it comes to mobile devices where there will probably be large numbers of clients running identical stock clients on identical stock hardware (most people on a specific model of iPhone running a specific version of iOS, for instance, would probably get the same fingerprint). Fingerprinting like this is normally just used for user tracking rather than to enforce controls but I am aware of places which do use fingerprinting to implement bans when there is concern that an IP block would be too broad, and could be effective against a naive bot.
Comment: It's not unlikely at all; many universities, and at least one entire country, proxy web connections and add X-Forwarded-For.
Comment: Interesting. I would personally be surprised if a company were to configure their web proxies to do that as it exposes some (admittedly trivial) information about your internal network, but I guess it depends on the org.
Comment: @Carcer, it does not have to be the real internal IP address, just something that is consistent for each user of the proxy.
Answer: Generally the IP address isn't sufficient information for a correct ban. So advanced networks work high up the network stack.
A Denial of Service (DoS) attack (which you are worried about creating) is usually handled by rate limiting the initial TCP connection setup. This means legitimate users that are willing to wait will get through whereas those that are just trying to consume server resources are slowed to the point it become harmless. This is where DoS then evolved into a Distributed DoS (DDoS) attack.
Once you have a connection to the server you can make as many requests as you like, the web server administration can configure how many requests to handle.
The web server probably can handle more capacity than your local network gateway anyway, that's probably the limiting factor in your use case. I'd wager your University network admins would come knocking on your door before Wikipedia did.
It is important to be a good Internet citizen so I would add rate limiting code to a bot.
It should also be pointed out that Wikipedia offer data dumps so that trawling the site isn't really necessary.


Django-cms translatable objects

Question: I am implementing payment plans on an multilingual eshop based on django-cms. I need internationalized support for payment plans.

User can enter abritrary number of payment plans (implies standard django models)
Every payment plan must have a description in every language site supports (3 at the moment). Implies basic django-cms post or plugin.

Possible solutions I thought of, but did not fit..

If I go with django models, how do I handle i18n?
If I go with cms plugin, how would I link those descriptions to same django models in every language?
If I go with cms page, how do I create separate entities?

What is the most elegant solution?
Thanks.
Answer: Found the solution. Django-nani.
Comment: Don't use django-nani! Use the fork (django-hvad), since that's where the development continues!

Django-cms translatable objects


Why do tonal composers prepare dissonances when the dissonant chord is inverted?

Question: ii65 is a good example. According to my textbooks, the dissonant ^1 in this chord requires a more strict preparation than the ^4 of the V7 chord in common practice harmony which many times is not prepared at all. With the ii7 and its inversions the preparation is supposed to be more important via suspension or passing tone. The thing I dont get is that once you invert this chord to be ii65, the dissonant ^1 becomes consonant with the bass as a parfect 5th so why should it be prepared?
Answer: The ^1 may be consonant with the ^4 bass, but it is dissonant with ^2, usually in the melody.  Remember that voice leading rules developed from counterpoint rules, and harmony also developed from counterpoint.  We tend to think of voice leading as a constraint that restricts what you can do with a given harmony, but that's somewhat backward.
The ii6/5-V-I cadence is another way of harmonizing a descending ^3 ^2 ^1 cadence with a ^1 ^7 suspension (in, e.g., the alto).  It could also be harmonized as V with a 4-3 suspension; the difference is in the bass (and the other inner voice).  But this melodic cadence is far more ancient than harmony
Add to this that the seventh of the seventh chord may arise not as a prepared suspension but as a descending passing tone.  In the V-V7-I case, that's ^5 ^4 ^3, and in the other case, ^2 ^1 ^7.  But in the second case, there's a good chance that ^2 isn't doubled in the ii6 chord, so when the voice with that pitch moves to ^1, we don't have a ii6/5 chord but a IV chord.
In short, there are both contrapuntal and historical grounds for treating the ii6/5 chord distinctly from the V7 chord.
Comment: So then why not prepare the ^2?
Comment: @armani what chord precedes the ii6/5?  Normally some inversion of I, which has a ^1 in it but not a ^2.
Comment: ahh ok, that makes sense
Answer: In the context of traditional harmony textbooks, when considering whether or not a note is dissonant we must take into account all the notes in its harmony. The fact that the ^1 in a ii65 is consonant in relation to the bass does not change the fact that it is dissonant in relation to ^2. ^1 will always be a dissonance in the tetrad over the ii, no matter what inversion it happens to be in.
Answer: I see no reason why any of these variants of II-V-I require preparation of the melody note more than any other.  If your book thinks otherwise, it's down to the author to say why.
I see I didn't actually include a ii6/5. Sorry!  Add a D in the tenor of the third one.
Comment: None of these is a ii6/5 chord.


Two samples of the same distribution

Question: What non-parametric methods exist to assess whether two random samples belong to the same distribution?
Comment: Please consider the quality of your questions and the frequency of asking them. You can't possibly have done much background searching/research yourself on such disparate topics if you are posting 4 questions within 24hours (unless you save up the questions for us ;-) We really aren't here to do your work/research for you. The number of votes for Qs reflects the quality and amount of research effort demonstrated, and your Qs are somewhat lacking in that regard.
Comment: I second Gavin's suggestion. We like to help, but not at a rate that people usually get paid for.
Comment: @NickSabbe unfortunately here I didn't find nobody that want to get paid. I tried sometime in chat but nothing... I can pay for those questions but there aren't emails
Answer: It depends, how do you want to define similarity of distributions? Same location, same spread (variance), same skewness/kurtosis, combinations of these, or just "differences"?
Non-parametric methods like the Mann-Whitney U test (Wilcoxon rank sum test) test the hypothesis that the two samples' distributions come from populations having the same location (the alternative hypothesis being that the two samples come from populations with different locations, e.g. one distribution has larger values than the other). In R, see ?wilcox.test. The Kruskal-Wallis test (in R, ?kruskal.test) is a more general test for two or more groups.
The Kolmogorov-Smirnov test considers differences in the distributions per se (so is sensitive to differences in location, variance, skewness, etc) of the two candidate distributions. In R, see ?ks.test.
Comment: Some points of clarification: K-S considers differences between sample distributions, period.  It has nothing (explicit) to do with location, variance, or skewness.  It is truly non-parametric, too.  Its implicit definition of "similarity" is "equal a.e.".  Note, too, that "rank" is not a property of a distribution: the ranks (order statistics) are sample statistics.  Finally, it's not usual to consider the M-W test to be a form of ANOVA, although it can be cast into that framework.  It's simpler to consider it a nonparametric form of the Student t test.
Comment: @whuber +1 Thanks for the clarifications. On the K-S test, that was lax wording on my part as I didn't mean to indicate that the test looked at those features specifically. Re the M-W test etc, mea culpa; all these tests' names got me confused. Either that or I need some more coffee.

Two samples of the same distribution


Can check box and link be together? If not then what is the best UX to have on screen: icon or view more link?

Question: In my screen,left side text is clickable. You can click on parent level and see their child after parent. Parent and child has text box to delete or bulk delete. I want to give capability to user that user can click on right side and see parent and child level and drill in the child level.
Can i give check box and text link together ?
If no then what will be best ux to understand that user can go in child level by clicking right side?
Can i give icon near delete button ?
Can give view detail link after text ?
Comment: I am unsure why you need two separate panels. You could fit all the information in the same panel. Also, I'm not sure I understood the purpose of the checkbox?
Answer: In your query, the text link is meant to be checkbox label. If the checkbox has a correct association with its label, the label could be clickable. No need to make it a link.
To answer your UX concern, Is it possible to do everything in the left panel, is there any reason for the right side panel? You can have the delete button in the left tree view itself.
If you need to display, the attributes, details, and contents related to the selected node, then the right panel will do that for you.
Answer: You don't need two panels. An icon such as an arrow is a common way to indicate children in a tree view. Down pointing arrow means there are children, side arrow means the group is open, no arrow means no children. Then your actions can still be on the side
<code>> Group 1                     [delete bulk]
      Group 11                     [delete]
    > Group 12                [delete bulk]
          Group 121                [delete]
v Group 2                          [delete]
v Group 3                          [delete]
  Group 4                          [delete]
</code>


In python, how to find out how many sets of numbers in the sentences

Question: For example, if there is a sentence "I have 8 pens and my friend have 7 pens"
I know how to use  re.findall to extract the number and the outcome will be ['8', '7']. However, i want to figure out how many sets of numbers in the sentence, which the answer suppose to be 2. Can someone help me to do it? thank you
Comment: If you mean to say number of numbers, then you can do like this to get it- `len(re.findall(r'\d+', 'I have 8 pens and my friend have 7 pens'))`
Comment: It's unclear if you mean proper a python `set` of numbers (no duplicates in output), or are using it in a generic "group of numbers" context (duplicates allowed)
Answer: Simply use the length of the findall() output?
>>> sent =  "I have 8 pens and my friend have 7 pens"
>>> import re
>>> re.findall(r'\d+', sent)
['8', '7']
>>> len(re.findall(r'\d+', sent))
2

Or since you asked for the set of numbers, convert the list to a set too (excluding any doubles).
>>> sent =  "I have 8 pens and my 8 friend have 7 pens"
>>> import re
>>> re.findall(r'\d+', sent)
['8', '8', '7']
>>> len(re.findall(r'\d+', sent))
3
>>> len(set(re.findall(r'\d+', sent)))
2

Answer: To find how many numbers are in a string, you can find the length of the list you created with your re.findall call.
In [1]: import re

In [2]: sentence = "I have 3 tacos, 2 burritos, and 3 tortas"

In [3]: re.findall(r'\d+', sentence)
Out[3]: ['3', '2', '3']

In [4]: len(re.findall(r'\d+', sentence))
Out[4]: 3

To find how many unique numbers are present in the string, convert the list into a set and find the length of that.
In [5]: len(set(re.findall(r'\d+', sentence)))
Out[5]: 2

Answer: Cant you use len(re.findall()) find the answer.
Answer: If you use
amount = len(re.findall(sentence))
print(amount)

This SHOULD work. Though, I must admit I have never used re.findall, but what it looks like up there is that it creates a list of the numbers. So if the string is in a variable called sentence, and re.findall makes a list of numbers. Then Len should read the length of the list. Then it will print the length of the list.


Impacts of the collapse of the current cyber-security?

Question: Much of the information transferred over the internet is encrypted using methods which rely on the fact that currently, very large numbers are extremely difficult to factor. Imagine that in the near future, developments in mathematics result in algorithms can factor numbers in a fraction of a second (which is actually possible). How much would "life as we know it", with online banking, communication, etc. change? Would these industries be able to quickly develop other methods of encryption, or would the world get kicked back to pre-internet days?
Comment: The premise stated in the question does not necessarily imply the outcome given in the title.
Answer: There is no one answer to this, because it is too complicated of a topic.  The key to the answer would be in global dynamics.  How does China respond?  How does Russia respond?  How does ISIS respond?  How does Anonymous respond?
Rest assured, very little encryption relies on the difficulty of factoring large composite numbers.  Most symmetric algorithms rely on other proofs for their security.  The facet of encryption that would be pounded would be public-key encryption, where RSA is the current reigning champion.
There are other public-key encryptions out there.  Some even rely on lattice based techniques that are immune to Shor's algorithm, making them particularly resilient against quantum computers.  In the greater scheme of things, the internet can survive someone determining how to rapidly factor a large composite number.
However, in that short period during the changeover, there would be a lot of turmoil.  The individual players on this global scene would have a lot to say about how things play out.
Comment: "There is no one answer to this, because it is too complicated of a topic." - this question is **obviously** too broad/opinion based and should not have been answered. Cort, you're one of the top users of WB, and it pains me to see you setting a bad example T.T
Comment: @Marion In the context of public key encryption, RSA is an algorithm for encryption that involves large prime numbers.  It was actually released the day it was published.  A good crypto algorithm assumes the enemy already has your algorithm, so there is no breach when it is released.  The people who developed RSA then founded a company, also named RSA.  Obviously this was to enjoy the fruits of their successful algorithm, but it does create some confusion, especially with respect to their security breach.
Comment: @MarkRipley The question asked about just factoring large composite numbers.  Breaking all of crypto would be a more substantial hit, and probably would not have a meaningful worldbuilding answer.   Elliptic curve crypto (ECC) is interesting.  From my understanding (which is by no means perfect), ECC is very strong.  However, Dual EC DRBG, an ECC pushed by the NSA, demonstrated an interesting issue with them: they're terribly easy to hide backdoors in.  That would suggest they may be secure, but they can't be trusted =)
Comment: @CortAmmon That's why current opinion is that the curves should be selected in a highly transparent manner, in ways that involve no (or minimal) "magic constants". It's unexplained magic constants that provide opportunities for hiding back doors; if you tell people exactly how you chose the proposed constants, and ideally do so in a cryptographically secure fashion, there's really no good place to hide a back door. For example, an ECC curve involving just `SHA512("Cort Ammon does not fully trust Dual EC DRBG")` and the digits of $\pi$ is probably not a good candidate for hiding a back door in.
Comment: RSA has long been broken; there was a security break a few years ago which released their algorithms. Unfortunately, it doesn't stop corporations from relying on RSA tokens.
Comment: @Aify I felt there was a class of answers, and describing the class seemed like a useful enough answer.  A hundred people could write a hundred books about different ways it could play out, but the reality of the world of cryptography is clear enough that those hundred books would have to fit a pretty crisp timeline from 0-day exploit to restitution of order.  The way that stage was set and the eventual endpoint deemed valuable for many future authors.
Comment: I was under the assumption that elliptic curve crypto uses a different math method than the factoring of large almost prime numbers. Are you postulating all methods of crypto math have been broken, or just the crypto that uses slow factoring of large numbers?
Comment: @MarkRipley The RSA algorithm bases its security on the difficulty of factoring semiprimes (the product of two prime numbers). (That's not to say there's no easier way to attack RSA than semiprime factorization; *we just haven't found one yet.*) Cort Ammon mentioned lattice-based algorithms, which rely on a totally different set of problems. There's also elliptic-curve cryptography, which relies on another set of problems: discrete logarithms. It's possible, but not necessarily a given, that an efficient method of factoring semiprimes could generalize also to solving discrete logarithms.
Comment: Also, just for clarity: I'm not saying that an ECC curve made up of those constants would be *secure*. I don't know elliptic-curve cryptography well enough for that. However, you'd very likely have a hard time coming up with ways of hiding a backdoor in a curve generated in such a transparent fashion.
Comment: @CortAmmon, thanks for the clarification.
Answer: I really like Cort's answer and I think it is the correct one. This one is just me bringing more info to the table.
There is a matter of scale involved. We usually hear about encryption keys with some amount of bits attached. That's the size of the key, and the longer it is, the more computing it takes to break.
Adding four extra bits to an encryption alghoritm will, on back-of-napkin calculations, make it one order of magnitude harder to break. Now look how we went from 512 bits keys to 1024 bits ones.
No matter how much mathematics advance, we are still limited to processing power. Even if you figure an easier way to break a key, it still involves computing. So if you suddenly develop an alghoritm that makes it possoble to break a 2048 bits key in one minute, I'll just start using 4096 bits. I'll take whatever performance overhead that costs me, but your alghoritm will take eons to break the new key.
Again, back-of-napkin calculations have a brute force attack taking approximately 10^2045 (the numer one, followed by two thousand and forty-five zeroes) longer to break a 4096 bits key than a 2048 one. I may be a little off there, but the amount of zeroes will be close enough to give you an idea.
Okay, I expect your attack to be a non-brute force one, which scales more favorably than that, but even then, scaling the key up may make any attacks unfeasible for a long while - until better processors are developed, and anoter math genius comes up with another, clever method of encryption breaking.
Comment: That order-of-magnitude argument is true for brute-forcing (or any other exponential-time algorithm). However if a polynomial-time algorithm is found, that argument breaks down.
Comment: Your answer is based on incorrect assumptions. Your basic assumption -- that the difficulty of a brute-force attack scales exponentially with key length -- holds *for algorithms where the key has no inherent structure*. That's often (but not always) the case with symmetric encryption algorithms, but it is decidedly *not* generally the case with public-key encryption algorithms. A RSA key, owing to its semiprime nature, has *significant* internal structure that allows far better attacks than brute force on the public key directly. Compare [keylength.com](https://www.keylength.com/).


Need help replacing this super old shower handle!

Question: Not really sure what kind of handle this is or how to replace it. It doesn't work anymore so no water comes out of the showerhead. There's some little pin in the base of the handle that broke and none of the hardware stores around here have any replacement parts for it. I'd really like to remove and replace it with something more modern.
Comment: I cant tell what brand that is, there are literally dozens and dozens (old, new, foreign, domestic). Your picture does provide a clue though: The hatched area around the external part of that *collar* is a hint that it must be unscrewed to remove the handle and valve guts. Once apart, take all pieces to a good plumbing shop, not a "big box" store.
Comment: It looks like some putty or glue has been applied to the back side of that collar.  For that and other reasons I would not be too optimistic about being able to open this, buy parts, and put it back together easily.  Advice from a DIYer: If this bathroom has its own shutoff valve, shut it off, and go at it.  If not, I never bite off projects that could leave the family without water for days.  Hire a plumber who has the experience and skill, once the job is started, to get it to a stable state with the water back on within a few hours, even if that means opening the wall and replacing it all.
Comment: YES! The water needs to be off before removing that cap.
Comment: Thank you for that, Jimmy! I only work with local hardware shops that are more personal than the big box stores.  Would I have to turn the water off to take the parts off? I'm really, really not savvy in this area.
Answer: If you can't find matching parts, you will need to open up the wall and get a new shower diverter. You might be able to do it without damaging the tile if you approach it from the other side of the wall. You can do the work with push fittings and it will be relatively simple that way.
Comment: If you are forced to open up your wall, many times you can do that from the backside (other side) of the wall to preserve the tile.    You'll still end up with a drywall repair to do but without a tile project, too.


Software testing and non-functional properties

Question: Do you think that software testing is good for non-functional properties?
What are the non-functional properties that could be evaluated through software testing? Security, accessibility, usability, energy consumption...?
Comment: I'm not sure I understand the question.  Are you asking whether *automated* test is good for those things?  Or whether software *testers* are capable of testing non-functional things?  Or something else?
Comment: Not the testers, but if the Testing is capable to testing non-function things
Answer: Nonfunctional requirements generally support all users in that they describe the business standards and the business environment, as well as the overall user's experience, therefore, software testing is very essential for non-functional properties also.
In non-functional testing the quality characteristics of the component or system is tested. Non-functional refers to aspects of the software that may not be related to a specific function or user action such as scalability or security. E.g. How many people can log in at once? Non-functional testing is also performed at all levels like functional testing.
Non-functional testing includes:
Usability testing,
    Efficiency testing,
    Maintainability testing,
    Portability testing,
    Baseline testing,
    Compliance testing,
    Documentation testing,
    Endurance testing,
    Load testing,
    Performance testing,
    Compatibility testing,Security testing,
    Scalability testing,
    Volume testing,
    Stress testing,
    Recovery testing,
Comment: Thanks for your answer. I'm getting the opinion of several people. You talk about kinds of testing that I don't knew like Endurance and Documentation. It's good to know non-functional software testing is an important topic.
Comment: apologies for my bad english
Comment: Endurance testing is also known as Soak testing.
Endurance testing involves testing a system with a significant load extended over a significant period of time, to discover how the system behaves under sustained use. For example, in software testing, a system may behave exactly as expected when tested for 1 hour but when the same system is tested for 3 hours, problems such as memory leaks cause the system to fail or behave randomly.
Answer: It is totally depends on your software/website and requirement also.  But it is really important and beneficial that we choose and perform non-functional testing techniques as per our need.
Basically no-function testing includes following :
1 - Load testing
2 - stress testing
3 - portability testing
4 - reliability testing
5 - usability testing
6 - maintainability testing
7 - Recovery testing
and there are some others.
Basically non-functional is the
testing of "how" the system works.
Comment: "how" the system works as opposed to what ?
Comment: It means behavior of system.
Comment: depends on the requirements and deadlines of the project
Comment: deadlines influences everythink :)
Answer: ISTQB describes non-functional tests as following:
Non-functional testing includes, but is not limited to, performance testing, load testing, stress testing, usability testing, maintainability testing, reliability testing and portability testing. It is the testing of "how" the system works.
Comment: I agree, reading up on the ISTQB Foundation course will help you .