Where has the option to mount as hard drive gone ...?

Question: I have an HTC Desire HD (on Vodafone UK). I noticed this week that when I now connect it to either pc or mac the option to mount as a hard drive is no longer present. Why? What do I need to do to get it back?
Comment: Has anything changed since last time you were able to mount successfully?  E.g. new Android OS version, new apps, new computer, new USB cable?
Comment: The only thing I can think of is that I *may* have d/loaded a couple of apps, but nothing that should mess with core Android features in this way. e.g. Solitaire.
Answer: Ok, so I had a look at this thread and, as it suggests, I took the microSD out and put it back in again. Now it works as before. Smells like a bug to me?
Comment: The exact same thing happened to me - taking out the SD card resolved it too.


After accidentally deleting some files from /etc/ppp Internet not working?

Question: I just accidentally deleted some files form /etc/ppp folder. After that internet not working I replace ppp folder from a live ubuntu but its still not working.
I'm using ubuntu 16.04 LTS
Answer: Use dpkg to discover what files could be related to this file:
dpkg -S "/etc/ppp"

It will result:
resolvconf, pppconfig, pppoeconf, pptp-linux, ppp: /etc/ppp

Now, since you know the packages that uses this filepath. You have to reinstall them from the repository:
sudo apt-get install --reinstall resolvconf pptp-linux pppoeconf pppconfig ppp

Hope you fix your problem.
Comment: Could you please elaborate a bit on your answer? What does the command do, where to enter it, why it might solve the OP's problem etc.
Comment: But the thing is due to this problem internet is not working (wired connection is disabled) and sudo apt-get need internet access to install packages I think. what to do is there any other way to recofigure it without internet I have ppp folder from a live ubuntu 16.04 LTS.
Comment: Not if you have the image file.
In the "/etc/apt/sources.list" file, uncomment a line like this

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

mount the image in the cdrom and execute

   apt-get update

and execute the command sudo apt-get install --reinstall package-name


Nicer way to work params

Question: if params[:package]
  city_ids = []

  city = params[:package].delete 'city'
  city_ids << city  if city.to_i > 0

  cities = params[:package].delete 'cities'
  city_ids += cities  if cities.class == Array && cities.length > 0

  params[:package][:cities] = city_ids.map{ |c| City.get(c) }.compact
end

Answer: This code looks pretty clean to me. Here are a few thoughts:
I'm not sure what your ORM is (or even that City is database backed), but most have a way to fetch more then one record at a time. Making a single call will save time and Database resources.
Another thought is that you are inducing a lot of local vars: city_ids, city, cities. What about trying to build up the array of ids in params[:package][:cities]? e.g.
#if cities is not an array, it is bad date get rid of it.
params[:package].delete 'cities' unless params[:package][:cities].kind_of? Array
params[:package][:cities] ||= []
params[:package][:cities] << (params[:package].delete 'city') if params[:package][:cities].to_i > 0
params[:package][:cities] = params[:package][:cities].map{ |c| City.get(c) }.compact

The code above doesn't seem very DRY because it has all this params[:package] stuff.  If you do things like this a lot (your question makes it sound like you do) factor the operation out into a separate method:
def extract_nested_reference(hash,values) # change name as appopriate
  if hash
    hash.delete values unless hash[values].kind_of? Array
    hash[values] ||=[]
    hash[values] << hash[values.singularize] if hash[values.singularize].to_i > 0

    hash[values] = hash[values].map do |x|
      Object.const_get(values.singularize.constantize).get(c)
    end.compact
  end
end

This method could then be called with extract_nested_reference(params[:package],'cities'). Refactoring like this will also encourage you to be consistent in how you build you params hash, and allow you to reuse code.
Finally, your question asked about better ways of dealing with hashes.  I don't think there is.  You will find code very similar to this living in most popular gems.  AS you say, it is kind of clunky, and therefore and excellent candidate for a code redactor.
Comment: You are right about ORM. I'm usind marvellous DataMapper and it invokes just one sql statement instead of `city_ids.count` with this code: `City.all(:id => city_ids.compact)`

Nicer way to work params


How to set a polyline length as per a given Image

Question: I have an image of a map representing the road networks. I have converted these road networks into a shapefile with only polylines. I want to set a distance to this road network. For e.g I know from the image that the distance between A and B is 10 Km. However, I want to set the same distance to the polyline also. Because. If i draw a buffer of 2km for this road network, it goes beyond the size of the image. Any idea how to do it?
Comment: I think you did not georeference the raster image correctly before generating shapefiles..
Answer: There are a few things you can do.
You can georeference the image using another source that is projected correctly. Something in meteres would be a good choice. Then you could re-extract the road network from the image, and you are good to go.
Or, you can try taking your current (vector) road network and use the spatial adjustment extention in ArcMap to "georeference" the lines.
Good Luck


Torque on a current loop in a uniform magnetic field

Question: I'm trying to prove the result the net torque on a current loop in a uniform magnetic field is $\vec{\tau}_{net}=\vec{\mu}\times \vec{B}$ where $\vec{\mu}=I\frac{1}{2}\oint(\vec{r}\times d\vec{r})$ starting from Lorentz force
$$\vec{\tau}_{net}=\sum_i\vec{\tau}_i=\sum_i \vec{r}_i\times (I\vec{r}_i\times\vec{B})\\=I\int\vec{r}\times(d\vec{r}\times\vec{B})$$
now I need to get $\vec{B}$ ouside the integral. I tried Jacobi identity
$$\vec{r}\times(d\vec{r}\times\vec{B})=(\vec{r}\times d\vec{r})\times\vec{B}-d\vec{r}\times(\vec{B}\times\vec{r})$$
unless I made a mistake, it remains to prove $d\vec{r}\times(\vec{B}\times\vec{r})=\frac{1}{2}(\vec{r}\times d\vec{r})\times\vec{B}$. I tried triple vector product identity with no luck.
Comment: The proof you want can only be made under the integral, but it is difficult.  You're better off starting $a\times(b\times c)=b(a\cdot c)-c(a\cdot b)$,, but that proof is tricky. It is done in textbooks, chapter 7 in mine, but is not easy.
Comment: @JerroldFranklin That turned out to be a nice exercise. It is a shame that freshmen texts do it for a square loop and make a shaky argument that it can be generalized.
I also couldn't find it in advanced textbooks (obviously a remiss from my part). Thanks for pointing me to your book, it is an amazing text!
Answer: After Franklin's note that it must be done under the integral, obviously Stokes' theorem would help to turn it into a surface integral. Starting by introducing an arbitrary vector $\vec{k}$
\begin{eqnarray*}
\oint d\vec{r}\cdot(\vec{k}\times(\vec{B}\times\vec{r}))&=&\int_S d\vec{A}\cdot(\vec{\nabla}\times(\vec{k}\times(\vec{B}\times\vec{r})))\\
\vec{k}\cdot \oint (\vec{B}\times\vec{r})\times d\vec{r}&=&\int_Sd\vec{A}\cdot\Big(\vec{\nabla}\times((\vec{k}\cdot\vec{r})\vec{B}-(\vec{k}\cdot\vec{B})\vec{r})\Big)\\
&=&\int_Sd\vec{A}\cdot\Big((\vec{k}\cdot\vec{r})\underbrace{\vec{\nabla}\times \vec{B}}_{=0}+\vec{\nabla}(\vec{k}\cdot\vec{r})\times\vec{B}\Big)-\vec{k}\cdot\vec{B}\int_Sd\vec{A}\cdot\vec{r}\\
&=&\int_S d\vec{A}\cdot(\vec{k}\times\vec{B})-\vec{k}\cdot\vec{B}\int_Sd\vec{A}\cdot \vec{r}=\vec{k}\cdot(\vec{B}\times\int_S d\vec{A}-\int_Sd\vec{A}\cdot \vec{r})
\end{eqnarray*}
as $\vec{k}$ is arbitrary, $\oint (\vec{B}\times\vec{r})\times d\vec{r}=-\vec{S}\times\vec{B}-\int_Sd\vec{A}\cdot \vec{r}$. Now completing the computation,
\begin{equation*}
\vec{\tau}_{net}=\oint (\vec{r}\times\vec{dr})\times{B}+\oint(\vec{B}\times\vec{r})\times d\vec{r}=2\vec{S}\times\vec{B}-\vec{S}\times\vec{B}-\vec{C}\\=\vec{S}\times\vec{B}-\vec{C}
\end{equation*}
where $\vec{C}\equiv \vec{B}\int_Sd\vec{A}\cdot \vec{r}$. I just wanted to conclude it with the same logic I started but of course the approach of Franklin's Classical Electromagnetism is simpler; by the triple vector product identity, noticing $\oint \vec{r}\cdot d\vec{r}=0$ and the vector identity $\oint d\vec{r}\phi=\int_Sd\vec{A}\times\vec{\nabla}\phi$.
Edit: there was a mistake in my derivation. Now it seems an additional term $\vec{C}$ shows up.
Comment: The expression $\int_S d\vec{A}\cdot \vec{r}$ can't be transformed that way (already units don't match, the expression is a volume, while the replacement is a length) and it is easily seen from geometrical picture that it is not, in general, zero.
Comment: So the r.h.s. has contribution $\text{const} . \vec{B}$ where the constant depends on the choice of origin of the coordinate system (where $\vec{r} = 0$).
Comment: The step in question is Stokes' Theorem done backwards and wrong.  The correct step does depend on the origin of $\bf r$. For a plane surface loop, the origin would be at the center and the integral would be zero. For a non-planar loop, the origin could be picked at a point that makes the integral zero. This means that, except for a planar loop, the derivation needs some external (heavenly) help.
Comment: Now I'm more confused. It appears this additional term is zero independently of B only around the centroid (where the first moment of area is zero)? But why did it not show up with the derivation starting by the triple vector product identity? was that assumption somehow tacitly implied at any step?


Kinetic energy of an electron with de Broglie wavelength $\lambda$

Question: If an electron has de Broglie wavelength $\lambda$, can I write it's kinetic energy $E = \frac{hc}{\lambda}$? If not then what energy does the equation represent and when can the equation be used ?
Comment: https://en.wikipedia.org/wiki/Matter_wave#de_Broglie_relations. So your expression is not correct.
Answer: The problem is that for an electron $\nu \ne c/\lambda$. You need to replace $c$ by the phase velocity, which is somewhat involved to calculate. However you can get an approximate equation for the energy and wavelength by noting that the de Broglie wavelength is given by:
$$ \lambda = \frac{h}{p} $$
For a non relativistic electron we have:
$$ E = \frac{p^2}{2m} $$
Giving us:
$$ E = \frac{h^2}{2m\lambda^2} $$
For a relativistic electron you need to use the relativistic equation for the total energy:
$$ E^2 = p^2c^2 + m^2c^4 $$
And substituting for $p$ gives:
$$ E^2 = \frac{h^2}{\lambda^2}c^2 + m^2c^4 $$
Not that it's particularly relevant, but we can recover the non-relativistic equation by writing the above equation as:
$$ E^2 = m^2c^4\left(\frac{h^2}{m^2c^2\lambda^2} + 1\right) $$
so:
$$ E = mc^2\left(\frac{h^2}{m^2c^2\lambda^2} + 1\right)^{1/2} $$
If we assume the energy is much less than the rest mass we can use the binomial expansion on the square root to get:
$$ E \approx mc^2\left(1 + \frac{h^2}{2m^2c^2\lambda^2}\right) $$
or:
$$ E \approx mc^2 + \frac{h^2}{2m\lambda^2} $$
If we identify this as the energy equal to the rest energy plus the kinetic energy that gives us:
$$ KE \approx \frac{h^2}{2m\lambda^2} $$
Just as we concluded above.
Comment: Phase velocity? Why phase velocity?
Answer: the energy of a debroglie wave can be gotten from the equation below
                  E=hv/2l    where l=wavelength
it is obvious that a change in velocity will lead to a change in wavelength and energy. Therefore E=f(v,l)
Using partial derivatives, the change in energy, dE is expressed through the following equation
<code>                        dE=h/2l(dv.(v/l).dl)
</code>
Comment: please consider using MathJax for your equation, also your partial derivative of E is incorrect.


Kekkai Sensen ep9, meaning of "playing it backwards in double-time/fast-forward"?

Question: 5:54 Zapp said "What's he doin', playing it backwards in fast-forward?" You could replace fast-forward with double-time according to another set of subtitles. He was referring to the vampire, but the vampire wasn't even doing anything. What exactly does it mean?
Answer: The vampire they were fighting was regenerating (I guess "playing it backwards" as in "reverting to a prior, unhurt state") quickly ("in double-time").
He had previously been severely injured by crashing into the skyscraper and by Klaus's attack. Note that about 30 seconds prior (in video time, not necessarily in-show time), he looked like this:

I think there's a kernel of a pun in here. Zapp says 逆再生の早回しかよ gyaku-saisei no hayamawashi ka yo. The word 再生 saisei has two meanings. One, "play" as in "to play a video". Two, "regenerate" or "come back to life". The prefixal 逆 gyaku means "the opposite of" or "reversed". So whereas a regular creature regenerating might be "coming back to life", an eldritch undead abomination like a vampire might instead be "coming back to life backwards" - gyaku-saisei, which is also the word you'd use for "to play a video backwards".
I'm kind of reaching here, though; I'm not sure whether that was the intention.


easiest way to fill in holes on distressed font?

Question: Using a font with some distressing.  I need to remove the distress holes in the font.  When i try to get rid of the little holes, it's also getting rid of the large holes that make the letters o and f.  Is there an easy way to do this that I'm totally overlooking?
Thank you!
Comment: Thank you!  I apologize.  I did several searches prior to posting and couldn't find it.  Thanks for the links!
Answer: You can probably just Right Click → Release Compound Path and that will probably do the trick for you.
Though that will also release the holes from the letters and you will be left with a bunch of unnecessary paths.
To fix that you can then select the 4 holes + the base shape and then Right Click → Make Compound Path (Ctrl+8) and then just select all and use the pathfinder Unite option.

Another way I can think of is to use the pen tool to draw some paths above the unwanted holes (very rough shape - no precision needed) and then use pathfinder unite to merge them all together.

You can also use the Shape Builder Tool and Click + Drag on areas to merge together.


How do I see the currently running applications on an iPod Touch?

Question: There is only one button at the bottom of my iPod Touch. To close applications, I press the home button. Does it really close applications, or does it just display the home page and an extra thread runs in the background? Is there any way that I can see the currently running applications?
Answer: In iOS 3, you press the home button, with very few and only Apple-engineered exceptions (eg. the iPod app) the app is closed.
In iOS 4+, there is limited multitasking available to third-party apps. Apple freezes all processes in the background unless they're performing one of the following functions (ripped from Ars):

Audio: you can now listen to streaming music from apps, like Pandora or newscasts through the NPR app, while doing other activities on your phone.
VoIP: you can carry on Voice Over IP calls on services like Skype without having to quit the app if you need to perform other tasks.
Location: apps that need to poll your location, such as GPS and direction apps, will be able to do so in the background.
Local notifications: third-party apps no longer have to rely solely on push notifications if they want to alert you of something on your phone. If you have an alert set in, say, one of Omni's applications, it can ping you when the time comes instead of having to go through a convoluted series of Internet tubes to get to you.
Complete tasks: if you start a task in an application and then switch to another one (such as downloading a new map in your favorite game), it can now complete the task in the background instead of forcing you to sit there and wait on it.
Fast app switching: this is basically "pausing" an app where it is, which allows you to quickly switch away from it and then switch back, picking up where you left off.

In iOS 4, double-tapping the home button shows a tray holding both recently-used apps and apps performing the above limited-multitasking functions. You can close them/remove them from the tray by clicking the red "-" sign.
Comment: Yes, but is there a way to distinguish between "recently-used apps and apps performing the above limited-multitasking functions"?
Comment: @Thilo No there isn't.
Answer: If you use iOS 4 (or higher) tapping the Home button to close an app now only hides the app's activity and don't closed really, if you want close app you must "double tap button hold the icon then press the dash to close it"
But if you use iOS 3 or less when you press ipod touch button it close running apps and go to your home page.


Structuring CIFAR100 for resnet18

Question: This will probably be a basic question since I am starting with computer vision. I am trying to use resnet18 from pytorch and work with CIFAR-100 dataset. Single image has size 3x32x32 and the model cannot forward this throwing error. It can process arrays of size 224, 128, 64. How should I structure my images to process them with resnet18 specifically (not other arch).
Answer: PyTorch offers a range of transformations and you can simply apply a transformation to resize your images when loading your data. For example by using these transforms (using CIFAR10 as an example here which comes with 3x32x32 images too):
# transform for train data
transform_train = transforms.Compose([
    transforms.RandomResizedCrop(224),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                 std=[0.229, 0.224, 0.225])
    ])

# transform for test data
transform_test = transforms.Compose([
    transforms.Resize(224),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                 std=[0.229, 0.224, 0.225])
    ])

# load data and apply transforms
train_data = datasets.CIFAR10('data', train=True,
                              download=True, transform=transform_train)
test_data = datasets.CIFAR10('data', train=False,
                             download=True, transform=transform_test)

Both, transforms.RandomResizedCrop(224) and transforms.Resize(224) give the desired size. (the random cropping is applied as data augmentation to further diversify training data) You will find more details on available transforms in the PyTorch documentation.
As a side note: the size requirement is the same for all pre-trained models in PyTorch - not just Resnet18:

All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (3 x H x W), where H and W are expected to be at least 224. The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225].

Structuring CIFAR100 for resnet18


mysql and php views

Question: i am writing a html form, that simply passes data to a php one, and then to an sql database.
my question is, should view be stored in php or sql (and call them from php)?
i could do that. the problem is that in my views i have variables. i.e each time i call them i have different parameters in them.
so my php code looks like this:
<code>$this->query = "SELECT student.gender FROM student WHERE email ='$this->email'";
</code>
if i put the above view in mysql, i can't use a variable like "email" right?
so where are view better to be stored?
same goes for procedures ?
Answer: <code>$this->query = sprintf("SELECT student.gender FROM student WHERE email ='%s'", $this->email);
</code>
Comment: so im guessing, no storing in sql

mysql and php views


Admin page for every special page

Question: I'm creating a web site in Drupal 7, there are home page, and three main taxonomy pages(they are primary links), the client is asking, to tell the truth they are insisting on me to make custom admin pages for every primary pages, sounds like primitive but they want to control every part of the main pages manually. How can I handle this task? I've already created these pages with views. Has anybody faced before with this type of issue?
Comment: What you've made is awesome. +1
Comment: Nikhil Mohan any thoughts or ideas?
Comment: Depends on what you've done already?
Comment: i've only displaying these contents in by means of views on the main pages, they are sorted automatically, by fields, dates and comment numbers, main contents are showing up by date desc
Answer: I'm not sure exactly what you mean by "custom admin pages", but to give complete control over the layout of the content you could use Panels and perhaps also Panelizer.  The Panels in-place editor is probably enough for the client's needs, but you might show them the backend editor instead because it looks (and is) far more powerful/complicated.  It may even have the benefit of scaring them away from having the control themselves and asking you to go back to your original plan.
EDIT:
Here's how I would go about this using Panels, Views, Rules, and Flag.  This may not be the most optimal way, but it uses well-supported modules.

Make a panel for the home page.
Make a flag for each section that needs to appear on the home page.
Make a view (content pane) for each section.  The view should display the most recent node tagged with the flag for that section.  Add each view to the appropriate place on the home page panel.
Add a rule that, when a node is flagged, uses the trim flag action to ensure that only one node is flagged with that flag at any given time.

If you do this, your content editors can simply flag the pages they want and they will be displayed in the appropriate sections automatically.  (I have used all these modules to do a similar thing in the past, though I have not built this exact workflow.)
Comment: i don't think that the Panels is not the clue key of the situation, Panels and Panelizer are mostly used in the backend of the site, right?
Comment: Yes, it is used on the backend, but it is used to provide content creators/site administrators with an easy-to-use way to modify the layout and content of the site.  Panels was developed for Sony Music to manage their large number of artists' pages.
Comment: but in my situation client is asking not to change the layout of the pages, but the layout remains as it is, but nodes inside of the panels will be changed manually
Comment: In that case, you could try a combination of Panels, Flag, Views, and Rules.  See my update above for details.
Comment: i'll try to handle it with the modules that you mentioned, but besides i think custom module needs to be created
Comment: Patrick maybe you have misundertood this issue, in some cases your way can be correct, but in this particular matter i'd rather not follow it

Admin page for every special page


What specific criteria must a custom built vehicle meet in order to drive on public roads?

Question: Assuming in the state of Michigan, I have seen this Secretary of State web page on assembled vehicles, however, the two forms attached (BFS-72) and (TR-54) seem very basic and non-technical for the most part. My question is is it really that easy to build a vehicle that meets the criteria, if so, are there any restrictions as far as obtaining insurance for such a custom-built vehicle, and lastly would it be able to be driven out-of-state?
Answer:
My question is is it really that easy to build a vehicle that meets the criteria

That's not a legal question.

are there any restrictions as far as obtaining insurance for such a
  custom-built vehicle,

That depends on each insurance company's coverage offerings.

and lastly would it be able to be driven out-of-state?

That depends on the laws of states other than Michigan regarding the licensing of custom built cars and the coverage of insurance companies licensed in those states.
Comment: By "Really that easy" I mean are there any further legal requirements, i.e. max allowable stopping distance from a certain speed, brightness of lights, etc. - and if so, what are they, which ones are applicable to a self-built car vs the mass-produced cars. As far as the insurance, considering it's obligatory, are there any laws regarding offering availability for such cars? And for the other states, are there any noteworthy differences as far as the laws go? exceptions to be aware of? etc.
Comment: "further legal requirements..." Those should be determined by the SOS inspector who actually certifies the vehicle; ask MI SOS for more info on that. "Insurance":  insurance companies are private; they decide their own offerings, unless MI law somehow *requires* them to make offerings for custom built vehicles; ask MI DIFS. "Other states?: that's far too broad a question. You need to Google for the states you are interested in.
Answer: The sections of the Michigan Vehicle Code listed at the bottom of Form TR-54 (MCL. 257.685-686, 257.688-691, 257.697-697b, 257.705-711) provide more specific information about what the police officer will be looking for when they make their safety inspection.  You can read the pertinent sections of the Michigan Vehicle Code to find out more information.
Regarding the specific questions raised as a comment elsewhere, the requirements for headlamps are given in MCL 257.685, and those for brake systems are given in MCL 257.705 & 705a.


Who discovered pigeonhole principle in mathematics?

Question: The principle was used as early as late 1760s by Lagrange but are there any earlier uses of it in math?
Comment: GEP, While your questions are interesting, it seems you'd be much better off getting a couple of biographies of Lagrange rather than posting so many questions here. If you're that interested in him you'll gain a lot more understanding by doing your own research.
Comment: I tried to read this (https://www.jstor.org/stable/985239?read-now=1&seq=1#page_scan_tab_contents) online but it indicates that "Preview is not available" for some reason.
Comment: The pdf file opens normally, Jstor is accessible through most university libraries.
Answer: I assume this refers to Lagrange's 1768 proof of the Diophantine approximation theorem. The proof was simplified by Dirichlet in 1842, using the idea twice. He named it Schubfachprinzip (drawer principle), and it is with Dirichlet that the principle came to be most commonly associated. Many authors date Dirichlet's use back to 1834, but without any reference. The French name was le principe des tiroirs de Dirichlet, the principle of Dirichlet's drawers. Cabillón traced the first appearance of pigeons in it to Robinson's On the Simultaneous Approximation of Two Real Numbers (1941).
However, neither Dirichlet nor Lagrange were the first, see The pigeonhole principle, two centuries before
Dirichlet by Rittaud and Heeffer:

"In Selectae Propositiones, a book written in latin in 1622 by the French Jesuit
  Jean Leurechon, the pigeonhole principle is indirectly mentioned in a single short
  sentence, given without any further elaboration ([13], p. 2): "It is necessary that
  two men have the same number of hairs, gold, and others." The famous Marin
  Mersenne copied several propositions on arithmetic and music from Leurechon,
  including this mathematical principle in an early work of 1625, acknowledging
  the "excellent conclusions obtained from arithmetics" by the mathematicians
  from Pont-a-Mousson.
[...] Jean Leurechon was a factor of stability at Pont-a-Mousson, teaching mathematics
  on and off between 1614 and 1629. His short Selectae Propositiones
  from 1622 was a collection of propositions in mixed mathematics that were
  used for teaching. The booklet is one of the earliest witness accounts of the
  new mathematics curriculum at Jesuit colleges. Teaching was organised in lectures
  (lectiones), rehearsals (repetitiones) and discussions (disputationes).
[...] It is now established that an immensely popular work published at Pont-
  a-Mousson in 1624 resulted from these disputationes [12]. Entitled Recreation
  mathematicque [1], this French work is commonly attributed to Jean Leurechon,
  but there are good reasons to believe that this attribution is wrong (see
  [11]). More than seventy editions and translations were published during the
  seventeenth century. (The First English translation appeared in 1633 [2].) The
  pigeonhole principle appears at the end of the book (just after some elementary remarks inspired by Archimedes' Sand Reckoner about the number of grains of
  sand that could fill the universe). Unfortunately, this remarkable part of the
  book does not appear in the English edition.
It is quite astonishing that the example of men with the same number of hairs
  is still a very common illustration of the principle (see for example [4] p. 3
  where the case of New York City is considered, or [10] with the inhabitants of
  Madrid, etc.)... Indeed, the problem of men with the same
  number of hairs appeared in 1737, in a totally different context, in a French
  book by Charles-Irenee Castel de Saint-Pierre, which is in no way related to
  mathematics...
In the middle of the nineteenth century, the famous French writer Charles-
  Augustin Sainte-Beuve quoted extensively this passage [from de Saint-Pierre] in several publications
  ([16], [17], [18]), at the very same time Dirichlet made use of the principle in a
  purely mathematical context... So, do we have to replace the old Dirichlet's pigeonhole principle" by a
  Leurechon's pigeonhole principle"? We do not know for sure if Leurechon was
  really the first to publish the result. David Singmaster's comprehensive Sources
  in Recreational Mathematics [19] and our survey of Italian abbaco manuscripts
  revealed no earlier instances."
Comment: @GEP *Recreation mathematique* was quite popular, perhaps it reached him, or at least the idea derived from it. But we can only speculate.


Are there any taxes to be paid to HMRC when I sell an inherited property in another country?

Question: I recently (less than six months ago) inherited a flat in Italy. I'd like to sell it. Are there any taxes to be paid to HMRC if I have the money being paid to a UK bank account?
Comment: The property is actually in your name, it's not still in the estate of the deceased?
Comment: @GS-ApologisetoMonica the property is in my name
Answer: The taxes you might owe are independent of whether you transfer the proceeds to a UK bank account (unless you are a so-called "non-dom" claiming the remittance basis, in which case this answer doesn't apply).
You are liable to Capital Gains Tax at the point of sale. However, it's likely that your gain will be minimal given that you've owned it less than 6 months and property prices are not booming at the moment. So the gain may well come under the annual allowance (£12K until April 5th, then £6K for the next year and finally 3K from April 6th 2024). You will need to work out this gain to check if you have any tax to pay.
Separate to any tax issues, note that having owned this property, you will not count as a "first-time buyer" for the purpose of various UK tax schemes, even after selling the property. See for example the stamp duty rules.


What is the best way to deal with very complex forms?

Question: I'm trying to give the best experience to users of a very huge system (like a CRM). It has a lot of forms and much of these have a lot of fields. My doubt is about if I should use a single column form (which raises too much vertical scrolling), or a two columns form (which needs less vertical scrolling and uses more horizontal white space) and a last one with four columns (which has few scrolling and uses almost whole white space to try to keep most of the fields above the fold).
It's important to say that our clients hate scrolling, and they always ask why we don't use the horizontal white space when we present a one column form).
So I'm little bit confused about it, because a lot of UX studies and good practices recommend to do not use/avoid multicolumn forms but the clients most of times ask multi column forms.
Our clients are very used to desktop programs and not everybody is very familiar with web based systems.
Below follows some possibilities I would like to share to illustrate an example of a complex form in the system with the three possibilities I mentioned:

In the example above I'm using the one column form (most recommended in UX studies), but with a very long vertical scroll.

In the second example I tried to reduce vertical space by using two columns.

This is the client's favorite one, 4 columns using white space and trying to keep everything above the fold.

The lengths of fields are based on the average of characters amount for each field.

I would like to know your opinion about the best approach to this case.
Comment: If your client is not the actual person sitting there filling in the forms, then I think they should try with your mock up. As completing a form is a task, the easier it is to complete it the more successful your design is. Looking at it is not enough, the physical act of filling it in -- see @ColinSharpe answer is required. Avoid a design that increases the average handling time of the user.
Comment: Can you show them mock ups ? This may help them visualise things they hadn't considered ?
Comment: Have you considered labels to the left? Right aligned? That would let you keep one column with a lot less vertical space (roughly half the vertical space)
Comment: have you considered the mice they are using? Are they stuck on some awful legacy hardware where the mice don't have scrollwheels? Are they using touch pads? Are the scrollbars set in from the screen edge violating Fitts Law (http://en.wikipedia.org/wiki/Fitts's_law)? In all mentioned cases scrolling can be a real headache! Give them a well designed, keyboard accessible form and mice with scrollwheels and the scroll may be less of a problem
Comment: I would keep in mind that although one column forms have many advantages, these may count for nothing if the users hate scrolling. What is the point of efficiency and ease of use when the users hate it anyway because another factor overwhelms those advantages? Food for thought.
Comment: 4 columns is a lot to put on some screens. Unless all your users are in house running desktop PC's with large screens I would not even consider 4 columns.
Comment: Does your client fill all the available fields every time? I guess not. I would vouch for simplifying and breaking down this huge form into several subforms. You could then present a very basic form with all the *essential* fields, and add some kind of control which they can use to invoke the extra fields. I say your client will complain first ("You dumbed down my super-cool CRM!"), but will thank you later.
Comment: Thank you for your opinion and I agree with them because I personally prefer one column form, to me it's much better to "scan". But even with all studies and good explanations about why it's better to use one column form, users keep demanding multiple columns like the example with 4 columns I presented. if users ask it and say it is good to them, should I hear them even knowing it's not good to them? Tks
Comment: Most of inputs are mandatory ones, and to me a weird thing is they don't like scrolling, I use to ask why and they say they loose time scrolling up/down the page looking for some information when there is horizontal space available and it could avoid vertical scrolling if it was used too... this is the main allegation unfortunately they don't understand too much about the advantages of horizontal white space I suppose, but I will try to make a usability test with some clients using wireframes to try to show them the difference...
Comment: I was trying to keep it with top label about the studies and recommendations but it might be a possibility to try to avoid multicolumn I will create a wireframe trying this too...
Comment: The term "single column form" refers to forms having the labels on top of the input fields.
You will be much better off with a "two column layout": labels before the inputs, in the same line.
The single col layout has many problems for forms other than a login. Firstly, the forms end up being too tall, albeit with a lot on empty unused space to the right.
Secondly, labels are displayed in small forms, which is an issue for users 45~50+ years old.
Comment: @ColinSharpe I don't know exactly what is the hardware used for all staff, it's more than 10000 users... it's a very large team so I'm trying to deal with a lot of conditions but always thinking about the users with bad devices (mouses, screens etc).
Comment: @JuanLanus I agree with your arguments... thinking about it I'm trying to get other solution besides "one column" I'm finishing some new studies to try to make an usability test.
Comment: @Marcos: I'd like very much to see the outcome of your studies, even if they are in a language other then English.
Comment: There is another suggestion I recalled after my prior comments: in long forms it is very handy for the user to highlight the "current field", the one that has the focus.
Browsers now apply an "outline" automatically, which can be configured.
I also like to slightly change the background color.
This helps the user to get back th where he was working after having looked somewhere else, his papers usually.
Comment: Your forms are not complex, what they are is DENSE.
Comment: You can view a related question [here](https://ux.stackexchange.com/questions/101931/how-to-improve-usability-of-a-form-with-lots-of-fields)
Answer: I strongly advise AGAINST multiple columns, because this breaks the eye flow and work flow. However, grouping multiple inputs in the same line by logic, can be a usability+++, and will save you a lot of space.
Here I made a quick example of what I mean:

In addition, you can:

Reduce the number of input fields to a minimum (hide optional fields in an expandable box below the form, or move them to an additional panel on the side)
Group some logically connected inputs by group box or title (won't save space, but makes navigation easier)
Completely hide input fields you would otherwise disable
Place labels on the left (they are better on top for smaller forms, but if you have large forms, they can be better on the left)
Use pop-ups (where simple dropdown is not enough), or even better, create your own dropdown container component.

How to fit large form to screen width, without using colums
One useful method I've used on one of my projects some time ago is using 2 panels, which auto-align vertically on smaller screens, and align horizontally on wider screens.

If you are in doubt about whether some of your ideas will be a usability+ or usability-, let an external UI designer review your real-content mockup.
Comment: This is a very good example. I don't know the term for it but 'by logic' works well. This is a pattern heavily utilized by Apple in their online forms, BTW.
Comment: I really liked your wireframe... I will test my with left align label too...
Comment: @Alph.Dev great mockup... thanks for sharing... I will create some new mockups based in yours to show to the users...
Answer: I think there are some other ways of dealing with scrolling and modelling complex forms that will yield better results than just trying to squash all the fields onto one screen. Ways that will lessen the obviousness of scrolling, or remove it altogether as well as making white-space more manageable and less obvious.
I would advise considering the following strategies (as well as strongly advising that single columns are best):
multiple pages - complex forms can be split over multiple pages with continue buttons and intelligent data saving. A step count will help with navigation and with showing the user where they are at in the process. Takes some of the cognitive weight off a large form.
complexity - analyse the forms use, ensure that commonly used inputs are more prominent and that the form can react to certain selections by exposing / activating other parts of the form.
tab index - keep a close eye on your tab index, the order of the fields as they are selected by actions like tab. Ensure all elements are accessible with the tab key and the form responds to focus intelligently. Tab index allows the form to be filled in with just the keyboard when done correctly. (http://ui-patterns.com/blog/Input-contexts-switching-from-mouse-to-keyboard). Tabbing from field to field will help users to ignore the scrolling as it will just happen - they won't have to keep reaching for the mouse (I would hypothesise that this makes up for quite a bit of their scrolling fatigue).
defaults - provide good defaults constructed from user observation and let advanced users set their own defaults. Allow pre-population from existing records with duplicate / copy functions. Avoid as much actually filling in as possible.
scrolling - don't feel harangued into avoiding scrolling if it is necessary to present complex inputs. Good tab ordering and complexity management (as covered in the first three points) will help with this. (You may also find someone has a bee in their bonnet about 'above the fold').
feedback - use white-space for feedback on the field entries. This should help cope with unwieldy white space on a single column form also provide users with quick verification for field entry data. Complex and usual fields might also benefit from advise. This will help balance the page with useful information.
undo - give users an undo function to roll back changes.
There is a lot of evidence involving studies of eye tracking and forms to support the assertion that single column forms are the easiest to fill in:
EDIT ...
Due to the presented research and contributions from experienced members I'm editing this to say that right aligned labels to the left of the fields is also a valid, usable way of marking up a form, with the added advantage of supporting the OPs specific use case. See links in the comments for more info. Thanks @Rasha and @DA01
... END EDIT
Here is a good link that goes into more detail:
https://www.cxpartners.co.uk/our-thinking/web_forms_design_guidelines_an_eyetracking_study/
Comment: I would also add to this immediate field validation. Nothing like clicking submit and having your data rejected then having to hunt for the right field in a large form.
Comment: @ColinSharpe here are just a few. Matteo Penzo has a famous paper about this http://www.uxmatters.com/mt/archives/2006/07/label-placement-in-forms.php  .  Another interesting article by Janet M. Six which debates the pros and cons of each of the three placements of labels. http://www.uxmatters.com/mt/archives/2010/01/label-alignment-in-long-forms-paper-prototyping-for-engineers.php#labelAlignment .  There are many good articles on this if you search the web. But I'm only listing a few. Matteo Penzo's is one that is referenced a lot.
Comment: Great advice in this answer. For the last point, although labels-on-top approach is probably the best, using right-aligned labels next to their fields will help balance the page more and have less scrolling. Right-aligned labels have been studied and they perform as well as labels-on-top.  Avoid Left-aligned labels.
Comment: Very good points, the only problems is about a limitation to use multiple pages/wizards forms, the framework we are using to develop this system does not support wizards, so I'm trying to deal the best way I can with all this huge data quantity.
Comment: Interesting @rasha, can you link to said studies ?
Comment: @Rasha thanks for that. I've long been an advocate for right-aligned labels. Seems a lot of people are against them initially. Nice to have some data!
Comment: @Marcos: "The framework does not support wizards" and "we can't do multipage forms" are independent facts.
A few years ago I worked in a project involving 200+ fields forms, and after splitting them in pages the forms became usable.
Comment: I'll add to the list the capability to automatically save partial results, like for example in the user's local storage.
With lengthy forms it happens that a user could experiment a loss of her work due to the session end.
It is convenient to ensure that the session is renewed at each user interaction, not only upon submit. You can use AJAX for this purpose.
Comment: Also, give the input fields sizes proportional to the size of the expected data.
In addition to being a helpful hint, this breaks monotony and helps the to get back to the right point a user who turned her sight out of the screen usually to get a value from a paper.
If a designer comes out with an all-same-size-inputs design don't kill him, but give him an warning he can't refuse   :-)
Answer: User testing should give more objective results. Anyway, my suggestion to complex form is to provide visual indicator of current field, see image.
It allows:

to have more concentration on a current field and
to return to work faster after interruption or break.

The same approach you could see in Excel, which is edge case of complex form, as each cell is an input field.
Comment: @Mo'ath thanks for comment, my piece of advice is about highlighting only. When one deals with complex layout (i.e. multi-column), you need to provide some kind of navigational help, like "you are here". Concerning four-column layout, it's not my choice, rather customer's requirement.
Comment: Very interesting, I never paid attention in this highlight of field in Excel but it really helps and it's the same concept you showed in your wireframe... in your opinion this highlight would reduce the "harms" of using a for column form?
Comment: @MarcosRocha I think the biggest problem in a complex form is in losing orientation which leads to breaking task flow. Highlighting should solve this problem.
Comment: this is a very good suggestion ! I wish I'd put it on my list
Comment: @AlexeyKolchenko I am a little confused by your answer. I get the point of highlighting the field (great point), but I am confused by your screenshot that shows a four-column design. Are you suggesting using four-column design? Or you are just providing an advise to utilize highlighting?
Comment: @AlexeyKolchenko Thanks for clarifying.
Answer: Based purely on what you have and visually re-arranging things, I'd suggest going from labels-on-top:

download bmml source – Wireframes created with Balsamiq Mockups
To labels-on-left:

download bmml source
While wider, it's about half the height, so would drastically reduce scrolling.
Alternatively, how about a wizard or tab-style layout? Can the form be logically grouped into 2 or 3 'screens' instead of one long one?
Comment: Surely a right aligned label will dramatically reduce vertical scroll in the screen... and it will help to balance white space too... I will try a new wireframe using this to show to some clients too... Unfortunately the framework which system has been developed does not support using wizard forms, but other solution would be group this forms in tabs, it will have a similar effect, no?
Comment: @MarcosRocha yep, I think that'd be the same end result. The goal is to really reduce the form into smaller chunks so it's not overwhelming as one large form. Just be sure to add a 'next' button at the bottom of each tab so it's easy for a keyboard user to quickly get to the next tab and continue typing without resorting to the mouse.
Comment: I think the proposed layout is much batter then the labels-on-top one. But in the mockups I see an issue, which is that all fields are the same size.
IMO input boxes of the appropriate size for each input give the user a valuable clue, and also contribute to not getting lost in the uniformity. When the user takes the sight out of the screen, for example to check data that is on paper, getting back to an all-the-same-size-fields form is very error prone.
Answer: The context of the form and the intent of the user are very important qualifications to the approach...
Categories for Design by Use and Motivation of User
1. Transactional Forms - the intent is to engage the user. You want permission to ask them the next question, and the best form of engagement is a click. Start with the simplest possible question at the start or base of the decision tree. Do not start with Contact information, unless you have a relationship. Ask a question that indicates the VALUE to the customer. If you are selling hamburgers ask: what's your favorite hamburger?  Then you can ask for contact info, to deliver it. Even if you have a long form, get buy-in first if you dont't have a relationship with the user.

Next, you can expand the scope of your questions, but I would recommend doing this gradually. Do not overwhelm. Use common sense on the layout of the form. First rule: Be consistent. Same field sizes, locations and graphical styles.  Very good idea to consider and test WHEN you can ask for contact info. If this is required to deliver value - it is easier to ask for contact info sooner.

Give visibibility to the process to manage expectations and maintain strong trust.

2. Complex Data Gathering Forms
I found the most complex form I know of.. it is for insurance coverage for a client with multiple houses, vehicles, drivers and other valuable assets:
NOTES:
a. Recommend telling people how long it is expected to take.
b. Break the form up into sections visually
c. Allow people to scroll if their answers could possbily be subject to adjustment as they go along. Otherwise probably better as pages.
d. Give the user the ability to save as they go
e. Automatically save data regularly (they should be registered by now)
f. Leave optional windows closed, but visible - they open when clicked
g. Where possible, create dynamic form fields based on the information architecture and order the questions. This may require multiple pages depending on the backend systems you are using.
h. Make it possible to TAB through the fields, and hit return to select check boxes (programming the checkbox can be done with JavaScript).
USEAGE: Nobody is going to WANT to fill a form like this out. They will need to be motivated. In this case, they get the coverage they need, and even then, we found the agent often had to walk them through the process on the phone.
MULTIPAGE OPTION: make the number of pages visible from the start and save at each subsection.
I hope this is helpful. The form below is not perfect. Would have like to use sliderbars and dynamic content - but it is at least robust.
Comment: I appreciate the strong trust comment above. I often encounter motivated users or testers that don't want to engage with a form driven process because they don't trust that their input will be collected or saved correctly
Comment: I would update this to say, the game is moving forwards.... Interactivity and animations are making data collection much more engaging..   See this form, http://peachylife.com/financial-future.html
Answer: There are few questions that need to be answered:

Is this CRM system strictly for your client's employees only?
If so, are they dedicated to using this CRM most of their day?
Do these users have uniform screen size?
What kind of forms are these?  Do they fill out most of the fields (vs less than half)?
How often do users fill out new form from scratch, vs simply viewing them?
Do these form pages have separate "View-only / browse" mode?

When designing internal applications with captive audience, different set of UX rules apply than if you were designing consumer-centric applications.  Depending on the answers, there are benefits to cramming fields above the fold.
Comment: Answering your questions:

1. Yes, strictly for our client's employees only.
2. Yes, they will use this every day all day long.
3. Yes, most of them have uniform screen size.
4. Most of fields are mandatory ones.
5. They will fill out new form as much as they will only consult previous recorded information.
6. The "view-only/browser" solution will be the same adopted to the form (the same quantity/disposition of columns) the only difference is the data will not be inside an input field it will be showed as a text label to improve the readability of them

What are your considerations to it? tks
Answer: I think you should look at @Jung Lee's answer.
In my opinionn UX should apply differently on different contexts, also, there's a barrier with the clients that we always forget. It's said that the client is always right, so if your client is stubborn enough, you should agree with what they want (trying to convince them first) in the end they are paying for a product.
In your case I would tell them the advantages of 1 column layout, backing it up with a bit of actual studios and/or data.
Also you have a HUGE advantage there, you have the actual final users at your reach, not some "similar target demographic testers". The definetively most effective way would be to let the employees to complete the forms (or a similar setups) for X times, and keep the record of the time used up, along with their feedback, and then decide.
Answer: Since this is a web-based client-server data-entry form, it has at least 3 major use-cases:

new record
update record
view record

Your question and most of the answers focus only on #1. Even if this is for a group that only enters new records, it's almost guaranteed it will eventually be used for views and updates as well and that's where the scrolling really becomes a big issue.
Single column with scrolling is worse case for data entry
Single column with scrolling only works for casual data-entry (most web forms for registering users, etc.) and viewing. Even then, a scrollwheel is mandatory.
Single-column is bad for adding new records since the source documents (which could be other online or on-screen forms) never have fields in the same order as your form. As the user moves sequentially through the source document fields, they must constantly scroll up and down looking for the corresponding form field. The more fields off-screen, the more scrolling, and the easier it is to get lost and miss entering a field -- very bad. Finding the desired form field when updating data is even slower and more frustrating.
Multi-column/Multi-tab with No Scrolling best for data entry/update
Data-entry of a field (case #1 and #2) goes something like...

Identify source document field
If possible, select and copy the field
Find corresponding form field
If possible, paste selected data into field. If not, type it in.

The time required for step #3 often dwarfs the other three steps combined.
If all form fields are on one screen, the user's eyes can scan both horizontally and vertically (two dimensions) to rapidly locate the correct one. Accuracy and speed are enhanced if related fields appear on same line. If there is a common grouping and order the user is familiar with (like the postal name and address format), using it will further improve productivity.
If there are too many fields for one screen and there is a logical grouping the user is familiar with that can be identified by a short title, then tabs (could instead be a single level menu if tabs are not well supported) bearing those titles is the next best approach.
It's all about optimizing for what the user expects. On identifying a source field, they should be able to immediately find where it goes on the destination form.
Hands off the mouse...
Data-entry is most productive when users never take their hands off the keyboard. If you want the data-entry users to love you (or at least think twice about forming a linch mob), be sure that the tab order is set logically (in the West, left-to-right, top-to-bottom) and there are easy shortcut keys for all actions, particularly navigation actions like switching tabs and submitting the record. A listing of those shortcuts should also be a single keystroke away.
RESOURCES

answer by Chris Lively to "Developing websites for data entry"
A number of relevant articles on UIE.com including this one
Comment: Very interesting comment and I agree with you because these forms will be used not just to new records, but to update and view data recorded too... and other important information, to view data we have created a 4 column screen and the values are showed with a simple label, not inside an input (with borders, shadows etc), it's clean and it has a better readability... if a four columns just to view data looks fine to the users (we knew this about their opinion) I was wondering about a four columns form too... Do your opinion is tested or based by any study or test? Thank you
Comment: I've added a couple of resources to the answer. These have some good info on what you're doing but I've been unable to locate an easily accessible study or test directly covering this. My advice comes from 30+ years writing software including designing several data-entry systems for large organizations with "assertive" data entry personnel.
Answer: if you need to show forms having multiple rows you should consider a free open source table presentation framework such as http://Datatables.net or http://flexigrid.info/ to achieve best presentation.  Don't bother with them if you only have single user/single item tables, but if you have tables for management listing several rows each for a different customer or other multi-row table layout needs, they'll give you tons of UI goodness for little effort. Notice that some of them support out of the box "card view" which is a way of showing a single line of data that might be too wide as a stacked series of input boxes.  In an ideal presentation you can use the same layout on both the management presentation of multiple customers as you use for customer data entry and thereby reduce the cognitive load associated with showing the same data in multiple formats.
Answer: Personally I like multi-page or 'step' systems. It breaks up a long process into seemingly more managable chunks and you can also easily show how far through the process the user is.
I have also had instances where a form hasn't submitted correctly meaning I have to fill it all out again. If this were to happen it would be better if it were only 1/5 of the form rather than the entirety.
Comment: I also like it but this a very complex system using a pre existing framework as base that unfortunately does not support use of wizards :/
Comment: there's no way that a form should be left in a state where it all needs to be filled in again, not with local storage available
Answer: While my thread is closed, I alluded to some of the issues that this thread discusses.
https://ux.stackexchange.com/questions/39760/multi-column-form-design-is-there-a-consensus
Comment: Hi, this page doesn't existe anymore :(
Answer:
You can use placeholder instead of showing label. It saves the height.
4Column fields are bad idea. If you are thinking to save the height, user may get frustrate to see/fill the form.
As per your first one, your form has too much right white space. To avoid this you can center the form. User will be attention to the center.
You can split in 2 or 3 pages depends on you fields like steps process.
We should take care designs especially for forms. Those are not easy at all. We have to take user smoothly till the end of the form. For that we have to work with colors, font sizes, dividers, some interactions,...
You can check the examples:Yahoo registration, ebay registration,
You can show ads/suggestions/features of you product or website to right side or left side of the form.. Ref:Google Registration.
Answer: I really enjoyed all the good advice and scenarios described here. I was also using the cited eye-tracking studies as a point of reference for many years. But I have to say that I am not really happy that we are still using 2009 papers (and not really replicated officially) as a guideline.
So many things have changed since then. Internet a different thing, users' expectation, and experiences changed a lot.
What's more - the research was done on very simple forms.
I would love to see some more recent studies.
Another thing - wizards etc. Again - good advice, but is it always? I think that in many contexts, it is of great value for users to be able to see the whole forms at once - in a single view, although with scrolling.
Comment: Welcome to UX.stackexchange. Unfortunately your post did not answer the question. It was more of a comment than anything else. Bear in mind that the question was originally asked in 2013.  Your post will be deleted as off-topic if it doesn't attempt to answer the OP's question.


Can I control which nuke will be launched?

Question: Assuming I have multiple nukes ready at different ghost academies, when I launch a nuke, which one will be used? There are times when I want to choose the nuke to use, for example during a base race where I'd like to use the ghost academy that will be killed first.
Comment: Maybe you could make a suggestion for Blizzard to change that. Still this is only significant if the silos are in 2 different locations (e.g. main base and 4th base). But I doubt they will fix it, because there are so few scenarios that will profit from this. You need to be in a base race scenario and have multiple nukes in different places. Thats like 1 out of 1000 games, and that is even a generous estimation. :)
Answer: No, there is no way to choose your nuke. They are launched in sequence. Meaning the nuke you build first gets shoot first.
This means you can choose the order before you build them, but you cannot change it afterwards.
Source: I opened a game, build 2 silos and tried everything to change the order. There just is no UI to change the order. I even tried to select 1 Ghost and 1 Silo while launching, still no effect.
Comment: Cancelling a launched nuke won't put it back in the silo. It won't land either, so I guess it just floats around space for all time.
Comment: Did you check if maybe the distances matters, i.e. closest nuke gets launched first?
Comment: Yeah it does not matter. Another bonus I found during this is that you can cancel the nuke with ESC as long as you see the red dot.
Comment: That is correct but you can use it to gain a better position. If your opponent has sieged you can use a nuke to force him unsieging his tanks. Either he stays and dies from the nuke or he unsieges, you cancel the nuke and stim into his tanks. I knew it is possible to cancel nukes, but not up to which point. Well now I know :)


Pulling files off of Time Machine Back Up After Full Reinstall

Question: I have a MacBookPro, purchased October 2012.  I use Time Machine to back up files.  I was having slow computing issues, so the Genius Bar folks recommended a wipe out and reinstall from scratch, but we decided not to back up the entire disk off of Time Machine for fear that it would only put back onto my computer that which made it run slowly.  I did full reinstall, reuploaded all software, a bunch of files I kept on an additional external drive, and now need to go retrieve a few files (not a full restore) from the Time Machine back up.  I see the purple tag mark for the precise date before I took the computer in, but the machine will not let me click on it to "reveal" that date's back up.
Any ideas how I can get back to those files?
Thanks
Answer: I would try Back-In-Time.
Yes it cost $30 but there is a demo and the couple of times I have needed to dig stubborn files out of a Time Machine backup it worked.


Lightning protection for TV Antenna

Question: I live in an area with frequent lightning strikes. Occasionally people get killed due to those - specially when strikes enter house through TV antenna cables. My house is quite tall and seems to be the tallest building in this area. I have one lightning protector installed already. I wish to install some TV and satellite antennas on the roof of the house but very worried about possibility of lightning strikes entering the house through these cables. I am currently thinking about passing each cable through a two pole isolator switch which would allow me to switch off the isolator when lightning occur. Does this sound like a good option? Or are there better options available?
Comment: Please understand that a powerful lightning bolt, especially positive charged ones that come from the top of the clouds, have so much power that a direct hit can blow apart thick oak trees. Blow holes in roofs. Hospitals use many lightning rods of plated copper with heavy gauge wire between each rod and many runs to many ground rods. But of course here in Florida it is built into their construction budget.
Comment: Can you show a block diagram with dimensions of your present lightning protect and surrounds such as treetops?  Is this in Florida or Tornado Alley?  There are better options to protect.  The best I know is a blunt paladium tip with a 30 degree cone over the roof to Sat TV type coax centre conductor to deep earth with hot zinc steel  deep enough to moist earth < 100 Ohms year round. For a long roof multiple rods. WIth open space a taller flag pole with same conductors.
Comment: some lightning strikes without a warning .... you may not be able to flip the switch in time or you may get injured while flipping the switch ......  google `cable tv lightning arrestor`
Comment: https://en.wikipedia.org/wiki/File:Statue_auf_dem_Bayerischen_Landtag_3427.JPG  30 deg cone
Comment: https://en.wikipedia.org/wiki/Lightning_rod
Comment: Protection is performed in stages. I think four, altogether. I'd recommend contacting an engineer at the electrical power company in your area, to start. Also, if there still is one, contact the copper line phone company, as well. Both will have extensive experience. There is a lot that can be done before the entry point into the home, and still more at that entry point. And at least one more stage once past the entry to the home itself. Get some experienced local advice.
Answer: Make sure the antenna pole is grounded. Disconnect the antenna plug during thunderstorms, and all should be fine. You cannot of course prevent damage from a direct hit. I would also recommend physically unplugging (not just switching off) expensive electronics, both from power line and telephone line (e.g. DSL modems). Lightning arcs will easily jump over at least two switched off mains switches (in series).
Most lightning surge protection systems exist to suppress surges when lightnings strike some distance away (many hundred meters away). If there is a direct strike on your building, it will probably end up with a hole in the roof and a broken water tank. This is what building lightning arrestors protect against. A grounded antenna pole might do this job.

Lightning protection for TV Antenna


Invasion of southern France

Question: Why didn't the Allies place all their energy into a major invasion of southern France in place of the Normandy operation? German defenses apparently were much lighter there, as evidenced by the relatively easy time the Allies had when they came ashore a month or so after D-Day. I have an idea, but am curious as to what others think.
Comment: Difficulty of getting ships & forces from Britain around the Iberian peninsula, especially without being observed?  Also the southern defenses might have been lighter after D-Day precisely because forces had been moved north to deal with the invasion there?
Comment: "I have an idea, but am curious as to what others think." - why be coy?
Comment: @jamesqf Except the allies did invade Italy, which had exactly those issues.
Comment: @Steven Burnap: But the invasion of the Italian mainland came after Mussolini was deposed, and the new government was making peace overtures. The Allies thought it would be an easy victory.
Answer: Any chance of surprise would totally be lost as the German's had spies in Spain and Gibraltar who would have noticed the thousands of ships sailing through the straits.  Deception was a major component of the Normandy landings, and there would have been no chance for deception sending the ships from Britain to S. France.
Also the Allies would not have been able to put as many troops on the ground.  The main bases in Britain held the million troops that were on the beach in Normandy by the end of July.  Take Sicily as a counter example, we were only able to get around 150,000 troops there in the same time. This was approximately the same amount of troops that later landed in S. France.  This was the operational limit in that theature. There was just not the infrastructure required to increase this limit. The supplies, the bases, and most importantly the ships weren't in the Mediterranean and any movement of that amount of material to the staging zones would have most definitely been noticed by German spies.
Also consider air power,  it was much easier for the Allies to cover landings right next to our bases in the UK.  It would have been much more difficult if the landings were in S. France.
also as jamesqf pointed out, the exact reasons the defenses were light were because they were being pulled up to N. France to deal with Overlord. Specifically the 2nd SS Das Reich and the 1st SS Leibstandarte Adolf Hitler were pulled from S. France to Normandy.
sources: troop numbers from Wikipedia (so take from it what you will)
sources for troop movements:
http://www.iwm.org.uk/history/the-german-response-to-d-day
Comment: Another factor might be that it could have been much easier for the Germans to do air attacks on large convoys making the several-day journey through Gibraltar.  Also if you're just crossing the channel, you can send your ships back for another load of troops & supplies in a few hours, vs a week or more round-trip for the south.
Comment: Agreed, they just did not have the ability to get the necessary number of troops on the ground in South France, as they did in Normandy, in the short amount of time required.  As you said those ships weren't just a one time drop-off, they unloaded troops, supplies, etc.. then returned and repeated..  Additionally there were no large deep water ports near the South of France that the Allies controlled large enough to stage the material, troops, and supplied for a million man invasion.  Also there was no way to build the Mulberry docks in the Mediterranean which provided crucial Allied resupply.
Comment: @ed.hank Mulberries were unnecessary as there was the large ports of Toulon and Marseille right there.
Comment: @Schwern I could be wrong in my thinking, because you bring up a very good point.  but dont you think the Nazis would have been able to sabotage the port facilities so bad that it still would have taken weeks (more likely months) to bring the ports back to operating levels?  remember they also would have known this invasion was coming days ahead of time.  what are your thoughts on that? if you still think the Allies could use those ports I will remove that part from my answer.
Comment: @ed.hank They did sabotage the ports, but these are VERY large ports and complete sabotage is difficult. Toulon has been the home of the French Navy since the Napoleonic days, and Marseille was the largest French commercial port. In addition, the Allies made efforts to assure the important channels were not blocked with ships by sinking the blockships first. Toulon was taken in days. Marseilles took two weeks and two weeks later was handling shipping. OTOH the Allies didn't think they would be captured for 40 days, so there is something to be said for your argument.
Comment: @ed.hank As for surprise, the Allies were already supplying a large army in Italy and troops movements for Dragoon could be covered by that. The troops and supplies for Dragoon came from Italy (US VI Corps), Corsica (US 7th Army Group HQ), and North Africa. OTOH Dragoon would leave the invasion hundreds of km further away from their objectives (Ruhr Valley and Berlin) and having to fight through tougher terrain with a worse road network. The [North German Plain](https://en.wikipedia.org/wiki/North_German_Plain) is much better offensive terrain, and the traditional German invasion route.
Comment: @Schwern - ah yes, i didnt even think of the terrain,  very true!!
Comment: Thanks for the responses. Very interesting. I also used to wonder why the Allies didn't just bulk up their forces in Italy and push northward toward the main part of the continent and on to Germany. That way another amphibious invasion wouldn't have been necessary. But after studying about the Italian campaign, I have come to realize that the peninsula was probably just "too defensible" due to the terrain.
Comment: @NatDog: Well, the Alps might have had something to do with that decision :-)

Invasion of southern France


Are questions allowed to be too technical?

Question: I've noticed a lot of questions lately where someone is complaining about a very specific technical process or concern related to programming.  Shouldn't these details be edited out?  These usually get derailed into a technical debate.  I realize that most of us here are programmers or generally in IT.  But if someone from outside of an IT related field posted such details in their question, they would undoubtedly be edited out.
Comment: "Are questions allowed to be too technical?" - seem pretty clear that lots of technical details are permitted. It would be  better if most of those details were left off, so as to make the question more generally applicable. But apparently there is no requirement to do so.
Answer: Technical details, like any others, should be limited to what is required to lay the foundation of the question.
If the answer would be a technical answer, not a workplace one, it does not belong here.
Answer: There have been a few questions here in Workplace Meta covering a similar concept - the idea that this forum skews heavily towards IT related professions, to the extent that content focused on IT concepts is allowed but the rare content focused on other subjects gets voted as off topic.
I don't think there's necessarily value in editing out details, but I do think there's still a need to deal with the bias.
If a question is purely technical in nature and has no workplace content, it should be moved to the appropriate technical SE site. If a question has workplace content, but it's expressed as technical problems, it's useful to take actions such as:

Comment on or edit the question pointing out that the real root "problem" has a workplace nature and not a technical nature. This can help others responding get in the right mindset
Answer the question yourself, and explicitly point out the generic workplace problems, and address them, without using technical language.
Comment on, or downvote, answers that focus purely on the technical aspects and explain the technical bias.

For instance, if a question asks something like, "how can I get my boss to adopt platform X, instead of Y, which we currently use?" you can answer focusing on getting your boss to respond to your ideas for improvement, and not even mention X or Y.


Is it safe to microwave Pyrex containers immediately after removing them from the freezer and removing the plastic lid?

Question: I am attempting to bulk prep some frozen convenience food and have determined that a standard Pyrex glass container would be ideal for freezing (non-liquid) meals (think burritos or tacos), but I want to ensure it is safe to induce a huge temperature swing, or if there is a better way to do this.
Comment: It depends where you are. In Europe, Pyrex is a material, and probably able to handle temperature swings. In North America, it is a brand name rather than a material, and (aside from labware) not the same substance as in Europe. Not sure about in the rest of the world.
Comment: Pyrex is a special borosilicate glass that is specially made to handle large temperature extremes.  You'll be fine.
Comment: jbarker : extremes but not shocks.  Taking a dish and pouring boiling water in it will cause it to shatter.  (so note : when making jello, there's a reason they tell you to heat up half the water, then add cold water ... I learned that lesson when I was in my teens)
Answer: It not huge, it's just the difference from freezer to room temperature you are worrying about
E.g. -20°C to 20°C, is A 40°C shift. The shift was going to be 20°C to 100+°C anyway. There is no physical reasons why this would be anymore stressful
From room temperature you are raising it 80°C, from frozen you are raising it 120°C. Not a problem in the normal temperature range for glass
The freezing temperature of water (most common item in food) has no relation to the freezing temperature of glass etc
Pyrex and other glasses can be damaged if one part of them is instantly heated or cooled by a 100°C or so
Answer: Pyrex used to be made with BoroSilicate glass.
Now some Pyrex is made with SodaLime glass, which isn't so tolerant of rapid  temperature changes.
So you need to follow the instructions for the dishes you have.
If in doubt don't heat Pyrex straight from the freezer.  Rather eg transfer contents to another such dish already at room temperature for heating  (if you can't wait for it to defrost naturally).
http://www.consumerreports.org/cro/magazine-archive/2011/january/home-garden/glass-cookware/glass-cookware/index.htm
Comment: Yep, and sadly the american manufacturer is unapologetic and saying it is equivalent given correct usage, and is oblivious to the fact that correct usage is not what the customer is buying it for.


Read-only error when trying to boot from almost any Linux distro

Question: After updating Ubuntu Gnome 16.04 to Ubuntu 17.10, I started running into some problems. There were the semi-expected ones (like malfunction GUI features) that came with the merge of Ubuntu and Ubuntu Gnome, as well as the unexpected ones.
And the biggest one that I cannot seem to solve is why I can no longer boot from almost any Linux distro, which is a problem since I need to reinstall it for school.
I have tried many OSs and versions: Ubuntu 12.04, 16.04, and 17.10.1
Elementary OS
Fedora 27
And Puppy Linux. Which is interesting, because that one worked.
None of the Ubuntu based distros gave any error messages, but when I tried Fedora, it thankfully gave me some output - the first I have gotten:
<code>3.616156] Couldn't get size: 0x800000000000000e
4.048773] Dracut-pre-udev[416]: rpc.idmapd: conf_reinit open ("(null)", )0_RDONLY) failed
4.049176] Dracut-pre-udev[416]: rpc.idmapd: conf_reinit open ("(null)", )0_RDONLY) failed
</code>
So it looks like something is read only, but I can't seem to figure out what. And the weird thing is that it is making my dual booted Windows 10 install misbehave as well. Strange bugs - the likes of which I rarely ever see, like failure to sign in.
There is one more bit of information that will hopefully be helpful. This is a new, Lenovo laptop, and with the big deal with Ubuntu 17.10 corrupting BIOS chips on many Lenovo computers, it has certainly crossed my mind that that could be the culprit, but I can still read and write to my BIOS (I updated it to the latest version and saved settings such as the time), and I can still boot some things from USB, like Puppy Linux as well as a Windows 10 iso.
Note that the Windows 10 boot has problems since it for some reason cannot detect any drive.
Upon running diskpart in Windows, it reports that everything on the SSD is fine and dandy, although I almost suspect that something is wrong here.
If any of you have any ideas or suggestions, they would be more than slightly appreciated :)
Comment: Ubuntu 17.10 didn't corrupt anything. It did a normal operation to the NOR flash which caused the BIOS to reset itself due to a bug in the BIOS. The error messages you posted are probably not directly related to the issue. Can I see more of your boot logs?
Comment: Unfortunately that's all the logs that I was able to glean from the system. They've been pretty few and far between.
Answer: The kernel usually places the filesystem in read mode when it is damaged and/or it has inconsistencies.
Given your description of this happening with several Linuces, your disk is most probably dying, get a new one.


Blue screen when attempting to reinstall Mavericks using USB

Question: I recently formatted my MacBook and used another MacBook Pro to create a bootable USB. Now, when I try to reinstall Mavericks on my Mac using the bootable USB, I get a blue screen in the process.
Comment: Hi, did you check your drive and the USB
Comment: @Buscar Could you expand on how you intend the user to do this? — Sheriff, could you explain in more detail at what point in the process the blue screen shows?
Comment: Is your MacBook supported by Mavericks?
Answer: The first step is to make sure your MacBook is supported by Mavericks. Check this page here to make sure.
UPDATE
OK, having checked that it is supported by Mavericks but that it does not install from the USB, you have a few options. None of them is particularly straightforward, but here goes:

Burn a DVD and boot from that. This is probably going to have the same results as the USB drive, but it takes any USB-related issues out of the equation.
Boot into Internet Recovery mode (hold CMD+R, power on and keep CMD+R pressed until it starts to boot in recovery mode). Select the option to install the OS from there.
If both Macs have Firewire, put the MacBook into Target mode, connect the two machines, and run the installer on the MacBook Pro, specifying the MacBook's hard disk as the target for the installer. This will install OK, as long as the MacBook Pro is also supported by Mavericks.
Take the hard disk out of the MacBook and put it into the MacBook Pro. Install Mavericks on the MacBook Pro, then swap the hard disk back again. Once more - the MacBook Pro must be supported by Mavericks for this to work.

Good luck!
Comment: what would be the second step if it does support Mavericks?
Comment: @Buscar There is no second step? If this is the cause of the blue screen then the cause has been discovered and the problem solved.
Comment: So your answer is bit misleading "The first step is"?


Hide GUI'd applications

Question: Is it possible to completely hide the GUI of a program that cant run silently. I have manged to get my bat files to process hidden using the solution from the link below, but some of the batches call on GUI'd programs. I dont mind third party solutions as long as they also run from cmd as I am basing my project around it.
Run a batch file in a completely hidden way
Comment: What problem are you trying to solve exactly?  There are ways to hide an application but it requires the source code to the application
Comment: I am trying to put together a AV scanning solution for my company using various scanners like Roguekiller, JunkWare Removal, MAlwarebytes, etc. Some of them already have command line switches for silent runs.
Comment: Here is an example of a program I cant get to run silently: http://www.bleepingcomputer.com/download/adwcleaner/. It has switches but none for silent runs
Answer: You can do something close with Autoit
The only criteria is that you must know the title of the window that you want to hide.
For example, if I wanted to open up a new notepad instance and then hide it, I could do so with this:
<code>ShellExecute("notepad.exe") ;start notepad
WinWait("Untitled - Notepad", "") ;pause execution until window loads
WinSetState("Untitled - Notepad", "", @SW_HIDE) ;hide window
</code>
Autoit can also manipulate the controls on the window to take specific actions (eg, press buttons)
You'll still see it pop up briefly, though - so it won't be truly silent.
Comment: Excellent. This seems like it will do the trick. Changed SW_SHOW to SW_HIDE. Will see how far I can take this with my batch files and related programs. The "convert to exe" feature will be golden for portability and remote deployment. Thank you
Comment: right, it was supposed to be hide, I copied that line from after I brought my window back and forgot to change it - editing the answer to correctly reflect that.

Hide GUI'd applications


How to vectorize `__call__` method

Question: I am following, quant-econ tutorial. I am trying the exercise where I am supposed to implement a Empirical Cumulative Probability Funcion using vectorized numpy methods.
Here is the correct solution to problem:
class ecdf:

    def __init__(self, observations):
        self.observations = np.asarray(observations)

    def __call__(self, x):
        return np.mean(self.observations <= x)

    def plot(self, a=None, b=None):

        # === choose reasonable interval if [a, b] not specified === #
        if not a:
            a = self.observations.min() - self.observations.std()
        if not b:
            b = self.observations.max() + self.observations.std()

        # === generate plot === #
        x_vals = np.linspace(a, b, num=100)
        f = np.vectorize(self.__call__)
        plt.plot(x_vals, f(x_vals))
        plt.show()

But I am trying to do it this way:
class ecdf(object):

    def __init__(self, observations):
        self.observations = np.asarray(observations)
        self.__call__ = np.vectorize(self.__call__)

    def __call__(self, x):
        return np.mean(self.observations <= x)

So that, __call__ method is vectorized and instance can be called with an array and it returns an array of cumulative probabilities for that array. However, when I try it like this:
p = ecdf(uniform(0,1,500))
p([0.2, 0.3])

I am getting this error:
Traceback (most recent call last):

  File "<ipython-input-34-6a77f18aa54e>", line 1, in <module>
    p([0.2, 0.3])

  File "D:/Users/y_arabaci-ug/Desktop/quant-econ/programs/numpy_exercises.py", line 50, in __call__
    return np.mean(self.observations <= x)

ValueError: operands could not be broadcast together with shapes (500) (2)

My question is, how come author could vectorize self.__call__ and it works, while my method gives an error?
Comment: I don't know if your solution can work somehow, but I wouldn't let `__init__` (on the object side) modify the definition of the function it obtained from its own class (on the type side). IMHO, this should be done through a metaclass.
Answer: You can't do that way, because __call__ must be an attribute of the class ecdf, not the instance. Here is my solution:
class ecdf(object):

    def __init__(self, observations):
        self.observations = np.asarray(observations)
        self._v_calc = np.vectorize(self._calc)

    def _calc(self, x):
        return np.mean(self.observations <= x)

    def __call__(self, x):
        return self._v_calc(x)

How to vectorize `__call__` method


80's movie with a boy on skates or bmx bikes that has holographic ants that torture people

Question: I once saw an 80's movie with a boy on skates or bmx bikes that has holographic ants that torture people. It was post apocalyptic if I recall.
Comment: @PaulD.Waite - When he said "BMX bikes in the future", I felt that "it's from the 1980's" was pretty unecessary
Comment: The first half of your question was not promising in terms of details that would help to narrow down what movie this was. Then you came in with the holographic ants, and I felt like we had a pretty good chance there.
Answer: You mean Solarbabies (AKA Solarfighters) from 1986. You can see the "holographic ants" scene in the film below:

It has also this sequence with torturing an alien ball with titan nitride drilling....
Comment: If you think that's good, check out the latest edit.
Comment: @Richard Whoa, fast finding....
Comment: @Richard Now only HD, 3D & 7.1 surround is missing. Oh man, I must have seen this movie earlier despite being campy and cheesy as hell. Thanks for improving, by the way.


Forge-flattening

Question: Is there an easy way to estimate how much energy is needed to forge a cube of iron into a thin square sheet with a hammer? I suppose i should integrate the force $$F = \text{yield_strength} \times \text{area(h)}$$ through the height, $h_0 = \text{height of the initial cube}$, $h_1$ -- resulting sheet's thickness. Am I right? Also, where to look for compressive yield strength of iron at high temperatures? I've read its better to forge it at $1000-1100 °\text{C}$
Comment: I'm sure the vast majority of the energy is dissipated as vibration.
Comment: I doubt the energy is ever calculated in the real world. The shop determines from experience  how much force is needed  for the material, area , temperature, the extent of upset  and the desired number of blows.
Comment: blacksmith37 from your experience, how much time do you think would it take to flattern a 2 kg billet into a 1.5 mm sheet of low carbon steel? is there maybe a book or article on productivity of hand forging?
Answer: Your suggestion is reasonable as an estimate for pressing the metal; hammering would require significantly more energy (see below). The volume $V=Ah$ of metal is constant so as its thickness $h$ decreases its area $A$ increases. A graph of the temperature dependence of Yield Strength for several metals is given in Engineering ToolBox.
At room temperature the Yield Strength is about $p=50MPa$. The work required to compress a cube of side $h_0$ to a plate of thickness $h_1$ is $ph_0^3 \ln{\frac{h_0}{h_1}}$. For $h_0=100mm$ and $h_1=1mm$ this work is approx. $230kJ$.
An upper bound is the energy required to heat the metal to its melting point then change it from solid to liquid. Gravity would then re-shape the metal without further input of energy. For $h_1^3=0.001m^3$ of iron ($\approx 0.8kg$) this is about $375kJ$ when starting from $1100^{\circ}C$ and $760kJ$ when starting from room temperature $25^{\circ}C$. This is the same order of magnitude as the Yield Strength calculation.
For a lower bound estimate you could calculate the energy of the bonds which need to be broken in order to increase the surface area of the metal between its initial and final shapes. Bond energy for iron is about $120 kJ/mol$.
Hammering also dissipates energy through heating with a much smaller amount lost as sound. Whether this non-useful energy is significant depends on whether the hammer blows exceed the yield strength of $50MPa$ and by how much. The proportion of energy dissipated as sound increases as the surface area of the metal plate increases but remains small. Vibration energy is eventually lost mostly through heating of dense metal rather than radiation of sound in air.
For an interesting discussion of hammering see Can hammer blows increase workpiece temperature? which states that $90-95 \text{%}$ of the impact energy goes into raising temperature. It concludes that  manual hammering does not cause any significant rise in temperature because the metal anvil quickly conducts away the heat generated. But power hammering can cause a significant increase in appropriate circumstances.
Comment: OK. At 900C the yield strength is approx 10% that at room temp. so only 23kJ required. If only 10% of the impact energy is doing useful work when hammering (90% goes into heating, which is conducted away) then 230kJ input is still required, which is 575 blows at 400J per blow.
Comment: Kevin Peffers has written other articles, eg [Blacksmithing : It's all about energy and power](http://www.academia.edu/519751/) and [Heat Energy : on the move and fast](http://www.academia.edu/519765/).
Comment: 230 kJ is quite small, about 100 strikes of a sledgehammer or 2 minutes of work. Is it really that easy?
Or maybe the most of the applied energy is lost? (goes to the temperature, 90-95%?)
Comment: 230kJ assumes pressing rather than hammering. As the article explains, with a metal anvil most of the heat generated by hammering would be conducted away, and as the piece gets thinner and the contact area increases the rate of heat flow increases. If the workpiece were insulated about 375/0.9=420kJ would be required. I think your figure of 100 strikes assumes a hammer of about 25kg which is a power hammer - wikipedia article quotes 9kg as the practical limit for manual work, and even at that weight I doubt any blacksmith would sustain a rate of about 1 strike/second for 100 seconds.
Comment: i have corrected for high temperature forging (divided by 10 = 23 kJ), and afaik the striker does not only rise a hammer above his head to create potential energy but also pulls it down when it falls, adding to its speed. a man can provide about 400 watts of work for a short time (about a hour), e.g. every second rising a 10 kg hammer to the height of 2 meters (200J) and pulling it down with additional force of 100N, for the total of ~200N -> 400J blow..

Forge-flattening


Ubuntu Minimal Install

Question: Every attempt I've made to install via the Minimal Install has resulted in a full blown Unity Install, whereas I simply want the Base System, the Repositories, and i3WM installed (of course flash and such would be lovely but that can always be installed through the restricted-extras package) and then basically configure my system from there (install my own File Manager, music player blah blah blah) Is there something im doing wrong when using the Mini iso or is it simply built that way?
Answer: Try this:

Start with a mini ISO on a CD or USB stick.
Start the installation.
Choose the default language.
Select the keyboard settings.
Select the geographical configuration.
Wait for the system to configure the network.
Write the name of the host.
Choose the installation mirror for Ubuntu packages.

If you use a proxy server, enter it's details. Otherwise, leave it blank and continue.

Installation of basic packages starts. It will occasionally stop to ask you some details.
After downloading the required packages start partitioning.

I suggest choosing manual and manually create partitions as needed.

When finished partitioning, the system will ask you to confirm the changes made on the computer, including formatting and editing the partitions.
The system will start the download and installation of packages; including the kernel, required for the system to function.
After downloading and installing, configure user accounts, writing full name, username and password.
After analyzing the reply, it will ask if you want to enable automatic updates.

Now comes the most important, the selection of programs:
Do not select anything other than the server!
Then, it will proceed to download and install the files, and then download and install Grub, set the time zone, and warn you when you are ready to restart.
Restarting from the hard drive, it will start in a terminal.
There you can install programs to your needs via apt-get.
Example of installation with minimal Xfce desktop:
sudo su
apt-get update
apt-get install software-properties-common
apt-get dist-upgrade
apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils x11-apps x11-session-utils x11-utils xinput xorg lightdm lightdm-gtk-greeter oxygen-icon-theme qupzilla flashplugin-installer gstreamer0.10-ffmpeg libcurl3 libnotify4 libtag1-vanilla dkms gvfs gvfs-backends policykit-1 udisks2 synaptic xfce4 xfce4-goodies thunar thunar-volman

dpkg --configure -a
apt-get autoremove
apt-get clean
reboot

Comment: For future readers, all you need is `xorg`, that's it. Then just install `i3` or any other WM, and run `startx` (which can be added to `.bashrc`, if you want it on every login; make sure to limit it to `/dev/tty1` or something like that).
Comment: I'm going to have to try installing via CD as opposed to USB tonight. When installing GRUB, it was trying to install to /dev/sda which was the USB stick. I've used LILO in the past so I tried to install LILO as opposed to GRUB and when I booted the system up, I got the dreaded flashing Caps Lock light.

Ubuntu Minimal Install


UICollectionView Xamarin.iOS, Custom cell with button

Question: I have read many tutorial out there for UICollectionView for both iOS and Xamarin.iOS
Everybody has shown same sample tutorial with one image inside UICollectionViewCell
Desired output
UICollectionViewCell with custom design

What I have done
This is what I have achieved so far.. please ignore the bad design :P

Problem
When I Click on Book button, it triggers the event multiple times. The weird thing is that its not consistent, sometimes it will trigger only once some time twice or some time three times or whatever...
Code Snippet
List<MeetingRoom> data = new List<MeetingRoom>();

async public override void ViewDidLoad()
{
    base.ViewDidLoad();

    data = await DashboardServices.getMeetingRooms(DateTime.Now);
    MeetingRoomCollection.WeakDataSource = this;
}

public nint GetItemsCount(UICollectionView collectionView, nint section)
{
    var count = data.Count;
    return count;
}

public UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
{
    var cell = (MeetingRoomCell)collectionView.DequeueReusableCell("cell", indexPath);

    cell.RoomName.Text = data[indexPath.Row].Room_Name;
    cell.Status.Text = data[indexPath.Row].Availability;
    cell.BookButton.Tag = indexPath.Row;
    cell.BookButton.TouchUpInside += Cell_BookButton_TouchUpInside;

    return cell;
}

void Cell_BookButton_TouchUpInside(object sender, EventArgs e)
{
    var x = sender as UIButton;

    Debug.WriteLine("index : {0}, status : {1}", (int)x.Tag, data[(int)x.Tag].Availability);
    this.PerformSegue("segue_bookRoom", this);
}

Please suggest what needs to be done to fix this issue, any reference to available tutorial would be appreciated. It will be great if Xamarin.iOS hint is there..
Comment: Try to unsubscribe from the event first then subscribe to prevent multiple triggers.
`cell.BookButton.TouchUpInside -= Cell_BookButton_TouchUpInside;cell.BookButton.TouchUpInside += Cell_BookButton_TouchUpInside;`

Tell me if it works for yout to post as answer, I don't have Mac Right now to test it.
Comment: Thanks, this seems to work.. :)
Answer: One possible way to solve this issue is to unsubscribe from event before subscribing it, this way it will prevent multiple calls especially if this item is recycled in list.
cell.BookButton.TouchUpInside -= Cell_BookButton_TouchUpInside;
cell.BookButton.TouchUpInside += Cell_BookButton_TouchUpInside;