Problem installing Drush 7 due to missing ext-pcntl PHP extension - any workarounds?

Question: I attempted to install Drush 7 using the "manual install" instructions, and the "composer install" step failed with the error that the ext-pcntl PHP extension was not found.  The hosting company (which I don't have control over choosing) says they are unwilling to install ext-pcntl in a production environment due to security concerns.  Are such security concerns justified?  Is there any workaround for installing Drush 7 without the ext-pcntl dependency?  If not, I might try to install an older Drush version that doesn't have the dependency.
Answer: Are such security concerns justified?
Given the description on extension's introduction page, yes:

Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. Process Control should not be enabled within a web server environment and unexpected results may happen if any Process Control functions are used within a web server environment.

Emphasis mine.
But also no, because, as greg_1_anderson stated in his answer, it can be enabled (or even compiled) into CLI only.
Then again, it might be yes. With functions like pcntl_fork it might be possible to make a fork bomb. Other bad things may also be possible. Personally, I wouldn't allow it on shared server.
Is there any workaround for installing Drush 7 without the ext-pcntl dependency?
Not really*, but if you can mount webserver's filesystem on your local machine and tunnel SQL port, you can install drush locally and still use it on remote website. From Drush's point of view there will be no difference.

* Correct me if I'm wrong here.
Answer: php-cli has a different php.ini file than the webserver's php environment, so it is entirely possible to enable ext-pcntl for php-cli, but not for the php in the web server environment.  Some shared hosting environments only allow one shared php.ini file, though.  It is also possible that they may be unwilling to install it simply to prevent their clients from accidentally enabling it for the web server environment.
Drush uses ext-pcntl in backend invoke, so it is unlikely that you'll be able to use Drush successfully without it. The missing dependency might not be enforced in pre-Composer versions of Drush, so it might work to install Drush 6 or earlier, provided you do not call any functions that redispatch back to drush (e.g. use drush pm-updatecode followed by drush updatedb rather than using drush pm-update -- not that you'll be updating your live site on the hosting platform with pm-update though, right?)
Comment: I was able to work around it by installing Drush 6, which still lets me do what I need to do, for now.  Thanks!
Comment: *"not that you'll be updating your live site on the hosting platform with Drush though,"* - s far as i remember drush is also able to sync data and files between Drupal instances? Even if updates are tested on dev all right, they need to somehow get on production and Drush is one of the ways.
Comment: Most folks update code on dev, and then either commit it to the vcs and push to live, or rsync it over. You are right that the Drush rsync wrapper could be used to deploy; there are also Drush extensions designed specifically for deploying. I'll update the answer to say `pm-update` instead of `Drush`.


Do they make a tv wall mount that will come out and down?

Question: I want to mount my tv above the fireplace. I would like a mount that will let me pull it out and then down so it will clear the mantle and not make us have to look up too far when watching it. If they make something like this, what would it be called?
Comment: I know this isn't a good answer, but if you need this, then doesn't it mean this is not the right spot to mount the TV? If you're a casual TV watcher that uses it very little, then it shouldn't be a big deal to have it above the mantel. If you watch it quite a bit, isn't it more likely that it's going to be left "down" position most/all the time anyway, blocking your fireplace? Why not just find somewhere else to mount it and/or rearrange your furniture layout so you can permanently mount it without issue?
Comment: I need the same! The only thing i found is like a swivel arm- that will swing the tv completely out of the way(but you need the same amount of space to the left or right).. nothing that goes up/down..  or ask this guy  http://www.youtube.com/watch?v=yKwdWgXXnK0
Comment: I have one other wall I can put it on due to wall shape and entry ways. To be honest I do not like the way the furniture can be laid out with it on that wall.
Comment: also, most of the time we can watch it just fine with it up. The uncommon case is when we have enough company over to use all of the furniture. Some people will be straining to look up quite a bit.
Comment: I'm looking for the same and just found a possibility on Amazon by searching for "mounts that go out and down". :)
Answer: Dynamic Mounting http://www.dynamicmounting.com/ has a product specifically for this purpose. Be forewarned, they are not cheap (well, maybe cheap compared to a motorized lift, but not cheap compared to simpler articulating arms).
Answer: You could consider a motorized TV lift like this one. I have had clients have this. They are not cheap...
Comment: These seem to only go vertically and not horizontally.


Can a PWM fan be turned on and off with the control pin voltage?

Question: Can a PWM fan be turned on and off through the control pin?  Or can it only adjust speed?  Is it just a fet that turns the 12V on and off?
Comment: Which is the 'control' pin? According to Intel's spec. for PWM computer fans: If you provide 0 volts to the *'PWM' pin* the fan will not spin. If you provide 5 volts to the *'PWM' pin* the fan will spin at 100% of it's rated speed. A ~25kHz square wave (of 0 to 5V) will cause the fan to spin at a speed linearly proportional to the duty cycle, although performance is 'undetermined' below a 20% duty cycle.
Comment: It depends on the fan. I've worked with fans that, by spec, will not go slower than 30% of full speed, even at 0% PWM. In this case, to actually stop the fan, you'd need to cut the +12V. Read the datasheet!
Comment: Post a link to the fan's datasheet, please.
Comment: Okay, this is how I was hoping it would work (0V on the PWM pin would be off, and 5V on), but it doesn't seem to be working that way.  It is the Arctic F9 PWM  https://www.arctic.ac/us_en/arctic-f9-pwm-co.html
Comment: I thought maybe I had a ground issue since the fan is powered with a wall wort (12 V) and my control / pwm / 0V,5V signal was from an arduino board, but that is not the cause.  I am trying to turn it on and off with a digital out from the arduino.  Changing the voltage on the PWM/control pin does nothing to change the fan speed.  Any suggestions?  I could just use a fet, but I thought a pwm fan would make this easier.
Answer: Before 4-pin fans became common, people had to build their own fan controllers to change the voltage applied to 3-pin fans. Some folks used rheostats, just burning off the excess power as heat, others chopped the incoming 12V, making a rudimentary form of buck converter.
The 4-pin fans simply integrated the PWM control circuit inside the fan -- this may be implemented in many ways, all dependent on the fan model. Dead simple brushed DC motors probably have a single FET in there that is roughly chopping the voltage. If there's a fan built with a BLDC motor, it's probably using the PWM signal to drive the BLDC motor controller.

Your fan's datasheet seems to show that at PWMs below roughly 10%, it will not spin (for a 12V supply). If it is actually spinning, I would measure the voltage on the PWM line -- perhaps something else is driving onto it.
Comment: Based on this, and the next answer, I would expect 0V on the PWM fan (0% duty cycle) to turn the fan off, and 5V (100% duty cycle) would turn the fan on to its max speed.  HOWEVER, this is not the case.  Connecting the PWM pin (blue wire) to either the +12 V (yellow wire) or 0 V (black wire) does nothing to change the speed of the fan.  Is there some subtlety about the 25 kHz frequency that I don't understand?  There must be something to that, right?
Comment: So I got the arduino running the PWM pin at 25 kHz, and I am able to change the fan speed.  However, the fan cannot be completely stopped... in fact as the average voltage drops (duty cycle lowers) below a critical value of about 1 V, the fan spins up to max speed again.  So yeah, there's clearly some other crazy stuff happening in the fan circuitry.  The fan's behavior does not seem to follow these RPM vs PWM% curves shown here either.  I guess I'll just use a fet to turn the 12 V on and off.
Comment: I feel like connecting the PWM pin directly to 12V would potentially destroy the control circuitry inside -- isn't PWM for those fans a 0-5V signal?
Answer: There are three possible implementations according to Intel's specs.
Type A:

Type B:

Type C:

If your fan happens to be a Type A it (a bit like Friedman & Rosenman's human 'type A' personality category) will not shut down from the PWM input.


Better Android Device Detection

Question: I've been looking around for information on detecting Android devices vs iOS devices so that I can either show a link to download an Android or iOS app depending on the device. Every answer I've come across says to look for the "Android" userAgent in the navigator object but after doing a quick print out of that object there is no indication of Android anywhere. I think this must be a feature of newer Android devices. Instead I had to do a bit of a work around by checking to see if the object carries the "Mozilla" tag but not the "Chrome" tag. This seems to work fine, but a Chrome browser was just recently released for Android ICS+ so now what can I check for that differentiates a mobile device from a home computer? At least in this scenario I've set it up (by proggramming subtractively rather than additively) so that if they do happen to have mobile Chrome they see both, but that seems sloppy.
//Update - I found out that HTC devices (and possibly some honeycomb devices) output a false userAgent unless the user is in "mobile View Mode" which can be turned on in their settings.
<code>    else if( /(Mozilla)/i.test(navigator.userAgent) !== (/(Chrome)/i.test(navigator.userAgent))) {
    $('a#iphone_app').css("visibility", "hidden");
    $('a#iphone_app').css("display", "none")
    }
</code>
Answer: Not sure if you want to completely hide content. Maybe just make one more prominent then the other. Showing that you support both platforms can be a plus for you.
userAgent on my GNex running Chrome:
<code>"Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
</code>
userAgent on my MacBook running Crome:
<code>"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24"
</code>

Better Android Device Detection


How to design tables for airbnb style booking system

Question: all. My English is not very good, but I will try to describe my question as clear as possible.
I want to design a airbnb(https://www.airbnb.com) style booking system, this kind of booking system allows somebody books idle resources of the others.
Here is my system needs:

Resource provider can set resources' available time of booking. The minimum time slot is 1 hour between 9am-12pm.
The default setting can be set as repeat periodically. For example: 5pm-8pm every Saturday available.
Also resource provider can change the time table whenever necessary. For example: stop provide the resource this Saturday because it's not available temporary.
Other users can book single or multiple time slot of any resource provided by many resource provider as long as it's available
Booking is open for the next 28 days.

Now I have difficulty in designing tables for the resource provider to set the available time.
Can your guys give me some advice?
Answer: Use timestamp ranges for booking availability. There is good documentation in official PostgreSQL docs.
You may find this lecture helpful:
Range Types and Temporal: Past, Present, and Future
And my blog post about generating timestamp ranges could also be helpful:
Generating ranges in PostgreSQL


Please help me in identifying this beautiful insect

Question: This beautiful looking comuflaging insect on my Chameli plant. What it could be?
Comment: Additional information that could greatly assist would be 1. Geographical location - not exact - just region and country, and 2. Plant the insect is feeding from... looks to be a variety of hibiscus?
Comment: Kolkata, India. Feeding on jasmine plant.
Answer: It's the caterpillar of one of the three moths commonly called "death's head hawk moths". This one is acherontia atropos.
It normally feeds on Solanaceae (potatoes, tomatoes, nightshade, etc) though your Chameli (jasmine) isn't in that plant family.
The moth is very large and has some curious habits. For example it will enter bee hives to feed on honey, and if it is caught it can make a "squeak" as an alarm call.
See https://butterfly-conservation.org/moths/deaths-head-hawk-moth
I have never seen the caterpillar, but I have occasionally found a pupa (large and reddish-brown colour) in the ground when harvesting potatoes in the UK.


Domain with a minimal left ideal is a division ring.

Question: I need to show that a domain $R$ with a minimal left ideal is a division ring. Suppose that $I$ is a minimal left ideal, then take $a\in I\setminus \{0\}$ and consider the left ideal generated by $a$, that is, $Ra$. It is a subset of $I$ and by minimality of $I$ we get that
$$ Ra=I $$
and $I$ is principal. Take $r\in R$ to be nonzero, then $ra\in I$ and $ra\neq 0$ since $r\neq 0, a\neq0$. Take $r' \in R$ and suppose that
$$
ra=r'a
$$
then $(r-r')a=0$ and hence $r-r'=0$, so that $r=r'$. I am not sure how to proceed from here.
Answer: Take any $x\in R, x\neq 0 ,$ then $R(xa) =Ra $ hence there exists $ v\in R $ such that $a=vxa $  and hence $$0=a-vxa =a(1-vx),$$ and since $R$ is domain we get $$1=vx.$$
Answer: I think you didn't quite get the right angle, but you started on the right foot.
With your $Ra$, notice that $Ra=Ra^2$ is and think about what that entails.


Automated End-To-End-Testing: Generate API calls via swagger or make them hardcoded?

Question: We, the test automation team, are currently implementing end to end tests. We use the API of the backend team for the setup of the end to end tests, which run via UI.
Should we use the swagger file to generate the API calls or make them hardcoded? If we use the swagger file to autogenerate them, we would never know if the API changed at all, and we wouldn't have to worry about possible changes, as it always autogenerate.
But if we would know that it changes, as our setup would fail, we could also inform the frontend team about those changes, so that we could tell them: did you check if you also updated your frontend for the API changes?
What should we do?
Answer:
But if we would know that it changes, as our setup would fail, we
  could also inform the frontend team about those changes

A break change in a Provider is responsibility of the service team, not the Consumer team (in this case, an frontend app).
When a service make a change, it should looking in the Consumer contracts it fulfilled before and check if the change causes a crash. If the change needs to be performed, the two teams should come together to solve the issue: All of this before integration of the changed Provider.
The responsibility of the Consumer teams is only keep a comprehensive contract with its Providers.

Given that, you shouldn't need to dismiss the robustness of the E2E in order to get information that you can find otherwise.


Need of Kalman filters in unimodal measurement model

Question: I have recently been studying Kalman filters. I was wondering that if sensor model of a robot gives a unimodal Gaussian ( as is assumed for LKF) and the environment is pre-mapped, then the sensor reading can be completely trusted( ie. max value of Kalman gain), removing the need for odometry for localization or target tracking purposes and hence the need for the Kalman filter. Please Clarify.
Comment: Hi RamanButta and welcome to robotics SE!  I don't quite understand your question.  Could you clarify or add more details?  What are you using the kalman filter to accomplish?
Comment: What do you mean by a pre-mapped environment?
Comment: What is your question?
Answer: No. An example of this is a GPS measurement: It has one mode (the mean), but is uncertain. What this means is, if you receive 100 gps measurements, they will all have similar modes, but will be slightly different due to uncontrollable environmental effects.
The map of the environment has nothing to do with the sensor data of this type.
The mode / mean is often called the estimate, and for practical purposes with small noise, yes, you can treat the mean as the true state. But it is never theoretically correct to do so. Always account for the uncertainty of the system.
Comment: In the real world there are always errors.
Comment: Let us assume we use a camera fitted on a robot to estimate the location of a robot at any instant of time. I don't understand why do we need to consider the odometry reading/ state transition model/ action model from the previous time instant and combine it with the camera reading to find the minimum variance estimate of the location. Aint the camera reading perfect if no two places in the environment have the same appearance ?
Comment: If the error in your system is always tolerably small, then you don't need all the sensor data. It almost never is. The only way to know for sure is to try it.
Comment: Thanks @Josh . In fact the KF does minimize the error covariance.
Comment: No, the kf estimates the covariance. If the cov. estimate shrinks, it is because the update steps provide information about the state estimate.
Answer: What I think you are asking:
Given a map of the environment (e.g., the positions of landmarks), and a sensor that can measure the location of these landmarks, is odometry required when the position of the robot can be uniquely determined from the landmark measurements?
My answer:
In short, yes. If every measurement can be uniquely associated with a large enough set of landmarks, you can get a unique estimate of your position. Note I said "estimate" of your position. Of course there will still be uncertainty of your estimate because your measurement of the landmarks will not be perfect. However, here are a couple reasons having odometry in this situation would be helpful anyway:

As an initial guess. A lot of data association algorithms work much better if you have a good initial guess. Having odometry here helps increase the likelihood of a good match. It helps you make the correct choice between two possible matches, for example.
To help deal with infrequent or highly uncertain landmark measurements. There are often situations where your landmark measurements won't be very good for stretches of time. Maybe you briefly were in an unmapped or poorly mapped area. Maybe the environment has changed. Maybe something is interfering with how your sensor is working (e.g., different lighting). If you are not constantly getting good updates based on measurements of the environment, it could lead to unrecoverable errors. Odometry gives you a (dead-reckoning) estimate during this time, making recovery easier when you start to get good landmark measurements again.

In short, you need to ask yourself: Is the map very good? Does it full cover the operational area (i.e., is it possible for the robot to take measurements of things not in the map)? Is it possible the map has changed? Does the sensor work well in different conditions? Is the data association algorithm reliable for different amounts of noise? Will the updates provided by the sensor be frequent enough based on how fast the robot is travelling? Etc.
Comment: Thanks @kamek . I see the key point you mentioned was the dynamic and noisy nature of the environment itself (and not the camera) which calls for odometry readings. Indeed if the environment is well landmarked and static, then Kalman filter will be needed only if the camera itself is unreliable.


Getting random number from Weighted sum of Normal distribution functions

Question: I've a weighted sum of the 2 Gaussian distribution functions as below. How can I get a random number based on this sum of functions. The number of functions can vary up to 10.
Answer: Let's say your mixture components have probabilities $p_1,p_2$ (add up to $1$).
A basic algorithm would probably choosing a uniform random variable between $u\in[0,1]$ and compare with $p$, if it's smaller sample from $\mathcal{N_1}$, else sample from $\mathcal{N_2}$. For $K$ components with probabilities $p_1,\dots,p_K$, do the same:
If $u<p_1$, sample from $\mathcal{N_1}$, else if $u<p_1+p_2$ sample from $\mathcal{N_2}$, ..., else if $u<\sum_{i=1}^m{p_i}$, sample from $\mathcal{N_m}$, which basically applies Inverse Transform Sampling in discrete.


A romantic era piece has a baroque era title: how does one determine the style?

Question: J. Danbé's "Petite Gavotte" (ca. 1888) for violin and piano seems to be baroque mainly because of the title, "Gavotte", which was a common baroque dance. But I can't find any strong argument to defend that choice and the composer is from the 19th century, so I don't really know if this is a piece composed in the baroque style after that period or it's just "pretending" to be baroque
Comment: @naoxink: You might want to re-read [editing](https://music.stackexchange.com/help/editing). Advance notice is neither expected nor supported.
Comment: I voted to reopen your question, but right now it's closed and I can't answer. Dance names like Gavotte, gigue, etc are well known Baroque dances, but that doesn't mean they are only Baroque. Some are older like the pavane and gigue, some continued after like gigue, sarabande, and gavotte. Look for the typical "bass and chord" accompaniment for 19th century Romantic works.
Comment: [IMSLP](https://imslp.org/wiki/6_Petits_Morceaux%2C_Op.20_(Danb%C3%A9%2C_Jules)) lists this piece under _Romantic_.  I would agree.
Answer: This piece is a romantic-era throwback to the earlier style. Here is a broad outline of how one can determine the style for this and other pieces.
Begin with the title
The title of a piece is clearly the first clue, in part because it suggests the era, but even more so because it suggests the style. A waltz in any era can be expected to be in 3/4 time, for example.

gavotte: an elegant dance in moderate duple meter and in binary form, often with a homophonic texture and simple rhythms. (SOURCE)

Based on that definition, the piece could be a baroque-era throwback. It's in duple meter (2/4) and the texture is homophonic (the piano part is a simple oom-pah oom-pah part outlining the chords).
A case could also be made that the piece is in binary form; however, not in the fairly strict sense that one would expect of a baroque piece. This piece has more the structure of a theme and variations.
For a dance, look at the rhythm

The phrases of the 18th-century French court gavotte begin in the middle of the bar, creating a half-measure (half-bar) upbeat. (SOURCE)

Although there are cases, especially in the romantic era, of gavottes that begin on the downbeat, this piece clearly begins its phrases on the upbeat.
Examine the harmony (the "harmonic language")
In a baroque-era piece, given the technical limitations of the time, we would expect a principal key with visits to the dominant or relative minor keys. More distant keys would be less likely.
The "Petite Gavotte" plays it relatively safe in the first sections, but by measure 29 Danbé moves further afield. For example, the top-of-staff G in m. 29 is a chordal 9th. The leaps that precede it are a decidedly romantic gesture.
Overall style
The "oom-pah" style piano part is not especially baroque. But the most obviously non-baroque section is the part in all sixteenth notes. That section alone places this gavotte in the "showpiece" category, which is decidedly romantic.
Regarding "throwback" pieces
It has been common in all eras of music to "look back" to earlier forms and styles for inspiration. Brahms looked to early church styles and Prokofiev wrote a "Classical Symphony", just to name a couple of famous examples. In general, a piece with a title like "Gavotte" can be best placed in the era of its composer, who likely wants to place their own aesthetic on top of a familiar form.
Comment: It's helpful to be able to recognize "throwback" gestures even when they've gotten lost to the foreshortening of history. The overture to Handel's _Messiah_ is in a "French overture" style, suggesting the work of Lully in the previous century, and would have been heard by Handel's audience as the pomp and grandeur of days gone by. When Mozart uses a trombone choir in _The Magic Flute_ he's conjuring up the piety of the renaissance sackbut consort in church music. By choosing the Gavotte form here, Danbé is looking backward to the baroque, if not actually trying to write in its style.
Answer: Titles are a poor guide to identifying an era.
Many 19th century composers wrote Gavottes.  They typically follow the general form and style of a baroque gavotte (duple or quadruple meter, moderate tempo, etc.) but most 19th century gavottes begin on beat 1, while baroque gavottes start on beat 2 (in 2/4 or 2/2) or 3 (in 4/4).
It looks to me like Saenger was writing in the baroque style, but I can't be certain of that because of one detail: the a tempo instruction at the beginning of the 9th line.  A baroque gavotte will have strict rhythm throughout.  Saenger's gavotte notes that it's in strict rhythm... but the a tempo isn't needed unless there's a ritardando or accelerando somewhere, and I don't see one.
It's possible that a different edition shows an alteration of tempo, and the one you posted left it out.  If so, it's a romantic piece.  If not, it's got me curious - why would you return to a tempo you've never left?
Comment: While 19th century gavottes sometimes begin on beat 1, this piece does not, so that point doesn't hold in considering this a romantic era piece. Also, Danbé is the composer, not Saenger. Saenger is the editor of this edition. Finally, strict rhythm and strict tempo are not the same thing. The "a tempo" is just a reminder in case the performer chooses to place a ritardando in the measures before. For example, this recording: https://www.youtube.com/watch?v=uO9GqrNP2DE.
Comment: My point was that because this piece starts on beat 2, it's rhythmically more in the style of the baroque gavotte than a Romantic one - you make the same point in your answer.
Comment: I see. That deserves to be clarified. As written, it seems to me like you're arguing in favor of a 19th century interpretation based on the phrase *not* starting on the downbeat.
Comment: Note, that *Saenger* only contributed to the edition. Comoser [Danbé](https://musicalics.com/en/node/88894) lived 1840 to 1905.
Answer: Some elaboration in addition to the answer given by @Aaron:
As he pointed out, it is the style of the music which determines whether it is in baroque style, not the title.
Arnold Schoenberg wrote a suite for piano, opus 25. One of the movements is a Gavotte. You can see just by looking at the sheet music that the style is certainly different from baroque style:

Here you can listen to the piece:
Gavotte by Arnold Schoenberg on YouTube
Comment: I'd like to see people dancing to this Gazette.
Comment: @AlbrechtHügli That would be fun.
Comment: I mean *this Gavotte* :)
Answer: Dance names like Gavotte, gigue, etc are well known Baroque dances, but that doesn't mean they are only Baroque. Some are older like the pavane and gigue, some continued after, like gigue, saraband, and gavotte. Look for the typical "bass and chord" accompaniment for 19th century Romantic works.
The gavotte from different eras:

Renaissance
Baroque
Romantic

The web site IMSLP has some browse features that will combine various terms including gavotte and periods. That has quite a lot you could browse through for examples.
Regarding determining the style the most obvious thing to look for is the texture, whether it is Baroque contrapuntal or Romantic homophonic.
This Baroque example is contrapuntal, notice the linear, melodic bass with lots of step-wise motion...

compare that with this Romantic era example with lots of bass & chord accompaniment in the left hand...

When you start comparing such different styles for what is supposed to be the same dance the thing to realize is these are stylized art music dances. The only thing that really makes them a gavotte are: a moderate tempo, common time, a half bar anacrusis beginning phrases.


Print when textarea has overflow

Question: I have a form with some text areas that allow a scroll bar when the text exceeds the text box. The user would like to be able to print the screen, and this text is not visible. How do I make all of the text visible for just printing? Am I better of making a print to pdf link or something?
Comment: Alan H, I accepted the answer because it worked for me and my environment. I don't need cross-browser solutions and all that stuff. You still haven't given me an example. If you are trying to get a tick from me then you will have to show me your solution in practice.
Comment: Timothy, that's all well and fine. However, this page is not just for your own benefit, but also potentially hundreds or thousands of other developers. I'm guessing most of them do prefer cross-browser solutions, and only mean to do them a favor by pointing out the above (not to criticize you).
Comment: Notice: The accepted answer was not researched or tested and is factually incorrect. There is unfortunately no CSS-only, cross-browser solution, but several JavaScript-based workarounds are possible (my answer suggests two, both of which I have done in practice).
Comment: I have updated my answer to include a working JavaScript solution.
Answer: You cannot solve this problem with CSS alone.
Why Pure-CSS Solutions are Insufficient (with demo)
Let me convince you the answers involving print stylesheets and overflow: visible are insufficient. Open this page and look at the source. Just what they suggested, right? Now print preview it (in, say, Chrome 13 on OS X, like me).  Note that you can only see a line or two of the note when you attempt to print!
Here's the URL for my test case again: https://alanhogan.github.io/web-experiments/print_textarea.html
Solutions:

A JavaScript link that opens a new window and writes the contents of the textarea to it for printing. Or:
When the textarea is updated, copy its contents to another element that that his hidden for screen but displayed when printed.
(If your textarea is read-only, then a server-side solution is also workable.)

Note that textareas treat whitespace differently than HTML does by default, so you should consider applying the CSS white-space: pre-wrap; in the new window you open or to your helper div, respectively. IE7 and older do not understand pre-wrap however, so if that is an issue, either accept it or use a workaround for them. or make the popup window actually plain text, literally served with a media type text/plain (which probably requires a server-side component).
The "Print Helper" Solution (with code + demo)
I have created a demo of one JavaScript technique.
The core concept is copying the textarea contents to another print helper. Code follows.
HTML:
<textarea name="textarea" wrap="wrap" id="the_textarea">
</textarea>

CSS (all / non-print):
/* Styles for all media */
#print_helper {
  display: none;
}

CSS (print):
/* Styles for print (include this after the above) */
#print_helper {
    display: block;
    overflow: visible;
    font-family: Menlo, "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", Monaco, monospace;
    white-space: pre;
    white-space: pre-wrap;
}
#the_textarea {
  display: none;
}

Javascript (with jQuery):

Again, the successful JavaScript-based demo is at https://alanhogan.github.io/web-experiments/print_textarea_js.html.
Comment: @GordonM Your "pure CSS" answer requires PHP and and does not allow for the case where the user edits the textarea before printing.
Comment: Javascript is not necessary. It can be done with pure CSS. It's rather a pain in the neck though. See my answer.
Comment: Great answer, and even more importantly, works really well with javascript data binding frameworks, like angular and ember.
Comment: @EduardoMolteni Thank you very much for letting me know. Dropbox stopped allowing web pages to be served from their service; I have updated the URLs above to point to the GitHub Pages site I previously set up as an alternative. (They should work now!)
Comment: @AlanH. thanks for the solution. How can I achieve the same for multiple text areas on the same page?
Comment: Could you give me an example of how to use it in javascript? That would help me a lot more.
Comment: @Timothy-Ruhle Updated with a demo!
Comment: btw - i have enhanced your answer and created a "plugin" (only can be used when doing `window.print()` :) @ http://stackoverflow.com/a/10600643/57508
Comment: Alan: Your demo no longer works because Dropbox is now forcing https and you are loading jquery via http.  See error console in Chrome for details.
Comment: @AllInOne: Thank you for the report! I have switched my page to load the script with HTTPS. Let me know if it works for you now.
Comment: Note: you may need to make sure all the parents of the print helper are `height: auto`
Comment: All the samples gives 404s. Maybe it's safer to move to a gist or JsFiddle
Comment: @AlanH. I'm several years late to this. Your solution works great - like Bogdan, I also need to figure out how to loop through several textarea/"print helper" divs to make this happen. I actually need to do it 21 times on a page.
Answer: Loop through each of your text areas and move the content to a holder
    window.onbeforeprint = function () {
        $('.print-content').remove();
        $('textarea').each(function () {
            var text = $(this).val();
            $(this).after('
' + text + '
');
        });
    }

And use the following CSS
.print-content {
  display: none !important;
}

@media print {
  .print-content {
    display: block !important;
  }
  textarea {display: none !important;}
}

Answer: I recently ran into the same issue.  My solution was to duplicate the content into form controls for editing and into divs for printing.
In my Head I put a print stylesheet.
<link rel="stylesheet" href="printform.css" type="text/css" media="print" />

In printform.css I put the following
.screenOnly { display: none; }
.printOnly { display: inline-block; }

For textareas (and other field types that were causing problems) I used the following code
<textarea class="screenOnly" name="myTextArea"><?php echo (htmlspecialchars ($_POST ['myTextArea'])); ?></textarea>

<?php echo (htmlspecialchars ($_POST ['myTextArea'])); ?>

When displayed on screen the textareas are shown and the divs duplicating their content are hidden.  When printing the opposite applies.
I know you already picked an answer to this question but while using the print stylesheet is a good idea it didn't describe a specific solution.  Setting overflow:visible on the textarea (my first idea) didn't work so I ended up going with the solution above.  If you're still having difficulties I hope this helps you out
Comment: What is the point of using a textarea if you're going to echo its contents again with PHP and then assume the user will not edit it before printing? While this technique could be useful, I don't think you should be selling your solution as "CSS-only" as it assumes PHP and a narrow, unlikely use-case.
Comment: The example code is in PHP because it had to be in something.  It should be possible to do something similar in most languages used for web scripting.  And yes, this technique does have limitations, but as you can't overflow:visible a textarea there's always going to have to be some compromise made.  I suppose if you need to print out a form before its committed to the server you could also add some javascript to synchronise the textareas with their respective divs.  This, however, adds a javascript dependency so it won't work if js is off.
Answer: Just encourter the problem recently too. Thanks for Alan H's posts. It works perfect with Chrome and Safari. However, with IE and Firefox, the issue is that the last several pages(page elements after textarea) will be missing from printing(FF), missing pages and overlapped layout(IE9).
Another finding that will be helpful to solve the issue is, you can set textarea's rows properties correctly as the control's height says to make it work with CSS overflow:visable stuff. All browsers seems to respect the rows property while printing.
Answer: This seems to work for applying to all  elements that have overflowing content:
$("textarea").each(function () {
    var Contents = $(this).val();
    if ($(this)[0].scrollHeight > $(this).height()) {
        $(this).after("
" + Contents + "
");
        $(this).addClass("no-print");
    }
});

Answer: This is an easy fix with CSS, given that most users aren't really bothered about printing a bit of extra blank space. Just target a minimum height for textareas when printing:
@media print {
textarea {
min-height: 500px;
}
}

Tag that onto the end of your CSS with a min-height that is comfortably enough when you look at it in Print Preview.
Answer: With the usage of pure CSS it is not possible to prepare the textarea for printing.
It is necessary to add some javacript magic to the text area or add a hidden field.
There are a couple of solutions, that have been mentioned here:

Hidden paragraph or div
Using Javascript to extent the size of the textarea

1. Hidden paragraph or div
HTML & CSS:
<textarea>Sample Text</textarea>

Sample Text

2. Javascript
You could use a js library e.g https://github.com/thomasjo/jquery-autoresize
$(function() {
    $("textarea").autoResize()
})

Answer: Adding onto Alan's answer above, if you have multiple instances of this problem on the same page, then you can use data-* attributes to handle all at once. Sample:

var $printOnlyArr = $('.print-only');
for (var i = 0; i < $printOnlyArr.length; i++) {
  var $printOnly = $($printOnlyArr[i]);
 var textSource = $printOnly.data('textsource');
 if (textSource) {
   $printOnly.text($("#" + textSource).val());
 }
}
.print-only {
 display: none;
}

@media print {
 .print-only {
  display: block;
 }
 .no-print {
  display: none;
 }
}

<textarea class="form-control no-print" maxlength="2000" id="txtAdditionalComments"></textarea>

Answer: I had this same problem. My project is React, I was a semnaticUi TextArea component. The Text that could only be seen by scrolling down in the Textarea aka the "overflow" could not be seen in the print view when I press the print screen button.
Solution :)
I just used a normal paragraph tag instead and set css white-space: pre-wrap on a div that enclosed the p tag.
Worked for me!
Answer: try  this using jQuery. Redefine height of all textareas based on quantity of lines.
Attention: this code change the textarea on screen too
window.onbeforeprint = function () {
    $('textarea').each(function () {
        var lines = Math.round($(this).val().split('\n').length * 1.6) ; //multiply to 1.6 to consider spacing between lines
        $(this).height(lines+'em');
    });
}

Answer: Define a separate CSS for print media like this <link rel="stylesheet" href="print.css" type="text/css" media="print" /> and for the text area, define the overflow attribute as
overflow: visible;

Comment: It seems, this answer and the answer accepted as solution are same.
Answer: I use this in my styling:
PRE.print {
display:none;
}

@media print {

  TEXTAREA {
    display:none;
  }

  PRE.print {
    display:block;
    width:90%; /* fixes margin issues in some funky browsers */
    white-space: pre-wrap;       /* css-3 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
    font-family:monospace,sans;
  }

}

Then, after every TEXTAREA, I use a PRE with class "print" like so:
<textarea id="message" name="message" rows="10" cols="80" onblur="updatePrint('#message')"><?= $MESSAGE ?></textarea>

<?= $MESSAGE ?>

...note the PHP I used -- you can switch with your programming language. And then this code above needs the following function, assuming you have jQuery library loaded:

The way this all works
The way this works is that I'm basically loading content twice into the page, but using the stylesheet to hide content not suitable for the printer like the TEXTAREA.
You can change the PRE styling as you wish. However, I use monospace in case someone was wanting to print HTML code that they typed into the field and wanted it to format nicely.
The onblur event helps capture a need to update the related PRE.
Note you can also do the stylesheet stuff via the media attribute on a link rel in the HEAD section of your HTML, using things like media="all not print" and media="print".

Print when textarea has overflow


Opa Syntax Highlighting for Kate

Question: I see there are syntax highlighting extensions for Vi and Emacs in Opa binary package.  I use KDE as my desktop environment so I was wondering if anybody knows such extensions for Kate?
Answer: I don't think there is anything available for Kate at the moment but we (MLstate, creators of Opa) are always looking for contributions and are willing to help should you decide to give it a try :).

Opa Syntax Highlighting for Kate


updating maradns with nsupdate

Question: I have configured Maradns as dns server on openwrt platform. Can i use nsupdate as ddns client to update the DNS Server. Is it possible of updating Maradns zones with nsupdate.
Answer: You could look at the maradns documentation. My reading of it is that no you cannot. However it does have something called fetchzone.

updating maradns with nsupdate


Using gradient descent: cost decreases, then increases

Question: I am minimizing a function using gradient descent. The learning rate is fixed. First, for few iterations, the cost decreases; after that, it starts increasing. What is the reason for this?
Comment: If learning rate = step size, then you should use a linesearch method to determine step size.
Comment: Problem-specific. Decreases and increases how? If the energy goes like 10, 1, 0, 0.01, 0.02, 0.03, 0.04, ... it's likely to be numerical error. If it goes like 10, 1, 0, 5, 10, 100, then you're not doing gradient descent on a good function.
Comment: Try reducing the learning rate slowly, e.g. $\sim 1/\sqrt{k}$ or $\sim 1/\log k$.
Answer: One possible reason is due to Ill condtioning of Hessian matrix.
Condition number of a matrix is the ratio of the largest singular value to the smallest singular value. A matrix is ill-conditioned if the condition number is very high, usually indicating that (i) the lowest singular value is orders of magnitude smaller than the highest one, and (ii) columns/rows of the matrix are heavily correlated with each other leading to redundancies and a matrix that is pretending to be of a higher rank than it truly is.
Hessian encodes the second derivatives of a function with respect to all pairs of variables. So, if there are n inputs to a function, the gradient is n-dimensional and the Hessian is nxn-dimensional. In machine learning, the inputs are usually the features and the function is usually a loss function we are trying to minimize. When the Hessian is ill-conditioned, it means the basis of the loss function have contours that are very long "ellipsoids" rather than being close to "circular".

This causes problems for first-order optimization methods like gradient descent (w=w−η∇w) which need to follow a very zigzag path to the minimum. The first figure below shows the gradient directions at various points on a straight line through the parameter space. Notice how the directions away from the center are nearly orthogonal to the useful direction of descent. The second figure shows the zigzag path gradient descent has to take if the Hessian is ill-conditioned, the function contours are stretched out, and the gradients often point to directions that might not be the best way to descend to the minimum.
You would think that second-order optimization would solve this problem. It sort of does if the Hessian is not too ill-conditioned.  I have inserted a screenshot from Chapter 8 of Deep learning book by Ian goodfellow et al. To read more about optimization problems in neural networks, you can look at this chapter: http://www.deeplearningbook.org/contents/optimization.html
Ill conditioning of Hessian matrix
Comment: Hi I am searching for graphs like this, this circular one, I need to know its name please?


Possible to be adequate with respect to decision/condition coverage but not block coverage?

Question: Following up on a debate that I was having with a colleague. What is the community's opinion on whether or not a section of code can be adequate with respect to decision coverage (all possible decisions have evaluated to true and false) but not block coverage, and if a section of code can be adequate with respect to condition coverage (each simple condition in a compound conditions has evaluated to true and false) but not block coverage. Thanks.
Answer: Well... I guess I can't imagine how you could have forced all decisions into both the true and false conditions without having covered every block.  The condition coverage doesn't seem like it guarantees decision coverage, though, unless you are saying that every single cell in the truth-table made up by all of the conditions has been hit.
Is this purely academic, or does it support a more practical argument such as "do we have enough test coverage?"


Can I verify nonce which was generated on a different WP site?

Question: I have a form with the action going to a different wordpress site.  I want to use wp_nonce to generate fields in the form on site A.  Can I use wp_verify_nonce on site B to verify the nonce fields?
Comment: Agree with @cybmeta here, if you want to track where users are coming from, that scheme is pointlessly over complicated
Comment: Can we kow what is your purpose? Why do you need that?
Comment: If you just need to check the referrer, I think it is better to use (wp_get_referer())[https://codex.wordpress.org/Function_Reference/wp_get_referer] function. But if you want to performe some kind of access control, think neither nonces or referrer is what you need.
Comment: I need to determine if the user is arriving on Site B via Site A or not.  So I'm using a form with the form action going to Site B, and then on Site B I was going to  check if the form is sent etc...  Is there a better way of doing this?
Comment: Ok, thanks for your help.  I've abandoned the for Idea and going for referer.
Answer: In theory yes, but it will be a very bad thing to do. For that you will need to have the secret used to generate the nonce at site A in site B which means tht if site B is compromised site A might be as well (there is also some time synchronization that needs to be done between the site, but that the lesser worry).
There are two ways to properly go about it

don't use nonce at all. nonce are there to protect registered users and if the submitter of the form is unlikely to be registered or the form do not do anything destructive on the server, then no point in using them
Site A should embed the form as an Iframe from site B. That way the nonce was generated by site B and it can verify it without knowing the secrets of site A
Comment: Well, the safiest method is to use the REST API over a OAuth server. That is why asked the reason of send data between sites.
Comment: Thanks for reply.  What is the safest way to send the form data from site A to site B?
Comment: safe in what regard? iframe is most likely the safest especially if you put on it all kinds of security attributes, but to get an opinion about how safe things are, you will need to ask security experts.


Why inflation give rises to gravitational wave?

Question: GR predicts accelerated expansion of spacetime should create gravitational wave, how? I thought universe does not have a center and the big bang happens everywhere so then where do these early gravitational wave originates? I know you need to accelerate massive object to produce significant gravitational wave so in this case of inflation what is being accelerated excluding space? During this period there shouldn't be any primordial blackhole forming right so they are ruled out?
Comment: Where did you read that the accelerated expansion of spacetime causes gravitational waves? I thought that small inhomogeneities in the energy density due to quantum fluctuations are the cause of conjectured primordial GWs.
Comment: @G.Smith: I must have misread it in the wiki: gravitation wave, under source, under inflation. (section 4.5)
Comment: I think the quantum inhomogeneities cause the expansion to be "not symmetric in all directions". I don't think there needs to be accelerated expansion.
Comment: @G.Smith  if there is inhomogeneity in mass/energy and acceleration there will be gravitational waves. People are thinking of using them to see back further. than the CMB. The . BICEP experiment tried, but later was corrected by PLANCK, that the qudrupole was due to intergalactic dust.history https://www.space.com/25088-gravitational-waves.html
Comment: more recent pnas.org/content/116/20/9690 .the accelerated expansion  after the inflation epoch is an observational fact included in the BB model . Inflation epoch just has much faster acceleration but this they are trying to observe in the CMB, not successfully up to now.
Comment: *I thought universe does not have a center and the big bang happens everywhere so then where do these early gravitational wave originates?* What makes you think they have to all originate from one point?
Answer:
GR predicts accelerated expansion of spacetime should create gravitational wave, how?

How are gravitational waves generated?

Gravitational waves are disturbances in the curvature of spacetime, generated by accelerated masses, that propagate as waves outward from their source at the speed of light.

....

Gravitational waves transport energy as gravitational radiation, a form of radiant energy similar to electromagnetic radiation

.....

gravitational waves are generated by a changing quadrupole moment, which can happen only when there is asymmetrical movement of masses. Since the exact mechanism by which supernovae take place is not fully understood, it is not easy to model the gravitational radiation emitted by them.

The last paragraph quoted is important, the asymmetry.
Gravitational waves  are inherent in the general relativity model which describes the effect of the energy momentum on the space time fabric, when there is some asymmetry in the space time curvature.

I thought universe does not have a center and the big bang happens everywhere

true

so then where do these early gravitational wave originates?

In the early Big Bang standard model, the universe was expanding steadily after the "bang,"no acceleration . The inflation epoch was "invented" so as to explain why there is an inhomogeneity in the cosmic microwave background, which is connected with the concentration of masses we observe ( galaxies, clusters of galaxies). It is supposed that the  energy momentum tensor of the early universe has quantum fluctuations, which quantum fluctuations will statistically have asymmetries that lead to the observed inhomogeneities. The quadrupole distributions of those asymmetries will give the gravitational waves. The gravitational waves are effective after some time after the "quantum uncertainty bubble" assumed for the very early universe, at inflation epoch in this plot.

I know you need to accelerate massive object to produce significant gravitational wave so in this case of inflation what is being accelerated excluding space?

By the equation of Einstein, the energy momentum tensor is directly connected to the space time tensor, when space is distorted there is a mass that is distorting it. Without the masses and energies the universe would be flat with nothing in it.
To see a  description of how space time and gravitational waves are tied see this.
This is a recent paper discussing the subject.
Comment: thanks a lot it will probably take me days to digest ;D


What is the best GARCH model for forecasting daily stock return and why?

Question: If I want to forecast daily stock return let say Apple what would be the best GARCH model and why?
(ARCH, GARCH-M, IGARCH, EGARCH, TARCH etc)
Comment: ARCH-variants aren't used to forecast returns, they're used to model volatilities...the last word in the acronym (heteroskedasticity) indicates this.
Answer: GARCH models are usually used to predict volatility, not returns.
Comment: The question asks about using GARCH models for something they are not designed to do. It is impossible to answer.
Comment: This is completely correct, but also not really an answer to the question.
Answer: You cannot use GARCH. The models you mentioned are used for modelling the conditional volatility, which is time-varying and displays clustering,as Mandelbrot mentioned.
A common model is an ARIMA(p,q,1), where p the order of the AR component and q the MA component. Simply, it is an ARMA(p,q) on the first differences of the log prices. This is due to the non stationarity of the log prices that drive ACF and PACF being significant for a long period of time (known as long memory process). Hence the first differences make the process stationary "cutting" the PACF and ACF shortly. As a heuristic, you can use an ARIMA(1,1,1) model, but technically speaking someone has to check higher order models as well. Model selection criteria, such as AIC or BIC have to be used.


What do you call it when the management of properties is transferred due to negligence?

Question: When the owner of a property or properties fails to take proper care of said properties, the state or municipality may take over management of the properties by force. What is the legal term for this?
Comment: Where does this happen?
Answer: What is the legal term for this?
england-and-wales
Compulsory Purchase Order
See s.12 of the Housing Act 1957:

Where a person has appealed against a notice under this Part of this Act requiring the execution of works to a house, and the judge or court in allowing the appeal has found that the house cannot be rendered fit for human habitation at a reasonable expense, the local authority may purchase that house by agreement or may be authorised by the Minister to purchase it compulsorily; and the First Schedule to this Act shall apply in relation to a compulsory purchase under this section.
Answer: There are multiple terms for different variants on this fact pattern. There is also considerable regional variation in local practice regarding what this is called.
Global assumption of management of property by someone other than the owner pursuant to court order because the owner has neglected obligations related to a property is frequently called a "receivership" and is usually temporary until there is a foreclosure of the property, or until defaults in the owner's obligations are cured. The receiver's expenses are typically taken out of the revenue generated by the property, if any, and if none, are billed to the owner or taken out of the proceeds of a foreclosure sale.
In bankruptcy, and less frequently, in other circumstances, a "trustee" or "custodian" or "conservator" or "administrator" is appointed to manage the property (outside of bankruptcy, these terms are more often used when property is neglected due to the owner's incapacity, death, or disappearance without explanation).
In a more piecemeal fashion, sometimes a government has the authority, for example, to mow your lawn at your expense if you fail to do so to the extent required by a municipal ordinance. This is sometimes called an "assessment" or "special assessment" although there are other names for it as well that aren't coming to mind at the moment. These assessments typically then become liens against the property.
Comment: @Helen The word "cure" means to take all measures necessary to pay outstanding and due amounts owe (other than debts accelerated as a result of a default) and to fix all non-monetary defaults on a legal obligation.
Comment: @Helen "Remedy" wouldn't be entirely wrong, but typically refers to what a court does at the conclusion of the legal process involuntarily, while a "cure" (it is both a noun and a verb) usually refers to a pre-judgment voluntary resolution of legally well defined defaults or violations. The word "remedy" as a verb rather than a noun is used less often in the law because it is harder to distinguish from the noun in context, and because "remedy" has connotations that exceed strict legal compliance (making someone whole, rather than merely resolving the specific things that you did wrong).
Comment: Thank you so much! Another question: you use the verb "cure" ("until defaults in the owner's obligations are cured") – is there a difference between this verb used in this context and the verb "remedy" used in the same context?
Comment: Thank you ohwilleke for the clarification! Would you say the verb "remedy" **cannot** be used in this sense then?
Comment: Thank you so much, ohwilleke – excellent explanation as always!


Does copper react with HCl when current is present?

Question: Copper does not react with hydrochloric acid, according to many sources.  However, I found an experiment posted in a video, which I will try to repeat, that shows a copper pipe dissolving into HCl and plating a nail when the copper pipe and the nail are connected to a 12-volt battery, becoming electrodes.  No other chemicals, according to the video, are present.  How does the electrical current cause the copper to react with the HCl when otherwise it would not?
Comment: Electric current is stronger than _anything_ in chemistry. It would make pretty much anything react with anything else.
Comment: Related: [Copper Doesn't React with Hydrochloric acid](https://chemistry.stackexchange.com/q/16507/7951)
Answer: A reaction between copper metal and hydrochloric acid would go something like this: $$\ce{Cu + 2HCl -> CuCl2 + H2}$$
...which we can write as: $$\ce{Cu + 2H+ -> Cu^2+ + H2}$$
If we break this up into half reactions, we get: $$\ce{Cu -> 2e- + Cu} ~~~E°=-0.34~V$$ $$\ce{2H+ + 2e- -> H2} ~~~E°=0.00 ~V$$
If we add the voltages together, we get the cell potential of the combined reaction is $-0.34+0.00=-0.34~V$. Since the cell potential is negative, the reaction is not spontaneous, so the reaction is not going to occur without any artificial interference ($\Delta G°=-nFE°_{cell}$).
However, if you connect a battery (galvanic cell) to this reaction, you can supply the necessary electrons for this reaction to occur (electrolytic cell). Since you are connecting a 12 V battery, there is more than enough voltage to cause this reaction to occur.
Comment: The copper oxidation half reaction needs to have the copper ion's charge on the right hand side.
Answer: When I want to plate small parts with copper, I submerge lots of waste copper and the steel part into muriatic(HCl) acid.  The oxides on both materials dissolves quickly and overnight there deposits a layer of copper on the steel suitable for forming a passivation layer.  No electricity involved.
Answer: The short answer is because the electric circuit provides the energy needed to do those reactions. You should know that you could try the same experiment but instead of using HCl, try table salt dissolved in water. That should work (12 V is a whole lot of voltage), but I can't say I actually looked it up to verify it. If that doesn't work, add some vinegar (acid) to the salt solution. Be sure to use the right connections (the copper will only dissolve near one wire). Waiting 5 or 10 minutes should be long enough to see if its working or not.
Dr. Who said "Time makes liars of us all." and he was right. It is just not true that HCl is unreactive towards Cu. I found dozens of YouTube videos and testimonies which contradicted that claim. The real world is complicated. Most general statements of the form "A doesn't react with B" are likely to be true in some circumstances and false in others. "Water doesn't react with sugar" for instance. Well, that seems to be true; I can dissolve sugar in water and then evaporate the water and get back the sugar. Well, wait a minute: it turns out that sucrose reacts (very slowly with water at room temperature, it takes years) and converts to a mixture of glucose and fructose. Not only that, but if I heated the water to 2000° I know that dumping some sugar into it would decompose the sugar. So, we need to qualify statements of fact (either implicitly or explicitly). In the case of your question, we need to make sure that the copper and the acid are pure. We need to prevent contamination with any oxidants (such as O2 from the atmosphere) and we need to specify the conditions of temperature and pressure (and protect the system from other interferences, such as radiation, gravity, etc. etc. (admittedly, Earth's surface gravity isn't strong enough to have much effect on reactions at lab scale.). Most copper is coated with various oxides, so cleaning a penny with HCl (which makes it shiny) doesn't prove that the HCl is reacting with the metal, but demonstrates that the HCl is either reacting with the oxide, with the metal, or with the copper alloy. (Copper wire is quite pure, 99.99%, pennies not so much). So, let's say we condition the HCL solution to eliminate all oxygen and other impurities, abrade the surface of a (pure) copper wire, and place the wire into the solution and leave it there at room temperature, 25°C. Will the copper react? Well, let's say that it won't. We can assume this because supposedly the "standard potential" tables indicate it won't. (Be careful here!, what concentration of acid is used to determine "standard potential"??) 1M HCl is ~4% but you can easily buy 30% concentrations. (The devil is in the details.) So, assuming your "sources" are trustworthy, then they are referring to specific conditions, and not some "universal truth". If you doubt it, you could try (the dangerous experiment of) carefully heating the diluted HCl with a scraped-clean-of-oxide piece of Cu wire in it, and seeing if the copper starts to react. It will but it might not be an experiment you should do. HCl is volatile, and can vaporize. The problem with that is that it is also corrosive and toxic. If you breath it, you could die. If it condenses on various metal surfaces around where you're heating it, they might corrode (and lets not even think about what it will do to electronics!).======== OK. So, we've diluted and cleaned the system and if your sources are right, the copper just sits there. But if you connect the metal to an the right side of a 12V transistor battery, you can indeed drive the reaction. Why? Well the flow of current indicates that energy is being used, just like the flow of water. You can use some of that energy (from the battery) to do work. (Incidentally, you could also use a battery charger and do the same thing, even a dc charger or power source which you probably have dozens of (you know, those little black cubes you have to plug into your AC wiring and then plug into your cell phone to charge it, or into thousands of other things that require DC power)). Anyway, a battery by definition works by ionizing something (usually a metal) and guiding the electrons that flow from one electrode to the other out of the battery (if a circuit is made and closed). The opposite of M → M+ + e- which is what powers most batteries (where M is a metal like lead or lithium) is M+ + e- → M. In other words you can use the electrons to ionize some metal, M, if there's enough energy. We measure energy in a circuit by voltage, the higher the voltage, the 'stronger' the energy (voltage, or potential, is like the height of a tank of water - the higher it is, the more work it can do). A 12V battery has a LOT of potential (relative to what's needed to ionize metals) but generally doesn't have much current. That means it can ionize most (I think, all, actually) metals but not very much of them. Electrochemistry is a bit of a strange area of chemistry, because it deals with two different concepts of "potential": the electrical term, same meaning as the word as voltage, more or less and the chemical term, meaning the ability (or potential) to react. Most metals prefer to ionize to the M+ ion, the cation. (By "prefer" I don't mean the atoms are choosing what to do, they do what the Laws of Physics and Chemistry tell them to do, no exceptions) But metals losing electrons is called "oxidation", metal ions gaining electrons (and so going back to the neutral (uncharged) atom, is called reduction. In order for a + ion (a cation) in solution to gain an electron, it needs to take it from something. The easiest place to take it is from a wire which has a negative charge and is "full" of extra electrons (from the battery). It happens at the wire's surface, and this allows the metal to "plate out" on the wire because uncharged (neutral) metal atoms are generally not very soluble in water. The ions are soluble, they are changed to the neutral metal at the electrode surface and plate out (precipitate out) onto that surface. Oh, one last thing. 12 Volts is more than enough to break apart water. In gentle conditions, (not working with explosive mixtures, using small batteries, etc.) the reaction which will occur is the one which uses the least energy. This means that even if you have enough energy to, say, ionize gold or platinum or silver, that they won't dissolve in a dilute acid if the reaction 2H2O → 2H2 + O2 uses less energy. (You can see this by watching bubbles form at the wires. If bubbles form at one wire, you know that something is going on at the other. The water reaction, above, makes hydrogen at one wire (electrode) and oxygen at the other. One explodes, the other we breathe. (Collecting the H2 is mostly safe unless sparks, flames, or heat (or platinum) is present.)
Comment: Wallet of text. Consider making paragraphs for readability.


Why are attributes missing in overlay tab QGIS 1.8.0?

Question: I want to add a diagram overlay onto a shapefile layer. When I look at the attribute table, all the correct columns are shown. However, when I open the layer property box, the attribute columns I want to display are not available in the drop down list. Would this be because there are some NULL values in the attribute table? How do I get around it?
Answer: It's more likely that those attributes are not numeric but strings. You can use field calculator to create new, numeric attributes from the strings if necessary.


Is SFTP vulnerable to brute force, bounce, spoof, sniffing and port stealing?

Question: I have been researching FTP and noted that using FTP means you are vulnerable to these types of attacks. I have been looking for an safer alternative and came across SFTP. Is SFTP still vulnerable to these types of attacks?
Answer: Most services are available to brute forcing, and most have mechanisms to defend against it. You can likely use SSHGuard to prevent brute forcing as it written to detect multiple failed anomalous logins, and blocks (via IPTables) the connection. Or you could write your own script with checks and balances:
pseudocode
if
tail -n 1000 /var/log/messages | grep fail && grep sftp
then
cut field of IP and create iptable rule && run rule
fi

The better (optimal) option would be creating a rule to allow instances you trust, and blocking all others.
Answer: SFTP is FTP over SSH. So take the usual SSH security measures, install denyhosts or fail2ban to lock out everyone that tries to bruteforce. Since the data is going through the secure SSH tunnel, well, yes, they can sniff it, but it would be worthless as everything is encrypted using a modern cipher. For SFTP, the attacker would only know the IP addresses of the two endpoints, but nothing else.
Comment: It's file transfer over SSH, but it's not actually "FTP" -- it doesn't have separate data connections and the problems that come from FTP's usage of `PORT`/`PASV`, for example.
Answer: As already explained in the other answer, about brute-force, YES, it is vulnerable to brute-force as every public-facing service.
To answer also the other part of the question about spoof, sniffing and port stealing: NO, It is not because SFTP is using SSH and it is solving these problems (for more info, discuss specification or RFC's). Unless you don't check the fingerprints for the first connection. Then you are screwed anyway.


How to change the amount of zoom from the scroll wheel while viewing through the camera?

Question: One click of the scroll wheel zooms too much IMO. Is there a way I can get more precision zooming?
Answer: CtrlMiddle Click is for precise zooming.
Comment: TIP: Ctrl + Middle Click works well in Uv/Image Editor also.
Comment: With an object selected (or any vertices, edges or faces selected in Edit Mode) press Z to zoom to that selection. Then when you zoom with the scroll wheel, the camera will zoom in relation to the size of your selection. It's not as precise as Ctrl Middle Click, but it works pretty well.
Comment: @YoeyYutch Z is for toggling between solid and wireframe view. Could you be thinking of Numpad . and you changed the hotkey to Z?
Comment: Sorry I must have changed my keyboard shortcut. I thought it was default because I've seen video tutorials which use Z to 'zoom to selected'.
Comment: @YoeyYutch Okay. Do you use the normal version of Blender or do you use something like the Sensei Format? In that case you might just be thinking of some of those tutorials.
Comment: If I scroll one time then the scene is about 50meters away, thats way too much. Why is this?
Answer: I know it's an old post, but I just had the same issue and I didn't find a solution online. So I leave a solution here in case someone needs it still. I started having issues after pressing Shift+C to reset my 3D cursor in my scene. So I experimented with the Edit -> Preferences and "Navigation" tab. Under the "Orbit & Pan" section you have a tickbox for "Depth" that needs to be selected to get a more precise scroll-wheel zoom.
Answer: Straight to the point:: try hitting decimal on the NumPad '.' or whatever you have [Frame Selected] -- in certain modes without what I'll call a 'reference frame' it is trying to zoom you across 1000m of world space.
I found my way here because I had the same problem---however it was all of a sudden from no where; I was in sculpt mode on a regular cube object; and the mouse wheel was jumping football fields----I messed with settings I scoured preferences for something that might have changed---and then it struck me! - Like lots of things in blender (sculpting) Zooming can be relative. For my issue---I had not set any 'focus' to the cube; as soon as I hit '.' on the NumPad (decimal) which is mapped by default to [Frame Selected] then the planets aligned, the stars shone brighter and I found my mind again after it had begun slipping away... Hope this helps you &/or anyone else
Answer: Split the screen in two, change one view to camera view , 0 and the other to side view, 1, then select the camera in object mode and press g then z to precisely move the camera to where you want it.


Preview tab is empty for the request sent in Postman tool

Question: Am new to POSTMAN tool and when I send a request am getting the response status as '200 ok'.
But in Preview tab, the page is not displaying and its empty. How to view the response in preview tab?
Comment: What is your raw response? Probably there is nothing to display
Comment: Alexey, I have added the Raw response in above.Thanks in advance...
Answer: Unfortunately neither the native nor the Chrome Postman app are particularly great with HTML previews, especially with dynamic content, such as the search results you have on your screenshot.
If you check the Raw tab, you'll see the actual HTML code returned, and if you just want to look at the page, you might as well use your browser.
The point of Postman is mostly that you can process the response, either to assert some of the values, or to use them in a subsequent API call.
If you're just getting started with Postman and trying to figure out how it works, you cold use a free public API for practicing. Something that returns JSON. You can find good free ones on ProgrammableWeb.
Or if you actually want to process google search results, then use the API: https://developers.google.com/custom-search/json-api/v1/overview


Does a SIP trunk relay the RTP stream or just set up the call?

Question: Suppose I have a SIP PBX like Asterisk and a bunch of phones registered to it, and outgoing/incoming calls are handled through a SIP trunk.  Do the RTP streams go directly between the phones and the SIP trunk provider or are they relayed through the PBX?
Answer: check this line in sip.conf :
canreinvite = no  ; allow RTP voice traffic to bypass Asterisk

if it set to yes RTP traffic will _try_ to go directly between SIP endpoints.
If it set to no - all traffic will be sent over PBX.
Answer: It depends.  If you do any transcoding (in other words the two endpoints use different codecs) then Asterisk will definately be in the RTP stream.  If your two endpoints are on opposite sides of NAT, then Asterisk will likely be in the RTP stream (also depending on reinvite settings).  If both endpoints are on the same side of NAT then likely no.


Solvable subgroups of groups of polynomial automorphisms

Question: Does every finitely generated free solvable group embed into the group of polynomial automorphisms of some C^n?
Comment: This is related to the Jacobian conjecture, and so I've retagged as algebraic-geometry and commutative-algebra.  I don't have an answer, but have you looked for stuff in van den Essen's book "Polynomial automorphisms and the Jacobian conjecture"? It seems like the first place to start looking.
Comment: sorry, what does "free solvable" mean?  The free group I know are not very solvable.
Comment: That's a good point.  I was just ignoring the word free as meaningless there.
Comment: "Free solvable" could mean e.g. a free k-step solvable group. Explicitly, this is F/D^k(F), where F is a free group and D^*(F) its derived series. I don't know the context well enough to know if this is what was meant.
Answer: Wilhelm Magnus (W. Magnus, Über $n$-dimensionale Gittertransformationen. Acta Math. 64 (1935), no. 1, 353--367.) seems to have shown that the free metabelian group on $n$ generators has a faithful representation of degree $2$. It follows that there is a copy of the free solvable group on $n$ generators and of derived length $2$ inside $GL_2(\mathbb{C})$.
That answers your question affirmatively in a special case.


Why does my neon line tester glow even when I'm not touching its conductive screw?

Question: So I'm testing a phase wire. When I touch the conductive screw top and use the tester like it's supposed to be used, it glows brightly. But when I'm only touching its plastic casing and not touching the screw at all, it still glows, albeit very faintly. What's happening?
Comment: Apparently, ambient electric fields are high enough to reach the ionization voltage of the low-pressure neon gas inside the bulb. Once ionized, you see a glow for a portion of the AC cycle. Electric fields are affected by your body proximity.
Answer: When measuring AC current's there can still be a small amount of capacitance between test probes and other objects. This happens with most meters that can measure sub mA currents, but could also be happening with your meter. Because of the capacitance (usually in the pf range, but probably more if measuring close to the ground through the plastic in the unit you are measuring) a small amount of current can be detected and be enough to light the light. If you have a regular DMM turn it to AC mode mA and repeat the experiment, you should see some current.


What generates the curvature which is necessary for curling-up extra dimensions?

Question: To say it right away, I am not an expert in string theory, but I know well General Relativity. So I wonder how the curling up of extra-dimensions which is assumed in many "Kaluza-Klein" like theories (string theory, Randall-Sundrum etc.) is actually created. The extra dimensions in these theories are apparently warped, and therefore their geometry must be characterized by a non-zero curvature (Riemann tensor). According to General Relativity the latter one should be generated by a non-zero energy-momentum tensor  which must have its origin in a significant matter Lagrangian  $L_{matter}$. $$T_{\mu\nu}= -\frac{2}{\sqrt{-g}}\frac{\delta (L_{matter})}{\delta(g_{\mu\nu})}.$$ This finally would mean that  the matter as origin of this warping must be significant in order to produce this warping of extra dimensions on an extremely small scale. Is this conclusion correct or not?
Comment: It is correct according to the axioms you assume. The quantum theories postulating the extra dimensions  are free to have their own axioms and postulates, like some dimensions curled and independent and not contributing to the limit of GR. Another problem is that general relativity has not been definitevely quantized  to be relevant to the quantum models.
Comment: @John Renie I've just checked on WP that the Gaussian curvature of a 2-dim cylinder is zero, i.e. its Riemann tensor is also zero. No non-zero energy-momentum tensor is necessary. In that respect I follow your argumentation. Nevertheless, it is not intuitive that a cylinder is supposed to have zero curvature.
Comment: @FredericThomas the confusion between intrinsic and extrinsic curvature is very common. The curvature in GR is intrinsic.
Answer: The compact extra dimensions are not curved, or more precisely they are not necessarily curved.
As an analogy consider starting with a flat sheet of paper and rolling it up to form a cylinder. The intrinsic curvature is still zero i.e. a flatlander confined to the surface would find that the geometry was still Euclidean. The cylinder looks curved to us because of the way it has been embedded in our 3D space.
The rolling up of the extra spatial dimensions is analogous to this though the surface they form is obviously more complicated than a cylinder. It has long been assumed that they would form a Calabi-Yau manifold, though with the failure to find low energy supersymmetry I believe this is now starting to be questioned. Anyhow the Calabi-Yau manifold can be intrinsically flat just like a cylinder or perhaps a better example would be a six-torus.
This doesn't mean the curvature in the extra dimensions must be zero, just that it can be zero.
As for how the compact dimensions are stabilised, the first proposal I know of for this was the KKLT mechanism.
Answer: It's worth pointing out first that the standard model relies upon exotic geometries - that is if one thinks about them geometrically. Take for instance the strong force. Before it's quantised it's described as an $SU(3)$ bundle over space time. This just means spacetime has an 'internal' geometry that looks like $SU(3)$, and this is a group, the group of special unitary transformations in 3 complex dimensions; this is hard to visualise, but there is a nicer topological description, it's $S^3$, the 3-sphere that is the surface of the 4d solid ball.
So here we already have a picture of spacetime with an exotic geometry. If you can imagine it, a spacetime atom is not 4d, but 7d; and these atoms, unlike real atoms, are not distinct, but continuously change from one point to another. The curvature of the bundle manifests itself as the field strength.
Electromagnetism is similar; in fact it was the direct precursor to the theories of the weak and strong force and so this is not suprising; here, the geometry of the point is $U(1)$. This is topologically the same as a circle; so we need to add another dimension for this. This makes the dimension of a space time point 8d. The weak force adds $SU(2)$, and this is topologically speaking the double cover of $SO(3)$, the rotation group in 3d. This has 3 degrees of freedom. So altogether we have 11 dimensions at each space time point; or another way of saying the same thing, 11 degrees of freedom.
Now, whilst bosonic string theory is 26d; the main contenders, the five superstring theories are 10d; M-theory had 11d. So in these latter theories we are not far of the actual degrees of freedom at a spacetime point.
Now, it's the curvature of the electromagnetism bundle that manifests itself as the electromagnetic field strength; locally, after you choose a basis this splits up into the electric and magnetic fields; a similar story can be said for the other Yang-Mill fields - the weak and strong force.
All this before the theories are actually quantised though.
It's probably worth adding at this point, that it's was the geometrisation of gravity by Einstein that inspired Weyl to introduce a similar scheme for electromagnetism - the gauge principle - and which, over half a century later led to the current geometric picture of gauge theories. The question arises as to whether this geometric picture is anything more than a mathematical convenience that helps physicists and mathematicians grasp and work with the theory better. A case in point is gravity, it posits the curvature of spacetime. We have now direct evidence of that through gravitational lensing. We can actually see the curvature in action.
Since geometry changes in the very large, far from our ordinary and everyday experience right here on this earth, one can then be led to the idea that geometry may also change in the very small. Probably one of the first pieces of evidence that pointed towards this is the discovery of spinors. Michael Atiyah said that in some sense they are 'the square root of geometry'; another piece of evidence, is the Ahranov-Bohm experiment that suggests that it is not the electric or magnetic field that is fundamental but the electromagnetic potential which was originally considered to be a conveniant way of talking physical problems with electromagnetism. This again is an expression of curvature and enters directly into the coupling of the electromagnetic field with the electron in Diracs equation.
The difference with this and string theory is that the extra dimensions are posited as actual space; one can take it from a purely pragmatic point of view, in the way particle theorists take gauge theory and think of it as merely another way to think about the physics in order to get a fully unified picture. After all, that kind of spatial picture has already proven its worth in the Hilbert space of quantum states which is directly inspired by our own 3d Euclidean space.
As to your other question about what generates this curvature. I'm not sure that this is a question that is tackled at all in the theory. The compact dimensions are given by fiat, in the same way we have them in classical field theory underlying the standard model. The main question here is to get a phenomenological my accurate description of the physics we all know and love.
Answer: It seems that the OP is asking for "causality" not technique for compactification.
The proposal that extra dimensions exists takes us down a path that (1) provides degrees of freedom for expressing Gauge fields using differential geometry and (2) leads to a naturalist problem.  Namely, what mechanism justifies the compactification.  Theorists do not always care to answer that question.
It should be noted that in the earliest days of unification theorists also played with extra dimensions that were not compact, i.e. extra copies of R^1.  This accomplishes the task of extra fields.  The emergence of a geometric description of the EM field and other fields was attractive but also introduced extra fields that no one knew what to do with.  At first they "wished them away".  This led to the result that EM is embedded in a higher dimensional geometric theory but we can't really figure out what to make of the "extra fields".  Not only were these extra fields disconcerting to theorists but it turns out that "wishing them away" leads to a configuration that is not a solution to the field equations.  This is an even bigger problem, inconsistency.  Michael Duff (not 100% sure of the name) revived these theories by showing that one can build up a higher dimensional theory that have vanishing extra fields that is consistent with the field equations (a big deal).  Using compact extra dimensions and taking the limit as the radius goes to zero makes terms legitimately vanish.  This means that the physics we know can be extracted from these theories in some limit.  It also means that if those dimensions loosen up we would "see" those extra fields, i.e. they may get excited and have a measurable effect in 4-dim.  But nothing explained why these extra spatial degrees of freedom are the way they are, it is an assumed configuration that does not violate logical consistency.
These very same ideas are connected to modern Gauge theory, where one couples an internal symmetry group to the manifold.  The difference here is that the manifold of the internal symmetry group is "frozen".  It cannot breath, expand or contract.  It dies not have its own dynamics.  In Kaluza-Klein theories since the extra portions of the manifold are due to the geometry of a larger dimensional space-time, and the extra dimensions can expand and contract according to a higher dimensional version of Einstein's equations.  This should allow one to develop a theory that explains "WHY" the dimensions contract and shrink.  Whether or not anyone has explicitly developed such a model I cannot say (haven't kept up with the literature on this).  But it is possible to explain why some dimensions contract and others expand.  Most theorists aren't that interested in such a detail, only in showing that the assumption of contraction is not inconsistent with the field equations.
But as a final note to assume that the extra dimensions are open or closed (a line or plane, or a circle or sphere or other manifold) places some constraint on topology, not geometry.  I do not believe it is possible for a material stress energy tensor to actually change topology, i.e. to somehow make an infinite line close up into a circle.  What these theories are saying is that if we start with the assumption that the extra dimensions are closed (i.e. a compact manifold) we have a chance of shrinking by some mechanism.
If you're really interested in learning how these techniques work and have evolved over time I recommend:
Introduction to the Theory of Relativity by Peter G. Bergmann
The Dawning of Gauge Theory by  Lochlainn O'Raifeartaigh
These may be old books but they are very good.  The Appendix of Bergmann's book has a derivation of KK theory with one extra dimension.


What is meant by "place 4 inches apart on cookie tray"?

Question: Does this mean place some cookie dough every 4 inches (i.e. 4 inches center-to-center), or have a 4 inch gap between each cookie?
Comment: Wow how big are those cookie(How much is each ball of dough)? 4 inch buffer on every side? That's like a 8 inch diameter cookie.
Comment: Mom would only allow me one cookie at a time when I was a kid, so I would present her recipes for big cookies. Seriously though, I suspected it would refer to the gap so I made the size suggest it was center-to-center.
Answer: It means to have a 4 inch gap between each cookie. Of course, if you use less dough per cookie, you can put them a bit closer together.
Normally, if you put cookie dough on the tray, the surface of the cookie won't be very big (perhaps an inch). So it would not make a very big difference if you would've placed the cookies 4 inches apart center-to-center. Just be careful during the first batch. If you see you have a lot of space between the finished cookies, you can put the dough closer together for the next batch (if you use the same amount of dough per cookie).


Types of Salesforce community

Question: What are the types of salesforce community and cost of each type?
Comment: Pricing is always negotiable, license types are published: http://www.salesforce.com/crm/editions-pricing-communities.jsp
Answer: Salesforce communities basically provide the collaboration between customers, partners, distributors, suppliers and employees. So broadly any organization can own any type of community. Organizations can also provide access to data, content and business process through these communities publically or privately. They provide a social platform through which customers can interact with their favorite vendors. Generally Salesforce supports only following two types of communities:
Customer Communities: It provides rich collaboration, consistent branding and mobile access through which even the customers can share their experiences with each other and contact to their representatives as well.
Partner Communities: It provides a platform to business partners and a role based power can be added as well. Through these communities the partners can share the relevant information and at the same time can keep some information private as well.
As far as community pricing is concerned, then Salesforce charges two types: one is login based and another is membership based. Moreover the price also depends on the size of the community. Customers can buy either type of membership. Each community has to be purchased separately.
Reference: http://www.janbask.com/salesforce-communities/

Types of Salesforce community


What is an umbrella term for all sorts of urban development from road construction to tree planting?

Question: In Russian, there's a word 'благоустройство'. I'll give you its official definition (I kinda google-translated it but why not, it will do): "A set of works (on the engineering preparation of the territory, the construction of roads, the development of communication networks and water supply, sewage, energy supply, etc.) and measures (on clearing, draining and landscaping the territory, improving the microclimate, and protecting the air basin, open water bodies and soil from pollution, sanitary cleaning, noise reduction, etc.) carried out in order to bring a territory into a condition suitable for construction and normal use for its intended purpose, creating healthy, convenient and cultural conditions of the population." I would add that the word, uncountable, can refer not only to the process but also to its physical results (paving, trees, decorations, etc.). How could the term be rendered into English?
Answer: The general term for such type of projects is public works.
From Wikipedia:

Public works are a broad category of infrastructure projects, financed and constructed by the government, for recreational, employment, and health and safety uses in the greater community. They include public buildings (municipal buildings, schools, hospitals), transport infrastructure (roads, railroads, bridges, pipelines, canals, ports, airports), public spaces (public squares, parks, beaches), public services (water supply and treatment, sewage treatment, electrical grid, dams), and other, usually long-term, physical assets and facilities. Though often interchangeable with public infrastructure and public capital, public works does not necessarily carry an economic component, thereby being a broader term.
Public works is a multi-dimensional concept in economics and politics, touching on multiple arenas including: recreation (parks, beaches), aesthetics (trees, green space), economy (goods and people movement, energy), law (police and courts), and neighborhood (community centers, social services buildings). Essentially, it represents any constructed object that augments a nation's physical infrastructure.

Most cities, at least in North America, have a Department of Public Works at the municipal level of government.
Comment: Does it apply to the physical objects as well?
Answer: We don't have one word for the activity and the activity's results.
The result is infrastructure.

infrastructure noun
1 : the system of public works of a country, state, or region also : the resources (such as personnel, buildings, or equipment) required for an activity
Infra- means "below;" so the infrastructure is the "underlying structure" of a country and its economy, the fixed installations that it needs in order to function. These include roads, bridges, dams, the water and sewer systems, railways and subways, airports, and harbors. These are generally government-built and publicly owned. Some people also speak about such things as the intellectual infrastructure or the infrastructure of science research, but the meaning of such notions can be extremely vague.

https://www.merriam-webster.com/dictionary/infrastructure
The activity would be infrastructure development.


Ticking in the engine

Question: there was a ticking sound coming from my boyfriends truck Tuesday...once he had driven it for a little while the noise stopped...I asked him to check the oil and when he did, it was close to dry.  We put two quarts in and he ran it around the block and no noise.  On Wednesday he took it to work and on the way home the noise began again.  No warning lights of oil or over heating are appearing on the inside panels.  Once he drove a while, again the ticking stopped.  When he got home, he checked the oil and there was plenty.  He has not gotten an oil change in a very long time, my initial thoughts are possibly the filter is clogged and is not putting oil where it needs to be until the truck warms up and the pistons are being lubricated.
Any thoughts?????
Comment: Get an oil change first. If the issue persists after oil change as well, please come back and update the question. Also helps to know the year, make, model of the truck.
Answer: The ticking noise is probably a sticky lifter, push rod, or rocker arm. For a variety of reasons, one of these might momentarily lose contact with the other. The lifter touches the push rod, the push rod also touches the rocker arm, and the rocker arm touches the valve stem.  If any of these parts are "sticky" you can get a click.  When things warm up, the stickiness might go away.
The actual cause of the stickiness that is making things click might be harmless (rocker arm has extra play) or potentially deadly to the engine (no oil or bad oil).
Based on what you've said, get an oil  and filter change NOW!  Oil should be changed at least every 5000 miles. Don't worry about getting Synthetic. That's for extending the oil life, and there's a lot of debate about that. What you need now is new oil.
Answer: As well as @BillN 's excellent answer, it could also be that there is an exhaust leak between one of the heads and the exhaust manifold. This often sounds like valve train noise or can even sounds like a rod knock sometimes.
As the exhaust manifolds heat up, they expand. This squeezes things back together and the noise will stop.
What you'd be looking for is carbon tracks (black suet) somewhere around the exhaust manifolds. It will be darker near the junction of the manifold/head and lighten in color as you go away from that junction. Most likely it won't be that large of an area either, probably just a 1/4" or so in size (away from the junction). It can be wide along the manifold, but if this is a new noise, it probably won't be yet.
To fix this, you would need to replace the exhaust manifold gasket(s).

Ticking in the engine