How do I install Draftsight CAD?

Question: I've installed the 11.04 64bit version and now i can't install Draftsight (32bit with force architecture option) because there is an error with the library libexpat1..
anyone know how solve?
andrea@andrea-HP-Pavilion-dv5-Notebook-PC:~$ sudo dpkg --force-architecture -i DraftSight.deb
[sudo] password for andrea:
dpkg: warning: the following problems are ignored via the --force option:
 the architecture of the package (i386) does not match system (amd64)
dpkg: problems with pre-dependencies DraftSight.deb containing dassault-systemes-draftsight:i386:
 dassault-systemes-draftsight:i386 depends on libexpat1 (>= 2.0.1-4)
dpkg: errore processing DraftSight.deb (--install):
 dependency problem - dassault-systemes-draftsight:i386 not installed
There were errors in processing:
 DraftSight.deb
andrea@andrea-HP-Pavilion-dv5-Notebook-PC:~$

Editor's note: the error messages have been translated and don't match the real ones exactly.
Comment: In ubuntu 12.04, consider modifying the control file of the deb package to remove dependence problem.
The systems seems to keep track of the problem and de-installing the application, next time synaptic/dpkg is recalled. more info at
http://linuxaideddesign.blogspot.it/2012/03/draftsight-and-ubuntu-1204-lts-64bit.html
Answer: From: OMG Ubuntu
Free AutoCAD clone 'DraftSight' hits Linux Beta
Download a pre-packaged .deb file for Ubuntu 9.10+ at the following link: download (66.8MB)
64bit Ubuntu users note: The DraftSight beta .deb provided is 32bit. To get DraftSight to run in Ubuntu 64bit  will need to install the following missing library:
 sudo apt-get install libdirectfb-extra libxcb-render-util0

After this, install the .deb via a Terminal using the 'force architecture' command. Assuming you downloaded it to your Downloads folder:
sudo dpkg --force-architecture -i ~/Downloads/draftSight.deb

You probably did not install the missing library.
Comment: I had to install libcamberra0 to get it to run on 13.10.
Answer: After you install all dependencies mentioned above (that is libdirectfb-extra, libxcb-render-util0, libaudio2) you should install Draftsight using the following command:
sudo dpkg -i --force-architecture,depends ./DraftSight.deb
Obviously you should run this command while inside the folder where you have saved Draftsight.deb.
Worked on Ubuntu 11.04 x64
Answer: On 64bit Kubuntu 12.04 there is a libgtk-x11 error.
/var/lib/dpkg/tmp.ci/ShowLicence: error while loading shared libraries: libgtk-x11-2.0.so.0: c

Solve with this:
sudo apt-get install libgtk2.0-0:i386

Answer: I'm transcribing what I found in this UbuntuForums post by player107. The procedure is the following:

Unpack the DraftSight file in some directory (ex: DS).

Copy the contents of DS/opt/ and DS/var/ to /opt and /var/opt.

Go to DS/DEBIAN.

Run:
sudo ./preinst
sudo ./postinst

A menu should have been created in the graphical Ubuntu menu: you can launch it.

It is also mentioned that a problem with the screen may arise, but it didn't occur to my case. To avoid this, if you encounter this problem, run the following commands:
sudo apt-get install libdirectfb-extra
sudo apt-get install libxcb-render-util0

Answer: Installing on Ubuntu 11.10 64 bit can by skipping the dpkg-installer:
http://linuxaideddesign.blogspot.com/2011/10/draftsight-and-ubuntu-1110-64bit.html
Answer: I found that it is possibly to run this software by running it as a root (sudo) but still not functional trough normal launcher.
Ubuntu 11.04
start command is:
sudo /opt/dassault-systemes/draftsight/bin/DraftSight

or you don't have even to do that
just extract .deb file and run it as a root and it will work.
There is only a problem to run it as normal user
Answer: I have succeeded in to install draftSight in Ubuntu 12.04 (beta2) 64 bit.
I just have installed the required libraries and then extracted the .deb file content.
I copied the extracted folder to /usr/local/ and then just change the owner:
sudo chown -R  user:group draftSight/

After that i just have created a launcher in the desktop..
Cheers....
Answer: I have tried forcing the architecture to install DraftSight, even after installing the packages mentioned in the previous posts, but I always get this error:
dpkg: warning: overriding problem because --force enabled:
 package architecture (i386) does not match system (amd64)
dpkg: regarding DraftSight.deb containing dassault-systemes-draftsight:i386, pre-dependency problem:
 dassault-systemes-draftsight:i386 pre-depends on libexpat1 (>= 2.0.1-4)
  libexpat1:i386 is unpacked, but has never been configured.
dpkg: error processing DraftSight.deb (--install):
 pre-dependency problem - not installing dassault-systemes-draftsight:i386
Errors were encountered while processing:
 DraftSight.deb

I have tried installing this libexpat library through getlibs but nothing seems to let DraftSight install correctly.
Consequently, I tried the method copying the files manually (suggested by Juan José Alca Machaca), and DraftSight appears in the menu and I can run it, but it crashes when I do common operations, or run commands like DimensionStyle
Answer: I had the same problem but solved finally. Here is the solution:

Install the two missing dependencies:
sudo apt-get install libxcb-render-util0
sudo apt-get install libdirectfb-extra

Move your DraftSight.deb file to your home folder /home/yourusernamehere.
Then you have to force install the DraftSight package:
sudo dpkg -i --force-architecture DraftSight.deb

It is working for me.
Answer: Above solutions does not worked in fresh install of natty narwhale 11.04 64 bit.
System crashed after attempts: dpkg with force & make deb file for all architectures & trying alien rpm to deb & (re)installation and configuration libraries for i386 (supposed it destroyed system).
 I rescue system with reinstallation and configuration libraries for amd64 & update and upgrade system. Ubuntu 11.04 Natty and DraftSight works.
You can try install libc6 for i386 (simultaneously to already installed libc6 for amd64) from synaptic. I guess it helps in my case.
Answer: On Ubuntu 11.10 64 bit there is still a dependency problem:
dassault-systemes-draftsight:i386 wymaga wstępnie libdirectfb-extra (>= 1.2.7-2)

BUT it works if you
extract DraftSight.deb and then run:
./DraftSight/opt/dassault-systemes/draftsight/bin/DraftSight

Answer: Don't forget to right click 'DraftSight.deb' then choose 'Properties'. Select the 'Permissions' tab, and click ' Allow Executing File as Program'. Then run:
sudo dpkg -i --force-architecture,depends ./DraftSight.deb

Answer: I finally got it to work under Ubuntu 11.04 64 bit.
First follow detailed instruction (one of above since pretty much any method will work).
Don't forget to put all dependencies
Believe me or not after I installed it I had to delete configuration files in home directory which are starting with "." or move them to some folder if you have wine app or something like that.
For people which doesn't like this idea, to delete configuration files, try to create another user account and run it from there.
After that I found out that enabled **buttons have icons application will crach when i try for example to click on Open.**
and that's it for now. When I get more knowlegde i will post
Answer: "I found that it is possibly to run this software by running it as a root (sudo) but still not functional trough normal launcher. Ubuntu 11.04 start command is:"
Jorge Castro: I faced the same problem after installing DraftSight. I solved it by running DEBIAN/preinst script 'as normal user', it then asks for administrator password, then the licence agreement gui shows up(accept it). Keep doing it until it says "access control disabled, clients can connect from any host" in the terminal, run postinst script after that.
You may want to delete any '.draftsight' dir in your home directory PRIOR to running the scripts in DEBIAN folder.
Comment: You may want to delete any '.draftsight' dir in your home directory PRIOR to running the scripts in DEBIAN folder.
Answer: Solved!
Source: http://steamcommunity.com/app/221410/discussions/0/846940248727134912/
Solution:

sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install ia32-libs

You'll have to download files while updating. about 200MB, depends on your situation.
I'm using ubuntu 12.10.
Answer: This is for 14.04:
To install DraftSight on 14.04 (64 bits):
Step 1: Install i386 libraries
sudo apt-get install libuuid1:i386 libice6:i386 libsm6:i386 libxt6:i386 libaudio2:i386 libgtk2.0-0:i386 libcanberra-gtk-module:i386 libcanberra-gtk0:i386 libglu1-mesa:i386

Step 2: Download DraftSight Installer :
download .deb from source
Step 3: Install DraftSight CAD
after changed to downloaded folder run
sudo dpkg -i draftSight.deb

How do I install Draftsight CAD?


Remove tabs from within lists of a list

Question: I have 10 lists with four elements each seperated by tabs within a large list.  How do I remove the tabs, have the elements seperated within their respective lists, all within in a large list?
Comment: tabs?  Could you post your code please.
Answer: Courtesy of this question. This may work.
>>> tabbedlist = 'element0\telement1\telement2\telement3'
>>> list = tabbedlist.split('\t')
>>> list
['element0', 'element1', 'element2', 'element3']

This appears to also work for: tabbedlist = 'element0      element1        element2        element3' Where those spaces are actually tabs or at least my terminals rendering of them as spaces. (posting condenses the spaces, sorry)
So for your app:
tenlists = [
    'l0e0\tl0e1\tl0e2',
    'l1e0\tl1e2\tl1e3\tl1e4',
    'l2e0\tl2e2',
    'l3e0\tl3e2\tl3e3\tl3e4\tl3e5',
    'l4e0\tl4e2\tl4e3\tl4e4\tl4e5\tl4e6',
    'l5e0\tl5e2\tl5e3\tl5e4\tl5e5\tl5e6\tl5e7',
]

largelist = []
for list in tenlists:
        largelist.append( list.split('\t') )

print largelist

Answer: To split a single list, use a list comprehension:
[x.split("\t") for x in list_with_tabbed_elements]

Now, you need to do this for each element of your list of lists. You could use another list comprehensions, but personally I don't like nested list comprehensions, so I'd suggest to use map here:
map(lambda l: [x.split('\t') for x in l], list_of_lists)

Answer: It's not clear exactly what your original data looks like from the question as it is, but perhaps this is all that you're looking for?
data = ["alpha\tbravo\tcharlie\tdelta",
        "one\ttwo\tthree\tfour"]

new_data = map(lambda x: x.split("\t"), data)

print new_data

... which produced the output:
[['alpha', 'bravo', 'charlie', 'delta'], ['one', 'two', 'three', 'four']]

Answer: I did not understand the question fully, so I am going to make following assumptions. Please let me know if they are correct.
Your input is of the form :
a = [["test\tinput"], ["test1\tinput1"]] # 10 elements.

Following code will create a list ['test', 'input', 'test1', 'input1']
reduce(lambda x,y: x+y, [x[0].split('\t') for x in a])

Comment: I guess he want to have `[['test', 'input'], ['test1','input1']]` as a result: "have the elements seperated within their respective lists"

Remove tabs from within lists of a list


Server-side SVG to PNG (or some other image format) in python

Question: Currently I'm using rsvg to load the svg (from a string, not from a file) and drawing to cairo. Anyone know a better way? I use PIL elsewhere in my application, but I don't know of a way to do this with PIL.
Comment: PIL doesn't support SVG; a quick surf indicates you probably have the right toolchain.
Comment: I just posted a more recent comment about this over here - http://stackoverflow.com/a/19718153/542550 - a comment below states that "ImageMagick support appears to be terrible", but that commenter didn't build it/test it.  It's now 10/2013, and I just tested using ImageMagick (via Wand-py) to import a wide variety of SVGs and it worked great!  I still have more testing to do and will definitely pull this comment down if I'm horribly mistaken, but at this point it has worked flawlessly on a few SVGs that were known to be buggy using other methods.
Comment: Simple SVGs: https://github.com/aslpavel/svgrasterize.py
Comment: For a simple solution with `CairoSVG` see this answer: https://stackoverflow.com/a/77712749/1725562
Answer: Here's what I currently have:
import cairo
import rsvg

def convert(data, ofile, maxwidth=0, maxheight=0):

    svg = rsvg.Handle(data=data)

    x = width = svg.props.width
    y = height = svg.props.height
    print "actual dims are " + str((width, height))
    print "converting to " + str((maxwidth, maxheight))

    yscale = xscale = 1

    if (maxheight != 0 and width > maxwidth) or (maxheight != 0 and height > maxheight):
        x = maxwidth
        y = float(maxwidth)/float(width) * height
        print "first resize: " + str((x, y))
        if y > maxheight:
            y = maxheight
            x = float(maxheight)/float(height) * width
            print "second resize: " + str((x, y))
        xscale = float(x)/svg.props.width
        yscale = float(y)/svg.props.height

    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, x, y)
    context = cairo.Context(surface)
    context.scale(xscale, yscale)
    svg.render_cairo(context)
    surface.write_to_png(ofile)

Comment: Welcome to Stackoverflow!  The general rule of thumb is if what you are posting is a way to solve the problem then it may be an answer; if it's context or attempts at solving the problem that do not work, or feel to hacked-together to be a good answer then it should go in the question as an edit.  The fact that this code seems to be the 'what you were doing' that you were looking to get comments on, ("Anyone know a better way") rather than a solution to a problem suggests that this should really be in your question.
Comment: There are some errors inside. When create an ImageSurface you need Integer `surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, round(int(x)), round(int(y))` And you should make sure that maxwidth and maxheight is always set to a high number which would be better than 0. I have many SVGs with heights of 32000 which will result in a memory error.
Answer: How about imagemagic? - http://www.imagemagick.org/script/magick-vector-graphics.php It can read/write from/to stdin/stdout so You can integrate it with your app even if You don't want to use files
Comment: ImageMagick `convert` versions older than May 2010 do a horrible job of interpreting SVG. Given the changelog, it doesn't seem like they've yet gotten SVG support working well (although I didn't build it to see).
Answer: I have inkscape installed so I am just farming out the process to the inkscape command with inkscape -f file.svg -e file.png
Using this code:
import subprocess
inkscape_dir=r"C:\Program Files (x86)\Inkscape"
assert os.path.isdir(inkscape_dir)
os.chdir(inkscape_dir)
subprocess.Popen(['inkscape.exe',"-f",fname,"-e",fname_png])

I am on windows 7, and got the Windows 5 Error [Access Denied] (or something like that) until I switched to the inkscape directory
Comment: Consider passing `cwd=inkscape_dir` to `Popen`, rather than changing the directory for the parent process.
Answer: You can also use PhantomJS for this (see http://phantomjs.org/screen-capture.html)
From a shell:
phantomjs rasterize.js http://ariya.github.com/svg/tiger.svg tiger.png

Or from python using selenium:
from selenium import webdriver
driver = webdriver.PhantomJS()
driver.set_window_size(1024, 768)
driver.get('http://ariya.github.com/svg/tiger.svg')
driver.save_screenshot('tiger.png')


Why "Go get dressed" instead of "go dress"?

Question: Considering that 'to dress' is a verb, why is it preferable to say "Go get dressed" as opposed to the simple "Go dress"?
Answer: Dress is one of those words where if there is no object expressed, an reflexive object like myself, yourself, etc. can be understood, like wash, bathe, clean, etc.
So you can tell someone to go dress.
However this usually means to dress for a specific reason, such as a ceremony, function, costume party, etc.
Go get dressed is idiomatic for putting on your normal clothes of the day.
Answer: Dress is a transitive verb, meaning that it takes one or more objects. Go dress doesn't contain any objects, so the sentence is ungrammatical.
Comment: user132181: I disagree. 'Dress' is transitive or intransitive in different sentences. Longman Dictionary of Contemporary English gives 'Aunt Margaret told her to dress herself in her nicest dress', 'I dress the kids before I go to work' (trans), 'I've got to go home to dress', 'I dressed quickly' (intrans).
Comment: Thank you, I'll read about [that](http://en.wikipedia.org/wiki/Transitive_verb). I suppose that one might say "Go dress yourself", then?
Comment: @dotancohen exactly.
Comment: @SydneyAustraliaESLTeacher I completely agree I was wrong. Please, provide the right answer so OP can accept it and I can delete mine (right now I can't because it's accepted).


Best way to replace faces on photos

Question: My company had a team event and we have several group photos (with 10-20 people in them). Some colleagues were not there so now I have a task to take their individual photos and to insert them into the group photos (i.e. to replace some of existing people's faces with those ones). What would be the best way to do it? How to take the individual photos, what should I pay attention to, what's the best way to make light and colors same as in the original photos...?
Comment: No offense, but replacing faces in a photo and also make it look good and realistic, is not an easy job. If you have to ask how to do it, I honestly doubt that you are the right person for the job.
Comment: You need to define "best"; the most time-efficient way is to pay a professional to do it.
Comment: I would echo jarnbjo's comment, but I'd also come at it from a slightly different angle... Who is asking you to do this? I think your employer has assigned a difficult/unreasonable task to you. What's the need for the edited photo? If it really must be done, the task should be given to an experienced person - likely outsourced.
Comment: For me this question is likely to be answered with opinions rather than facts and citations. It should be updated so it will lead to fact-based answers. Maybe you should ask for possible way, not the best way.
Answer: This assumes you have at least basic photography & Photoshop skills, and access to the same or at least ball-park similar quality camera to that the master shot was done on. If we're talking about phone photos, all bets are off.
To get the best start, you want to be in the same location with the same lighting as the original photo. Stand the replacements in the same places as those they're replacing, keep the camera at the same distance & direction as the master shot [set focus by re-framing, if necessary]. Same lens isn't vital, but will save resizing later.
This will give you basic matching for lighting & perspective. Perspective is even more important than lighting. If you can't match light you might be able to airbrush. If you can't match perspective it won't work.
If you can shoot tethered, set up an arrangement whereby you can quickly flip between the master shot & the proposed replacement.
If the background on the master shot was anything other than plain, then add in a plain backdrop for the new shots, to make cutting the subjects easier.
This doesn't mean you have no hill to climb, but it does make the slope shallower.
Comment: Not an easy task, but yes, making photos for the purpose of photoshopping them is infinitely better that trying to shoehorn a random shot.
Comment: @xenoid - yup, I do this type of thing as a bit of a hobby; for essentially family-only consumption, by taking famous or ludicrous scenes, characters or settings & placing myself & my partner into them so we look a part of the story. It's something I'm not great at, but have a decent grasp on how to accomplish these days. …which reminds me… nearly time to do this year's, for the family calendar ;))

Best way to replace faces on photos


Increasing and Decreasing Electric Potentials

Question: If the midpoint between $+q$ and $-q$ has zero electric potential, in which part/region is the electric potential increasing and decreasing?
Comment: What are your ideas about the answer to your question?
Answer: Potential increases in the direction which points opposite to the net electric field.
Take example of a $+ve$  charge. Potential is defined as the work done by external force per unit charge.
$V=\frac{Q}{4\pi\epsilon r}$

So if I bring a +ve unit charge (called test charge) towards the reference $+ve$ charge, I will have to do work against the electric force that the reference charge is applying on the test charge.
Consequently, the value of potential will be higher in the vicinity of the reference charge than at far away points because the work done by us is used up in overcoming the electric repulsions and stored up as potential energy.
So, potential increases in the direction opposite to electric field.
Comment: You should consider adding formula and explain a little more to improve the quality of the answer.


Is the derivations of OLS different if we do not have an intercept?

Question: We have an equation with $\alpha =0$ therefore the simple linear regression is: $$ Y_i=\beta X_i+u_i$$ and the question was. Derive the OLS $\beta $ and provide comments on its variance. In this situation should I have derived the OLS the same way as for a regression with intercept? to obtain $$ \hat\beta =\frac{Cov(XY)}{Var(X)} $$ or is it something different that I should have done?
Comment: What do you mean by "the normal way"?
Comment: I mean the normal derivation of ols for a simple linear  regression which has an intercept
Answer: That is not correct if there is no intercept. Without an intercept the OLS estimate would be:
$$ \beta = \frac{\operatorname{E}[XY]}{\operatorname{E}{[X^2]}}$$
In the case of a finite sample, your estimate would be:
$$ \hat{\beta} = \frac{\sum_{i=1}^n x_i y_i }{\sum_{i=1}^n x_i^2} $$
The general case (skip over this if you don't know matrix algebra yet)
If you know matrix algebra, all these are special cases. Minimizing the sum of squares can be written as:
$$ \text{minimize (over $\mathbf{b}$)  } \quad\left( \mathbf{y} - X \mathbf{b}\right)'\left( \mathbf{y} - X \mathbf{b}\right) $$
Which has the solution:
$$ \hat{\mathbf{b}} = (X'X)^{-1} X'\mathbf{y}$$
The algebra behind that can be found (among numerous places) on my answer here.
Comment: So beta is the same for a regression which has an intercept and for a regression which does not have an intercept, right?
Comment: Sorry I am looking at your equation and it seems like it is the same as the one I wrote in my question: $  \hat\beta = \frac{\sum (x_i - \bar x)(y_i - \bar y)}{\sum (x_i -\bar x)^2 } $
Comment: @Alex They are not the same unless $\bar{x} = 0$ and $\bar{y} = 0$. A regression line without an intercept term is forced to go through the [origin](https://en.wikipedia.org/wiki/Origin_(mathematics)).


Connection was cancelled here, Interrupting long running request

Question: Sometimes an Apex request gets interrupted/terminated by Force.com.  The underlying Apex request contains numerous DML statments (insert into around 13 custom objects) all of which marked at a savepoint. There are no triggers/workflows/formula fields. Also these objects don't have too many fields. There are only few hundreds of records.

What could be possible reasons for DML operation to run long and be interrupted by Force.com?
As these are runtime exception, what is the best possible way to handle/react to these exceptions?
What troubleshooting will help?

Appreciate any suggestion.
Comment: getting this when trying to run a unit test...
Answer: In no particular order...

Are you sure the most time-consuming part is the DMLs? If it's initiated from visualforce and you have a complex page it might take long time to deserialize viewstate, run basic validations (like required fields being filled in) and setters before even your actual action method is called. Use debug logs to compare the request's initial timestamp and the timestamp on first DML operation.
Any SELECT ... FOR UPDATE that might cause the request to wait for a resource?
Any callouts being made before actual DML?
Do you really need the savepoint in this transaction? Can you move some parts (like less important inserts) to @future?
Are there any other signs of problems - are you getting close to queries limit maybe? returned rows? script statements? Multiple inserts in a loop?
Field history tracking, email sending and sharing rules recalculation happen outside the transaction so I don't think it will matter. Formulas have no impact either (they're calculated when you view data). But are there any unique fields or validation rules that SF needs to verify that might take some time (like VLOOKUP() in validation rule?
Maybe it's not your code's fault - use debug logs to check if any of the managed packages you might have is also invoked (they'll have their own triggers, in theory separate set of governor limits, I'm not too sure about the request time though)
Any particular time of day it happens (rush hours?) or for specific user maybe?


Determining straining force and reaction forces on a beam

Question: A homogenous beam $OA$ with the length $4a$ and the mass $m$ can rotate in the vertical plane along a horizontal axis through $O$ and is kept in equilibrium  by a wire running from the points A and C through a castor in B. Determine the straining force $S$ in the wire and the reaction forces from the axis on the beam at the point $O$.

$$\begin{cases} (1) \, |\vec{A}|\sin 60+|\vec{C}|=|\vec{R_y}|+|m\vec{g}| \\ (2) \,|\vec{A}|\cos60 = |\vec{R_x}| \\ (3) \, a|\vec{C}| \cos 30 + \frac{4a}{\sqrt3}|\vec{A}|=|m\vec{g}|a(\sqrt{3}-\frac{\sqrt{3}}{2}) \end{cases}$$
Where $(1)$ is the equation for the forces in the vertical axis, $(2)$ the horizontal and $(3)$ the moment equation to the point $O$. But as you can see, I have 4 variables ($\vec{A}, \vec{C}, \vec{R_x}, \vec{R_y}$) and 3 equations (the $a$ disappears in $(3)$). Is there something I have missed or how can I solve this problem?
Comment: Nice question - thanks for taking the effort to show your reasonning clearly - I will add the homework and exercises tag as it fits into that category, but well done for making it so clear
Comment: @AcuriousMind Well, I'm really asking how I can solve the problem of having 4 variables and 3 equations. I thought I had missed an equation or something. Did not know this qualified as off-topic.
Comment: Although the effort shown is laudable, this question does *not* ask any question except for *"How to solve this problem?"* and is thus off-topic for not asking a conceptual question.
Answer: If the wire used around the pulley is considered ideal and massless, tension in the wire is same at each point and hence vector A and vector C are equal in magnitude. This reduces one variable and you will be left with 3 equations and 3 variables.
Comment: nice answer - conveys well the key point needed to solve the problem without doing the work
Comment: @Edark Yes, you are correct, I miscalculated that distance. I now got the correct answer and I have upvoted and accepted your answer.
Comment: @Edark If you look at the figure, you can easily calculate that the perpendicular distance between $\vec{C}, m\vec{g}, \vec{A}$ and the point $O$ are $$a \frac{\sqrt{3}}{2}, 2a \frac{\sqrt{3}}{2}, a \frac{4}{\sqrt{3}}$$ and if $S$ denotes the tension in the wire then $$S(a \frac{\sqrt{3}}{2}+a \frac{4}{\sqrt{3}}) = mg (2a \frac{\sqrt{3}}{2}) \leftrightarrow S(\frac{\sqrt{3}}{2}+\frac{4}{\sqrt{3}}) = mg \sqrt{3} \leftrightarrow S = mg \frac{\sqrt{3}}{\frac{\sqrt{3}}{2}+\frac{4}{\sqrt{3}}} = 6/11$$ The answer sheet says that $S = \frac{2\sqrt{3}}{4+\sqrt{3}}$. What is wrong?
Comment: Thanks @tom. My answer to another question got deleted for giving out the solution, so I tried not to over here.
Comment: @Lozansky How did you calculate perpendicular distance for A? The perpendicular distance is not $ \frac{4a}{\sqrt3} $. The other distances are correct.                         Note: You can use the definition of torque too.       P.S: The answer for S given by the sheet is correct.
Comment: @Lozansky And if you find my answer helpful, consider accepting it _(and voting on it)_ :)


ANOVA compare observations with prediction

Question: I want to find the model that best fits my observed data. There are 29 observed data points that are normally distributed. My proposed model has 2 categorical variables each with four possible values, total of 16 permutations. I propose using ANOVA and Scheffe contrasts with Dunn/Sidák or Bonferroni correction factors as the follow up test identify the best predictive model.  What are the best statistical tests for this comparison?
Answer: Your best bet, if this study is meant for a peer review process, is to use a model that will preserve your limited degrees of freedom. There is a good chance that your model will suffer from sparsity or be unable  to converge. On another note, I would also be extremely skeptical of an author telling me that their 29 data points were normally distributed.
I would recommend removing one of your variables from the model. That will at least allow you to estimate an effect on ~7 units per group and would address the ability of your model to converge. And you have to ask yourself, anyway. Do you want to make an claim of inference on a model that might have only 1 unit that is being used to make that inference?
If you wish to preserve both variables, I recommend condensing them into binary variables.
BTW, why would you be using a bonferroni?  You are only testing a single model which is "Dependent variable = A + categorical variable1 + categorical variable2 + error". There is no need to adjust p values as you are not resampling from the same dataset.
Your goal, with 29 data points, should be to employ a model that can make inference with a limited number of data points. I could even see using two t tests on either independent variable and then using a correction in that regard. That might be the more sensible approach rather than having both effects in a single model and trying to estimate them at the same time.
To be honest, this is an instance where you should be letting your literature guide you as well on which statistical approach makes the most sense in the context of the corpus.
Comment: Thank you for your insights and I agree 29 data points isn't much to work with. I'm trying to empirically evaluate a relatively simple theory to estimate commercial aircraft leases. One of the difficulties of empirically testing lease pricing is the absence of data. Lessors consider the contracts proprietary and confidential. However, a few of the major lessors are publicly traded and financials are available for their aircraft portfolio. The actual formula is
Comment: The formula is l = (r + v + d) * a. The 29 observations are values for l, d, and a, not enough for regression. Assume that I can reliably estimate r, I want to test various estimates of v for best fit. Lessors may use other values for d in their contracts, therefore, I also want to test alternate values for d. I'm not a stats guy and any suggestions on the best approach are welcome.
Comment: One question I have, do you have multiple years of data? Or does your dataset include all lessors?
Comment: Good question. The data set covers 2013 - 2017. There are 6 companies in each year except for 2014, where I exclude one company because it quadrupled in size and the data looks like an outlier. From 2008  - 2012 there are another 22 observations with at least 4 companies reporting each year. The plan is to back test the model, if possible, against these prior years.
Comment: I don't believe you have enough companies to verify a model. You just do not have the power to perform that analysis. If you are concerned about your approach, you can boot strap, though this is likely to be unhelpful. I cannot stress this enough that you should acknowledge and accept the limitations of your sample size and how that influences the extent of your inference.


Coding Arduino's samples/period and cycles/sample configurations for input signal

Question: Am I able to code the Arduino so that I can change cycles/sample of an input waveform and a number of samples/period configurations? I would like to modify these parameters in order to be able to store a high-frequency sinusoid but taking into account Arduino's 16MHz clock.
For examples, I have a 40,000kHz sine wave. I would like to sample it at 10 samples/period and having 10 cycles/sample. As a result, I need a (40,000kHz * 10samples/period * 10 cycles/sample = 4MHz clock, which Arduino can supply). Compared to a more standard 128 samples/period and 256 cycles/sample, which would require a 1.3GHz clock.
Comment: It means you can't come anywhere near your goal, so adjustability is beside the point.
Comment: No, an Arduino cannot do this.
Comment: @Chris Stratton  So does it mean you always have a fixed sample/period of 128 and cycles/sample of 256?
Answer: The limitation is in the ADC which by default takes 104 µs to make a sample. Now you can speed up the ADC, sacrificing accuracy, but even then you can probably practically only reach a sampling time of 13 µs. Plus you would have the issue of where to put these 400,000 samples in the 2KB of RAM you have.
To sample at 400,000 times a second you would need to sample every 2.5 µs, which you can see is way shorter than 13 µs.
Plus, you not only need space to put these 400,000 samples, but it would take time to store them.
For more information see my page about the ADC which has a lot of details about sampling times, frequencies, accuracy, etc.


OrCAD/Allegro PCB design

Question: I am required to design a PCB in Allegro for this circuit:

The problem is that our teacher believes that we have too much free time so our introduction into Allegro was close to none. I have searched the internet and found some videos and documents regarding my issues but I can't be certain that everything is actually ok! Furthermore I have two problems I couldn't solve at all:

As seen, there is a potentiometer in the design. I found a PCB footprint, downloaded it (it actually had a tutorial video attached and followed it) but I got this error:

I was told that I am required to put two fiducial markers on my PCB but I couldn't find the PCB editor everyone apparently has when using OrCAD!

For more information this is what I came up with:

and these are all the instructions that I have received:

For SMT & PCB technology, the circuit will be made in the form of an electronic module whose interconnect structure (PCB) will comply with the following design requirements:

PCB dimensions: 40mm x 40mm;
Material FR4, double layer/ copper foil thickness 18 μm, plate thickness 1.5 mm;
All components will be placed on the upper side of the plate, TOP;
Passive components SMD chip 0805;
Only bipolar transistors and TEC-MOS can be used in SMD capsules (SOT 23, DPAK). TEC-J transistors can only be used if the need is justified
them.
Test points: circular, maximum 5 – justified by the test plan;
The origin (coordinate point (0,0)) will be placed in the lower-left corner of the printed wiring, so all project elements will have positive coordinates;
Against the edge of the plate, a clearance of 1 mm will be kept; they won't be components placed here, routes, texts, etc.;
The board will be provided with 2 global fiducial markers on the TOP layer, at a distance of 200 mil from the edge of the board, place conveniently; these markers will also exist on the layer Solder Paste Top (overlaid on TOP); will be used at the time of alignment template with the plate. The fiducial mark will be a circle with a minimum diameter of 1mm on the layer respectively, located in a circular space with a minimum diameter twice that of the inner circle, in which there will be nothing on any layer;
Greater attention will be paid to the Inscription Mask (Silk Screen) layer; this must not be found on component pads;
A new non-electric, MECHANICAL layer will be generated. It will contain: the outline of the board, the drilling drawing ("drill drawing") and the drilling table ("drill chart/table", "drill legend"), a cross-section through the designed printed circuit ("layer stack-up") and the mechanical information required for PCB manufacturing; 2 | 5
The gauge dimensions/plate dimensions must not be found on the electrical layer TOP; these, if any, will be placed on a mechanical non-electrical layer;
The plate will be provided with the identification elements of the designer (name, surname, group, PDCE I 2022-2023).

The following widths are given for the interconnecting routes:

Current of 1A - 28 mil;
Current of hundreds of mA - 22 mil;
Signal - 18 mil. The spacing, in all cases, will be 12 mil. The through holes for signals (vias) will have a diameter of 0.4 mm.

Gerber files - standard 274X and Excellon file must contain the following information:

Board outline;
TOP electric layer;
Electric layer BOTTOM;
Non-electric layer Printing mask (Silk Screen Top);
Non-electric layers Protective mask (Solder Mask Top and Bottom);
Non-electric Layer Template (Solder Paste Top);
Aperture list and drilling file.

NOTE! Mandatory design requirements:
a. PCB dimensions: 40mm x 40mm;
b. Material FR4, double layer;
c. The origin (coordinate point (0,0)) will be placed in the lower-left corner of the printed wiring board, so all elements of the project will have coordinates positive;
d. The size of the routes and their spacing in accordance with the mentioned specifications.
Design requirements aim at knowledge, compliance and application of IPC standards from the electronics industry in the realization of the electronic module for Project 1, as it follows:

IPC-2221A, "Generic Standard on Printed Board Design", regarding route routing conductors, conductor spacing, pad sizes for SMD components,
presence of marking and orientation of symbols, provision of test points and provision of bridges thermal (where applicable);

IPC-7527, "Requirements for Solder Paste Printing", for the deposition operation a contact pastes;

IPC-A-610, "Acceptability of Electronic Assemblies", for validating the operations of component placement and actual contact for module acceptability assembled electronics.

I would like at least to understand what I am doing instead of just messing around and hoping I found something close to a solution!
Answer:
The footprint you downloaded was made for a newer version of OrCad than what you are running and is not compatible.
It's generally better to make your own footprints anyway, and I assume that this may be part of the assignment.
Create components which are fiducial markers, then place them in schematic and layout.
Comment: Is there a tutorial or something like that for creating a component as a fiducial marker?
And thank you very much for your answer

OrCAD/Allegro PCB design


Automate a particular state of an iPhone application

Question: Is there any way to store a particular state of an iPhone application. My objective is to make an application independent library which can be integrated into any application and which store the state of the application including events and corresponding time.This can be replayed from a particular section of the application.How can this be acheived? Hoping to get a healthy response.
Comment: I cannot think of any generic way of doing it.. For a single app  you can save the state to NSUserdefaults or something and get the data and  make the UI play using those data.
Comment: Yeah that's possible,but for that we need to track each action and event seperately. I need a way to track these without coding for each action so that the library can act independently.
Answer: i think, It is not an generic way of doing it. because apple IOS SDK is not allow as to access other apps states information. but you may try private framework for it (In this case, App will not approve by apple).
thanks
Comment: Like Private Framework has bluetoothmanager class by which user can able to use bluetooth.
Comment: Thank you for the reply.I found the way of Implementing that. I have posted it above.
Answer: Given that each application is intended to store and access data only within its sandbox (i.e., confined area of the file system), I suggest you look towards an external data source to store your library.
Specifically, could your requirements be met by iCloud storage? Some users may not have an active account, however, so an alternative may be to use a backend-as-a-service (BAAS) offering (e.g., Kinvey, StackMob, Parse)? You could store a user's profile and associated data on the latter. Or you could even roll your own backend as an external data source.
For info about the sandbox approach in iOS, check here: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/TheiOSEnvironment/TheiOSEnvironment.html#//apple_ref/doc/uid/TP40007072-CH9-SW2.
Hope that helps.
Comment: There are applications like FoneMonkey which is doing similar function and is primarily used for Automated Testing. Was hoping to come up with a similar functionality.I believe that's possible.
Answer: After much digging on that part I found the exact solution to my issue in the following link. http://www.cocoawithlove.com/2008/11/automated-user-interface-testing-on.html. Hope that helps somebody out there looking for solution for the same. However applications using the provided solution will be rejected by appstore. It can be used only for your own purposes.


Can I put custom comments when recommend a deletion of an answer?

Question: I had a lot of situations where I need to put  "my own" comment when recommend a deletion of an answer. This is because, I felt none of the available options do not suit to indicate the real problem in the answer.
For an example, recently I came to recommend deletion of an answer that seems like this
<code>I got it now. Google is your friend!
</code>
One of our community member answered his own question like this ! There were no better suit deletion option available when I recommended this answer for deletion.
It would be nice if there was an option to put a custom comment while recommend for deletion.
So my questions are..
Is there any provision to do that ?
If not, why it is not available ?
Answer: Hm, not sure if that what you mean but there's always an "other" item while flagging where you can put your reason.


cam shaft damage noise

Question: My garage has said that my camshaft is badly damaged as the engine is making a tapping and grinding noise. There is no loss of power but the car is 12 years old. I have been told the engine won't take a new camshaft as it is to old, is that true?
Comment: Age means nothing with camshaft replacement. It may be that the costs of repair outweigh the value of the car due to its age, mileage and condition.
Comment: everything is fixable for a price.  They can always replace the whole engine. Shop around and find a mechanic who will at least quote on the job.
Answer: A 12 year old car is not too old to be repairable. Even if the cam or its bearing surfaces had failed, a replacement or second hand cylinder head would likely be available for it. If necessary, this could be tested/reworked and refitted without too much difficulty.
Answer: They are most likely trying to sell you a new engine, you can find decent camshafts in junkers or on eBay.
They need to check if the camshaft damaged the engine head, if damaged occurred, then get a replacement engine head which should include a new camshaft, timing gear(s), and possibly timing belt.
Cost could range from $150 to $500, depending on the type of car you have.
Answer: I call bs on that, does your car have a reusable valve cover gasket? If so, remove the valve cover gasket so we can look at the cams or cam, take a pic of it. If it is flat like a circle without a pointed lobe, then your camshafts are shot.
If they're shot, then you can buy new ones OR pull them at the junkyard.
What car is it btw?
Tapping and grinding usually indicate failed lifters.
Here is a great video on how to check your lifters. If you push on them and they move down OR if they're collapsed before the cam lobe comes in contact with the lifter, they're bad and need to be replaced.
https://www.youtube.com/watch?v=SOqAdvkJPJY
IF they cannot be replaced they CAN be rebuilt. Which is just cleaning them out.
https://www.youtube.com/watch?v=sIyI6zWWbiI

cam shaft damage noise


How common are certain enchantments in the enchantment table?

Question: If I enchanted a sword with a level thirty enchantment what chance would i have to get fire aspect I or II or sharpness V, is it a definite or is it unpredictable?
Comment: If you don't mind you can use a mod to pick the exact enchantment you want. This may refer in your personal logbook as cheating though.
Answer: It is not predictable what enchantments you will get but at certain enchantment levels, you will get some enchantments with a higher probability. This chart shows the probability for diamond tools:

If you want to have a certain enchantment on your item, I would recommend checking out this enchantment calculator: Minecraft Enchantment Calculator or a list of precalculated probabilities
Also, the Minecraft Wiki can give you the algorithm Minecraft uses for calculating enchantments. It is pretty complex and you really don't need to get into it, but it is definitely interesting: How Enchantments Are Chosen
Answer: The minecraft wiki offers a very detailed description of what enchantments you'll be able to get but the short version is:

Do some math to calculate a modified level.
Build a list of the possible enchantments and what levels they are (here it is determined whether you'll get Sharpness IV or V).
Pick an enchantment from the list with a weighted chance. (see this page for a list of weights)
1 Divide the level by half and round it down.
2 Decide to keep going with a chance of ((level + 1)/50) in 1.
3 Remove all conflicting enchantments (no silk touch and fortune on the same thing)
4 Pick a possible enchantment and apply it
5 Go to step 1

With regards to Sharpness and Fire Aspect, Sharpness is pretty likely (about 1 in 3 chance of it being applied the first time), however it conflicts with the other damage enchantments (Smite and Bane of Anthropods) for which you also have about a 1 in 3 change of them getting picked (either one being picked is 1 in 3).
Fire aspect is less likely, it only has a 2 in 29 chance of being applied as the first enchantment.


resignFirstResponder vs. endEditing for Keyboard Dismissal

Question: In Swift, both [someTextField].resignFirstResponder() and self.view.endEditing(true) accomplish the same task - hiding the keyboard from the user's view and de-focusing whatever text field was using it. I understand that the former is specific to a particular field, while the latter encompasses the entire view, but other than wanting to target a specific text field, when is one preferred/recommended over the other?
Comment: i do not know anything about specific cases to use the one or the other. i would say that if you have a reference to the textfield you should use `resignFirstResponder`; otherwise it's totally ok to call `endEditing` on the view. feel free to correct me :)
Comment: It's a really interesting question.  I **cannot see any reason** to ever use `resignFirstResponder.`  I believe they will deprecate `resignFirstResponder.` in the future.  (Regarding the efficiency aspect, you're talking a handful of items, it's irrelevant ... if for some reason you happen to want to, you can call `endEditing` on just that one item.)
Answer: someTextField.resignFirstResponder()
resignFirstResponder() is good to use any time you know exactly which text field is the first responder and you want to resign its first responder status.  This can be slightly more efficient then the alternative, but if you're doing something such as creating a custom control, this can make plenty of sense.  Perhaps you have a text field, and when the "Next" button is pressed, you want to get rid of the keyboard and present a date picker, for example.  Here, I would definitely use resignFirstResponder()
self.view.endEditing(true)
I typically reserve this for scenarios when I just absolutely need to clear the keyboard no matter what is currently going on, for whatever reason.  Perhaps, I've got a slide-over menu?  Just before this slides out, no matter what is going on, the keyboard should go away, so I'll make sure everything resigns its first responder status.  It's important to note that endEditing() will look through the entire hierarchy of subviews and make sure whatever is the first responder resigns its status.  This makes it less efficient then calling resignFirstResponder() if you already have a concrete reference to the first responder, but if not, it's easier than finding that view and having it resign.
Comment: Ahhh, there's what I was wondering, if there was any underlying difference that was not readily apparent.  Thanks for the help!
Comment: Actually, as a follow-up to your answer...in a scenario where the first responder might not be known, is there a function that can find out what object currently has focus, then provide that object's name to `resignFirstResponder()`?  Seems it would be more efficient than the second method, if it's possible.
Comment: If you don't know the object, calling `endEditing` is going to be more efficient then trying to figure out which object is the first responder just to call `resignFirstResponder` on it.
Comment: @nhgrif we can use `resignFirstResponder()` for UIView. what does that mean?
Comment: if I have multiple textFields like: firstName, LastName, Address, etc. and then at the end I have a **`submit`** button, would doing `self.view.endEditing` be a better choice
Comment: Assume you know the first responder and have a reference to it. Which should you call, `resignFirstResponder()` or `endEditing(true)`?
Answer: There is no such strict rule.
You use resignFirstResponder when you have the reference of the text field currently holding first responder status. When you don't have the reference or you are unsure about that, endEditing would do the trick.
One thing however should be noted that endEditing has a boolean parameter that we occasionally set to true. By setting this parameter to true the view, on which endEditing has been called, will force every child text field to resign first responder status irrespective of it has returned a false value from textFieldShouldEndEditing delegate method. On the contrary calling endEditing with false would only ask (not force) the text field to resign, respecting the return value from textFieldShouldEndEditing protocol method.
Comment: Gotcha, that was a method I was not aware of...I'm guessing that would be used in text validation or other error handling?


Error when using UDL file

Question: I got a problem when I using UDL file on a Windows XP pc. It shows error messeage "provider cannot be found. ensure that the provider has been installed properly".
I've search some article online, most of them mentioned that it occured on X64 OS, but my Windows XP is 32bit and patched SP3.
I just try to open the UDL file but it show the error. I'm using this UDL to get external data from a SQL Server database in a xlsx file.
Answer: UDL created on Win 7 can't opened on Win XP, strange thing.

Error when using UDL file


The handicapped VS Disabled!

Question: Would it be offensive to say "The Ormerod School educates handicapped children from South"? Should I use "Disabled children" instead?
Comment: This is not a question about the English language so much as one about style and politics. For instance, you could refer to the [Disability Language Style Guide](https://ncdj.org/style-guide/?utm_content=bufferbf31a&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer#H)'s advice on the word. But no doubt other organizations and guides give different guidance.
Comment: Both of those expressions classify people by their handicaps or disabilities. The preferred expressions nowadays are ones that do not do so, such as _children with disabilities_. See the guide Jason Bassford linked to for more information.
Comment: It's more a "socio-political" distinction than anything to do with English itself. Some people think that ***disabled*** is less "offensive" than ***handicapped*** (as you seem to be aware already), but most people probably either don't know that or they don't care anyway.
Comment: It rather depends on your audience. Person-first is largely preferred in the US, and social model language ("disabled children") in the UK.
Comment: @ColinFine: I didn't know *that* one! The "extended syntax" of the now-preferred version looks similar to how we were told 20-30 years ago that we must say *person of colour* rather than *coloured person*. They both seem like somewhat meaningless arbitrary distinctions to me, so it's no wonder many people *still* can't remember and infallibly follow the new rules. Even [UK politicians,](https://www.spectator.co.uk/2019/03/why-the-oed-says-coloured-is-offensive/) who are usually real experts at careful use of language (because they know mainstream media will be watching them like hawks! :)
Answer: This is a highly complicated matter, heavily dependent on what country you are in, and what attitude you expect the audience to have. However, handicapped is frowned on by the disabled community everywhere in the English-speaking world that I'm aware of. The pitfall is whether you should say "disabled people" (or children) or "persons with disabilities" (or children with disabilities). The first is social model language, and the second person-first language. The former is preferred by organised disability movements in Canada and the United Kingdom, and the latter in the United States, though of course both have their adherents in the countries that prefer the other. The explanation as to why each is preferred by its adherents is, I would say, beyond the scope of this site.

The handicapped VS Disabled!


What is wrong with my question about needing help understanding Deleuzian realism?

Question: Check out this post.  Why is this still on hold after I have modified it to bring it in line with the editors' expectations?
Answer: Reopening does not happen automatically. When you edit a question that has been put on hold, it is placed in a review queue where experienced users can vote to reopen it or leave it closed. So only some time would have been needed. I force-reopened the question now.


Why does high pressure cause clear skies?

Question: In high-pressure areas, air falls, but why does high pressure leads to clear, sunny skies?
Comment: Hi and welcome to Physics Stack Exchange! This link could prove useful: https://www.weatherworksinc.com/high-low-pressure.
Answer: The weblink above gives a good overview.  To clarify though, high and low pressure are terms that are more general than the H and L that you see on a surface weather map.  The H and L that you see on the weather map refer to specific evolved states of air columns, anticyclonic (labelled as H) and cyclonic (labelled as L).  The anticyclonic formation leads to air sinking from high elevation (low pressure) to low elevation (high pressure).  See for example: https://slideplayer.com/slide/8992497/27/images/18/Role+of+Airflow+Aloft+in+Cyclonic+Activity.jpg   I don't own this slide, I am just referencing something I found on google that is correct.
This movement of an air packet from low pressure to high pressure causes it to be compressed by the surrounding air, and the compression is ultimately caused by the transfer of kinetic energy of surrounding air into the air packet, thus raising its temperature above the dew point (condensation temperature), and clouds evaporate. A similar phenomena contributes to the so-called rain shadow (pattern of little rain) on the leeward side of mountains.
Conversely, compressed ground air that is rising due to convection, orographic lift, or at a weather front, especially a cold or warm front, undergoes expansion as it pushes against the lower-pressure higher air.  The random collisions transfer energy to the surrounding air, and the rising air packet cools.  If the air rises fast enough and there is sufficient moisture, the temperature will drop below the dew point (condensation temperature) of water, and a cloud will form.
This is why mountains get so much more precipitation than other areas.  Many people misconceive the origin of snowfall over mountains as being from their height, but there is air at the same height all over the surface of the earth.  The key difference is that the air moving across the continent interacts with mountains the same way a marble encounters a ramp.  The air is pushed up and expands, leading to cooling and cloud formation.  All of this can be demonstrated with the cloud-in-a-bottle experiment.
These patterns are certainly at play in so-called mid-latitude systems.  None of this is to exclude other weather factors at work.


Can I have two prologues

Question: i'm writing a story and i want to write two prologues the first one when the MC was being born and then later on when the MC is around ten years old before starting the main story. can i do that?
Comment: Heh. So there are two sections I skip over to get to Chapter 1?
Comment: Thanks this was all very helpfull information since i am a newbie to this kind of stuff i think my book sounds better now. Thank you all
Comment: @screamer I'm glad the answers here helped you -- always good to hear!  If one of them especially helped you, you can click the checkmark next to it to highlight it (and give its author an additional small reward).  If you're having trouble choosing, it's also fine to not check one -- no pressure intended.
Answer: How would this be different from having chapter one by about their birth, chapter two be about them at 10, and chapter 3 start the main adventure? This is a perfectly normal progression for many novels.
A prolog, generally, is not simply an incident earlier in the career of the MC, it is in a different narrative voice altogether. If it is giving the historical background of the story, for instance, it is written like a history, not dramatized incident.
Prologs tend to be frowned upon, mostly because most of them are done badly and are a symptom of lazy writing. This is not to say that you can't do a prolog well, but any agent or editor seeing a book start with "Prolog" is likely to breath an inward sigh, and who needs to start with one point against them?
Gaps in time between chapters of a novel, on the other hand, are perfectly normal. One might even say they are essential, because most adventures, real or imaginary, involve a certain amount of waiting or transportation that does nothing to advance the plot. It should be skipped, and skipping it create a time gap. Your story has time gaps between birth and 10 and between 10 and adulthood. There is nothing unusual about that.
Answer: I am going to take a stab at this and say probably not.  The whole point is to provide an introduction to the story.  What you seem to want to do is introduction, second introduction, third introduction, main story. There are just too many things stacking on top of each other just to get to the main story.
The character being born is basically the prologue to the main story if you jump to when he is 10 after you are done sharing about what ever happens at birth.  If you need to provide information that is IMPORTANT (key on importance because prologues by nature provide important information about the past that is NEEDED for the story) about his birth before he is born, you can always add it to the same prologue.
After you are done explaining about his birth, you should be able to jump right into "modern time" when he is 10 and start the story.  If you want to explain about things that has happened to him between 0 and 10, do it as flash backs or recollections during key parts of the story while keeping other things a mystery until the right time.
What you want to avoid is providing a history lesson for people to read before the story even starts.  It gets boring and people tend to skip forward if it goes on for too long.  From the sounds of it, you are trying to shove all of your history into the first half of the book without even actually starting the book yet.
I would recommend breaking up the information and only using what is important within the context of the story.  What I mean is if in the prologue, you write that his favorite food is a grilled cheese sandwich, then this grilled cheese sandwich also needs to play a role in the main story in some way.  If it doesn't, it's pointless information to the story that doesn't need to be added.  Do enough in the prologue to explain what is needed around the events of his birth and then get right to the story.  Should any other need arise for bringing up the past or information not yet known, create a flashback or write it into the story.
In the end, you don't want to write 10 chapters just to introduce the main story and already be 100 pages into the book before even writing chapter 1.  It's just too much.  Chop it up and spread it out.  Create 1 prologue that gives the basic needs and then let your narrator fill in the gaps as the story evolves.
Comment: Although, as a counter-point, it has definitely been done and done well. Arthur C. Clarke's 2001: A Space Odyssey (and the accompanying film) is one of the most celebrated works of its genre, despite having what by any standard other than chapter numbering would have to be considered two prologues, which together total fourteen chapters. That said, as a work of its merit is exceptionally rare, and a work of its structure even more so, I have to agree that it's generally inadvisable.
Answer: I would be very cautious with this approach, especially the "birth prologue". In the birth scene, the protagonist isn't taking an active part in events. He or she has no agency, and will not even remember what happened. It contributes nothing to character development.
For example, consider Harry Potter. Important and dramatic events happen when Harry is a baby; but they take place "offstage". The truth of those events is gradually revealed to Harry, and to the reader, as the story progresses. This helps us empathise with Harry and moves the story forward.
Similarly, I would reconsider the scene at age 10. This could work, if it is strongly relevant to the plot. If Joe meets a mysterious stranger at the age of 10, who reappears when he is 25 and instigates an exciting series of events, that might be okay. If it's backstory, intended to explain why Joe learned to play the piano, leave it out or reveal the information through flashbacks and reminiscences.

Can I have two prologues


Publishing Remotely To Wordpress?

Question: Hey i know that there are options to post to a wordpress blog remotely by email or by another source.
My blog is self hosted.
What other ways is there to publish besides via email.
Answer: Built in to the current version of Wordpress there is "Remote Publishing" settings for Atom or XML-RPC, but that is geared towards programs that help you blog outside of your Wordpress control panel. You can configure it in the Settings > Writing area of your site's Wordpress dashboard.
If you want to publish the content of an RSS feed to your Wordpress site, you will need a "re-feeding" plugin such as FeedWordPress: http://feedwordpress.radgeek.com/
Maybe you were thinking of publishing remotely as in a mobile app? Email is still probably the best route, but there are probably blogging apps, and they might need the Atom / XML-RPC setup to work with your site.
Answer: If you are using windows you could of course post to WordPress self hosted using windows live writer which is part of the free windows live essentials suite.
You would need to enable  XML-RPC in settings under writing > remote publishing. For more info see http://en.wordpress.com/windows-live-writer/
Answer: You can publish via mobile phone, I guess you will find different solutions if you google it. I personally use Woothemes, and they have a plugin called WooTumblog and a  Iphone/Android App called Express, and then you can post notes, images, links and quotes directly from your phone. I find this very useful for blogging in the field!
More information here!
Answer: Another interesting way is using the JSON API plugin's create_post function. It uses nonces for authentication.

Publishing Remotely To Wordpress?


Is "surveillance" adequate for observing a patient in a hospital?

Question: Can this word be used to mean observing the patient's condition in a hospital in order to make a diagnosis?
Answer: 'Observation' is my preferred term.  We normally talk of a patient being kept in hospital 'under observation'.
'Surveillance' is not unheard of, but it has a sinister ring about it, and is used in connection with the police and security services, as well as 'CCTV surveillance'! For that reason I would avoid its use in a medical context.
Comment: *Surveillance* is certainly used among those in the medical community; a simple web search for *patient kept under surveillance* turns up thousands of examples in research papers. But I agree that lay persons would not ordinarily use it because it has connotations of criminal investigation out of context. We also speak of patients *being monitored*.
Comment: Yes; English just doesn't behave like we'd want it to. There's nothing sinister connoted by the word 'survey', but 'surveillance' is loaded. Compare 'schematics' and 'scheming'.
Comment: -1 for a wrong answer sorry
Answer: It is a perfectly legitimate word to use. It is extremely common to say that the patient is to be kept under surveillance. The commonest use is in the context of patients with precancerous conditions who are routinely kept under surveillance for signs of malignant change.
Comment: For once, I think I agree with just about every answer / comment here! One has to be careful to use a register that won't needlessly create a wrong impression. I can imagine a doctor telling a worried spouse that their spouse's condition is being carefully monitored, then instructing the nurse on the types of surveillance to be carried out.
Comment: According to my medical connections (who I just asked), surveillance is commonly used in hospitals for patients with acute problems, and especially in areas involving serious mental health concerns. It usually implies a higher level or ongoing observation. I realise this is anecdotal - will try to find a more formal reference.
Comment: [surveillance](http://www.medilexicon.com/medicaldictionary.php?t=87097) - from MediLexicon "a type of observational study that involves continuous monitoring of disease occurrence within a population."
Comment: Do you have a reference for this? I would normally expect _surveillance_ to be used if the patient is a risk to himself or others – suicide watch or legal custody. I could accept that it's a common medical jargon but would want to see a source backing that up.
Comment: surveillance - (http://www.merriam-webster.com/medlineplus/surveillance) - close and continuous observation or testing. It may also refer to long term screening for adverse conditions
Comment: Agreed, it sounds like this is legitimate medical jargon then, although not something you'd ordinarily say to patients and loved ones.


Does a Socket InputStream read() unblock if server times out?

Question: I have a server that times out after 45 seconds if it hasn't received a full request and closes the connection. I connect to this server through a Socket and write my request to the socket's OutputStream.
Socket socket = new Socket("myhost", myPort);
PrintWriter out = new PrintWriter(socket.getOutputStream());
out.write(properRequestMessage);
out.flush();

I'm assuming here that my request is good (follows my protocol). The server is supposed to respond with a file. I try to read from the socket inputstream:
BufferedReader response = new BufferedReader(new InputStreamReader(socket.getInputStream()));

String in;

while((in = response.readLine()) != null) {
    System.out.println(in);
}

The readLine() blocks here and I think it is because my server thinks my request isn't properly terminated and is therefore waiting for more.
Now, if 45 seconds pass and my server times out, will the readLine() unblock or wait for some Socket default timeout time?
Comment: how did you configure the timeout on the server and what does it do upon timeout?
Answer: That depends on what the server does when it times out.  If it closes the connection you will see that.  If it just logs a message, you might not see anything.
There is no default read timeout. Your readLine() can wait forever.
Comment: My server closes the connection. What do you mean I will see that? The `readLine()` will unblock with `in == null` and break out of the loop?
Comment: That is what the documentation says happens when the end of stream is reached. ;)
Answer: If the server closes its end of the socket on that timeout, then readLine() will return null.
Answer: The readLine() method will block until it receives an input or until the underlying socket read() timeout ends.
You don't set the timeout on the read command but rather on the socket it self.
Socket.setSoTimeout(int ms).

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.

What actually occurs also depends on what the server does, if it closes the socket correctly a IOException should be thrown by readLine(). If the connection isn't close it will wait for the socket to timeout.


Is it important to publish my article in a journal indexed on Thomson ISI?

Question: If a journal is not indexed this way, is it an academically honorable one?
Comment: Related: http://academia.stackexchange.com/q/101/102
Comment: according to my experience publishing an article depends on which purpose you want to publish that paper and of course ISI journals have more value than other ones.
Comment: Of course a non-ISI listed journal _can_ be an academically honorable one. Remember that ISI is just a service that indexes journal contents and it is employed to give journal a ranking number (oversimplifying). Your choice depends on several factors. First of all, which field are you in? Which country?
Comment: @dgraziotin Tourism Management. And I am from Iran but of course I am going to publish my work in English.
Answer: If we momentarily disregard from discussions regarding the cons of ISI and Thomson-Reuters who run the service etc. and focus on the usefulness of ISI indexed journals for ones career, the answer is yes, it is important at least to some extent. The importance is in part depending on your discipline since ISI indexing is not evenly distributed over disciplines. But generally speaking the ISI listing means the journal publishes papers that are referenced, which is an indication that it is research of some quality and importance.
This does not mean non-ISI-listed journals are not "honourable". But, when choosing a journal in which to publish, you need to make sure it is read by other in your field so that your research is seen and your ideas known by others. You should make a survey of journals that are of reference and if you find ISI-listed journals there is a reason to consider them if your papers fulfill their quality criteria because they will be  seen as prestigeous references when you are evaluated for a position etc.
Comment: I think this misses the actually important point: some bureaucracies won't count publications in non-ISI journals as "real."  If you want to get a job in a country with such a bureaucracy, that is your real issue.
Comment: @BenWebster Writing that as an answer would be valuable.
Answer: I don't think "honourable" is the correct framework to think about.  My general understanding is that most reputable journals will be ISI indexed, and so if you are considering publishing in a journal which is not, you should look hard at whether it is legitimate, and whether people in your field will respect publications in it.  You should look at the same thing for ISI-indexed journals.
 There are many journals which are ISI-indexed, and I have no reason to believe are not run legitimately, which I have never heard of, and which I would never recommend to someone I know as a place to publish (I don't want to pick on any particular one, but if you go to Web of Science and search for the name of your field, you will find plenty of them). An article in a journal I have never heard of makes a very poor impression to me on a CV, so it is worth researching more carefully what the "word of mouth" reputation of journals is in your field.


Shouldn't the crew of Helios 522 have felt in their ears that pressure is changing too rapidly?

Question: Since Helios 522 was unpressurized all the time, shouldn't the faster-than-usual change of interior air pressure during the ascent have alarmed the pilots that something isn't alright because their ears would feel a more rapid change of pressure, possibly hurting because of the faster change? Within 15,000 ft the TUC is unlimited so they should have become suspicious that their ears hurt that much and be able to do something about it if they realized the danger, shouldn't they?
Comment: Airliners don't climb fast enough to cause a dramatic change in pressure that would be immediately noticeable.  And besides, ears don't "hurt" going up...
Comment: @MichaelHall Now that you say it, indeed I remember that when my ears hurt it was during a plane's descent rather than ascent. Unless perhaps when I was sick, but it's a long time, I don't recall well. So ears only hurt when the exterior pressure gets _higher_ than the one within the Eustachian tube?
Answer: As a general rule, without going into specifics of this particular case, no.
One does not necessarily notice, or rather pay attention to pressure changes if you fly a lot, which is the case of professional pilots. Equalizing the pressure inside the ears becomes pretty much a reflex that goes unnoticed.
In the case of passenger planes (and military jets even more so) the rate of ascent is relatively high, which sneaks the lack of oxygen into the equation. One does not need to climb very long for the effect of thinning air to accumulate, numbing the senses and compromising the judgement.
Comment: @Giovanni If the outflow valve wasn't fully open, it might moderate the (cabin) rate of climb somewhat, enough to make the higher rate less obvious. Years ago, I had an unpressurized maintenance ferry flight, although with both packs working (as they were on the Helios flight). At 10,000', the cabin wasn't all the way there, and I had to hold the outflow valve control to OPEN much longer than I'd normally do (this was when we did cycle it manually during preflight checks) to get a 10,000' cabin. So it may have been less than fully open, enough to shallow but not stop the cabin's rate of climb.
Comment: I thought it is because they fly a lot that they would notice a more rapid change than usual.


What is web service composition?

Question: What exactly is web service composition?
Comment: is google broken on your PC?
Comment: nope it aint. google just got me to this post.
Answer: Composition refers to the way something is build, the new term at the moment is mash-up which basically means utilising a variety of different services in a composite application.  So that functionality of disparate application can be used in one application.
I think your referring to service granularity - which means how much functionality a service exposes. a coarse grained service will expose a whole process as a consumable unit whereas a fine grained service will expose a specific unit of logic from a larger process.  Obviously, it is up to the service architects to determine what granularity of service works best in the given environment.
This also, in a way has to do with the style of SOAP message you are using whether it is RPC style or document and that a service should be atomic and not hold external state.  Meaning it does not need to know any more information other than that in the SOAP message to perform its function.
Hope this gives you a good starting point.  The trouble with service-orientation is that it differs depending on who you read, but the main points stay the same!
Jon
Answer: Some web services which are provided for clients are abstract and composition of some smaller web services and it's called web service composition.
Sometimes there are more than one web service in order to use as the mentioned small web services, so we choose them based on QoS (Quality of Service) and many researches have been done on this subject.
Answer: Web service composition involves integration of two or more web service to achieve more added value of business functionality. A work flow composer is responsible of aggregating different web services to act as a single service according to functional requirements as well as QoS constrains. BPEL is one of the popular composers uses XML language to perform service composition.  Fine-grained  services perform single business task and provides higher flexibility and reusability. However, coarse-grained service involves performing complex business functionality leading to lower flexibility

What is web service composition?


Is there a way to guarantee a bones file?

Question: I have an elven wizard that has found a huge stash of valuable loot by chance of trap-door discovering a multi-boned level.  Unfortunately, he's about to die of starvation locked in a room, or be killed by the invisible monster that killed the others.  He's too deep for him to fight and prayer is used up, he's going to die. I'd hate to see all this loot vanish before another more worthy character gets a chance to sort through all of it.
   Can I do something to ensure this level makes the bones file?  If so, how?
If not, what are the odds that it will store as bones?
Answer: Assuming you aren't on one of the levels that can't leave a bones file (basically any level that isn't randomly generated), there is a (depth/4)/(1+depth/4) chance of leaving a bones file.  Both of those (depth/4)s are integer division, that is, rounded down.
There is no way to guarantee a bones file, but if you're deep enough into the dungeon, you're very likely to get one.
Reference: http://nethack.wikia.com/wiki/Bones#Ineligible_bones_levels
Comment: @slowball16 When one talks about "ascending" in nethack, it's about winning the game not merely running back to the surface.
Comment: You round to 2/3.  And no, Rodney doesn't stick around (but also any Amulet of Yendor you find in a bones file will be fake).

How do you have a bones of a character who ascended?  I guess you just mean started to climb and was killed on the way up?
Comment: THX,  so just to clarify, he's on L11.  (11/4)/(1= 11/4)= 2.75/3.75= 0.733. rounding at finish.  Or do I round to 2/3?  Either way, odds favor, which is good because one of the bones is of my only character to ascend (killed by Rodney---BTW, he doesn't stick around , does he?)
Answer: One other possibility would also be to rev-genocide a monster that is typically more likely to turn your dead body into one of its own, such as a mummy or vampire.  Let it/them go ahead and "ghost" you (pun intended) and just keep your fingers crossed, provided you still have any.
Comment: This won't have any effect on the probability of bones file generation---all it would really do is create a much more difficult situation when the bones file is encountered.


Is DD-X developer ok to use for Acros 100?

Question: Is DD-X developer ok to use for Acros 100? Also, I would like to control the contrast. Can someone point me to a development time chart that relates to the amount of contrast?
Comment: In my opinion, this is going to be opinion-based.  You could avoid that by asking instead what properties of DD-X interact in what ways with Acros (but you might also need to specify whether you mean original Acros or Acros II).
Comment: Agree w/ @ZeissIkon. Also, bear in mind that the negative is just an intermediary step to the final print. When you say "control contrast" are you trying to lower it because you shot a particularly high contrast scene? Worried about blocking your highlights? What are you going for? Also, will you be scanning or printing in the darkroom?
Comment: Thanks for your input. I might go either way with the contrast. Some times less and sometimes more. Maybe it doesn't matter since I will be scaning to digital. I might try my hand at pushing film just to experiment.
Answer: It should be (more than) fine, yes. Massive Dev Chart and FilmDev both have some suggestions for this particular combination (the latter with sample photos). Plus, there's a lot of discussion on various forums, if you google "acros in dd-x".
As for control of contrast, you could try to extrapolate from the Acros data sheet, which gives characteristic curves for various developers (though ultimately you'd have to run your own tests to find out how the film behaves in DD-X). Looking at the G-bar-against-time plot in section 14 of that document, a reasonable first guess would be to expect an increase of 0.1 in G-bar for every added 2 minutes of development time (in 20°C).


What is the actual result of a Logjam's DH attack?

Question: Does a Logjam attack calculate a group of probable Diffie-Hellman private keys for a user and then try them one at a time to see if it can decrypt the message - or does it directly calculate the one specific instance of a user's private key?
Comment: It's a precomputation of reusable intermediate values for cracking private keys for some given DH prime. It allows you to find probable keys faster. Then you can reuse this to crack any private key under that DH prime. It's basically one half (the difficult half) of a batch attack.
Comment: @CBruce The attack can be performed without ever even recording someone's key exchange session.
Comment: So it doesn't require checking the message itself to ensure that you got the correct private key and calculated the shared key? By the time you get done calculating, you are just sure that you got the right private key?
Comment: @CBruce it's a two-step attack 1: precompute (slow, only feasible for small primes). 2: aquire key exchange transcripts, crack them (very fast) using the data from step 1.
Comment: @Natanael To be fair it's not _that_ fast (it requires a pretty powerful computer, though an intelligence agency could probably do it real time), but it's significantly faster than cracking the handshake on its own.
Answer: Simple description of Logjam
Logjam is a two-step process. First, you take a group and apply a precomputation to it. Most people use one of a few different groups, so breaking a single group effectively breaks every single key exchange done by anyone using that group. If a group is "broken", then any key exchange done with Diffie-Hellman using that group can be broken quite easily,* revealing the shared secret. This is the second step to the process, using values derived from the precomputation to quickly determine the shared secret.
Logjam does not attack any one user's individual key and it does not rely on any information specific to any single key exchange event. In fact, the initial precomputation step of the attack could be performed for a group even if no one has ever used that group before. All it means is that when anyone does use that group, the derived shared key could be passively recovered by an eavesdropping party.
Slightly more accurate description
A simplified view of Diffie-Hellman is that it involves Alice and Bob agreeing on a generator $g$, and a prime modulus $p$. All operations are done modulo $p$, making it a finite cyclic group. Alice generates a secret integer $x$ and sends the result of $g^x$ to Bob. Bob generates a secret integer $y$ and sends the result of $g^y$ to Alice. Now Alice calculates $(g^y)^x$ and Bob calculates $(g^x)^y$. It just happens to be that $(g^y)^x = (g^x)^y = g^{xy}$, so now $g^{xy}$ is the shared secret. DH gets its security from the fact that Eve has access to $g$, $p$, $g^x$, and $g^y$, but is unable to calculate the value of $g^{xy}$. Seems all rosy, right?
Recall that all of the above operations are done modulo $p$. Unfortunately, it turns out that a one-time computationally-intensive calculation done on $p$ allows an attacker to derive information that allows them to calculate $g^{xy}$ from only $g^x$ and $g^y$, despite never having direct access to either $x$ or $y$. They can re-use the information derived from the analysis for any exchange done modulo that same prime $p$.
Full description
https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf
Mitigations
There are three ways to mitigate this attack:

Use a custom modulus - You can generate your own DH modulus instead of an existing group. This would force an attacker to perform an extremely complicated precomputation step tailored specifically to your system, making it impractical to attack. After all, $10,000,000 to break a third of the Internet's key exchange is nothing to a powerful adversary, but it's probably too much to spend on a single target. This is an option if you don't want reduced performance from a larger modulus.

Use a large modulus - You can use an existing but large (2048-bit or greater) group. While the precomputation attacks are still possible and breaking the group would allow mass recovery of shared secrets, the size of the modulus would make it impossible to attack with any modern technology. This is a risky option if technology significantly improves in the near future.

Use elliptic curve cryptography - Finally, you can switch away from finite-field Diffie-Hellman and instead use elliptic curve Diffie-Hellman. ECDH, in addition to being faster and more secure even at smaller key sizes, is not vulnerable to precomputation attacks. It performs calculations as points on a curve, rather than modulo a large prime number (your potentially exploitable group).

* It still requires some serious computing power, don't get me wrong, but it's nothing compared to the initial precomputation step. A powerful ASIC cluster could break each key exchange using the broken group in real time.


Independent contrasts with non-homologous traits

Question: I have morphometric measurements for a trait across various animal taxa, and would like to study the relationship between the size of this trait, and the animals' body size. In theory, I can account for the non-independence of the data with phylogenetic methods, such as independent contrasts. However, I have very different groups in my tree (for example insects and lizards), and even within more closely related groups, the structures are often not homologous. Does this present a problem for independent contrasts/phylogenetic least squares? For example, the structure is not homologous between ants and flies, yet every (sensible?) tree would treat a fly as more similar to an ant than to any lizard. Is this justified if structures are analogous? If not, are there any ways to deal with this problem?
Answer: When you calculate the PICs of a trait, you are making a statement about how that trait evolved. The purpose of PICs is to account for phylogenetic non-independence. However, when you are comparing two analogous traits, those two traits are in fact phylogenetically independent of each other; they do not share a common origin. Thus, I think it would be an error to perform PICs on analogous traits because those traits do not share an evolutionary origin.
How to deal with this problem would depend on the specific question you are asking. One thing to do would be to perform PICs on each trait independently on just the portion of the tree that that trait occurs so you are not comparing analogous traits.
You've probably already read this, but I recommend that anyone who hasn't check out Felsenstein's 1985 paper describing the PIC method.
Comment: Thanks, that makes sense! I think your suggestion is similar to one of the ideas I had: Essentially, I could build groups within which the trait in question is homologous, and connect all these groups to the tree root. As a consequence, the shared branch length between groups across which the trait is analogous would be zero, and thus the data would be treated as effectively independent in a PIC or phylogenetic least-squares, or am I missing something?
Comment: @David I'll admit that I'm not entirely sure about this, but I think you should not set the branch lengths between the groups to zero because that would imply that the groups are _highly_ related. On the contrary, setting the branch lengths to be very large would imply that they are effectively unrelated. However, if it were me, I would perform separate analyses on each group and not try to get them to fit into a phylogenetic analysis together
Comment: Sorry for being not very clear: I was talking about the branch length _shared_ between groups were the trait is non-homologous being equal to zero, so that there are effectively independent, or unrelated. Does this make more sense to you?


How do you get rid of large quantities of water in Minecraft PE

Question: Someone made a massive lake on my world and I want to get rid of it, preferably by filling it in. But I would like to do it quickly, is there a fast way of doing this?
Answer: If turning the top layer into cobblestones works for you, just dump a lava bucket near the lake (NOT INTO THE WATER, just close to it) and let it flow into the water.  Scoop it up, move it closer, and repeat.  As the lava flow hits water they'll turn into cobblestones.
If you accidentally dump the lava into the water you'll get obsidian instead and lose your lava.
Answer: If you can get your hands on it a good amount of Sponges would be helpful.
Otherwise (if you don't care what's below the cobble) use Lava like mentioned or Sand/Gravel to dump them into the water, if you want all the water gone.
A possible alternative would be to use Sugar Canes, if you just want to get rid of water without dumping 1000s of blocks into the lake. They're easy to come by and easy to get rid of.
Other solutions:

WorldEdit and <code>//drain</code> (yes, there is one for PE)
Fill lake with burnable material (wood, leaves) and burn it once filled.
Comment: http://mcpedl.com/worldedit-pe/ this is one for example
Comment: WorldEdit for PE link please!?


Video Format Compatibility with GoPro cine studio

Question: Can a video recorded using Edmund optics camera in mp4 format be played and edited in GoPro studio? The video I have recorded can not be imported.
Answer: GoPro Studio allows constant frame rate H.264 .mp4 and .mov files. Your camera might use a variable bitrate which doesn't seem to be supported by GoPro Studio (Source).
You can transcode the video to a constant frame rate video by using the tool Handbrake and choosing a constant frame rate in the "Video" tab. Choose the "High Profile" preset for a good quality encoding or choose your own quality settings.
You might also want to force a certain framerate that comes close to your average frame rate instead of using "Same as source" if Handbrake makes a automated decision.


Convert YouTube DASH audio (youtube-dl) to m4a (AAC DL)

Question: I am unable to listen to m4a DASH audio I download from YouTube via youtube-dl on Winamp. Is there an option in youtube-dl to remove the DASH audio part of m4a file and download/save it as an m4a (AAC LC) without loss of quality? So far, I am using  ffmpeg -i input.m4a -vn -acodec copy output.m4a to convert each file so it plays properly in Winamp.
Answer: No, you need a second conversion step.
The problem is that for YouTube DASH, the MP4 container's ftyp has the "major brand" set to dash instead of m4a. This is the correct approach for DASH streaming, but Winamp is too old to recognize it (and many other programs are).
Now, what would be a reasonable suggestion is to create a feature request for youtube-dl to add post-processing support for ffmpeg to convert the major brand of the MP4 container to something more compatible. But at the moment, such a thing does not exist.
Or, file a bug report for Winamp to include decoding support for dash brands. Since it's likely to rely on a third-party decoder plugin, this probably means raising a bug report somewhere else, too.
Comment: Yes. You're not actually converting the audio bitstream itself – you're just changing the metadata. This is a lossless process, so you won't lose audio quality.
Comment: Do you think the ffmpeg parameters I am currently using is best for converting it from MPEG DASH m4a to AAC LC m4a?
Comment: It's not an opinion. The build of Winamp appears to be too old to have implemented the (rather recent) MPEG-4 brands from the MPEG-DASH standard. Other software supports it. And like I said, some other programs may fail.
Answer:
youtube-dl 2015.01.23.4 and newer will automatically correct the
  header of the m4a file if ffmpeg is present on the system.

Source: youtube-dl
: Youtube m4a files downloaded with --extract-audio can't play in some players
All you have to do is to add the path to the directory containing the ffmpeg binary to your system path variable (like so in Windows 7):

Or use the --ffmpeg-location <path to ffmpeg binary or its containing directory> command line argument when calling youtube-dl, to allow youtube-dl through ffmpeg to automatically correct this.
Comment: My question was appropriate in Nov 14. youtube-dl author addressed the issue in Jan 15. Glad it is part of youtube-dl now.
Answer: I took the liberty of using your ffmpeg command and this is what I got: yt "My Youtube File.mp4"
A file yt.bat placed in system32 containing:
@echo off
move %1 "_%~n1"
ffmpeg -i "_%~n1" -vn -c:a copy "%~n1.m4a"
del "_%~n1"

*renames automatically to m4a, which can be changed in the code.
**it needs to be through temp file and then using rm, mv, otherwise the file and filename get corrupted.
Comment: @sunk818 You are absolutely right about the file deletion in case something goes wrong. I guess I could add some kind of a check. ..But then, I run this command right after youtube download, so I can just download it again.
Comment: it works, but change mv to move and rm to del. Also drag-and-drop works too!