debugging a method for finding running average of frames from video for motion detection using OpenCV in C++

Question: So to practice C++ I'm writing a motion detection program that uploads photos to dropbox using the OpenCV library, a project that I did last summer in pyton following this tutorial:  https://www.pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-opencv/
This section of code is running once, and then throwing an error on the second loop.
This is the code:
Mat set_delta(Mat &average, Mat gray_frame)
{
    Mat delta_frame;
    if (average.empty()==1)
    {
        cout<<"gray frame depth: "<<gray_frame.depth();

        gray_frame.convertTo(average, CV_32FC(gray_frame.channels()));
        //Mat Acc(gray_frame.rows,    gray_frame.cols,CV_32FC(gray_frame.channels()));
    }
    //cout<<"gray_frame average: "<< get_average(gray_frame)<<
    //      "\naverage_frame average: "<<get_average(average);
    Mat Acc(average.rows, average.cols,CV_32FC(average.channels()));

    cout<<"average depth: "<<average.depth()<<"\nAcc depth: "<<Acc.depth();

    accumulateWeighted(gray_frame, average, .5);
    convertScaleAbs(average, average);
    absdiff(gray_frame,average,delta_frame);
    return delta_frame;
}

I'm getting this error:
OpenCV Error: Assertion failed (func != 0) in accumulateWeighted, file /build/opencv/src/opencv-3.3.1/modules/imgproc/src/accum.cpp, line 635
terminate called after throwing an instance of 'cv::Exception'
what():  /build/opencv/src/opencv-3.3.1/modules/imgproc/src/accum.cpp:635: error: (-215) func != 0 in function accumulateWeighted

the error is being generated by the accumulate Weighted function, which I tried to fix by creating a local array Acc after reading these pages:
http://answers.opencv.org/question/63781/accumulateweighted-problems/
Assertion failed with accumulateWeighted in OpenCV
I need to find out why this is terminating on the second loop. I think this is a symantic error. the code runs as written, but my instructions aren't actually what I intend/need it to do.
some possibly useful information:
Acc was originally based off gray_frame but I realized the design of this method depended on the global value average, causing the delta frame to have an outline of the original frame in all proceeding frames. So I'm trying to redesign it to stick to using global average.
The channels for all 3 (gray_frame, average, and Acc) is one.
The depth of gray frame stays at 0.
The depth for average at first is 5(after the if statement), then 0, whereas the depth of Acc stays at 5. It seems as is the main loop executes once and then quits.
a single average value of average before the accumulate weighted of the second loop is the same as the average of the first. around 97.89
The entire C++ program (work in progress) can be found here: https://github.com/skewballfox/SauronsEye/blob/master/SauronsEye.cpp
My work from last summer that I'm somewhat using as a guide (this was mainly for me to practice and never really was intended to be viewed so it's kinda messy):
https://github.com/skewballfox/opencv-practice/blob/master/pi_surveillance.py
Comment: What actual question do you have? Are you asking why you are getting assertion errors?
Comment: sort of yeah, I know the issue  is with accumulateWeighted() due to these two pages I found when initially debugging this: [https://stackoverflow.com/questions/7059817/assertion-failed-with-accumulateweighted-in-opencv] and the one listed in the question below the error
Comment: I'm trying to figure out the difference between Acc(created based off gray_frame's values and average(initialized as empy matrix but made as a float valued copy of grayframe. I need this method to work with average because I need to have a running average frame in order to figure out if anythings is moving in the frame.
Answer: The issue is when scaling average in convertScaleAbs() this changes the type of average to 0 or CV_8U. this was fixed by creating an empty Mat() and storing the results in there, as opposed to scaling average itself:
Mat set_delta(Mat &average, Mat gray_frame)
{
    Mat delta_frame, scaled_average;
    //delta_frame is the storage for the difference between the accumulated average
    //and the current gray frame. scaled average is for storing the output of convertScaleAbs()
    //otherwise the depth of global average is 0 and causes an error on the second loop
    if (average.empty()==1)
    {
        gray_frame.convertTo(average, CV_32FC(gray_frame.channels()));
    }

    accumulateWeighted(gray_frame, average, .5);
    convertScaleAbs(average, scaled_average);
    absdiff(gray_frame,scaled_average,delta_frame);

    return delta_frame;
}


How could I proceed in proving that a Lindenbaum algebra is atomless?

Question: Given a $P$ infinite set of propositional variables we consider the Lindenbaum algebra generated by $P$. Then is this algebra atomless?
Comment: I think the third paragraph in [this answer](https://math.stackexchange.com/questions/154396/a-free-boolean-algebra) has everything you need. But it might not have all the required detail...
Answer: Let $\varphi$ be any propositional formula that you believe is an atom. In particular, $\varphi$ isn't a contradiction. Choose proposition variable $p$ such that $p$ does not occur in $\varphi$. Then $p\land\varphi$ isn't a contradiction but $p\land\varphi$ implies $p$ while $\varphi$ does not. Therefore $\varphi$ isn't an atom.
I'll leave it to you to show why $p\land\varphi$ can't be a contradiction and why $\varphi$ can't imply $p$; both under the assumptions above of course. It's pretty intuitively obvious though. The above also makes it clear why the finitely generated case is different.


I can't add icing to a doughnut on blender in the 2018 version

Question: So a few days ago I was watching blender guru's doughnut video. I found out that that was made in 2016 and that his was working differently. On his, the selected part came out when he set the offset to 1. With mine, it just moves the selected part into the centre of the doughnut. Can someone help
Comment: Please post the video and time code of the problematic section. Your version of blender and screen shot of how it fails on your setup. We are happy to help but you have not given us much to go on.
Answer: clearcoat = 1
clearcoat roughness = 0
If your using the principled shader (which is a good choice for a donut, I would recommend it), then you can turn on clearcoat, and set clearcoat roughness to 0. This should give you a glossy finish on top of your donut. I don't know if I have seen the tutorial you are talking about, but I think this is the desired effect.
Also,
have you tried the blender from 2016? Older versions can be downloaded here: https://download.blender.org/release/


Framing Integer associated with a Framed Knot/Link

Question: I have been looking for a clear definition of the n-framing of a knot unsuccessfully. A framing here refers to a choice of homeomorphism between a solid torus neighborhood (a.k.a, tubular neighborhood) of a knot and $S^1 \times D^2$ .I vaguely understand the number (which is an integer ) has to see with the number of times a basis for the normal space to the knot turns when doing a full $2\pi$ turn about the knot. I also know there are framings defined by a vector field V , where $V(k)$, the image of the (nowhere-zero)vector field at a point $k$ in the knot $K$ determines the framing. I assume a 0-framing means we take a normal vector and somehow parallel-displace it along the knot (having chosen a Riemannian metric $g$ to define the displacement), so that it returns exactly to its initial condition.I know that the framing number is an isotopy invariant. But this is not enough for me to know how to assign an integer to a framing.  Any ideas, refs, please?
Answer: Knots are made of string, but framed knots are made of ribbon.  More formally, the framing is a choice of a nowhere zero section of the normal bundle of the knot, which is essentially what you have written.  This is the tubular neighborhood theorem!
Note that the collection of possible framings of a knot is $\Bbb{Z}$ as a torsor, not as a group.  This means that we can speak of the difference between two framings, but there is no absolute sense of the framing of a knot.
When we draw diagrams (also called projections) of a framed knot in the plane, we draw two parallel strands that sometimes twist around each other.  The blackboard framing is well-defined on a diagram (but meaningless for the knot itself), where the parallel strand does not twist around the original strand.  Having established a blackboard framing for a knot, and after a choice of convention about what constitutes a positive crossing vs. negative crossing, the framing is just the linking number of the two edges of the ribbon, considered as a two-component link.
If we only allow ourselves the Reidemeister II and III moves, then the equivalence relation on diagrams is sometimes called regular isotopy and it respects framing.
Comment: +1 ; does the "torsor class" (meaning constant difference ) agree with homology, and/or isotopy, i.e., are any two framings in the same torsor class isotopic? Both answers are very good; I'm having trouble choosing which to accept.
Answer: In my understanding, framing of a knot is not something you can calculate from the knot, but rather an additional piece of information. It is defined as follows. On the boundary of a tubular neighborhood of the knot there is a unique nontrivial simple closed curve which bounds a disc in the tubular neighbourhood. We call such a curve the meridian. Then there are infinitely many curves on the boundary of the tubular neighbourhood, which intersect the meridian once. They are called longitudes. Now a choice of a longitude is the framing of our knot. It is naturally in bijection with integers: all longitudes differ by some number of twists around the meridian (the sign of the difference is pinned down by orientation) and there is a unique longitude that is homologically zero in the complement of the knot, which is mapped to zero in our correspondence between integers and longitudes
Comment: nice, +1; a followup: I guess that the number of intersections (aka, the twists around the meridian)of the meridians depends on the homology class of the longitude? Both answers are nice, I don't know which to accept.
Comment: oh yes, exactly, homology of the knot complement is generated by the meridian, so the number of twists (which one may think of as adding meridians) is exactly the value of your chosen longitude as seen in first homology of the knot complement.
Answer: This is my best understanding hopefully will help illustrate, together with other responses:
1) We choose a normal vector field for the core of  $T:=S^1 \times D^2$ . Then the framing number is the winding number of the normal vector field about the core.
2)Say we select l, a longitude , as a basis element for $H^1 (T;\mathbb Z)$. Then the framing number is the linking number of the longitude with the core.
3)Any two n-framings are isotopic.


What does one mean by saying "in conjugation"

Question: In my chemistry class in high school we just started with resonance and my teacher said that its the phenomenon of moving around of negative charges, lone pairs or pi electrons with no change in position of atoms and in conjugation with pi electrons. Could someone explain what the statement in bold is supposed to say?
Comment: "Conjugated double bonds in a molecule mean that the single and double bonds alternate". If you can write a Lewis structure like that, every atom in a chain will have an atomic orbital that can interact with its two neighbors (typically, a p-orbital), giving rise to the molecular orbitals that span multiple atoms in a chain or ring.
Comment: You should ask your teacher to better illustrate what he/she means. Anyhow, you can read the Wikipedia page on "Conjugated system" to get more info on what he/she is trying to say. It basically has to do with the definition of the word "conjugated".
Comment: Charges do not actually move around in resonance. They are not structures in equilibrium. They are simply ways of representing a hybrid structure, when no diagram may be used individually to do so.
Answer: Did you look up conjugation in the dictionary? It implies joining, but in chemistry it is joining the atoms in a special way.
The chemical meaning is straightforward, see https://goldbook.iupac.org/terms/view/C01267

In the original meaning a conjugated system is a molecular entity
whose structure may be represented as a system of alternating single
and multiple bonds

More explanation here Chemistry LibreTexts
Comment: This answer illustrated that conjugation has in principle a purely topological meaning. It is worth to note that the word conjugation used to mean delocalisation it is a somewhat a contradiction in term, in the sense that a perfect organic metal would have no alternating bonds. Still, the existence of alternated ie conjugated limiting structures is a requisite for resonance / delocalisation, and this makes the two terms synonyms in practice.


Can I play Beyond Earth without Steam?

Question: I looked at the Beyond Earth , game site and it does not say anything about steam.  I searched here and found sometimes you can't play if steam is not happy.  Is this game dependent on steam (as some have been) or is steam an option?
Answer: You need Steam to install and play the game. Even the boxed version is just a Steam key and some files to make the download easier.
Beyond Earth does work in offline mode, so once installed you can still play it if you lose your internet connection or Steam's servers have issues.

Can I play Beyond Earth without Steam?


photo manipulation question

Question:
After you've done all things in Photoshop to make a good photo montage, you will have a photo like the left picture. But after that amazing artists do something that I don't know like a final color and light grading that make a picture like the right one; it's shiny and cinematic, it's amazing. How do they do that? Tell me, are they doing that in Photoshop or another app and how should I do something like that? If you have a video tutorial or link, please send me.
Answer: Try a curves adjustment layer to make the image pop a bit. You can make a gentle S curve in the RGB, and in the blue channel, a small upward curve.
The eye of the snake looks like it has been edited separately with some extra flames overlaid, and the flames inside the mouth have also been added. A curves adjustment alone won't give you that result. Maybe try to look for a flames brush on DeviantArt, or you could clone some flames from some other part of the image onto a separate layer, and change the layer blending mode to overlay/lighten etc.
Anyway, here's what a simple curves adjustment can achieve.

You could take this further, say make a selection of the sky and add another curves adjustment to brighten that portion of the image a little. Create a new layer paint some more flames (I just used the clone tool for that here), then another curves adjustment layer and clip it to extra flames layer, and brighten that by adjusting the curves. This is a very rough attempt, but I'm sure you will get the general idea. You could take more time and care, find the right brushes and get a better result.
Comment: thanks a lot i guess camera raw filter is so imprtant in final grading
Comment: @daniel Well this is a painting/illustration, not a photograph. But Adobe Camera Raw can be used as a filter too. I didn't use it here though, just simple curves adjustments.
Comment: I learn too, Thank you @BillyKerr

photo manipulation question


Black hole information paradox implications

Question: What are the philosophical implications of the black hole information paradox? Would the creation of a small super dense residue of the black hole evaporation give rise to a philosophical issue anyway?
Comment: Tim Maudlin has a very polemical essay on the topic where he argues that the entire idea of the information paradox, along with all of the resolutions that have been proposed by people like Susskind, are horribly misguided [here](https://arxiv.org/pdf/1705.03541.pdf). [Here](https://arxiv.org/pdf/1801.05923.pdf) is a response by Manchak and Weatherall where they argue for the opposite and discuss the philosophical implications of the paradox. Susskind's ER=EPR and recent claims that [GR=QM](https://arxiv.org/pdf/1708.03040.pdf), taken in a literal way, have giant metaphysical implications.
Comment: @Not_Here This looks almost like an answer. You could just add brief summaries of Maudlin's, Manchak-Weatherall's and Susskinds's speculations.
Answer: There are no real direct consequences, in the sense that the information paradox is more a tension between the current understanding of gravity and quantum physics, that is General Relativity and Quantum Field Theory.
It's widely believed that we will need a full theory of quantum gravity to understand the evaporation process of a black hole. This theory will of course have deep philosophical implications, but it's not possible to speculate further without any particular insight.
Regarding a possible black hole's residue, called black hole remnant in the literature, it's pretty much ruled out. Since the initial black hole can have arbitrary high mass and the entropy is proportional to the mass of the black hole, the remnant must be able to carry an arbitrary amount of information. Therefore there must be an huge number of stable remnant with mass comparable to the Planck scale and indistinguishable from an effective field theory viewpoint, so these remnant should appear inside quantum loops and evaporation process of other black holes. Even though the production of a single remnant will be highly suppressed, the huge phase space implies that the probability of generating a remnant is not negligible in a conventional process. But we know that quantum field theory works well, therefore we do not expect remnant to be present in our universe.
Comment: Carlo Rovelli has just proposed a new solution of the paradox  https://arxiv.org/abs/1802.04264


Was there a time skip on episode 2 of Tokyo Ghoul Season 2?

Question: I just notice that Touka has changed and became more mature. Her surroundings, including Hide who has a part time job, have also changed/became more mature.
How many years have passed? Does anyone know?
Answer: I don't think there is "a years time skip". At most a few months have passed, as the Anti-Ghoul members who were injured have healed and Aogiri have taken over some areas.
At this point in the manga, the time skip was around 6 months, but apparently this is an original story (for season 2) so that may not be a good guideline.


How can I connect BeagleBone to 2 slaves with 1 "Chip Select" pin?

Question: I have a BeagleBone white and I want to use it as a master which is connected to 2 slaves via an SPI connection. Besides SCLK, DIN, and DOUT there is one pin of chip select "CS" "just one" and I need 2 because I have 2 slaves. What I already knew is that I can use any GPIO pin as chip select, but when I saw the "CS" pin I get confused: can I use any GPIO pin as a chip select? If yes, why there is a pin with the name of chip select?
Answer: Yes, you can use any digital out as a CS.  Use some other pin for a second chip select, and bit bang it.  Bit banging will never get any easier than that.
Alternatively, you might consider just NOT-ing the one chip select, and seeing if you can get away with controlling two slaves that way.
Comment: . . . and a third alternative, if your application and your slave devices allow it, is to daisy-chain them and access them together with the one chip select.
Answer: I assume you use SPI0. Another option is to use SPI1 instead which has both CS0 and CS1 available on the expansion headers.
(At least in theory. I'm currently trying to achieve the same thing, but I've failed to enable both CS0 and CS1 for the pins connected to the expansion header using TI's pinmux tool. There seems to be no available IO-set that includes all the required pins. Any hints appreciated...)
Answer: With micros you have a dedicated spi "block" if it includes a CS, it may be able to assert the CS line automatically and there is usually a designated pin. Most SPI hardware blocks do this is so when preforming writes you don't have to spend precious CPU cycles to assert a gpio pin if you need fast timing. You don't have to use the SPI block's CS lines, you can use any GPIO line, however you have to write code to turn it on and off.
As long as fanout works out for you GPIO (which shouldn't be a problem for two devices) and the devices have the same logic level you should be fine.
But why would you want to? You have plenty of pins so you could have two different GPIO's and control them seperately or at nearly the same time. The only application I can think of is simultaneous sampling with an ADC to make sure you start at the same instant. If you bit bang the SPI port you can even have two seperate SDO's so you trigger the CS line to start the conversion at the same time, and write the same value into both ADC's and then read back both values simultaneously on two different GPIO's connected to two different SDO's of the slave devices. If you roll your own spi code you have more options.


Mind-Stream Continuum's Origination?

Question: What is the origination of the mind-stream continuum? What are the basic elements that make up the mind-stream continuum?
Answer: Gautama never described an origin. Whether existence had a beginning or end was never defined. Some traditions have taken to saying "beginningless." So if mindstreams have a beginning, the Buddha never said so. The asker was either told that the answer was irrelevant to liberation (hence not worth answering) or that the question did not apply.
The Pali canon relies on dependent origination for explaining where minds come from, but does not describe mindstreams themselves. Later commentators, such as Asanga and and Vasubandhu of the Yogacara school of thought would expound on additional layers of conciousness. From my experience, most talk of mindstreams take their source as the alaya-vijnana; itself a term that has been mentioned by some contemporary Theravadin monks (Ajahn Geoff and Ajahn Sujato).
I believe the orthodox Theravada response would be the parable of the poison arrow, and Mahayana responses would depend on the proclivities of the instructor. A Yogacarin would describe the features of the alaya-vijnana and a Madhyamika (in a Tibetan tradition) would conclude that mindstreams simply are (in conventional terms at least; illusory "like a city of gandharvas" in an ultimate sense).
There is no set "Buddhist" answer here, unfortunately.
Comment: the madhyamika would say simply that its one of the 5 elements that neither have been arisen nor will they cease.so it simply has always existed.dependant origination or momentariness is an upaya in madhyamaka.in reality nothing originates and thus nothing ceases(everything that originates must cease).in Dzogchen wich basis itself on madhyamika,it is one of the 5 personal wisdom lights reified mistakenly into 5 elements.these wisdom lights have always existed and will always exist.
Comment: the Vajrayana view based on Madhyamaka would be that each sentient being has a basis,wich is a term for the collection of the 5 wisdom lights together,wich have been reified as 5 elements by the sentient being.one of those elements is Space or awareness wich form the mindstream of a person.nothing arises and nothing ceases.so the mindstream has always existed thru beginingless ignorance,since the 5 wisdoms are reified mistakenly into 5 elements by the deluded mind since beginingless time.a Buddha is simply someone that recognizes these elements as lights and as empty in Vajrayana and Dzogchen.
Comment: the Only Difference between Nirvana and Samsara is thus perspective.this knowledge of them as 5 empty lights is nonconceptual and experiential ,wich is why practice is necassery for Buddhahood.a 16th bhumi Buddha has simply recongized this fact.this recognition is why the Adi Buddha woke up when beings got dejected from the deva heaven after prayala and karma set in to make us as regressive buddhalike devas regress back into Samsara.there is no nirvana without Samsara in mahayana and Vajrayana.there is no end to the 5 wisdoms.as something that doesnt arise cant cease.
Answer: Mind is a created thing, further conditioned by experience. The "mind stream" actually isn't mind at all, since mind is completely dropped in Nibbana. The "unborn, deathless" is what, I think, you are referring to. The unborn is not a static "state". It flows. In ignorance it flows, creating mind. That-which-flows identifies with mind, creating ego. That-which-flows does not at this point have awareness of itself. That awareness doesn't happen until one achieves stream entry, the first insight into self-realization. The fruits of stream entry are well known. But when this stage is passed through, one has the "turning in consciousness" spoken of, i.e., full self-realization. I know I am somewhat off the point here, but bear with me, as I think this gives a fuller appreciation of the difference in mind and that-which-flows. When one awakens and reaches Nibbana, mind is dropped but not abandoned completely, else one could not come back and function. Rather, mind changes. A new awareness, of which that-which-flows has achieved, now occupies the mind. (This is obvious from the fact that the mind is created by that-which-flows.) Lastly, you might ask how the unborn flows when it is beyond both time and space. Think of the flow as movement of awareness. It's not exactly that, but that is a good metaphor for it. Another way is to ask yourself if insight flows. YES! It does. That is what I mean.
Answer: In my understanding:
Mind-stream continuum originates from the growth and evolution of tendencies. It is created by the same mechanism that lies behind "the natural evolution of species".
(Phenomena that create causes that either support their continued existence or aid future arising of similar phenomena tend to "survive" and "procreate". These are called tendencies.)
Most phenomena carry imprints of other phenomena, one way or another. Carrying imprints they carry information about (or representation of) other phenomena. These are the basic building blocks mind is made of.
Phenomena that carry imprints of other phenomena can also happen to be like that, cyclical self-supporting tendencies. The more imprints they accumulate, the better their odds for continuation and accumulation of even more imprints.
The rest is explained in the Twelve Nidanas. The cyclical tendency becomes habit to seek similar imprints. This iteratively grows until it becomes an ability to recognize.
Once there's recognition, there's association. Once there's association, there's interpretation of signs. Once there's interpretation of signs there's citta-vrti, the associative loop. Here we go, this is a full-blown Mind-stream.
Answer: the mindstream is merely a element(consciousness) like earth,water,fire,air etc it has always existed and will always exist.it is one of the 5 wisdom lights in vajrayana wich has always existed and will always exist.Vajrayana basis itself on madhyamika,and in madhyamika nothing arises and nothing ceases.dependant arising is an upaya in a sence.the 5 wisdom lights are reified as elements thru (beginingless)ignorance of their true nature,the only difference between a 16th bhumi buddha and a ignorant being is nonconceptual(that is experiential knowledge thus) knowledge of their true nature as empty and as wisdom lights basically according to Dzogchen and mahamudra.
the 5 wisdoms are personal and unique to every sentient being,together they form the basis(Gzhi).there are infinite basises(meaning every sentient being has one basis known also as mind,also known as 5 wisdoms) unique to infinite sentient beings.basically sentient beings have always existed and will always exist.
the reason we percieve the same universe is explained by a container universe yogacara model in vajrayana.
people think madhyamika is saying nothing exists.or that its Nihilism.it isn't saying that.simply that reality is nonestablished and is a contradiction in itself and that it is not arisen .it is simply saying that there is no absolute,without its relative parts and thus there can never be said to be a independant absolute entity.thats it.madhyamika is pretty simple and logical.
Comment: "the mindstream is merely a element(consciousness) like earth,water,fire,air etc it has always existed and will always exist." Does the mindstream, as you define it, exist for one who has taken paranibbana?

Mind-Stream Continuum's Origination?


Bash Script to list files within a directory

Question: I need to create a bash script that will send out an email with the files contained in a specific directory. The script will get the directory location. (ie. ./script.sh /backups/daily).
Once the script is executed it will send out an email with the list files contained in /backups/daily. The email will also include the size of each file in GB and the date when the file was created.
I'm very new with linux. Could someone point me in the right direction?
Answer: Crude, but this should do it:
#!/bin/bash
ls -lh "$@" | mailx firstname.lastname@example.com -s "listing of $@"

I used mailx here, but the right mail command will depend on your system, and it might need more flags, for example for authentication. It could be mail or sendmail, or something else.
In ls -lh, the -l is for long listing which includes the size and the date. The -h is for "human readable" format of file sizes, so that for example instead of 81883042 (bytes) you would see 78M as the size.
Answer: If what you need is a listing of the contents of your directory, with size and modification time, then ls -lh /backups/daily is likely what you need.
If you need to automate this to run daily, use crontab -e to set up a job with cron. Run man crontab for more info. The crontab you edit could contain something like the following:
#<Minute> <Hour> <Day_of_Month> <Month> <Day_of_Week> <Command>
05 01 * * * ls -lh /backups/daily

As by default, cron mail the output of job to the user, this would email YOU a listing every night at 1:05am.
You can pipe the output of this listing into a mail command in order to send to others. Edit and try this on the command line, then when it's working, add it to your crontab.
ls -lh /backups/daily | mail -s "backups contents for `date -I`" firstname.lastname@example.com

It's possible to tailor the output of ls if needed. A simple (and overly simplistic) filter for the ls output is to chop off the left hand side of each line:
$ ls -lh | cut -c32-

98M Jan 14 14:01 meb.20140105-030003.img
98M Jan 14 14:01 meb.20140106-030003.img
$

This is overly simplistic because the width of the left hand portion (32 in my case) will change based on user and group names.  If these are constant for you, then adjust the number, and the overly simple would be good enough.
Comment: This is great. But how do you think I could tailor the output to only show the file_name, Size and date created.
This is what i'm getting now:
    `total 1.5T`
    `-rw-r--r-- 1 mysql mysql 769G Jan  5 13:55 meb.20140105-030003.img`
    `-rw-r--r-- 1 mysql mysql 755G Jan 12 13:49 meb.20140112-030003.img`
But I would like:
    `meb.20140105-030003.img 769G Jan  5 13:55`
    `meb.20140112-030003.img 755G Jan 12 13:49`
Comment: With ls options alone, to my knowledge it's not possible to get just the size and date. So you need to either filter the ls output, or write a script from scratch. A simple filter would be to pipe the output of ls(1) through cut(1) to chop of the left hand side of each line - I'm adding an example of this to the answer above. Other filters could be done with awk, sed, perl, etc.


could not find the version that satisfies the requirement tensorflow in python 3.5

Question: I am trying to install tensorflow with the pip in the cmd, but it is appearing an error "could not find the version that satisfies the requirement tensorflow"
I have the python 3.5 version installed and the Anaconda 64bits too. Can anyone help me?
Answer: The 'sudo' makes pip install tensorflow outside the env. Try:
pip install --upgrade $TF_BINARY_URL
Just tested this on Ubuntu 14.04 w/ conda env, was able to reproduce (with sudo) and resolve issue (without sudo).
You can also check the "Using Conda" section of tensorflow.org. They list the below:
[1]: Installing tensorflow on Anaconda anaconda?rq=1
Answer: I think you can try this it will work copy this line and paste it in your command line before this make sure python already installed on your computer
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl


An Example of a Nested Decreasing Sequence of Bounded Closed Sets with Empty Intersection

Question: Could someone provide me with an example of a metric space having a nested decreasing sequence of bounded closed sets with empty intersection?
I first thought of Cantor set but the intersection is not empty!
Comment: Can you think of sets which are bounded and closed, but not compact? Because if you ever include a compact set in your sequence, [Cantor's intersection theorem](https://en.wikipedia.org/wiki/Cantor%27s_intersection_theorem) will imply there is a non-empty intersection. (As is noted in an answer, we can't do this in $\mathbb R$ or $\mathbb R^n$ due to the [Heine-Borel theorem](https://en.wikipedia.org/wiki/Heine%E2%80%93Borel_theorem))
Comment: @MiloBrandt: Your comment was indeed what I was hinting at in my answer.
Answer: Let $\mathbb N$ be endowed with the discrete metric. In this metric space, every subset is bounded (although not necessarily totally bounded) and closed. Moreover, the subsets
\begin{align*}
A_1\equiv&\,\{1,2,3,4,\ldots\},\\
A_2\equiv&\,\{\phantom{1,\,}2,3,4,\ldots\},\\
A_3\equiv&\,\{\phantom{1,2,\,}3,4,\ldots\},\\
\vdots&\,
\end{align*}
are nested, and their intersection is empty.

However, if you stay within the realm of $\mathbb R$ endowed with the usual Euclidean metric, than you can't have a situation like the one above:

Claim: Suppose that $$A_1\supseteq A_2\supseteq A_3\supseteq\ldots$$ is a countable family of non-empty, closed, bounded subsets of $\mathbb R$. Then, $\bigcap_{n=1}^{\infty} A_n\neq\varnothing$.

Proof: By the Heine–Borel theorem, $A_n$ is compact for each $n\in\mathbb N$. For the sake of contradiction, suppose that $\bigcap_{n=1}^{\infty} A_n=\varnothing$. This is equivalent to $\bigcup_{n=1}^{\infty} A_n^{\mathsf c}=\mathbb R$. In particular, $$A_1\subseteq\bigcup_{n=1}^{\infty} A_n^{\mathsf c}.$$ Since $A_1$ is compact and the sets $(A_n^{\mathsf c})_{n=1}^{\infty}$ form an open cover of it, there must exist a finite subcover. That is, there exists some $m\in\mathbb N$ such that $$A_1\subseteq\bigcup_{n=1}^m A_n^{\mathsf c}=A_m^{\mathsf c},$$ where the second equality follows from the fact that $$A_1^{\mathsf c}\subseteq A_2^{\mathsf c}\subseteq A_3^{\mathsf c}\subseteq\ldots.$$ Now, $A_1\subseteq A_m^{\mathsf c}$ means that if a point is in $A_1$, then it must not be in $A_m$, so that $A_1\cap A_m=\varnothing$. But $A_m\subseteq A_1$ (given that the sets are nested), so that $A_1\cap A_m= A_m=\varnothing$, which contradicts the assumption that $A_m$ is not empty. This contradiction reveals that the intersection $\bigcap_{n=1}^{\infty} A_n$ must not be empty. $\quad\blacksquare$
Comment: @Fabian You're thinking in terms of the Euclidean metric, in which case each set is unbounded, indeed. However, consider the _discrete_ metric on $\mathbb N$. This is defined as $d(m,n)=1$ if $m\neq n$ and $d(m,n)=0$ if $m=n$. It is not difficult to show that this is a legitimate metric. Also, the distance between any two distinct points is 1. This implies that if you take a "ball" of "diameter" 2 around the point $n=1$, then this ball will contain the whole space! That is, $$\{m\in\mathbb N\,|\,d(m,n)<2\}=\mathbb N,$$ and the whole space fits into a ball, which implies boundedness.
Comment: Are these sets bounded? What I see is they are bounded from below not from above. Could You please explain why they are bounded?
Comment: Got it! Great explanation! Thank you triple_sec .
Comment: @Fabian I added a proof that the intersection may never be empty if you stay in $\mathbb R$.
Answer: Another simple example is to look at the "punctured line": $(-\infty, 0) \cup (0, \infty)$, which is just the real numbers with $0$ removed. The sets $A_n = \{ x \ \in \Bbb R \,|\, |x| \le 1/n \text{  and  } x \ne 0 \}$ are closed and bounded in the punctured line, but their intersection is empty.
Answer: Do you know a theorem about nested bounded closed sets having non-empty intersection? If you do then you would need to find a metric space that does not satisfy the conditions of that theorem. $\mathbb{R}$ satisfies that theorem and hence you're not going to find a counter-example there. But there is a smaller metric space sitting inside it, namely $\mathbb{Q}$, that will give you a counter-example.
Comment: I do not understand the downvote. I feel that my hint (without explicitly stating $\mathbb{Q}$) was just right, rather than just giving a complete solution like the other answerers that leave nothing for the asker to try.
Comment: Hello user21820, I upvoted your answer, and sorry to see users downvote for no reason. Thank you for your hint.
Comment: @MATH: Thanks. Anyway the downvoter removed his downvote already, so perhaps he is happier with the explicit example of $\mathbb{Q}$. =)
Answer: I initially missed the fact that bounded sets were desired.
Let the metric space be $(0,1)$, the set of all real numbers between $0$ and $1$, not including the endpoints, with the usual metric $d(x,y)=|x-y|$.
Then the example can be that the $n$th set is $(0,\  1/n]$.  This is closed within this space; it contain all of its limit points in the space.
The first thing I thought of was $\displaystyle \bigcap_{n=0}^\infty [n,+\infty)$.
If the object called $+\infty$ were included in the space, with the appropriate topology so that $n\to\infty$, then these sets would not be closed, but would become closed if one added $+\infty$ to them as a new member, and then the intersection would not be empty because $+\infty$ would be a member of it.
Comment: The sets should be bounded.
Answer: If $(X,d)$ is a metric space then
$$d'(x,y)=\min\{d(x,y),1\}$$
is a metric on $d$, as well. Moreover, the metrics $d$ and $d'$ generate the same topology (hence the same subsets of $X$ are closed in $(X,d)$ and in $(X,d')$).
Every subset is bounded in $(X,d')$.
See also: Proof that every metric space is homeomorphic to a bounded metric space

So it suffices to find a metric space which contains some nested closed subsets with empty intersection. Then you can look at the same system of subsets in the modified metric, and you will have an example of closed bounded sets.
Answer: Possibly a simpler example is the usual metric on the rationals, and the closed sets $$C_k=\left[{\lfloor \sqrt{2}k\rfloor\over k}, {\lceil \sqrt{2}k\rceil\over k }\right].$$ Intuitively, the intersection of the $C_k$s is $\{\sqrt 2\}$, but that's not rational, so in $\mathbb{Q}$ their intersection is empty.
Comment: Note that what's really being used here is that $\mathbb{Q}$ is *incomplete* - I'm essentially taking a non-convergent Cauchy sequence (one "converging" to $\sqrt{2}$) and turning it into a decreasing sequence of bounded closed sets with empty intersection. As e.g. Martin Sleziak's answer shows, this is *not* necessary - there are complete metric spaces in which nonetheless we have decreasing sequences of bounded closed sets with empty intersection.


Socket.io vs AJAX Use cases

Question: Background: I am building a web app using NodeJS + Express. Most of the communication between client and server is REST (GET and POST) calls. I would typically use AJAX XMLHttpRequest like mentioned in https://developers.google.com/appengine/articles/rpc. And I don't seem to understand how to make my RESTful service being used for Socket.io as well.
My questions are

 What scenarios should I use Socket.io over AJAX RPC?
 Is there a straight forward way to make them work together. At least for Expressjs style REST.
 Do I have real benefits of using socket.io(if websockets are used -- TCP layer) on non real time web applications. Like a tinyurl site (where users post queries and server responds and forgets).

Also I was thinking a tricky but nonsense idea. What if I use RESTful for requests from clients and close connection from server side and do socket.emit().
Thanks in advance.
Answer: Your primary problem is that WebSockets are not request/response oriented like HTTP is. You mention REST and HTTP interchangeably, keep in mind that REST is a methodology behind designing and modeling your HTTP routes.
Your questions,
1. Socket.io would be a good scenario when you don't require a request/response format. For instance if you were building a multiplayer game in which whoever could click on more buttons won, you would send the server each click from each user, not needing a response back from the server that it registered each click. As long as the WebSocket connection is open, you can assume the message is making it to the server. Another use case is when you need a server to contact a client sporadically. An analytics page would be a good use case for WebSockets as there is no uniform pattern as to when data needs to be at the client, it could happen at anytime.

The WebSocket connection is an HTTP GET request with a special header requesting the server to upgrade it to a WebSocket connection. Distinguishing different events and message on the WebSocket connection is up to your application logic and likely won't match REST style URIs and methods (otherwise you are replication HTTP request/reply in a sense).
No.

Not sure what you mean on the last bit.
Comment: well, you made some really good points. 3rd bit, you answered it anyway. I kind of get the bigger picture now. Thanks. One confusion thought `The WebSocket connection is an HTTP GET request with a special header requesting the server to upgrade it to a WebSocket connection` Is websocket a HTTP GET? I don't think so.
Answer: I'll just explain more about when you want to use Socket.IO and leave the in-depth explanation to Tj there.
Generally you will choose Socket.IO when performance and/or latency is a major concern and you have a site that involves users polling for data often. AJAX or long-polling is by far easier to implement, however, it can have serious performance problems in high load situations. By high-load, I mean like Facebook. Imagine millions of people loading their feed, and every minute each user is asking the server for new data. That could require some serious hardware and software to make that work well. With Socket.IO, each user could instead connect and just indefinitely wait for new data from the server as it arrives, resulting in far less overall server traffic.
Also, if you have a real-time application, Socket.IO would allow for a much better user experience while maintaining a reasonable server load. A common example is a chat room. You really don't want to have to constantly poll the server for new messages. It would be much better for the server to broadcast new messages as they are received. Although you can do it with long-polling, it can be pretty expensive in terms of server resources.
Comment: Note, socket.io will fallback to long polling, rolling-loads, and other systems when a direct websocket upgrade isn't available, which happens a lot in the wild.  Socket.io offers tooling for async and push communications, that simplifies development usign the most expedient channel available.
Comment: I would have to agree with your points. But I was more interested in CLIENT to SERVER talk.

Socket.io vs AJAX Use cases


Flush and seal refrigerator HVAC leak?

Question: So my fridge sprung a refrigerant leak and leaked out a bunch of its freon, I I thought I could Easily fix it by refilling it witth R134a with leak sealer. However it continue to leak and this eventually caused the compressor to grenade itself (presumably due to the oil absorbing water from the air). Now I know how to install a new compressor however, if I simply install a new compressor and recharge it all of the refrigerant will leak out, I also suspect that the compressor will die fairly quickly as the old compressor probably sent metal bits though the system.
My question is how I would go about Flushing the system and patching the leak?
Buying a new refrigerator would not be practical as the one we have is a bit of a special size.
Comment: " if I simply install a new compressor and recharge it all of the refrigerant will leak out," You are supposed to pull a vacuum on the lines first and it should maintain that vacuum for a 24 hour period with out falling - if it does fall out of vacuum you have a leak . If it maintains vacuumt - you can then be assured to fill.
Comment: ... and then you have to do a pressure test at like 400psi.
Answer: I would say this is not a DIY project for at least 3,4,5+ reasons the major ones opening a HVAC/R system requires a license, yes you can find R134 In less than 1 lb cans for cars or a duster or electronic troubleshooting freeze spray if you can find the adapters and it would work if you could install new parts and remove all the compressibles (air) and dehydrate the system (a vacuum pump to pull the system to at least 500um). A new filter dryer on the suction line would pickup any metal from the old compressor. I have seen techs "get away with" 1000um but this is risky because any moisture in the POE oil will become acidic and that eats the varnish off the motor windings in the new compressor and then it shorts out.  Bringing me to the point is the oil already acidic? We know it is contaminated because of the leak stop being used (leak stop may work on high temp AC like automotive but will plug the capillary tube on most refers).  UV dye and or leak stop will void the warranty on almost every compressor I have purchased. Now another non DIY reason you want to repair the leak, how and where did it start leaking? My bet would be in the evaporator, almost all refers have aluminum evaporators and sealing a contaminated aluminum line that has been punctured is almost impossible,  I don't do service calls on fridges but have Tryed to help friends that have tried to solder the aluminum lines to watch the line melt (had to replace the evaporator) another friend had a vending machine he tried to use some special 2 part epoxy and thought it was working until he unplugged the system loaded it up and took it to a break room, that warm day caused the Freon pressure to go (calculated) to 275 or so and blew the plug out and sprayed oil and Freon inside the machine (did I mention it did not cool at that point). Now for the last point, did you know there are fines up to $25,000.00 for doing this kind of work without a license?
Answer: This will not be an easy fix to do it properly which is why most just buy a new refrigerator. If using leak fix you need to be sure the system is totally dry or it will make a mess. It works in a dry system and when it finds a leak it is exposed to moisture and coagulates around the leak since there is moisture in the atmosphere. You will need to remove the capillary tube or you will get all sorts of crud stuck in it. Better yet, replace the tube with a new one in case it got clogged. Flush the system with a flushing kit. I usually use R11 (not the refrigerant, the flushing kit) they coined the term R11 since back before EPA regulations R11 was used to flush systems. At any rate there are several brands and they all involve injecting their fluid under nitrogen pressure and allowing it to exit out an open tube. You will then need to fill the system with nitrogen and look for the leak using soap bubbles and or a sonic leak detector. If you do not find the leak you can not properly vacuum the system and you will be left with moisture in the system. Vacuum the system >500 microns and charge to the exact weighed in charge.   Yes, changing a compressor properly really does take all this work which is why many techs take shortcuts and have repairs that don't last. Do it right and the system will last for years.
Comment: Seems a bit daunting for a diyer who has only ever worked on automotive HVAC systems... Those are a bit easier as the piping is bolted together. Not sure what I'm gonna do. I suppose I should try and see if a local place can do it.
Answer: 1: How do you know the refrigerator was leaking ?
You possibly over filled the system  - that is one reason the compressor may have exploded.
2: Your refrigerator may not have used R134a - did you verify the type of refrigerant it used as marked on the label? Samsung uses R600 I thinkothers I am not sure.
You did not specify make/ model so we can not know - please add that to your post.
If you mixed and matched - pressures are different - things can go blam into bits and they did so I am guessing either you overfilled or you mixed and matched.
3: Now you will need to do quite a bit - as there is a capillary tube , and I am not sure if it will have an orifice tube.
Replace these items with new - but I would attempt a flush first. Use a nitrogen flush through the system much like when you change out from R22 to R410.
Or you can buy the replacement condenser coil, evap coil and capillary tube along with that compressor and be certain. You will need to pull a complete vacuum on the system let the vacuum sit for a 24 hour period make sure that the vacuum has been maintained during that time period - if not you have a leak and need to find and fix it first.
After verification of Vacuum .. fill the unit to the proper pressure don't overfill sometimes your compressor may be pre-filled - verify if so and what refrigerant.
Comment: The system was definitely leaking, it was not getting cold and when I put a pressure guage on the line it read zero. And yes I verified the pressures and refrigerant. They we're listed on the side of the fridge. I think the issue was that I waited too long to fix the issue and the oil in the compressor absorbed water from the air as the compressor didn't fail suddenly rather it became nosier and nosier before failing.

Flush and seal refrigerator HVAC leak?


the difference between present passive voice and present perfect passive voice

Question: What is the difference in term of meaning between these:
The order has shipped, that means you will receive it soon and it is shipped. Does it mean the same thing ?
Answer: Let's start by cleaning up your terminology:

Present perfect passive: The order has been shipped.
Present perfect active: The order has shipped.
Present passive: The order is shipped.

These all have essentially the same meaning: somebody has packaged your order and put it in the mail or on a truck to be delivered to you.
The important difference between them is that

in 1, the verb ship is transitive. The order is the 'Patient' of the verb, the entity which undergoes the action. Its ordinary active-voice form would require that the 'Agent', the entity which performs the action, be named and act as Subject of the sentence, with the Patient, the order, acting as Direct Object:

Agent/SubjectWe  VbPrPfActhave shipped  Patient/DirObjthe order.

When this sentence is cast in the passive voice with a BE+PaPpl construction, the Patient becomes the Subject and the Agent is omitted or expressed with a by phrase:

Patient/SubjectThe order  VbPrPfPasshas been shipped  (Agent/PrepPhrby us).

in 2, the verb ship is intransitive. It is in effect a different verb, which represents shipping as an action performed by the Subject, and there is no Patient.

Agent/SubjectThe order  VbPrPfActivehas shipped.

This sort of construction, in which the Patient of the action is 'transformed' into its Agent, is sometimes called middle voice, because it expresses a semantic relationship between the verb and the Subject which lies somewhere 'between' active and passive voice. It is fairly common with verbs like wash and shave, where it has a reflexive sense: John shaves (himself), Cathy washed (herself); it also occurs idiomatically with verbs like cook and drive:

A stew was cooking on the stove.
  Toyota's new suspension drives very well.

in 3, the verb has the form of a simple present passive; but I think most native speakers would understand this as a predication: the Subject, the order acts as the 'Topic', the verb is the copula is, and shipped is an adjectival Predicate Complement describing the status of the order.

Topic/SubjectThe order  VbPrCopulais  PredComp{shipped / delayed / pending / in transit / complete}.

In this context, there's really no reason to prefer any of these over the others. In other contexts, however, your choice might be significant. These two sentences, for instance, have quite different meanings:

The new Toyota drives well.  This is a statement about the quality of the car.
  John drives the new Toyota well.  This is a statement about John's ability as a driver.
Comment: @KinzleB Not in a main clause, though it may occur in a subordinate clause (*I'll call you when the order is shipped tomorrow*). We'd use a simple or progressive present (*ships / is shipping*), a future modal (*will ship*), or a marked infinitival idiom (*is {going / supposed / expected } to ship*, *is to be shipped*).
Comment: Is it possible to say "the order is shipped tomorrow" if this has been scheduled? @StoneyB
Answer: OP's two examples...

1: The order has shipped, [so] you will receive it soon
   2: The order is shipped, [so] you will receive it soon

Both mean exactly the same thing, but idiomatically most native speakers would usually say...

3: The order has been shipped, so you will receive it soon

Note - in #1 shipped is a true "verb" usage, describing something that the order "did" (syntactically, it *"caused itself to be" sent), whereas #2 is more an "adjectival" usage (the "status" of the order is sent, as opposed to, say, high priority, or overdue).
Thus, although both #1 and #2 are "valid" (and by no means uncommon), they're both at least slightly unusual (#1 because "active intransitive" it shipped is less common than either passive it was shipped or transitive we shipped it, and #2 because it sounds as if the speaker is simply reading the "status" column from a Sales Ledger database).
If we consider the same constructions with, say, cancelled (so you won't receive it), it should be clear that #1 doesn't work (nobody thinks an order can cancel itself), but #2 and #3 are okay. On the other hand, with expired (of a repeat order that ships weekly until a defined expiry date, say), #2 just about works as a "readout of order status column", but #3 is unacceptable.

TL;DR: Customers probably tend to think in terms of What has happened to my order?, for which #3 is the expected reply format. Sales operatives are more likely to think in terms of What phase in the sales process has this order reached?" (#1), or *What is the status of the order?" (#2).


Can I convert an emoji to PNG or SVG and use them as an clipart in my videos,games,logos etc

Question: Hey everyone I am bit confused with emojis license. I have made a website that convert an emoji into PNG and SVG.
Curious to know if they can be used as an clipart(commercial purpose) in videos,games,pictures or logos etc...
Answer: The shape of an emoji is an artistic creation and so is protected by copyright,unless it is judged to be too simple to have the required degree of originality for copyright protection (which may be the case for some emojis).
If an emoji's shape is protected, a translation or conversion to another format would be either a derivative work or a simple copy. In either case the permission of the copyright owner would be required, unless an exception to copyright such as fair use applied. It is hard to see hoe fair use in particular would apply in suvh a fact pattern. If it did not, permission would be required, and unless the owner had granted a license that covered the intended use, a new permission must be requested and obtained.
Comment: @tuskiomi The issue of  market harm is one of the fair use factors in US law. But even if her is no market, the other actors might tilt against fair use. depending on the details. Also, not all copyright  suits are about fair use. Some are about whether a design is original enough to be protected at all, which I mention in my answer. In that case markets may not matter at all. Of course if there is no market, perhaps no one will sue in any case.
Comment: Now here's a question, one thing that courts must consider in the US is how it affects the market for the original work. Emojis aren't sold. Emojis aren't advertised as a feature of any smart phone or web browser, and it could be said that there is no market for emojis, no?  Further, orthogonal markets such as games use Google's emojis as their main assets (https://teamwoodgames.com/), a market which has no relation to the original intent of emojis.  How is this typically handled in a court case?
Comment: Wouldn't many of the same principles apply here as for fonts? Unicode is the defining body for the abstract concept of an emoji and assigns each emoji a code point, e.g. 'face with raised eyebrow' is at code point U+1F928 and 'face vomiting' is at U+1F92E just as 'Latin small letter a' is at U+0061 and 'Latin small letter e' at U+0065. Even if the emoji itself (as an abstract concept) is not copyrighteable, wouldn't the concrete rendering of it be, just as the appearance of the letters a and e in a specific font can be (and regularly are) copyrighted, even if the letters itself are not?


Minecraft.exe server not working

Question: I am using Minecraft V 1.2.4 and server v 1.2.4 . I checked on 2 port checkers and got green lights for my external IPv4 connecting to port 25565. I can connect via localhost yet I cannot connect to my external I have tried shutting off my Firewall turning on network sharing. I Was Able to run the server with Hamachi and have other players connect. but I dont like using it and now that I cant figure this out I am Determined to make it work. I run Windows 8.1. Any Suggestions or help is Appreciated
Comment: want brand/model of router you use to get on internet? probably a port forwarding issue but fetching a guide will require the modem specs.
Comment: Are you trying to connect to your external address on the same computer running the server?
Comment: Is this for Pocket Edition? Minecraft's current up-to-date version is 1.7.4
Answer: It sounds like you don't have port forwarding set up properly on your router.
Merely opening ports through your firewall isn't enough, you're router has to know where to send data coming through a particular port, thus port forwarding.
The difference between opening a port in your firewall and port forwarding is this:
Opening port in firewall:
What this does is allow your computer to accept connections through which ever port you open. This would equate to opening a particular door or window to you house so that someone could get in.
Port Forwarding:
Port Forwarding is where you tell your router to route all the data coming in through a certain port to a particular IP on your local network (usually looks something like 192.168.1.xxx)
This would equate more to giving someone the instructions to find your house as opposed to opening a door or window for them.
Both are necessary, the data has to know where you computer is on your network and have the door opened so that it can be received by your computer.

A Website you may find helpful is THIS.
That website has instructions on how to port forward for a wide range of diferent router makes and models.

Hope this helps you out!
Answer: What you're trying to do is called "hairpin NAT". This basically allows you to access your external IP address from inside your network. Most home routers don't support this, causing your problem.
Have a friend on a different network try and connect. If that doesn't work, investigate your port forwarding options.
On another note, why 1.2.4? That's a very old version of Minecraft...

Minecraft.exe server not working


Symbol not found when dynamic library is moved

Question: I have an app that depends on a dynamic library that is not in a system location.  If the library is located in the location from which the executable was linked and LD_LIBRARY_PATH is set to that directory, the application runs.
If the libraries are copied to another directory and LD_LIBRARY_PATH is reset, the application won't start and an undefined symbol error occurs, despite the fact that the symbol appears to be in the library.
Any ideas why this may happen?
Thanks,
Answer: Try ldd to show what path used:
<code>ldd youprogram
</code>


Should I recalculate white balance for all my pictures after moving from iPhoto to Aperture?

Question: I been shooting in RAW since I got my DSLR about a year ago (why not? storage space? that gets bigger and bigger all the time) and I kept storing my pictures in iPhoto, but this week I moved to Aperture. I read in a blog post that the first thing someone did when moving to Lightroom was re-white-balance all pictures (or however you call it, I'm not even a hobbyist when it comes to photography). I am wondering if I should do the same, can anybody tell me? and if so, how is it done?
Answer: It depends on how you shot the files originally. Did you shoot with auto white balance in camera, a custom setting, or a preset? If you always shot with a certain preset or custom setting because you planned on modifying the white balance later, then you may benefit from a mass auto adjustment. If you used auto white balance, I doubt the mass auto adjustment would gain little if any improvement. If anything I would imagine it could cause more problems that you would have to fix when it reads it incorrectly.
The real benefit to white balance adjustment in post production would be the added knowledge you have of the situation and how you want it to turn out, so if you just are doing a mass auto setting, you really aren't using any of the advantages. It is beneficial that you shot in RAW originally, but I would leave the files alone unless you want to dig in and fix the images setting by setting(because that is how most white balance is set).
Comment: I haven't touched any white balance setting in my camera, I don't even remember seeing them at all. I thought when taking RAW pics they are not white-balanced at all, am I wrong?
Answer: It should be noted that often white balance is a matter of taste, or matter of pattern recognition, ie. not possible to do without human eye. For example, if the scene has both incandescent light and daylight, like in a room with lights on and a window, it's often matter of choosing which one to use. Or if you shoot in daylight, but frame the image so that only warm-colored items are showing, any automation will "correct" the colors to a lot cooler variants.
Comment: Yes, I understand. I never white-balanced any picture. What I read is that Lightroom automatic white-balance, for this other guy, was better that the camera automatic white-balance, so I thought maybe the same thing applies to me with Aperture.
Answer: Raw photos are not white balanced, however the metadata and of course, the embedded JPEG preview will contain some white balance setting based on the camera settings at the time. It may be an automatic white balance, day, night, cloudy etc. This will most often be honoured by default in the program, however the other development settings may not (contrast, brightness, saturation etc).
Both applications should be colour profile sensitive, and possibly be using the same raw conversion engine.
I would say it's not necessary.


Why doesn't current return via the grounding conductor when it's connected in the panel?

Question: Since the neutral wire and ground wire are connected in the main fuse box then why doesn't some of the returning electricity flow through the ground wire to earth?
Comment: I was going to write a full answer, but @noybman is right - you can Google to get a ton of info on how all this works. But the very short answer is: In modern well-designed appliances, there is normally no connection between the hot & neutral wires (the normal round-trip path) and the ground wire (which is connected to the case) and therefore no electricity is given the chance to go back via "ground". But when things go wrong, electricity can flow through ground wire and that is preferable to it going through "you".
Comment: Welcome to stack exchange Robert. Questions here should be about home improvement where you are seeking help on particular home improvemnt topics. Your question is "curiosity" or "educational" in nature, google returns a simple result with great detail: https://en.wikipedia.org/wiki/Ground_and_neutral
Answer: Be clear: electricity wants to return to source, not ground.   Human-made electricity wants to return to the supply transformer, generator, or solar panel which made that electricity.
Grasping this concept will make electricity make a lot more sense.
Nature-made electricity (lightning and ESD) wants to return to its source, which is typically earth.
Since you asked about house wiring...
A lot of novices get excited when they see the Equipotential bond between neutral and ground in the panel. "They are the same thing!" They're not. Neutral is the working conductor, ground (as in the ground wire) is an emergency path. Other reasons too.  But relevant  to this question is that human-made electricity only has a relationship with earth when we tell it to.
In this case, it's to clamp the potential of our service power to only a few hundred volts away from earth.  If it was allowed to "float", as in an isolated system, it could float thousands of volts above natural earth, especially if the supply transformer had a leak.  Think about an electric corded lawnmower.  It's probably insulated for 600V tops.  Keeping power clamped to 120 or 230 volts from earth is quite a safety win.

Equipotential bonding in more than one place creates huge problems, notably with paralleling and unintended current paths in the event of a wire break. Imagine a neutral wire breaks at the panel.  Suddenly all neutral current for the whole house comes out to a generator, across its carelessly left on neutral-ground bond, back to the panel, through the panel's N-G bond, and back to source.  This fries those wires (neutrals and grounds don't have breakers!) and sets your house on fire.  Wire breaks shouldn't do that.
That said, we "do it anyway" between a service (main panel) and its poletop supply transformer. Your house has bonding from N to G to earth.  Your transformer has bonding from N to earth.  Yes, that is a redundant, parallel path.
Current flows on parallel paths in proportion to their conductance (1/resistance).
So you have a a fat #4 aluminum service drop competing with a bunch of dirt.  The dirt's resistance will be quite high but it'll still get a piece of the action. A tiny piece.
But a tiny piece is worth worrying about.  Neutral current flow can easily be 20-30 amps.  And even 0.1% of that is 20-30 milliamps, which is enough to kick your butt.  Stun, and cause a secondary kill via falling or drowning. So treat ground bonds and grounding electrode systems with respect.
Comment: "Wants"? You make it sound like there's more than one kind of electricity, and that it has intent. Really it all comes down to resistance, right?
Comment: There is a potent wanting there.  Its force can be measured in volts.  And there *are* multiple kinds.  The kind that wants to return to mains neutral, the kind that wants to return to the solar panel + wire, the kind that wants to return to battery +, the kind that wants to return to generator neutral, etc.  And every kind can be on the same piece of metal at once.
Answer: Yes and No.
There are two separate systems with "ground wires" in the typical US residential service, the three wire Edison service.
The Grounding Electrode System (GES) consists of ground rods and other grounding electrodes, connected (bonded) by a grounding electrode conductor (GEC) to the neutral at the first means of disconnect.
The Equiment Grounding System (EGS) consists of the equipment ground conductors (EGC's or ground wires) run along with all the feeders and branch circuits in the house.  The EGS is also bonded to the neutral at the main bond, nowhere else.
Under normal circumstances, no current flows on the EGS;  it does not provide a path back to the neutral at the panel to complete the circuit.  Current flows on the EGC when there's a ground fault so that the fault will draw enough current to open the fuse or breaker, clearing the fault.
The GES doesn't carry much current under normal circumstances, but whenever there is current on the neutral, there is some current flowing through the GES, through the ground, through the neutral bond to the ground at the utility pole.
Current doesn't only take the path of least resistance;  it takes all paths, with more flowing on low resistance paths, and less flowing on high resistance paths.
Normally the neutral wire has very very little resistance, and the ground has significant resistance, so although they are parallel paths back to the utility transformer, very little current flows in the ground, almost all flows through the service neutral conductor.
Comment: Good edits...  +1
Comment: Yes, it is a parallel path to the netural.  Think about it. (Edited answer.)
Comment: @Harper - Wait I think you're saying no current on the EGC, which I agree with, I am saying there is current on the GEC.


Can I align images via manually-set control points?

Question: I have two images I would like to align. Autoalign is not possible because the images display the same place in different weather conditions. Is it possible that I select few control points (building corners, streetlamps, street etc) that should be aligned and the rest of the image would align via interpolation?
Comment: Do you by chance have any sample images?
Answer: Yes. You can do this quite easily in Hugin, a popular open source Guide tool for panorama creation and other image alignment tasks. You can read about the details in the corresponding page of the manual, but it really just comes down to going to the control points tab and adding them by clicking. (There's no special trick to it; it's part of the program's basic functionality.) As the docs suggest, you should have at least three points per image for basic corrections, and more for more complicated ones.
You also might try automatic point selection; depending on the images, it may work better than you expect.


Does San Francisco and California law have jurisdiction in the Presidio of San Francisco?

Question: The Presidio is rumoured to be federal land, and I'm wondering how that affects what law is applicable there. Does California law have any effect there?
Comment: Seconded! It would be especially helpful to know what laws DO cover this area. What laws define the rights and protections of residents and employees?
Answer: Only a partial answer as I (and maybe others) attempt further research...
The Presidio of San Francisco falls within the care of the National Park Service (NPS) that...

... carries out its responsibilities in parks and programs under the authority of Federal laws, regulations, and Executive Orders, and in accord with policies established by the Director of the National Park Service and the Secretary of the Interior. (Source: NPS)

And

As a general principle, state or local governments may not directly enforce their laws against the National Park Service with respect to federal lands and activities within units of the National Park System. This principle originates in the U.S. Constitution.

Article IV of the U.S. Constitution outlines the relationship between the states and the Federal Government, and each state and the others.
Article IV, Section 3, Clause 2, known as the Property Clause, grants Congress:

Power to dispose of and make all needful Rules and Regulations respecting the Territory or other Property belonging to the United States….

This delegation of authority to Congress over federal lands, and the re-delegation of that authority to the various land management agencies, prevents states from enforcing their laws and regulations that pertain to lands, such as zoning, building permits, and land use regulations.
(Source: NPS Applicability of State and Local Laws to NPS Activities pdf)
Comment: @Trish yes, and furthermore the sentence does not concern laws that pertain only to matters other than "federal lands and activities," though how the NPS could do something outside the scope of federal activity isn't clear to me.  Regardless, California criminal law, as an example, would be enforceable against people who are not federal employees or officers, and I believe also against federal employees and officers for acts outside of their official duties.  I believe NPS law enforcement can issue citations for violations of state law.
Comment: **against the national park service**, means exactly that. If the target is not the NPS, that sentence dows not apply, yes?
Comment: IIRC, most state laws apply in national park service land, either directly, or via assimilative statutes that incorporate state law by reference as federal law applicable there. CA private law (e.g. torts and contract law and other laws governing interactions between non-governmental parties) would generally apply there I think.
Comment: @phoog NPS has, afaik, additional (federal) statutes or regulations they can issue citations and fines under, most of which concern the protection of the parks or punishing damage to it (e.g. littering, open fire...)
Comment: "against the national park service" but CA has done exactly that. In the big government shutdown over Obamacare, the NPS tried to kick everybody out of Yosemite immediately. CA stepped in and said evictions take three days minimum. (Which is an extremely lenient interpretation of CA law being granted to the NPS. Most evictions that aren't for nonpayment take at least five).


Do corrosion resistant rotors perform less?

Question: Slightly costlier ( $35 vs $54 in a popular chain for 2005 Camry front) rotors do not rust. But does it come at a cost of performance?  The surface might be more smooth and hence have less friction during braking.
Comment: No they do not perform less. Its the material they are made from that does not rust, has nothing to do with the surface.
Answer: I had to search the internet on this question; It appears to be a gimmick. that is no substantial change from standard rotors. I found two different techniques : One , coat or paint the rotor , this protects the non-wear surfaces from rust . However , about the only rotor surfaces that can be seen are the wear surfaces ( with the wheels on). It would be much more noticeable to paint the calipers. The second type was to carbo -nitride the standard rotors. This is a surface treatment that puts a very thin , very hard layer on the iron. This hard layer might give better wear resistance but the mileage they claim is what I am presently getting with standard rotors. They also claim some corrosion protection but as a professional corrosion engineer I have never heard of a carbo-nitride layer being used for corrosion protection and would expect only a minor affect , if any. Carbo-nitride is traditionally used on items like drill bits. There were various vague claims of "alloy" and chrome but nothing specific so apparently they were talking about the traces of Cr, Mo, and Ni that are in all modern steels and irons because of recycled scrape.


Disable history in Chromium?

Question: Is there really no way at all to make Chromium clear browsing history on exit? The closest way I know is to use incognito mode, which is fine except for the inconvenience of opening the browser, opening an incognito tab, then closing the original tab. Furthermore, when I click on a link in a different program, it will open in a regular tab, not an incognito tab, if the browser is not running.
Answer: For clearing cookies on exit:

Enable: Settings->Privacy and security->Site settings->Cookies->Keep local data until you quit your browser

(You can always exclude sites from this rule, down in the section: Sites that can always use cookies. E.g. exclude stackoverflow.com to stay logged-in between browser restarts )
For clearing browsing history on exit:
You need to change the value of policy setting: SavingBrowserHistoryDisabled
Depending on the OS the location and value of the setting changes.
windows/chromeOS:
Set Registry value  Software\Policies\Google\Chrome\SavingBrowserHistoryDisabled to 0x00000001
linux
#1.  chose directory
#based on this doc: https://www.chromium.org/administrators/linux-quick-start
# chrome
cd /etc/opt/chrome/
# chromium
cd /etc/chromium/

# however on my ubuntu:
cd /etc/chromium-browser/

# 2.
mkdir -p policies/managed
cd policies/managed

# become su
sudo -i

# 3. Just edit a new or existing json file (e.g. custom_policy.json)
# and add the key-value pair: {"SavingBrowserHistoryDisabled" : true}
vim custom_policy.json

# 3 Alternatively from the command line
[ -f custom_policy.json ] || echo "{}" > custom_policy.json
jq '.SavingBrowserHistoryDisabled = true' custom_policy.json|sponge custom_policy.json

# 4. remove write permission (otherwise it wont' work.)
chmod -w custom_policy.json
chmod go-w .

mac
For mac follow this guide. The corresponding value should be set to: <true />

Then after restarting your browser you should see the loaded policy with values under: chrome://policy
In the (3 dots) menu section also you will now see the message: Managed by your organization
manually clearing history and cookes:
Ctrl-Shift-Delete -> Select options to clear-> Press clear data
LINKS:

https://www.chromium.org/administrators/policy-list-3#SavingBrowserHistoryDisabled
https://cloud.google.com/docs/chrome-enterprise/policies/?policy=SavingBrowserHistoryDisabled
Answer: I see 3 ways:

The simple way is to use the Incognito mode automatically.
Add --incognito flag at the end of the Chromium shortcut and restart the browser. This way works on Chromium and Google Chrome.

Now, you browse in Incognito mode all the time.

Use a browser extension like Click&Clean and close Chromium with it.
Clean history manually with clearBrowserData. Just type chrome://settings/clearBrowserData in the address bar (omnibox) before to close Chromium.

Disable history in Chromium?


Is Vector in Cosine Similarity the same as vector in Physics?

Question: I'm new to Data Science. I'm trying to understand cosine similarity and it seems like the equation is about finding the distance between two vectors. From what I've Googled, a vector needs to have magnitude and direction. But in CS, it seems like it's a 1-dimensional array. Is vector in CS the same as vector in Physics? If so, what is the direction of a vector. And if a vector is like this [1, 0, 1, 0] what is the magnitude of this vector?
Comment: This explanation may help  https://en.wikipedia.org/wiki/Vector_space_model
Answer: As you ask specifically for the Cosine Similarity technique, it has magnitude and direction, and similar to a vector which is used in Physics, as Cosine Similarity deals with vectors in an inner product space.

So, the magnitude of vectors is exactly the same as the formula in Physics (summating over the squares of the vector elements.)
Answer: Yes, they are the same.
The array [1, 0, 1, 0] represents a vector in $4$ dimensional euclidean space ($\mathbb{R}^4$) with tails at [0, 0 , 0 ,0] and head at  [1, 0, 1, 0]. So your vector is "pointing" in the direction of your given set of coordinates.
This might be easier to visualize in $2$ dimensions: for example, the array [1,0] corresponds to the unit vector along the $x$-axis centered at the origin.


Finding Surface of Inner Volume mesh

Question: I am working on the generation of Hexahedral mesh generation using octree based discretization. I have a volume mesh (Hexahedral), using isomorphism I need to project the outermost surface vertices of inner mesh onto original mesh. Could anyone help me on how to extract the surface of inner mesh?
Answer: I think the term you are looking for "Surface nets".
In Surface nets, instead of doing an exact projection onto the mesh surface, an filtering-based approximation is used. For example, in this paper, they use an iterative smoothing process, that keeps all vertices in their original volume boundary.
Comment: Hello Jimmy,Thank you for your response. But, I am looking to find a way to extract the outter most surface of inner mesh. I really appreciate your post. But, I am not looking for smoothing methods.
Comment: @akhil I think you may have misunderstood what surface nets are. They are not simply a smoothing method. They are a way to polygonise an implicit surface by building a mesh out voxel edges and then projecting the vertices onto the actual surface. The only difference to your problem is that surface nets create a manifold mesh, not a hexahedral one, but the basic principle is the same. So when you talk of projecting the surface of the inner mesh onto the actual surface, it is EXACTLY what you want.
Answer: I think you need to create a signed distance field based on the original mesh.
Then you can use gradient descent to iteratively move the outer vertices along the gradient of the distance field towards the orginal mesh surface.
The gradient of a scalar field can be constructed like this:
<code>float getFieldAtPosition(vec3 _Pos) {
    return ... <- return value of signed distance function
}

vec3 getGradientAtPosition(vec3 _Pos) {
    float epsilon = 0.01; // small offset
    vec3 gradient;
    gradient.x = getFieldAtPosition(_Pos+vec(epsilon,0,0)) - getFieldAtPosition(_Pos-vec(epsilon,0,0));
    gradient.y = getFieldAtPosition(_Pos+vec(0,epsilon,0)) - getFieldAtPosition(_Pos-vec(0,epsilon,0));
    gradient.z = getFieldAtPosition(_Pos+vec(0,0,epsilon)) - getFieldAtPosition(_Pos-vec(0,0,epsilon));
    return gradient;
}
</code>
Hope that helps.

Finding Surface of Inner Volume mesh


Relevance of "Crossroads of Twilight" title to the story

Question: After reading the "Wheel of Time" series by Robert Jordan, I don't understand why book 10 was named "Crossroads of Twilight." I don't remember there being any sort of crossroads in this book whatsoever. Why is the book named this? Is there something I missed while reading?
Comment: There's a couple of passing (and non-relevant) mentions of crossroads in the book, once in the glossary ("*It is held to be especially dangerous to meet the Wild Hunt at a crossroads*") and once in the text ("*Just before sunrise was one of the worst times to meet the Wild Hunt, when darkness was changing to light but the light had not taken hold. At least there was no crossroads nearby...*"
Answer: The crossroad (of the title) is mentioned in the intro to the book:

"And it shall come to pass, in the days when the Dark Hunt rides, when
  the right hand falters and the left hand strays, that mankind shall
  come to the Crossroads of Twilight and all that is, all that was, and
  all that will be shall balance on the point of a sword, while the
  winds of the Shadow grow."
From the Prophecies of the Dragon; translation believed done by Jain
  Charin, known as Jain Farstrider, shortly before his disappearance.

The publisher marketing blurb states that:

"In the tenth book of the Wheel of Time from the New York Times #1
  bestselling author Robert Jordan, the world and the characters stand
  at a crossroads, and the world approaches twilight, when the power of
  the Shadow grows stronger."


Transfer WhatsApp chat history to new device

Question: I've got a new phone (Samsung) and want to transfer my WhatsApp chat history from my old device to it. Is this possible, and how to do it? I have a WhatsApp backup file for that date.
Comment: http://android.stackexchange.com/questions/52684/fail-in-restoring-whatsapp-chats?rq=1 this may help
Comment: For troubleshooting: [WhatsApp doesn't prompt to restore from local storage](https://android.stackexchange.com/q/203523/44325)
Answer:
Go to WhatsApp > Settings > Chat's and Calls > Back up chats
Connect your old phone to a computer
Go into the device's internal storage and search for the folder WhatsApp
Copy it to your computer and plug in your new phone.
Open internal storage and copy the folder WhatsApp to your internal storage.
Install WhatsApp on your new phone (if already done, clear data of WhatsApp), set it up and you'll be asked if you wan to restore the backup.
Click yes and enjoy.
Comment: Doesn't always work: What to do if e.g. WA comes pre-installed on the new device? I've had such a case, and even after clearing data it didn't find/recognize its own backups (though it made new backups into exactly the same directory). So on that device, we proceeded up to step 5 and half of step 6 – but were only asked for the phone number to verify, and got no chance for step 7 to enjoy :(
Answer: As referred in the WhatsApp FAQ:

You can transfer chats from one Android phone to another. To do so, please follow these steps:

To start, make a backup of your most recent chats.

Go to WhatsApp → Menu Button → Settings → Chat settings → Back up chats.

Next, transfer this backup to your new Android phone.

If your phone has an external microSD card, take the microSD card out of your old phone, and pop it into your new one.
For phones that have an internal memory / internal SD card (like most Samsung devices), you will need to transfer the /sdcard/WhatsApp/ folder from your old phone to the same folder of your new phone. There are a couple of ways you can do this. You can use a file explorer or even transfer the backup files to your computer.
Please note that it is possible to be missing some files during the transfer. Please double check to make sure all the files you wish to transfer over to your new phone are included in the backup.
If you are unsure about what kind of SD card you have, we recommend checking your phone's specifications on your phone manufacturer's website.

Once you have safely transferred your backup, you can install WhatsApp on your new Android phone.
During the installation process, WhatsApp will automatically find your backup and ask you if you would like to restore it. Once restored, your old chats will appear on your new phone.
Comment: Unfortunately this only works if you haven't already transferred service over to your new phone. If you transfer service, WhatsApp will lock itself on your old phone, and the menu will not have any options except 'Contact Support'. Are there instructions that work when the new phone has already been activated?
Answer: Go to settings, chat settings and choose backup conversations.
Now go to your phone storage (internal SD card) via file manager, go to the file named Whatsapp, go to the databases folder (i.e. <code>/sdcard/Whatsapp/Databases</code>). Choose the one without any date in its file name. It is the latest one. Transfer that file to the same location in your new device after installing Whatsapp. Now when you open Whatsapp for the first time in your new device, it will prompt you to restore the chats. This does not need the phone to be rooted :) Good luck :)
Comment: I've edited your post for clarification. Still: I was just brought the old and new phone of someone "on the move", did exactly that (the WA FAQ says the same) – but WA didn't find/recognize it (though it placed its new backups exactly there).
Answer: Just copy your WhatsApp folder from your device to your new device, install WhatsApp and it will automatically tell you that he found a backup as long as you use the same SIM card.
You don't even need to activate it again because the backups are registered to your inserted SIM number.
Just make sure you place it in the root folder of your new device.
For some reason other answers although correct look very complicated.
Comment: My experience was different: New phone, same SIM, same number. Had to activate it again (verifying the phone number via SMS), didn't accept the backups to import (didn't find them at all, but placed its new ones into the same location later). Lousy implementation of backup/restore.
Answer: Backup chat history via your gmail account. then restore chat history in your new device
Go to backup
WhatsApp → Menu Button
→ Settings
→ Chat settings
→ Back up chats via gmail account.
login new device
restore chat history via gmail account
Answer: WhatsApp now allows backup/restore via Google Drive. This is by far the easiest method for moving to a new phone. The WhatsApp FAQ page is pretty straightforward, but here's the bit that you'll need:
Backup on Old Phone

Open WhatsApp.
Go to Menu Button > Settings > Chats > Chat backup.
Tap Back up to Google Drive and set up the backup frequency to your
liking.
You will be prompted to select a Google account that you will back
up your chat history to. If you do not have a Google account, tap
Add account when prompted. Please remember the Google account you
are using for the backup.
Tap Back up over to choose the network you wish to use for backup.
Please note that backing up over cellular may result in additional
data charges.

Restore on New Phone

Make sure the same Google account that was used to perform the
backup has been added to your phone.
Uninstall and reinstall WhatsApp.
After verifying your number, you will be prompted to restore your
messages and media from Google Drive.
After the restoration process is complete, tap Next and your chats
will be displayed once initialization is complete.
After restoring your chats, WhatsApp will begin restoring your media
files.
Answer: You can try the following

FileDrop
If you're looking for an app that keeps things simple, then I tink you're going to like FileDrop. It's a free app you can install from Google Play and is very easy to use.
When you first install the app, you'll see that it's divided into two sections. The top part will ask you to sign into your Dropbox account, and the bottom part will show you all the files you have on your Android device.
Don't worry if you didn't previously create a folder since you can create one directly from the app. Just tap on the drive icon on the top left and tap on Create Directory. If you want to rename a folder that's where your WhatsApp content will go, you can do that too.
How to Backup Your WhatsApp Files to Dropbox
The option you need to tap on is ¨As Sync Directory¨. Now, tap on the folder you want the WhatsApp backup to go to. Switch to the bottom section of the app and scroll until you see the WhatsApp folder. Tap on it and then select what you want to backup. I chose Media.
Then tap on the SD card icon and select As Sync Directory. Once you've done that tap on the cloud and sun icon to the right of your display. Tap on the Turn On Sync Feature and then enable Use Sync. After that, it should automatically start backing up your WhatsApp content.
If you want the app to automatically backup your WhatsApp content, tap on the Turn On Sync > Sync Policy > Enable Auto Sync.

Source: How to Backup WhatsApp


How do you hook NewRelic monitoring into ExpressionEngine

Question: I use NewRelic to monitor site performance, but since everything runs through index.php, the amount of data I get back regarding controller performance is limited and clumped together. How can I get more granular performance data?
Answer: Does this help ?
Instrumenting ExpressionEngine with New Relic ( and Tracelytics )
http://learningsomethingnewwith.wordpress.com/2012/03/04/instrumenting-expressionengine-with-tracelytics-and-new-relic/
Comment: I was just looking at that. It looks a little hacky (is that a word?) I wonder if a proper add-on could be built and if that article is a head start in right direction.
Comment: Thanks, I have implemented and it works well. It would be cool to do something cleaner with an extension of sorts..
Comment: I wrote that blog post. At the time the hooks system was at least one right way to implement it. Now that EE has native New Relic support, you'd probably definitely want to go with that. :)
Answer: FYI: EllisLab released New Relic monitoring in ExpressionEngine 2.7
http://ellislab.com/blog/entry/expressionengine-2.7.0-released (2nd sub head down)


Source for Tehillim of your age?

Question: Does anybody know of a source for the minhag to recite daily the perek of tehillim corresponding to your age?
Comment: welcome to Mi Yodeya LMR thanks to you I discovered this minhag. Good question
Comment: related http://judaism.stackexchange.com/q/56735/759
Comment: LMR welcome to Mi Yodeya, and thanks very much for the interesting question! I hope you'll look around and find other Q&A of interest and stay learning with us.
Comment: Chabad is the source for this Minhag.
Answer: This is a custom transmitted from the Maggid of Mezritch to the Alter Rebbe of Lubavitch in the name of the Ba'al Shem Tov.
This is recorded in a letter of the Previous Lubavitcher Rebbe, printed in the back of תהלים אהל יוסף יצחק. In this print it is on page 214.
The full letter is printed in Vol 10 of his letters, page 53.
The reason for the custom is cryptically described by the Alter Rebbe here (מאמרי אדה"ז הקצרים page 341), which is somewhat explained by the most recent Lubavitcher Rebbe here.

Source for Tehillim of your age?


Putting "widgets" on Mac desktop

Question: Is there any software to put certain "widgets" on the desktop, such as notes or a clock? I would like to have apps permanently affixed there, rather than being open as separate apps or hovering over other windows.
Answer: In some versions of Mac OS X it is possible to detach widgets from the Dashboard and leave them on the desktop.
Enable Dashboard Development Mode

Launch Utilities > Terminal.app
Issue the command defaults write com.apple.dashboard devmode YES
Issue the command killall Dock
Quit Terminal.app
Display the Dashboard; using the F12 key
Click and hold on a widget
Hide the Dashboard; using the F12 key
In development mode, the widget remains visible and can now be positioned on the Desktop

These steps were originally for Mac OS X 10.4 but this technique is reported to still work with 10.8, Mountain Lion.
Comment: Works in Mavericks. OS X 10.10.3. However, they still float above all other windows.
Comment: Doesn't Seem to be working in Mavericks. Just saying because the OP tagged `Mavericks`.
Comment: I am also unable to recreate this on OS X 10.9.2; Apple appears to have removed the behaviour.
Answer: First you have to go to System Prefrences>Mission Control and uncheck Show Dashboard as a Space...
This still works, killall Dock after moving widgets to desktop
Answer: There is an application called the Dashboard that houses widgets. Below is a screenshot of the app icon, and another screenshot of my Dashboard.
Comment: This does not answer the question…
Comment: works. then click the Plus sign at the bottom to add widgets..

Putting "widgets" on Mac desktop