Moving Average, Exponential Smoothing, and Random Walk for Forecasting

Question: I would like to confirm my understanding. Is it true that a (simple) exponential smoothing model with alpha (smoothing constant) = 1 is the same as MA(1), which is in turn the same as a random walk model? (i.e. using only the most recent observation as the forecast for all future periods)?
Comment: Short answer: they are all different. Only the RW model uses the last observation as forecast. MA(1) and SES do something else. Check out the ["Forecasting: Principles and Practice"](https://www.otexts.org/fpp) textbook for some introductory material on these models. See also my comment under Carl's answer.
Answer:
Is it true that a (simple) exponential smoothing model with alpha (smoothing constant) = 1 is the same as MA(1), which is in turn the same as a random walk model? (i.e. using only the most recent observation as the forecast for all future periods)?

No, it is not. Here are the forecasts by the three models:

Simple exponential smoothing (SES; see section 7.1 of Hyndman & Athanasopoulos "Forecasting: Principles and Practice"):
$$
\hat x_{t+1|t} = \alpha x_t + \alpha(1-\alpha)x_{t-1} + \alpha(1-\alpha)^2 x_{t-2} + \alpha(1-\alpha)^3 x_{t-3} + \dots
$$

Moving average of order 1 (MA(1); see section 8.4 of the same textbook):
$$
\hat x_{t+1|t} = \mu + \alpha\hat\varepsilon_t
$$
where $\varepsilon_t = x_t - \hat x_{t-1}$. By iterated substitution,
$$
\hat x_{t+1|t} = \mu(1-\alpha+\alpha^2-\alpha^3+\dots) + \alpha x_{t-1} - \alpha^2 x_{t-2} + \alpha^3 x_{t-3} - \dots
$$

Random walk (RW):
$$
\hat x_{t+1|t} = x_t.
$$

As you can see, they are all quite different. It is only RW that uses the most recent observation as the forecast for all future periods. Meanwhile, both SES and MA(1) (implicitly) use a linear combination of all past observations to forecast the future.
When $\alpha=1$ for SES (but not for MA(1)), you get

SES: $\hat x_{t+1|t} = x_t$.

Hence, there SES coincides with RW but MA(1) is different. Also, even if we take $\alpha=1$ for MA(1), it still does not coincide with SES or RW. However, if you replaced MA(1) with AR(1), then your conjecture would be correct.
Edit: If by MA(1) you mean moving average of one element rather than the moving average model of order 1 (which it is the standard notation for), then indeed that forecast will coincide with the RW and SES forecasts under $\alpha=1$.
Comment: @BigBen, thank you, fixed!
Answer: A moving average can have a choice of a large set of decreasing weights into the past. One such is an exponential function, and exponential functions are memoryless in the sense that they have a constant rate of decreased weightings looking retrospectively. Thus, although exponential functions find use for moving averages, power functions and many other functions do as well.
{Random walk](https://en.wikipedia.org/wiki/Random_walk) is something entirely different. Morn gives this example in Wikipedia

As you can see, these many random walks have increasing noise the further out they are extrapolated. Moving averages are smooths and have less noise than any single datum beyond the first. Moving averages are not extrapolations, they are estimates of location.
Comment: That is not a moving average model. The MA(q) model is defined as
$$
x_t=\mu+\varepsilon_t+\theta_1\varepsilon_{t-1}+\dots+\theta_q\varepsilon_{t-q}.
$$
Check out [Wikipedia](https://en.wikipedia.org/wiki/Moving-average_model) for more details. Specifically, *The moving-average model should not be confused with the moving average, a distinct concept despite some similarities*.
Comment: Thanks all for your help. I indeed was confusing "moving average" with "moving-average model." What I was asking about was actually just a simple moving average (not moving-average model).

 \begin{aligned}F_{t+1}={\overline {MA}}(n) &={\frac {p_{t}+p_{t-1}+\cdots +p_{t-(n-1)}}{n}}\\&={\frac {1}{n}}\sum _{i=0}^{n-1}p_{t-i}\end{aligned}
Comment: Thanks so much @Carl for your explanation and for the knowledge.

I guess I didn't clarify my question well enough. I am specifically looking for the application of these models in forecasting.

My understanding is whether you use a (simple) MA or SES to generate forecasts, you will just generate a single forecast, based on the most recent observations, and use that forecast for all future periods (locally constant, i.e. non-trended, forecast).
Comment: Then, both MA(1) and SES with smoothing constant of 1 rely completely on the most recent observation alone. Is this correct? Also, if you were to forecast based on a (simple, symmetric) random walk model, you would also assume the future is best described by the most recent observation. Is this correct?

In other words, under these three forecasting methods, would you just use the most recent observation as your forecast for any future periods? (Of course, these specific models are not likely to do well in general.)
Comment: Not correct. For example, a moving average of the numbers 1, 3, 2, 4, 6, 5 could be have 3, 2, 1 weighs, that is $$\frac{3*5+2*6+1*4}{3+2+1}=\frac{15+12+4}{6}=\frac{31}{6}=5\space \frac{1}{6}$$
Comment: Usually, regression models are used for forecasting.
Comment: Also, regression models are used as much for forecasting as for explanatory modelling (if not more for the latter; it depends on the field). In contrast, SES, MA and RW models are used mainly for forecasting rather than explanatory modelling (probably because they do not allow for much interpretation by construction).
Comment: @RichardHardy I hear you, and yes, that's true, but, this was more of a what is a moving average question, rather than what is a moving average model question. And, you are correct, OP should have had something else in mind to fit the context of the origin of the question, but, didn't actually get that far in the asking.
Comment: @Carl, thanks. Seeing MA(1) on Cross Validated produces a knee-jerk reaction. I had never seen moving average of one element before (what are you averaging over then), so it did not occur to me that MA(1) could be anything but the MA(1) model. Good that we got the OP to explain it in the end.


Simulate a DELETE CASCADE in MySQL?

Question: Is it possible to predict the operations that follow a DELETE CASCADE automatically? In my software I would like to give the user a warning with details about the data that would be deleted then.
Comment: Good question, i am interested in the answer too.
Comment: The only reasonable approach I can think of currently is `SHOW FULL COLUMNS FROM ` and then traverse into the corresponding tables... (hardcodes fkey_names => table_names...)
Answer: You can make a copy of the database and put triggers on the after delete
DELIMITER $$

CREATE TRIGGER ad_table1_each AFTER DELETE ON table1 FOR EACH ROW
BEGIN
  INSERT INTO log VALUES (null                 /*autoinc id*/
        , 'table1'                             /*tablename*/
        , old.id                               /*tableid*/
        , concat_ws(',',old.field1,old.field2  /*CSV's of fields*/
        , NOW()                                /*timestamp*/
        , 'delete');                           /*what action*/

  REPLACE INTO restore_table1 VALUES (old.id,
        , old.field1
        , old.field2
        , ... );

END $$

DELIMITER ;

The log table is just a table with the following fields:
id            integer autoincrement primary key
tablename     varchar(45)
table_id      integer
fields        varchar(6000)
delete_time   timestamp
action        enum('insert','update','delete')

If you do a SELECT @last_id:= max(id) FROM log before the delete cascade on the copy.
Then you can do a SELECT * FROM log WHERE id > @last_id
and get all the rows that will be deleted in the cascade.
After that you can use the restore_table1 to recreate the rows that were deleted in the cascade in the copy database.
Answer: I think you could use Johan's trigger solution in combination with a transaction that you roll back. This avoids both the need for a second database and for the manual restore of the deleted entries.

add the trigger and the log table
for each attempted deletion start a transaction and delete the entries
present the information from the log to your user for approval
if the user agrees commit the transaction, otherwise rollback
Comment: @user694971: I think you need the log if you want to show the deleted entries to the user. Without it you can only show the remaining entries, unless your application logic can work that out.
Comment: The only problem is, if the engine that you log into also supports transactions, than the logging will be rolled back as well, so you need to use a non-transactional engine for the logging, like MyISAM.
Comment: The transaction idea is great. In fact I would neither use triggers nor a log for that. I would just simulate the delete and afterwards rollback.
Answer: I wrote a very quick hack that does exactly what you need in PHP, since I wanted to do the exact same thing and haven't found any resources for that online.
It might be too late for you, but it may help others.
function get_referencing_foreign_keys ($database, $table) {
    $query = 'SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA = "'.$database.'" AND REFERENCED_TABLE_NAME = '.esc($table);
    $result = rquery($query);
    $foreign_keys = array();
    while ($row = mysql_fetch_row($result)) {
        $foreign_keys[] = array('database' => $row[0], 'table' => $row[1], 'column' => $row[2], 'reference_column' => $row[3]);
    }

    return $foreign_keys;
}

function get_foreign_key_deleted_data_html ($database, $table, $where) {
    $data = get_foreign_key_deleted_data ($database, $table, $where);

    $html = '';
    foreach ($data as $key => $this_data) {
        $html .= "
$key
\n";

        $html .= "
\n";
        $i = 0;
        foreach ($this_data as $value) {
            if($i == 0) {
                $html .= "\t
\n";
                foreach ($value as $column => $column_value) {
                    $html .= "\t\t".htmlentities($column)."	\n";
                }
                $html .= "\t
\n";
            }
            $html .= "\t
\n";
            foreach ($value as $column => $column_value) {
                $html .= "\t\t".htmlentities($column_value)."	\n";
            }
            $html .= "\t
\n";
            $i++;
        }
        $html .= "
\n";
    }

    return $html;
}

function get_foreign_key_deleted_data ($database, $table, $where) {
    $GLOBALS['get_data_that_would_be_deleted'] = array();
    $data = get_data_that_would_be_deleted($database, $table, $where);
    $GLOBALS['get_data_that_would_be_deleted'] = array();
    return $data;
}

function get_data_that_would_be_deleted ($database, $table, $where, $recursion = 100) {
    if($recursion <= 0) {
        die("Deep recursion!");
    }

    if($recursion == 100) {
        $GLOBALS['get_data_that_would_be_deleted'] = array();
    }

    if($table) {
        if(is_array($where)) {
            $foreign_keys = get_referencing_foreign_keys($database, $table);
            $data = array();

            $query = 'SELECT * FROM `'.$table.'`';
            if(count($where)) {
                $query .= ' WHERE 1';
                foreach ($where as $name => $value) {
                    $query .= " AND `$name` = ".esc($value);
                }
            }
            $result = rquery($query);

            $to_check = array();

            while ($row = mysql_fetch_row($result)) {
                $new_row = array();
                $i = 0;
                foreach ($row as $this_row) {
                    $field_info = mysql_fetch_field($result, $i);
                    $new_row[$field_info->name] = $this_row;
                    foreach ($foreign_keys as $this_foreign_key) {
                        if($this_foreign_key['reference_column'] == $field_info->name) {
                            $to_check[] = array('value' => $this_row, 'foreign_key' => array('table' => $this_foreign_key['table'], 'column' => $this_foreign_key['column'], 'database' => $this_foreign_key['database']));
                        }
                    }
                    $i++;
                }
                $GLOBALS['get_data_that_would_be_deleted'][$table][] = $new_row;
            }
            foreach ($to_check as $this_to_check) {
                if(isset($this_to_check['value']) && !is_null($this_to_check['value'])) {
                    get_data_that_would_be_deleted($database, $this_to_check['foreign_key']['table'], array($this_to_check['foreign_key']['column'] => $this_to_check['value']), $recursion - 1);;
                }
            }

            $data = $GLOBALS['get_data_that_would_be_deleted'];

            return $data;
        } else {
            die("\$where needs to be an array with column_name => value pairs");
        }
    } else {
        die("\$table was not defined!");
    }
}

Imagine I have a table called "table" in the database "db" and I want to delete the one with the id 180, then I'd call:
print(get_foreign_key_deleted_data_html('db', 'table', array('id' => 180)));

and it prints a full table with all the rows and all the values that would be deleted.
But as I've said, this is a very, very quick and dirty hack. I'd be glad for any bug-report (and there surely are a lot of them!).

Simulate a DELETE CASCADE in MySQL?


Radioactive Babyface

Question:
Clues: [Contextual Images]
[hexagon made of 6 shapes]
[polygon filled with letters]
[alien at a bar]

Instructions: Name That Castle

_ _ â _ _ _ _ _ _ _ _ _ _ è _ _ _
Answer: My first attempt was to do this, which gave me nothing:

So instead, I realized it made more sense to attempt this:

By doing this, I am left with:

 H R G E R I G, as well as the last photo and title. As mentioned in the comment, These letters can be rearranged to form one name, H R Giger (as per the hint in the comments).

Doing this gets me to what I believe to be the solution:

 Giger bought a castle, the Saint-Germain Castle in Gruyères. In French, château can be translated to mean castle. Therefore, the answer is:
_ _ a _ _ _ _ _ _ _ _ _ _ e _ _ _
c h a t e a u d e g r u y e r e s

Additionally:

 H R Giger was the artist who designed the xenomorph in the Alien movie series, which solves the last photo (thank you again to the comment)

OP Edit:

 The title is a 2-part hint.  Hint 1 refers to the wall of tortured babies that cover one wall of the HR Giger bar in Château de Gruyères   Hint 2 is that a Geiger Counter is used to detect radiation.

 If you're ever in Gruyères Switzerland, be sure to visit this amazing place
Comment: ROT13: Gur yrggref yrsg bire fcryy U E Tvtre, gur negvfg jub qrfvtarq gur krabzbecu va gur Nyvra zbivr frevrf. Tvtre chepunfrq n pnfgyr, Fnvag-Treznva Pnfgyr va Tehlrerf, juvpu ubhfrf n zhfrhz bs Tvtre'f jbex. Ohg V pna'g frr ubj gung svgf jvgu gur ninvynoyr oynax fcnprf. Gur orfg V pna qb vf "Pungrnh va Tehlrerf".
Comment: You got the first part right! The letters all combine to spell one name.
Answer: I believe that the answer is

 Château de Montrésor

When I saw the â and è, I thought of castles in France. I looked up "list of castles in France" and found this.
I also looked up the meaning of Château and found that it meant "a large French country house or castle, often giving its name to wine made in its neighborhood."
I think that is why shows an alien at a bar.
Comment: I don't know if this answer is right, but either way it's not particularly useful when you haven't addressed most of the clues. Do you have any explanation for the hexagon or the shape filled with letters?
Comment: Given the answer doesn't even fit the blanks, I'll go out on a limb and say it's not right.

Radioactive Babyface


How can you effectively sail into a headwind?

Question: Unlike in The Wind Waker, you cannot control the direction of the wind in Sea of Thieves. So if you need to travel into a headwind, you just have to deal with the unfavorable wind direction. What is the fastest way to sail into a headwind?
Comment: Have you tried the method from the real life - tacking/beating? https://en.wikipedia.org/wiki/Tacking_(sailing)
Comment: @Yasskier While some parts of this game's sailing match real life, I've noticed going into a headwind is different. In real life, sailing directly into the wind (the "no-go zone") will never work even a little, but you seem to be able to move forward in the no-go zone in sea of thieves
Answer: So if it is very slightly off to one side you are better off trying to turn the sails so it has the wind a little bit.  if you have to sail directly into it then you typically turn the sails to be directly forward and have them dropped all of the way.  The larger the ship you use the slower you are against wind (Galleon slowest and sloop fastest) which also means that the Galleon is faster than a sloop when they both have the wind.
Another suggestion is if your destination is far away to the northwest for example, it may be faster to sail straight north if it gives you some wind and do this until the wind changes or until you would have to sail straight west.  Usually it is better to take a route that is a longer distance when you have the wind because it can be so slow.  Again this is what I would do in a Galleon but in a sloop I would probably sail straight into the wind.
The more you play the more you will get a feel for everything and speeds with the different ships.  Another suggestion to learn general things about the game and tips is watch some popular streamers on twitch or their youtube.  I watch Pace22 a lot and he significantly improved my playing


How to change items or things in the pouch?

Question: I'm playing Zelda - Skyward sword. I can't change items or things from my pouch or items collection. When I'm on the "item menu" I do as I'm told - I press and hold B to select, but the moment I let go all I get is a description of the item :( What do I do wrong?
Comment: Are you trying to rearrange the position of items?
Comment: Try rewording your question.  The word "change" is somewhat ambiguous in this context.  Do you mean "swap" (add items/remove items to/from storage in Skyloft), or do you mean "reorganize" (change position/orientation of items currently in pouch)?
Answer: What you're currently doing is viewing your inventory. What you need to do is either press and hold B to open up your "tools" pouch (slingshot, beetle, etc.) or press and hold the - button until your pouch containing your shield and bottles and whatnot opens. Then, still holding the - button, you can select the item you want.
If you want to move things around in your adventure pouch, you need to go see Peatrice at the Item check in the Bazaar in Skyloft. She will let you reorder the items in your pouch and let you pull things out as well.
You cannot, however, change any item in your collections or tool pouch.
Comment: @KEm: I've played the game plenty, and Kareen's instructions are pretty much spot-on. Are you trying to do things from *within* the inventory screen (the one that takes up the whole screen and pauses the game)? If so, you need to close it, and then follow Kareen's instructions (hold the button, aim the wiimote) from the normal screen.
Comment: ive tried all your suggestions and nothing works.......I feel like breaking the wiimote!!!!
Answer: To use an item, quickly hit B to equip it,  then use it with A. Holding down B will let you choose an item.
Likewise, quickly press - to equip an item from your adventure pouch (usually a potion), then hit A to use. Hold - to choose an item from your adventure pouch.
Answer: I believe that you should be able to pick up an item with the A button and hold it down to drag it into the pouch.
I think that what I did last night anyways.
Answer: When you have the "Cursed Medal" you can't open your pouch.
Comment: Maybe this is a comment instead of a question?  The OP doesn't specifically mention having the cursed medal.
Answer: If you are carrying a cursed medal, then you are not able access anything in your pouch: totally frustrating, took me hours to figure that out!


I cannot enable canonical partner and independent, why?

Question: On Software and Updates under Other Software tab, I want to enable Canonical Partner and Independent, after I clicked the checkbox and input my password, the checkbox stay unchecked no matter how many times I try to click it, why?
I'm on Raring.
Comment: You can also see this post:
https://askubuntu.com/questions/14629/how-do-i-enable-the-partner-repository#new-answer
Answer: The bug is Ubuntu failing to display an authentication prompt. A potential solution to this is simply to run the software as root:
sudo software-properties-gtk

It's also possible (as @Abdel-Rahman notes) to edit the sources.list file directly. The software-properties-gtk application does just edit that file, commenting or uncommenting the line as needed. Using add-apt-repository will duplicate this line, and have no effect on the authentication bug: it's not actively harmful, but it's not a preferable solution.
Comment: Bug link: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1727908
Answer: The accepted solution works fine alternatively you can navigate to and edit sources.list file directly from terminal using
sudo nano /etc/apt/sources.list

find the line that says
#deb http://archive.canonical.com/ubuntu bionic partner

remove the comment and save(Ctrl+X), and you're done.
Comment: The question and accepted answer is about `raring` and your answer is about `bionic`.
Comment: @WinEunuuchs2Unix that detail aside, editing the file directly is almost certainly the better solution than the accepted answer. The issue is that gnome-shell is failing to display an authentication prompt.
Answer: Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo add-apt-repository "deb http://extras.ubuntu.com/ubuntu raring main"
sudo apt-get update

Then go back to Software and Updates, and check to see if its OK
Note: in the second command replace raring with your Ubuntu version.
Comment: On second line I got : Error: 'deb http://extras.ubuntu.com/ubuntu' invalid
Comment: I've fixed the command.  see answer, and let me know.  Thanks
Comment: Works, but now in Software and Updates there are 2 Canonical Partner and 2 Independent, the original (on the top) is still unchecked, should I remove them?
Comment: I've got the same, and I left them alone.
Comment: As long they do no harm to my system I'll leave them alone, thanks!
Comment: They won't I've had like this a long time.


Is there a tool for finding common references among multiple papers?

Question: My question is relatively straightforward. Is there a tool that takes multiple papers, reads through them and figures out which other papers these input papers refer to, and see the most commonly cited papers as references among those input papers?
Comment: You want to analyze a [citation graph](https://en.wikipedia.org/wiki/Citation_graph). Knowing the terminology should help in your search.
Comment: Related: [Are there tools to find a subset of references shared by two or more publications?](https://academia.stackexchange.com/q/49884/17254) It doesn't currently answer your question, but it seems a good solution to your problem would apply also to the other.
Answer: There are citation manager packages which may provide some of what you need when you tell them the papers you are interested in.
https://guides.lib.uchicago.edu/c.php?g=297307&p=1984557
Answer: Citation Gecko can do this for some areas: https://citationgecko.azurewebsites.net/

You search for the papers you are looking at and add them as seed papers.
Then the tool shows you common citations and the like for the papers you've added as seed papers.

But its ability to do this strongly depends on what papers it is able to find in Step 1.


How to show/hide web part

Question: On a SharePoint page, I have two web parts: One web part displays root Documents folder and another web part on the side is just a text that provides some tips to users. But when a user clicks on any sub-folder in the Documents web part the tips web part should hide. How to achieve that?
Answer: I don't think you can hide the tip web part based on clicking on subfolders since

You cannot ensure the contents to stay the same.
The page gets refreshed every time you click on a subfolder.

However, you can hide a web part with a onclick method with JavaScript. It adds a button to the page and hide the web part when you click the button.
Please see the references below:
Hide SharePoint web part using javascript onclick method.
hide/show webpart data on buttonclick using jquery.
Comment: Thank you Chelsea. I hope someone either confirms this or suggests a solution(or at least hint)

How to show/hide web part


Are GPS airspeed meter and altimeter going to replace traditional measurements?

Question: When are GPS Airspeed meters and Altimeters going to be introduced if they not already in use?  Are they more accurate than systems in use now and? How much would it cost to install them to older aircraft?
Comment: How do you propose GPS would be used to measure airspeed?
Comment: Related: https://aviation.stackexchange.com/q/29154/520
Answer: In general, even very low cost GPS units can provide very very accurate velocity vectors.
Altimetry is not quite as good, and is different in that it is referenced to a geoid, rather than a barometric pressure.
Similarly, airspeed is referenced to the ambient air, and while a GPS is a very accurate velocity vector source, there is no easy way to know the ambient air velocity.
So in short, by necessity to maintain safe flight, airspeed utilizes relative wind on an aircraft, and there is not an easy way to determine that with GPS alone.  And altimeter settings by convention, are based upon ambient air.  However, by utilizing a geoid model reasonably accurate absolute altitudes or MSL altitudes could be determined. Cost? As much as an old cellphone and some software.  Pretty cheap.
Comment: Based on my experience with using GPS to estimate altitude in cycling, the pilot who relies on such a device will soon be a dead pilot.
Comment: I take it your cycle GPS is not WAAS enabled (grin).
Comment: Except that if using GPS for these types of instrumentation, the costs aren't going to be cheap. The system will still have to be certified in the aircraft, and an old cell phone and some software isn't going to cut it.
Comment: Geoid, in the sense that the altitude information for aircraft is conventionally referenced to MSL.  If functioning as an analog to a radar altimeter then the answer is different.    With respect to costs, I did not speculate on the certification costs, and the avionics manufacturing costs, as that would obscure the fundamental low cost of the underlying device.


Arduino direction sensor

Question: I am working on a school project for next week
And I need my Arduino to 'sense' at which direction it is moved is it possible? Are there any direction sensors that 'sense' at which direction the Arduino is moving?
Comment: it is, how it is done. study
Comment: Direction relative to itself or the absolute direction (like north or south)?
Comment: @chrisl  no I want the Arduino to sense that it goes up, down, right or left sry  that I didn't included in the question
Comment: https://playground.arduino.cc/Main/MPU-6050
Comment: @Juraj na not much help
Answer: As Juraj wrote, you need an MPU, which is a module, that consists of an 3-dimensional accelerometer and a 3-dimensional gyroscope. With the first you can sense acceleration in each of the 3 dimensions (up-down, left-right, forwards-backwards), with the seconds you can sense rotation around these three directions. Sometimes (depending on the module) there is also an magnetometer included, which can be used as a compass.
Note, that you cannot sense the actual speed of a device directly, without using some external reference. With an accelerometer you have to do some maths on the data to get the speed (basically integrating). But since you just want to sense the direction, without bothering about the exact speed, you don't have to think about this.
How exactly you have to program this is out of scope for this side, since it is a rather big topic. Also it depends on the module and library you use. The link, that was provided by Juraj, is a good starting point for reading about this. There are also some further links, for example to a library for controlling the MPU-6050 (if you have one of these) at this github site.
Basically you will have to regularly measure the acceleration in all three dimensions with the MPU. If for an axis the acceleration gets greater than a threshold value, you can count this as direction. To get a more precise direction (not only directly along the axis) you will have to combine the values of the dimensions as a vector. How this is to be solved depends greatly on what you want to achieve.

Arduino direction sensor


Connect iMac to SAN/NAS using Thunderbolt

Question: I own an Apple iMac and I would to directly connect it to a NAS using the Thunderbolt port. As far as I know, FreeNAS does not support this. Do you know of other open source projects that can do this?
Comment: Do I understand correctly that you have a device running FreeNAS and a Mac, both with a Thunderbolt port? Also, would you mind running anything else than a BSD-based system instead of FreeNAS? Support for Thunderbolt was added to Linux kernel 3.17.
Comment: I have an iMAC 5K, and am researching a storage solution.  Its easy to build up a NAS, but I would prefer not to.  If I could fill up a ATX case with SSDs and connect to imac with thunderbolt, that would be great :)  Does FreeNAS support this, or will I have to hack together my own?
Comment: No, the current FreeNAS release doesn't support Thunderbolt, since it is based on FreeBSD 9.x and that doesn't support it either.
Answer: A Network Attached Storage (NAS) device is normally used as a storage device that shares data over the network. What you are trying to achieve is possible in theory, but it is very uncommon and may therefore be hard to get working.
First of all, support for Thunderbolt is quite low in open source operating systems. As you figured out, FreeBSD has no support for it and Linux only supports it starting from kernel 3.17.
Secondly, since NAS distributions usually expect you to connect to the NAS as a network device, you might run into trouble if you try to work around this. Personally, I use a NAS to make backups and I'd like to keep these as safe as possible and I avoid workarounds.
I'd advise you to build a proper NAS and simply connect to it using gigabit ethernet, which is already pretty fast.
EDIT: there's no distribution that supports what your trying to do by default. This doesn't mean it can't be done. I'd start with Open Media Vault and try to install Linux kernel 3.17, possibly from the Jessie repository (OMV is on Squeeze, I think).
Comment: gigE, or 10gigE does not address my requirements :)  Openfiler MAY support thunderbolt :) will check.  otherwise, i'll roll my own disto and thats that
Comment: The OpenFiler project is dead and certainly doesn't support Thunderbolt, since the default kernel is too old. You could try to recompile a > 3.17 Linux kernel and insert that. I've updated my answer a bit. Please consider accepting it if it helped.
Comment: Wow, I've been thinking about this just the other day, as I've yet to build a storage array for my system.  I would prefer not to use a NAS, as usb3 is around the corner, hopefully available in the new iMacs coming in 2017.  My hope is upgrading the workstation, attaching usb3 SAN.


How to get all the fields defined by a particular module?

Question: Suppose i have a module1 where i define fields and i get list of all the fields in module2 using module1_fields_info(); this is done in D7. How to get list of fields defined by module1 in module2 in Drupal 8?
Answer: hook_field_info() defines field types in Drupal 7, so I think you're actaully interested in field types, not fields?
If so, field types, like any other plugin definition have a provider key, if you want to get the field types of a certain modules, call \Drupal::service('plugin.manager.field.field_type')->getDefinitions() and then filter on the provider key:
$field_types = \Drupal::service('plugin.manager.field.field_type')->getDefinitions();
$field_types = array_filter($field_types, function (array $definition) {
  return $definition['provider'] == 'yourmodule';
});

Code example written in browser and untested.
Answer: This depends on how module1 defines the fields. Supposed it defines an entity type with the module name you can get the field informations like in this example for the user module:
$field_manager = \Drupal::service('entity_field.manager');
$fields = $field_manager->getFieldDefinitions('user', 'user');

The first parameter is the entity type and the second the bundle. If an entity has no bundles you use the entity type a second time.
If module1 defines a content type, then you get the fields by using the same function on the node and the content type name:
$fields = $field_manager->getFieldDefinitions('node', 'module1_type');

If module1 defines extra fields on another entity, for example the user, you get all fields defined in hook_entity_extra_field_info() hooks by module1 and other modules:
$extra_fields = $field_manager->getExtraFields('user', 'user');

The result in all cases is a keyed array with field definitions. You get the field names with
$field_names = array_keys($fields);

Comment: Good answer for the question title, but I think it is actually about field types due to the hook_field_info() reference, see my answer.


Is near point defined for a myopic eye and far point defined for a hypermetropic eye?

Question: I learnt about far Point of a myopic eye and near point of a hypermetropic eye. But I am confused about the above question. And if near point is defined for a myopic eye and far point defined for a hypermetropic eye, do they have a significance?
Answer: You're overthinking the theory. Think practically and the answer is obvious.
The standard eyeball has a crystalline lense whose focal length is varied by the ciliary muscles. The maximum and minimum accommodation of focal length is what determines far point and near point respectively.
The near point and far point have to be regarded as properties of the eyeball and not as properties of the defects (this is where you were confused)
For practical purposes, for myopic eyes, we only need to know the far point and for hypermetropic eyes, we only need to know the near point. For presbyopic eyes, whose crystalline lenses are less flexible,  both far point and near point are relevant.
Remember that this information is needed to calculate the focal length of the required correctional lense (ie, spectacle lens).


Loss/accuracy on Synthetic data

Question: I am trying to understand if there is any difference in the the interpretation of accuracy and loss on synthetic data vs real data.
Comment: So, what is your specific question? Can you elaborate more? Why do you think there would be a difference?
Answer: No, there is no difference.
Of course, you are likely not able to extrapolate results obtained from synthetic data to expect identical or similar results in real life to unless you have very compelling reasons to do so.
Without a more specific question, I'm afraid a more specific answer is not possible.

Loss/accuracy on Synthetic data


onClientClick calling Javascript Function, can't pass parameter

Question: I'm currently working on a project using the Ajax Tabs control in ASP.NET.  My language for this project is VB.NET.  I'm trying to take advantage of the "OnClientClick" event on the tabs.  I'm populating the tabs using data from a database, and I'm using a VB Function to actually create the tabs.  The VB code is as follows:
Protected Sub makeTab(ByVal categoryName As String, ByVal categoryId As String)

            Dim label As New Label
            label.Text = categoryName
            Dim tab As New AjaxControlToolkit.TabPanel
            tab.Controls.Add(label)
            tab.HeaderText = categoryName
            tab.OnClientClick = "display_alert(" + categoryId + ")"

            tcResultSet.Tabs.Add(tab)
            'Next
            For x As Integer = 1 To tcResultSet.Tabs.Count
                If tcResultSet.Tabs(tcResultSet.Tabs.Count - x).HeaderText = "Tab0" Then tcResultSet.Tabs.RemoveAt(tcResultSet.Tabs.Count - x)
            Next

        End Sub

This function is called for every record that the database returns.
In the ASPX page, the tab container is:
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" />
                            <asp:TabContainer ID="tcResultSet" runat="server" AutoPostBack="true" ScrollBars="auto" >
                                <asp:TabPanel ID="tbTab0" runat="server" HeaderText="Tab0" />
                            </asp:TabContainer>

and my javascript function is:

and it is placed inside of my page head at the top of the page.  As you can see, I'm currently not even using my variable inside my Javascript function, but I will.  Currently, this code does not work.  It works if I remove the variable from the Javascript function definition, and if I call my Javascript function (from my VB) like "display_alert".  It will not work if I include "()" after the function name.  Is there any way around this?  Any way to make this work properly?
Comment: So if you use `tab.OnClientClick = "display_alert()"`, that doesn't work? Also, let me suggest that you don't use `OnClientClick` to set inline event handlers, and instead bind them unobtrusively with JavaScript; you can give your elements a specific `class` attribute and find them that way. This can be done in an event when the DOM is ready (such as `window.onload`), and you can access the `categoryId` by setting a `data-*` attribute in your VB.
Comment: Yes, using tab.OnClientClick = "display_alert()" does not work.
Comment: Well, if Tab #1 is clicked, then I need to know in my Javascript function that Tab #1 was clicked, not Tab #2 or anything.  Can I know that if I use Javascript to bind the method call?
Answer: I thought that the customer's spec for this app required AJAX tabs, after speaking with them, they were open to other options.  Now, I'm dynamically creating HTML buttons and am able to call my Javascript that way without issue.  Problem resolved.
Answer: The event handler attached to OnClientClick can't have a parameter.  To make this work properly you need to wrap your code in a function, e.g. in Javascript would be
tab.OnClientClick = function () {alert('my message here');}

This works in the markup too, something like
<asp:TabPanel ID="myTab" runat="server" OnClientClick="function (){alert('this works');}">

I think it's to do with the signature for event handlers.  When assigning to OnClientClick your event handler will be tagged on to the already existing event handler "under the bonnet" - if they don't have the same signature you'll get run time errors.


Tag email posts in Google Groups

Question: Is it possible to tag email post in Google Groups? I am able to tag new post that I create but am not seeing the tag option on topics that came in from email.
Answer: From Tag topics - Groups Help

Note: You must be the creator of a topic to add tags to the topic.

If you are the creator of the topic

To tag a topic after a topic has been created:

From the Topic screen, click on the 'add tags' link next to the
  topic's title. The Edit Tags dialog box appears.
Click on the tags (in blue; next to "suggested tags") you want to add to the topic. Tags appear in the field as they are added.
Click Save changes. Tags are added to the topic.

Tag email posts in Google Groups


Deploying Rails Apps to VPS using Nginx

Question: So I have been working on getting my VPS setup with no progress in a while so I figured I'd swallow my pride and ask here.
I have followed the following tutorials:
http://coding.smashingmagazine.com/2011/06/28/setup-a-ubuntu-vps-for-hosting-ruby-on-rails-applications-2/
got to the end of the tutorial and only have the Welcome to nginx! display
It is really strange because everywhere tells me that I should be pointed to my new deployed rails app. Is this something to do with my nginx config file?
PS. i tried to find a similar problem to mine before but if this is a duplicate I do appologize.
Thanks in advance
Here is my nginx.conf file: Im looking at it right now and I know its a mess
<code>worker_processes 3;

events {
    worker_connections 1024;
}

http {
    passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.18;
    passenger_ruby /bradbury/public;

    include mime.types;
    default_type application/octet-stream;

    sendfile    on;
    keepalive_timeout   65;

    server {
        listen  80;
        server_name localhost;
        root /rails_app/myapplication/public;

        passenger_enabled on;

        error_page  500 502 503 504 /50x.html;
        location = /50x.html {
            root html;
        }
    }
}
</code>
Answer: You can also take a look at this Railscast about deploying to a VPS . But , as you've said , you have got some things done . Just post your nginx.conf . We have to start from somewhere ...
Comment: I guess you can connect to the VPS by ssh. Try to navigate to your /rails_app/myapplication/public and check for index.html (we should be sure that your app is correctly checked out ).
Comment: yup just checked it and the index.html file is there

Deploying Rails Apps to VPS using Nginx


How can I lower action on this guitar

Question: Here is the picture of guitar.
https://photos.app.goo.gl/kRjPwrUCL5ad5gT46
It is a hovner 185 guitar, how do I lower the action on this guitar?
Comment: By action, what do you mean?
Comment: Have you tried to lower the bridge using those knobs under the bridge?
Comment: The bridge seems to be as low as possible. So it may be the neck needs help ... take it to a shop.

@Xilpex Why did you answer?
Answer: Those guitars were never designed to have a low action - because they're acoustic, but were competing against big band instruments, the action was set high in order to make them louder. There was also a craze in the 1950's for Hawaiian sounds made with slides - again, that requires a high action.
The bridge on arch-top guitars are usually only held in position by string tension. If the thumbwheels are as far down as they can go, and the neck is straight and aligned correctly, you will need to have another bridge built for you.
This will give you a lower action, but you should definitely retain the old bridge in case you want to sell that guitar in future years.
Answer: Merely taking the bridge down lower may do it, using the adjusting screws under it. It may not.
The bridge should be the correct one for the guitar, in which case,if it's at its lowest point, and the strings are too high, the neck relief needs sorting. That's by using an Allen key in the end of the truss rod which is inside the neck. Usually accessed via the small plate on the guitar's headstock.
Be warned, it's not really a job for a beginner, as it's easy to wreck a guitar tightening up the trussrod.
If the actions only due to the high bridge, it's feasible to shave some off (not the saddle part !), so that there's adjustment to go lower. Again, if you don't know what you're doing, it's wrecking time.

How can I lower action on this guitar


What is the difference between watering your plants early in the morning and late at night?

Question: I've heard that you shouldn't water mid day, but should you water more during the day, or night?
What is the rule of thumb on what part of the plant you want to affect more?
Answer: In my experience, watering at night allows the water to penetrate deeper, but it does promote slugs,snails, mildew and mold etc. During winter the water can also freeze on the plants and damage them. (much more than frost would).
I think that watering early in the morning is the best (like 4am) - avoids the freezing problem, and in my experience can actually "melt" frost. If you are still watering in early Winter/Autumn.
Watering during the day has the benefit of cooling the plants off when it's SUPER hot. But it really wastes a lot since most of it will evaporate and won't penetrate the ground. If you are lucky enough to have a greenhouse - I think this is the best time to water, because you cool the greenhouse down and you get nice humidity ( i.e. foliar irrigation )
If I had an endless amount of water .. I would water really well (20-40 minutes)at around 4-5am  ( just before sunrise ) .. and then 10-20 minutes sometime around 1-2pm when it is hottest.
But definitely never water after 5pm.
Answer: If you water at night, the water has a greater chance of penetrating more deeply into the soil without being lost due to evaporation and transpiration from plant leaves. The downside is that you are more likely to have water sitting on leaves, and other plant structures that might promote fungal growth. So be sure to water the ground and not the plant.
If you water in the morning, you have to use comparatively more water due to faster losses due to evaporation. But you can water the leaves and wash off dirt on the leaves that might be interfering with photosynthesis. The sun will dry the water off lessening the chances of fungal attack.
Nature doesn't care. Rain falls day or night, and plants adapted to the local conditions do well.
You might see sometimes written that you shouldn't water mid day as water sitting on the leaves act as lenses and burn the leaves. That's a myth.
So, if there's a water shortage, water at night. Otherwise water in the morning. But water appropriately for the ground conditions, and weather.
Answer: Watering in the morning gives your plants more free water to use during the day, watering at night can promote fungus growth due to excessive sitting moisture. Think like towels and mildew. Drop and wet heap of towels on the ground at night and by the morning they'll start to stink, but hang them to dry in the sun and they'll smell like the countryside.
As far as the plants go though it doesn't matter too much if once in a while you have to water them at night.
Comment: Also, if conditions are such that it's not as windy in the morning, there's less evaporation. This enables your plants to retain all that nice fresh water.
Answer: The "don't water midday" rule comes from folks saying that water droplets focus the sun's rays and burn the foliage. My counter to this is purely anecdotal, but I've never seen leaf burn on anything and I have seen the positive effects of cooling off plants just after the midday sun bake is over.
Watering in the morning will allow a lot more water to get to roots, because it won't be evaporating at the staggering rate it does later in the day.
Target the entire plant. If it's fragile, just mist the foliage every now and then to clean it, and water the base deeply.  If it's hardy then give it the full shower.  Most plants respond well to being battered around by water (ime, Barberry, despite being a hardy plant, doesn't do well with recovering its shape, but almost everything else that appears hardy does, especially vines).
Only rule of thumb I see broken on a routine basis is: don't over-water. It's harder to over-water outdoor plants, but it's far from impossible.


What is the common UI component that can be used for expand/ collapse on iOS apps?

Question: I am working on checkout flow for our iOS app. In one of the screen i need to use the expand / collapse behaviour to show cascading information. I am looking for a suitable UI component that provides good affordance. Suggestions?
Answer: My response probably isn't going to answer "THE common UI component" but I thought I might share how we will solve a similar problem in my project. We are designing a responsive search interface that has regular filters on the left hand side on large screens. On mobile all these filters will collapse into a bar below the search box. Please see my animated gif below (sorry about quality and ratio).
Regarding the affordance:
An "arrow" will indicate that there is something to be showed, the text "Filter" in combination with the icon will give a clue to what is hiding here. When the user presses the hitbox (maybe the entire bar, or just the icon) the list will expand and the content is revealed. What also is happening is that the "arrow" is rotating 180degrees. When the list is expanded and the icon is reversed pressing again will do the opposite (collapse the filters).

All of this is based on my personal belief. This has not yet been validated in user testing.


Rules for determining grammatical gender in Russian

Question: How do you work out whether a Russian word is masculine, feminine, or neuter?
Comment: Does not qualify as an answer, so just a comment: If by `you` you mean native speakers - we normally don't have to "recognize", we just **know**.
Comment: YOU is a pronoun referring to nobody in particular and everybody in general.
Answer: Most nouns ending in -а or -я are feminine: мама, тётя, душа, Мария. Although quite a few such words are masculine: папа, дядя, Юра, юноша. Some can be either masculine or feminine: ябеда, соня, Саша, Женя.
Most nouns ending in -о, -е or -ё are neuter: молоко, поле, копьё, Домодедово, пальто, ателье.
Most nouns ending in a hard consonant or -й are masculine: стол, мяч, Пётр, кристалл, герой, литий, Сергей.
Nouns ending in -ь (the soft sign) can be either masculine конь, путь, царь or feminine: любовь, ночь, Сибирь. See this answer on how to tell them apart.
Foreign names and recent loanwords may not follow these rules. E.g. мисс ('Miss') is expectedly  feminine and месье ('Monsieur') is masculine.
Comment: `A common exception are masculine words ending in -а/-я`
I would not call that an exception, rather a rule, there are plenty of masculine words, which end in а/я
Answer: As far as I know, just about the only absolute rule is "If it ends in a hard consonant, it's masculine." (Note: this isn't the same thing as "If it's masculine, it ends in a hard consonant.")
The other rules are almost always true. So words ending in а/я are feminine, except for masculine nouns like мужчина, plurals like дома, and super exceptions like дитя which is neuter!
Nouns ending in -ь are also feminine, except for nouns like путь which are masculine.
Nouns ending in -о/е/ё are neuter, except for кофе which is also masculine!
Comment: And how someone should know if a noun ending with -ь is like "путь" or not? What is it actually - "like путь"? Why is "олень" like путь but "лень" is not?
Answer: As was said before, normally in reference to the singular:

words that end in a consonant (including й) are masculine. The only exceptions I can think of are foreign female names (like Kate - Кейт).

words that end in -o, -e are neuter and may be invariable (if adopted) or declinable.
The only exception (other than foreign proper names) I can think of is "кофе" (it was кофий a couple of centuries ago and perfectly matched the masculine, and than changed to more-English кофе, while retaining its masculine gender, so it goes against the language. But most natives mindlessly treat it as a neuter, so the neuter eventually became the academic norm).

words that end in -у, -ю, -э are neuter and invariable (adopted)

words that end with -ы, -и are either plural or an adopted invariable neuter

words that end with -а, -я are feminine.
There's a group of exceptions that end with -мя and are plural (время, знамя, пламя, вымя...).
Also, if the word refers to a person with a known male gender, then it's definitely masculine (although it will decline just like a feminine); usually relatives: папа, дядя, дедушка and personal names such as Илья, Никита, especially short ones, but there are others (судья).

words that end with -ь may be feminine or masculine and should be looked up:
"лань" is feminine, but "конь" is masculine.
But if it ends in one of the sibilants -шь, -жь or -чь, it's feminine: мышь, блажь, картечь.
Answer: It seems strange to me that no one pointed out that in Russian, grammatical gender should always correspond with physical gender. So папа, дядя, дедушка, парниша, юноша are masculine, despite the ending, because they mean male persons. Конь is masculine and лошадь is feminine because this words mean male and female horses. Same with names: Никита, Данила are masculine, foreign names like Джейн, Кэтрин are feminine. If you know the physical gender you already know the grammatical gender
Comment: "grammatical gender should always correspond with physical gender" - no. Персона (person) is always feminine, лицо (in the meaning "person") is always neuter, человек (human) is always masculine.
Answer: There's such a thing as three (and a half) types of noun declension. This is more important for words matching. And this declension (a) is defined by word endings, and (b) applies some restriction to gender.
When Russians see the word "хрень" — it's 3rd declension and thus can only be feminine.
When Russians see the word "кофе" — it's 1st declension and since it ends in "-e" (a "soft vowel"), it can only be neuter. (Academia at one point pushed to change the gender to masculine which only created a mess. Now it can be of either gender.)
If the word has an ambiguous ending, like "чупута" (it's just a set of letters), which is 2nd declension and can be of either feminine or male gender — it can be used as either: "Чупута убежал" or "Чупута ушла" and both phrases will sound correct.
One main thing that English speakers should keep in mind is that gender and "essence" are separate and independent concepts in Russian. the "neuter gender" isn't "it" — it implies that "no gender applies".
Of course, native speakers don't "work out" declensions, they just "feel" them.
Comment: *кофе* does not inflect, so it does not belong to declension type 1. Better pick another example.
Answer: There's only one way to identify a noun's gender 100% accurately: look up in your dictionary.
However, there are some more or less reliable patterns:

If a noun ends with -a/-я, this is the so called "feminine" type or feminine declension. As you might already have guessed, the majority of nouns in this group are feminine. Some masculine nouns may end in -a/-я. Those nouns mostly refer to people, namely family members (папа, дядя), professions (судья) or proper names (Ваня, Никита).
Please note: There's a small group of neuter nouns that end in -мя: пламя, время among others.

-a/-я - most likely feminine, unless it refers to a male person or ends with -мя (that would be neuter).
One exception: кофе (coffee) is masculine, though some dictionaries say the neuter is acceptable, too.

If a noun ends in a consonant sound or the soft sign (-ь), this is the masculine declension because most of the nouns in this group are masculine: банк, танк, конь, огонь. However, the soft sign is tricky. Quite a large group of Russian feminine nouns end in the soft sign, too, so whenever you see a soft sign, check the dictionary for gender.

Consonant - masculine; soft sign - check the dictionary.

o/ -e are the common endings of the neuter gender. Also, those weird nouns ending in -мя are neuter.
Comment: You say all nouns ending with ь are masculine and in the very next sentence you contradict yourself. How that???
Comment: Oh, sorry for the confusion, bad wording. The second declension type indeed unite masculine nouns, but that doesn't mean that all nouns with the soft sign in the end belong to that declension type. Thank you for pointing that out!
Answer: An answer that works every single time (no exceptions ever) is to look at the endings of adjectives or pronouns that are  allowed to modify the noun: большое здание, so здание is neuter, мой папа, so папа is masculine. That is, when the adjectives or pronouns that modify a noun have masculine (resp, feminine or neuter) endings then the noun is masculine (resp. feminine or neuter).  This could be considered the definition of the gender of a noun. It looks rather indirect, which makes it a conceptually interesting way to think about the issue, but this way of explaining the gender of nouns is impractical to non-fluent speakers who are seeking rules to help guess the gender of an unfamiliar noun. That is why it is more common to see rules based on the ending of the noun. Such "simpler" rules always come with exceptions.
Comment: That's turning the problem upside down. In order to _determine_ which form of adjective to use, one needs to know the gender of the related noun. Unless you know the whole phrase from a lot of exposure - which is equivalent to just knowing the gender.
Comment: I said my answer that I was presenting an indirect definition and that it is useless to non-fluent speakers. When I first read about this way of thinking about gender of a noun, I was amused by its cunning way of working for those who know the language well enough, since it has *no* exceptions: endings on adjectives and pronouns are regular all the time. Nouns like коллега that allow adjectival modifiers with both masculine and feminine endings are a nice illustration of this (admittedly!) indirect definition: коллега is a common gender noun *because* it admits both endings on adjectives.
Comment: I also liked this way of thinking about what the gender of a noun is because it reminded me of the way in higher mathematics *properties* of an object can be turned around to serve as *definitions* of more abstract similar objects, e.g., the Pythagorean theorem in the plane and space is proved, but the formula it gives us for distance in 2 and 3 dimensions suggests a definition of distance in higher-dimensional spaces that nobody can directly visualize.


How do I change the soil on already planted plants (not in pots)

Question: So my plants arent growing too well in my garden (as compared to my friends with the same plants I gave them) and was wondering how do I give my plants better soil? I've already mulched the surrounding areas. Can I just dump new soil at the base of the plant? I assume no since that doesnt reach the roots. Fertilizer perhaps? New to gardening and never used that either.
Comment: Welcome to GL.SO. Could you specify which plants you planted? This is, IMHO, needed for receiving a good answer.
Comment: Photos would also be very useful - there are various causes for plants not thriving properly. Also please say when you planted them - was it recently? And where are you in the world?
Answer: Mulching and adding a layer of compost will improve the soil structure over time. You can speed up the process by digging them in, but take care not to damage the roots (source):

Permanent or semipermanent plantings of trees, shrubs, or perennials benefit from soil amendment too, but you need to do the job without damaging plant roots. It's often sufficient simply to spread the amendment over the soil surface as a mulch; earthworms, microorganisms, rain, and irrigation water will all carry it downward over time, gradually improving the soil's top layer. If the plant isn't a shallow-rooted type (that is, if it doesn't have many roots concentrated near soil level), you can speed up the improvement process by working the amendment into the top inch or so of soil, using a three-pronged cultivator.
Answer: I've never known a soil so perfect that fertilizer of basic nutrients was not indicated!  Just applying DECOMPOSED organic compost to the top of the soil is truly the most effective way to improve any soil.  Organisms come up to eat this stuff (if it is decomposed) and go back into the soil profile and poop it out!  Mixing it in by hand is a waste of time!  Besides improving the soil, it is more important to understand your soil type and your drainage!!  This is why raised beds are critical to healthy plants in our gardens.  If you do not have raised beds, what kind of soil do you have, what are you doing for compost, mulch, fertilizer, keeping foot traffic compaction away from your plant roots...the majority of plant roots are within 4 -6 "...I've read 94%!  The rest are for support. You can make your beds raised without any boards, bricks or barrier. You keep them fluffy, airy, by not walking on them as well as adding the DECOMPOSED ORGANIC matter right on the surface.  All we have to do is keep replacing this compost layer as it will disappear within a year or two. One double-digging at the very beginning to aerate is all that is necessary. Do a soil test!  Dig trenches around the edges of your bed to allow accumulation of rainwater and direct it away from plant roots. Your soil is first and foremost the most important aspect of any garden.  Learn what you have, improving it is simple after the fact! ALL soil can be made wonderful...just need to learn soil management...!


How do you find a difference among cells in a single column?

Question: I have a list of ~100 values in a column. I want to find all possible differences among cells of a value of 30 +/- 2. For example, 1200, 1201, 1205, 1208, 1230. The difference between values 1 and 5 and 2 and 5 would be found.
Comment: Transpose the cells in the column into the top row, by paste special and paste value. Then subtract the absolute value and drag the formula until you reach the last column and row.
=ABS($A2-D$1)
Then conditional formatting, highlight cell rules, between...28 and 32.
Answer: "Transpose the cells in the column into the top row, by paste special and paste value. Then subtract the absolute value and drag the formula until you reach the last column and row. =ABS($A2-D$1) Then conditional formatting, highlight cell rules, between...28 and 32." (OP)


Quantum field theory, particle interpretations and path integrals?

Question: I am trying to find some names or models of a particle interpretation of quantum field theory which isn't a literal path integral approach? Are there any particle interpretations of quantum field theory which don't use path integrals?
Comment: The particle intepretation is independent of the calculational tool. You get the same physical result using any formalism: path integral (particles are excited field configurations), canonical (particles are created by field operators acting on Fock space), Schwinger-Dyson equations (particles are poles in the Green functions), ...
Comment: Please leave the body of the question intact. You may still find helpful answers - maybe even find out that the answer you found was incorrect. It may also be helpful to people in the future.
Comment: John, you'll note that you edit has been rolled back. That is because we hope and expect that questions on Physics.SE will not only help the person who asked it, but also be a resource to help other in the future. Toward that end you are encouraged---if you find the answer yourself---to answer your own question so that what you have learned will be available to the next person with the same question.
Comment: I'm currently writing a [book](http://quantum-ethics.org/) on the interpretation of quantum field theory (which you could read online) where you would find, in the first chapter, a formulation of quantum field theory based on the Hamiltonian formalism, so without any path integral. I think it could be interesting to you, but I don't know if you would call it a "particle interpretation"? What do you mean exactly?
Answer: Quantum mechanics has a path integral interpretation, but it also has a description in terms of operators acting on a Hilbert space.
QFT is pretty much (special)relativistic quantum mechanics, so it turns out that particle number is not conserved and you can create/annihilate particles. So it's not enough to have a Hilbert space (fixed number of particles) but a Fock space (space of states of the theory) where you can have an arbitrary number of particles. $\mathcal{F} = \mathcal{H}_{1-particle} \oplus \mathcal{H}_{2-particles} \oplus \mathcal{H}_{3-particles} \oplus \ldots$
QFT can be described as a bunch of operators acting on this Fock space. Just like interacting QM, we can go to the interaction picture (where the Fock space corresponds to the space of states of the free theory, since we don't know the states of the full interacting theory). Here, the time evolution operator can be written in terms of the Dyson series. Each term in the Dyson series is the time-ordered product of a bunch of operators corresponding to the interacting part of the Hamiltonian (since the free part acts trivially on the Fock space). So, you can see that the Dyson series is inherently perturbative as each term corresponds to a higher order in the interaction coupling. One can then define (say) scattering amplitudes as the the Dyson series (representing time evolution) sandwiched between states of the Fock space.
That's how one does QFT in the operator picture, without any mention of path integrals.
Let's now go over to the path integral description. In the path integrals picture, when we try do do the integral perturbatively, note that the perturbation series we get is similar to the Dyson series. That's because we've solved the free part (which is an easy Gaussian integral) and trying to solve for the interaction (by expanding out the exponential). That formulation is very similar to what we do in the interaction picture! Essentially, paths which interfere constructively and contribute to the amplitude correspond to events (alternatively) modeled as a bunch of interaction operators acting on a state in the Fock space. So I hope I've also managed to motivate how the two descriptions are connected.
Update: I recently came across this relevant and useful blog post by Lubos.
Answer: In some sense 2nd quantization is equivalent to path integral approach when introduce quantized fields. But the point is, even if you use 2nd quantization you still need to calculate things like cross sections, which is more related to generating functional of path integral. Also, many things of more advanced QFT are based on path integral. I think you would like Ron's comment on path integral which is more professional: What is the fundamental probabilistic interpretation of Quantum Fields?.


How does Android multiuser system work?

Question: If each app on Android gets its own UID, then how are phone users identifed? Do they own some different UID or something? Or are they in special group "users"?
Answer: The human users of the phone don't correspond to different Linux users. The human users are identified only within Android itself, not to apps. Android provides a completely separate environment to the app for each user - a little like a Linux chroot - so the app doesn't have to worry about separate users. When a new user runs the app, it just looks like a fresh install on a new device, because it's given a brand new data directory, separate from those it's given for other users.

How does Android multiuser system work?


English Tanakh with as much commentary as possible

Question: I am looking for a Tanakh Sefer (or set) which has as much commentary as possible. I'm basically looking for one place where I can study without opening a thousand other seforim.
Comment: @Dude Except, you know, [mikraot gedolot in English](https://jps.org/product-category/collections/the-commentators-bible-the-rubin-jps-miqraot-gedolot/).
Comment: Being in English as a requirement makes this more challenging as being in English means lots more words to fit on the page. There are a lot of options for Tanakh with commentary in English but none that are going to look like a mikros gedolos exactly.
Comment: https://sefaria.org
Answer: The ArtScroll Tanach Series may be what you're looking for. Personally, I have found the amount of commentary to be a bit overwhelming, but there's a substantial amount of material in there.
Comment: Thank you for your answer! I have looked at this series before and find the commentary to be very difficult to follow as it is not in any sort of format, rather just on thrown together. I have seen a number of Hebrew versions which breaks down each commentary by the Rabbi with a subheading etc... I was hoping to find something like this
Comment: Just to note that not the entire Tanakh is available in this series. –
Answer: Try Alhatoraha.org. In the settings, check the box for English translations. Any commentary with an English translation will automatically display it.
Answer: Al hatorah is probably your best bet but there are still options if you need hard copies, though none of them are complete. There's the JPS Commentator's Bible/Mikraot Gedolot but that's only on chumash. The Judaica Press Tanach does cover the whole bible but the English commentary is a digest not a direct translation of each commentary.


Is it possible to compose a checkmate with king and any three minor pieces against bare king in the center of the board?

Question: I am running a small chess school for beginners. During a class I asked a child to compose a checkmate position using only king, bishop and knight against the opposing king in a corner. Then I made the task tougher by placing the opposing king in the middle edge. And finally I asked him on purpose to try the same in the center of the board, to see if he was able to conclude that the task was impossible. Not only he did, but he also proposed to try the task in the center of the board with a third minor piece. To my surprise, this task seems to be impossible as well. We tried with any combination of three minor pieces plus the king.
Is it true that this task is not possible?
Comment: Thanks and sorry I was silly enough to assume you were working only with the starting pieces!
Comment: Are you asking about three specific minor pieces, or any three?
Comment: @RobbieGoodwin Any three, as per the title. Could be three of the same kind. The given answer covers this case.
Comment: How does "three of the same kind" work, except for pawns?
Comment: @RobbieGoodwin The possible combinations are: 2 knight and a bishop, 2 knights and the opposite coloured bishop, or 2 bishops and a knight, or three knights, or three bishops. Pawns are not considered minor pieces -> https://en.wikipedia.org/wiki/Glossary_of_chess
Comment: Oh ok @RobbieGoodwin, in fact what you said could be a nice challenge!
Comment: Thanks and in fact, I think John Coleman's 3x3 net works - or rather, can't be made to -and  covering even the 8 places round the king would need 5 bishops or 4 knights.
Answer: It is indeed impossible to construct a mating net with king + 3 minor pieces against a lone king in the center of the board.
A mating net would require that all 9 squares in the 3x3 block which contains the opposing king be under attack. The king can only cover 3 of those 9 squares since it can't be next to the opposing king. This would leave a 3x2 rectangle of squares which would need to be covered by the 3 minor pieces. That rectangle has 3 black and 3 white squares. Any minor piece can cover 2 of those 6 squares -- but those squares would need to be of the same color. (One might quibble that a bishop which is directly adjacent to the opposing king could cover 3 squares, but that would be capturable by the king unless supported by another piece, the net result being just 3 squares covered by 2 pieces). If 1 of the minor pieces covers 2 of the white squares and 1 covers 2 of the black squares, the remaining piece would have to cover 1 white and 1 black square, but that is impossible.
Comment: Might be worth noting that you can _stalemate_ a king on (say) d5 with a nicely symmetrical arrangement of king at d7, bishops at b6 and f6 and knight at d2. But you can't attack him as well... (p.s. both your bishops are same colour, so you must've promoted one of them).
Comment: nice, parity strikes again
Comment: @OscarBravo You could replace one of the bishops with a knight covering the same to squares next to the king for a slightly less artificial position.
Comment: @OscarBravo Another configuration could be done with 3 knights, 2 on the same file as the enemy king 2 and 3 spaces away, and a a 3rd knight on the other side of the king and one file over (diagonally adjacent to it).  Your king would be on the same file as the enemy king and 2 knights protecting the 3rd knight and guarding the other 2 spaces on that row.  Or the 3rd knight could be on the same row as the enemy king 2 files away.
Comment: Hey, how did you do this? Did you actually think this through in your head or did you sit with a chess board and tried it out? I can't even think about this whole thing by reading your answer. I can only imagine how good you are.
Comment: @John Coleman  How is it your king can only cover 3 of those 9 squares?


Half of house power voltage drops during storms

Question: Very recently, about half my house's power outlets drops in voltage during storms. Each time it's the same circuits that are losing power, upstairs bed and bath, downstairs router, and a couple other rooms. The basement and living room never lose power. I measured the voltage of the outlet in the bedroom and it was fluctuation 30-10 volts AC and occasionally jumps back up to 120 volts. I've checked the breakers, all of them look good. My neighbors are not having issues with their power. What could be causing this issue?
Comment: My first difficulty in reading you is about "half my houses." This could mean "half of the thousands of homes I own" or it could mean "half of the power system in my house." But I'll take the latter meaning. A couple of things pop to mind. One, because you say 120 V, I think "North American" grid and therefore split-phase and then the two phases on your breaker panel. Which should be balanced. It would then make some sense if there is an explanation why your current return on one phase only is forced through Earth to get back to the power transformer. That ground return might be just enough.
Comment: Do you mean half the lights and half the plugs stop working, or do you mean that the voltage drops to 60V?  (And per @jonk, I think you mean "half of the electricity in my house", or "half of my house's electricity"?)
Comment: Not an answer to your question but a band-aid to your situation. I have found that power supply units to be beneficial to times of intermittent electrical issues in homes. If you use a UPS for your router, you can keep your internet running even when you have such power fluctuations.
Comment: Is there a way to test for a ground fault that occurs on one of the phases?
Comment: If you look at your breaker panel, does it seem like when there are problems it is with alternating rows?
Comment: Do you have overhead or underground entry of your service drop?  Are there trees near the path in either respect?
Comment: @jonk The "half my houses" comment seems a bit pedantic. It's pretty clear what they mean.
Comment: @RedwolfPrograms Yeah. The comment was made in a different group where it was slightly more appropriate to be pedantic. Here, not so much. Then this topic was moved here.
Answer: There are two tests you can do when this happens.

Check the voltage of the good circuits.  If their voltage is over 120V by an equivalent amount (e.g. 100/140V or 90/150V), that confirms you lost a neutral wire - extremely dangerous. Turn off all 120V loads and immediately call the power company to get it fixed.

Go to your service panel and turn off all 240V circuits - water heater, dryer, range, A/C, electric heaters; anything with a double breaker.  Now check the "weak" circuits.  If they are completely dead now, you lost a hot/live/phase wire - call the power company when convenient.

98% of the time, this is because of a downed pole-house wire, which the power company is responsible to maintain. That flaps in the breeze, slowly metal-fatiguing the wires - and the neutral wire doubles as the physical carrier wire!
What will have happened?  The USA is a 240V country. We get 120V because neutral is in the middle.  If you lose neutral, it's not in the middle anymore, which is very bad for the appliances on the higher-voltage side!
If you lose a phase, half your 120V loads should just go dead. However, 240V loads are attached to both phase wires. So when they turn on, they connect the dead phase to the live one, powering it back up (through the resistance of the 240V appliance).
Comment: You say "turn off all 120V loads" but wouldn't it be safer to just turn off the main breakers in this case? Otherwise you could be putting 240V across 120V loads while you are still turning them off.
Comment: " If you lose neutral, it's not in the middle anymore, which is very bad for the appliances on the higher-voltage side!" even more fun when the same thing happens on a European 400V three phase system......
Comment: And the fun will only increase with EV chargers connecting a large piece of metal on rubber feet outside your front door to TN-C-S systems (as separated TT is often too much faff), relying on the 18th edition "underspecified magic" later indents at the charge point to spot a broken PEN. It's really important to get a good charge point like a Zappi [no personal interest] that does this detection well, I think. This is going to become a horrible safety issue in a few years for folk who go for budget options. It's gonna be in the papers at some point.
Comment: @PeterGreen I bet it is. And worse, it requires coordination with neighbors to even identify!  We had that happen here (each unit gets a single 120V phase) but fortunately my storeroom was on the other phase, and I could go there and see the high voltage.
Answer: Because it is a storm, this is almost certainly an outside your home problem, which almost always is a utility company issue.
Because it is "half" and "intermittent", this is most likely one of your incoming hot wires (you have 3 incoming wires - 2 hots and a neutral) has a loose connection. When the weather is normal, everything is OK. When the connection either gets wet or battered by wind, the connection breaks.
This is not just an inconvenience, it is extremely dangerous. It can damage equipment (most things can handle power outages just fine, but low voltage can cause a lot of strange problems with modern electronics) and the intermittent nature of the problem could mean sparks, which can lead to fire.
CALL YOUR UTILITY COMPANY EMERGENCY NUMBER. You don't need to wait for a storm. In fact, they'll prefer to send when it isn't a storm, as it is easier and safer to work on the wires and they won't have everyone else calling at the same time. But if you have a storm now, call now. Tell them exactly what you said here: No power to half the house. They should send a truck and the problem will most likely be either where the wires connect to the pole or where the wires connect to the meter, both of which are there responsibility. In the unlikely case that they can't find the problem when it is not a storm, you may need to wait for a storm and call them back.
There is a small possibility the problem is past the meter and your responsibility and not the utility's responsibility. If that turns out to be the case, the utility will not normally charge and you will have to call in an electrician. But unless you live on a big property where the meter is at the edge with a long outside run from the meter to the house, I doubt that will be the case.
Comment: I agree.  I had a similar problem with intermittent short blackouts on half of my outlets during a storm.  Called power company and they took it very seriously and rolled a truck immediately.  They found a bad connection, replaced it, and I've had no problems since then.
Comment: Thank you for all your help, I did end up calling the power company and it was a tree branch on the power line. The branch was only on one of the hot wires causing the weird behavior.
Answer: I've had a similar issue occur with one phase drooping at times.  After calling out the power company they rapidly diagnosed it as a damaged transformer a block up the street.  Once they replaced that transformer there we no more voltage drops on that leg.
Replacement of the transformer only took them a couple hours, this type of failure is apparently prioritized since it can damage loads and upstream systems.
The storm may just be coincidental, call your power company.
Answer: The most recent edit saying that voltage is changing erratically makes a clearer picture, and that is that most likely, the transformer behind your house has a minor leak and the insulation between some of the coils is failing.
Partial loss of voltage to one phase indicates most probably that some of the coils on the secondary side are being shorted out of the circuit by water. This is especially likely if the weather head on your service (the place where wires enter your house) looks intact and there's no sign of water in the breaker box.
It is still somewhat possible that you may be taking water into the system somewhere else. If you have an attic that you can fit in, check for leaks that might be hitting a cable and following the sheathing down to exposed conductors. Check for moisture around outlets and switch boxes. These are good things to just check periodically in heavy rain anyway, as the wiring in a house can have a surprising amount of water in it before anything happens.
Comment: Even if it's the transformer, it's still a **Call the PoCo NOW** situation. That's still their responsibility.
Comment: @FreeMan, well, it's decidedly less urgent to be sure, but yes, absolutely. The most urgent action to take would be to turn off or unplug any loads that might be damaged by the voltage transients, especially anything that runs a motor, like washers/dryers, ceiling fans, air conditioning and the like. Newer electronics with DC power supplies and things like LED bulbs are probably fine, as they'll shut themselves down when they go to far out of tolerance.


Testing of distributed and asynchronous processing

Question: We have camel based system domain-agnostic data channel framework which facilitate the raw data flow from an external data source , validate the raw data, enrich and standardize the data to ensure that data can be consumed by our system, determine the changes to the data and persist the data. All of these asynchronously and exposed as rest webservices. We need to develop a test framework for this system. Please suggest tools and design for this.
Comment: What have you considered so far?
Comment: We are exploring Camel TestNG but not sure how to check asynchronous part
Answer: I have worked on systems which involved (Async Processing). The implementation of Asyc processing will be technically achieved through below examples

Queue based processing (Service Broker / MQ Series)
Custom Tracking tables (JMS etc..)

In all this cases, You can either validate by having

Retry for fixed number of times with configurable timeouts to validate messages are processed. I have seen a similar case in file processing, file will be picked up but it will not be loaded completely (processing). In this scenario I wait and retry for a configurable number of times to validate data loaded
Option#2 - If you have any tracking table you can run your validation once tracking table notifies messaged is processed
Option#3 - Wait until all messages are cleared from the queues, directly query where the message queues where messages are stored intermittently to identify message status
Answer: If you are black box testing the system it would be very hard to directly test asynchronism.
Even if you try some sort of white box testing, for example looking at queue sizes you'll have a difficult time testing since your response times will usually be too long- things will change until you understand that something has happened and react to it.
Why don't you just test the system with varying loads ? light to heavy loads, varying ratios of sequential to random timing, varying data sizes and combinations of the above.


MacBook crashes

Question: I have a 2008 MacBook. 2-3 minutes after startup the rotating beach ball appears. The only option at that point is to reboot. I have tried reinstalling the factory disks, installing Snow Leopard 10.6.3. I have replaced the HDD with a factory Fujitsu. It passes Apple Hardware Test (AHT). I have also created a USB bootable and booted from there. Same results, even with the HDD removed. Beyond that I have been through all the following: https://support.apple.com/en-us/HT201255 (start up options), https://support.apple.com/en-us/HT203161 (troubleshooting). The only mode in which it will operate without crashing is in single user mode. I've been working on it for 3 weeks and I'm afraid I'm going to have to throw it away.
Comment: Whatever happens DON'T THROW IT AWAY! Sell it on eBay. Believe me, someone will want it for parts and you'll at least get some money for it. No matter how damaged an Apple product is, someone will want it for the right price. I buy broken stuff all the time.
Comment: @RedEagle2000 - make me an offer. It's in perfect physical condition. I bought a new battery for it that has maybe 10 hours on it. There is no damage and I have the factory disks. drcurvin at carestandard.com
Answer: It seems like you've covered almost everything, but what I would do is start with the RAM. You said haven't changed it and RAM problems typically leave the computer somewhat functional, like how it will startups, but soon crash. I can personally recommend OWC for Mac replacement parts, but wherever you go, just make sure to buy Mac-specific RAM; I've had a terrible experience with Best Buy, one-size-fits-all RAM.
If that doesn't do it, it almost has to be the logic board, but don't go there first, as it should cost you more than RAM.
Comment: Thanks @RedEagle2000. I have not tested new RAM. Fortunately, I buy / upgrade Macs 2 at a time, one for my wife and one for me. So, I have an identical late 2008 MacBook that works perfectly. Will test it's RAM in the MacBook in question. A new logic board costs about what the MacBook cost originally. So, if this doesn't work I'll try it as a Ubuntu server. If that doesn't work, will go to EBay.

MacBook crashes


How to ad users using A shiro Plugin

Question: I am using Shiro plugin for my grails application security, My application already has a user .Using the shiro plugin, we get a shiro user, now how do i integrate the shiro user with the normal user of my application,show i go ahead and use relationships or is it that the user class ahould be only a shiro user class now ??
Answer: The Grails Shiro Plugin auto-generates the ShiroUser class as a starting point that you can use directly, or, if you don't want to use it, an example that helps you configure your own data model to work similarly.  It is totally ok to use your own classes instead.
And in my opinion, it is a good thing to use your own classes: there are less classes to maintain and you have Shiro work with your existing data model rather than forcing you to use new classes and/or interfaces.  The Grails plugin creates these things as a convenience to reduce the time it takes for you to get up and running, but you don't need to use them if you don't want to.
Using the ShiroUser class (and even further, using the Nimble plugin, which is built on top of Shiro) is all about convenience - how much do you prefer to use something that already exists (with the caveat that it may not meet all of your needs) vs how quickly do you want to get up and running.
Cheers,
Les
Apache Shiro PMC Chair & Katasoft Inc. Founder:
Application Security Products & Professional Apache Shiro Support and Training:
http://www.katasoft.com
Answer: Check out the nimble plugin which does exactly this and more:
http://www.grails.org/plugin/nimble

How to ad users using A shiro Plugin


IL Harmor soundesign thread

Question: Anyone have tried this great plug-in?
How is your workflow? I'm still learning so your advice and suggestions are welcome!
Answer: Hey User 6915 Welcome to the Forum!
Harmor is a very interesting Synth. It can create a lot of crazy new sounds.
The most important part about Harmor is, that you can apply effects and modulation to different frequency areas. For example: The higher the frequency, the higher the chorus amount, detune, distortion etc.
http://www.youtube.com/user/SeamlessR
The link is a portal to one of the biggest Harmor "freaks" in the web. He shows how to use Harmor to create up to date, Neurofunk, Dubstep and Electro sounds. In his tutorials he explains in depth how different parameters work. So its a worth watching, even if you do not like those sounds.
Peace
Answer: I have been using Harmor for a few years now and I would NEVER go to anything else (except Sytrus for FM/RM synthesis). The realy amazing thing about Harmor is the additive/subtractive thing about the way it is made. You can draw filter shapes! You can create filter masks and extremely versatile mapping. You can fully customize the signal flow. The unison is pretty much THE best in the market and its built in distortion is to die for. The main UI is scary but the REAL power grows from it's 100 odd envelopes, LFOs, keyboard/velocity/x/y/z mapping etc.
SeamlessR is a youtuber that essentially is a Harmor guru. He posts loads of videos explaining how it works and what is possible in many episodes of hie "How to Bass" series. Image-Line also posted a video of a lecture he did at dancefair on Harmor where he explains it in some extreme depth and then you really start to get an idea of its true power.
In terms of use: Ignore the envelopes to start with. Open up the spectrum analyzer and mess around with EVERY parameter to figure out what it does more specifically. Only once you've got the basic idea should you start exploring what the envelopes can do as they can do a lot more than you would expect.
I spent about 2 weeks doing this and it's got to the point where you can mention something in sound design and I can get to it in Harmor in under 20 seconds.
Good luck learning how to use this as I wouldn't be surprised if, once you go down to the fundamental components of it, it's one of if not the most powerful synthesizer on the market to date.
Answer: The harmonic setting on the phaser is excellent (next to the Oct, Hz setting), as long as its chained correctly it will really only let harmonics through. Its great for exciting timbres if you're using the Prism module because it normally pushes the partials of the sound very far apart from each other, which itself is great for in harmonic tones but gets a bit to 'side bandy' at the extremes.
I've also used the Image re synthesis engine to distort some voices rather than just pitching them down, you can set the form to neutral and get a very distinct robotic voice.
It's quite a deceptively simple looking synth but some of the routing and labeling isn't exactly clear, such as the Pluck module having a 'blur' button while the blur is actually on the other side of the plugin.
The filter is a lot more responsive than most subtractive synths because its just modulating the amplitude of the individual sines rather than actually filtering. Its also got quite a nice workflow with you being able to right click anything and choosing the edit articulator option rather than looking through the tables of envelopes.

IL Harmor soundesign thread


Missing Libraries make no sense

Question: I've never much issue importing a library to my master sketchbook location, restarting Arduino, then using the library examples. Today is a different story:

I'm loading RCLib which is part of this ArduinoLibraries family
RCLib requires PinChangeInt

So everything is in my sketchbook location right? Arduino > Preferences > Sketchbook Location
Still I'm getting compiler errors about missing libraries:
/Users/Jackson/Documents/Arduino/ArduinoLibraries-master/RCLib/Examples/Maga6ChanelsA8_A13/Maga6ChanelsA8_A13.ino:7:86: fatal error: PinChangeInt.h: No such file or directory
 #include "PinChangeInt.h"

I've even tried #include <PinChangeInt.h> Which makes more sense since this is a system library.
What is going on here?
The sketch I'm trying to run:
/**This is an example of using the RCLib with a mega and pinchangeint
 * This example isprovided as is by Jantje
 * Congratualtions, constructive feedback and I like it can be send to firstname.lastname@example.com
 **/

#define NUM_RC_CHANNELS 6 //You need to specify how many pins you want to use
#include "PinChangeInt.h"  //If you need pinchangeint you need to include this header
const uint8_t RC_Channel_Pin[NUM_RC_CHANNELS]={
  A8,A9,A10,A11,A12,A13};//Here I specify I want to listen to pins A8 to A13 of my mega

uint16_t RC_Channel_Value[NUM_RC_CHANNELS]; //This variable will contain the values read from the RC signal
#include "RCLib.h" //This include needs all declarations above. Do not try to move it up or it won't compile

Arduino v1.6.9 | OSX 10.11.4
Comment: The libraries should be in *sketchbook location* -> `libraries`. Try using `#include ` (note the less-than / greater-than).
Answer: I had downloaded PinChangeInterrupt through Arduino
Sketch > Include Library > Manage Libraries... > Filter your search... > PinChangeInterrupt > Install
I thought this is all I needed but I was wrong. This differs from the popular PinChangeInt library. Ultimately the file names where slightly different which is why my file was showing as missing. I found this out by manually looking at the file names in the library I was trying to used and comparing them against my includes.

Missing Libraries make no sense


Can I deactivate my CiviCRM WordPress plugin without losing all my data?

Question: We haven't used our CiviCRM plugin for quite some time, but it has acquired data I don't want to lose. I think it's slowing our site down and I'd like to disable it in anticipation of increased web traffic for an upcoming event. If I deactivate it, will I lose all my data?
Answer: Welcome to SE! If you deactivate the CiviCRM plugin the data will still all be in the database and not changed. However, I'd be surprised if CiviCRM slowed anything down if its not being used, so I think you'll have to look elsewhere for your problem.
Comment: Thanks a million! I'll give it a shot, at any rate, since deactivating it won't hurt anything.


Wallet Import Format - Guessing missing characters

Question: Is it possible to guess missing characters of a wif? Let's say there are 62 characters (lowercase + uppercase + digits) and the last 10 characters are missing. Is it possible to guess the WIF with powerful cloud computing in a reasonable amount of time? Guessing more than 10 characters (when we need to try all combinations) sounds utopic, but how is the WIF generated? Can we infer something about the math behind it to exclude specific combinations?
Answer: This would be trivial to brute force, if you had software to do so.
WIF private keys are encoding a number in base 58. If the last 10 characters are missing, that's 5810 = 430,804,206,899,405,824 potential numbers. That's a huge amount, but thankfully, every WIF key also contains a 32-bit checksum. That means that only 1 in 232 of those has to be tried, leaving us with just 100,304,421 keys left. Even fairly naive implementations could compute the corresponding addresses for those in a few hours of CPU time, to see which one might have been used.
Comment: Pieter Wuille, Can you please explain how a checksumm can reduce the number of combinations?
Is it relevant in case of unknown characters at the beginning of the


What is the best way to test for a keylogger on a Mac?

Question: If I suspect that someone has installed a keylogger application on my computer, what is the best way to test/find if such an application exists? Also, if I boot my Mac in safe mode, does this mean that a keylogger application would be disabled on startup?
Comment: If you seriously think your computer is compromised, it's probably just safer to re-build instead of continuing to use it at all.
Answer: First, I agree with Iszi in that it would be safest to format the hard disk and re-install OSX.  You would want to backup your documents and such first.  If you do decide to take that route, have a look at tripwire.  That should be installed immediately after you re-install OSX.
Short of that, you can do a couple of things:

Use Little Snitch to detect and prevent any data being sent across the network.
Secure your Mac physically, or take it with you if it is a Macbook to make sure nobody but you has physical access to it.
Look for processes, using Activity Monitor already on your Mac in Applications/Utilities, that look like 'logKext'.
Try this: http://www.chkrootkit.org/
Comment: Would booting up in safe mode prevent a keylogger from running at startup?
Comment: Matt, it depends on the way the alleged keylogger was installed and how it is architected. Booting in safe-mode will likely prevent many types of nasties from being loaded. At that point you could compare the process list to that of a non-safe mode boot. But that still won't guarantee you'll find anything. That's why the safest thing to do is start fresh with a newly formatted system. Short of that you can try safe-mode. Your mileage may vary. Best of luck.


How do I remove wax or Mop-and-Glow from Pergo floors?

Question: How do I remove wax or Mop-and-Glow  from Pergo floors?
Comment: If you know what was used, check the label. The  "waxes" I've used say they can be removed with household amonia. No idea what that would do The floor. Then again, no idea why anoyone would do anything more to a wood floor than keep it clean, at least not until it was time for serious refinishing decades after installation.
Comment: Do you specifically have Pergo brand floors or a laminate floor?
Answer: I won't suggest a brand in particular, but there are commercially available cleaners meant specifically for stripping hardwood/pergo/laminated flooring. A quick Amazon/Google search for 'Floor Polish Remover' brings up many options. It appears that this could be quite the project.
It appears as though some people also use a large rotary floor buffer/polisher to even out/remove any waxy buildup. This could also be a 'Pro Project' or something you could contract out.
Good luck.
(P.S. Whatever the outcome, I'd be interested. I also have hardwood floors that may need to be stripped)
Answer: Moved into a house with 50's linoleum; LOTS of wax buildup.
Tryed one of those fancy 'Floor Polish Removers' at $20 a bottle. It had triethylamine or triethanolamine or some such in it; looked and smelled like 70's vintage floor cleaning chemistry. Bottom line, it didn't work very well on serious wax buildup.
Then tried a bottle of Formula 409, developed 1957, on the floor. It worked wonders. Took off all the old wax with just a good scrubbing. With a fresh coat of wax, my kitchen again shines like the early space age.
Cleaning floors with Formula 409