How secure is TeamViewer for simple remote support?

Question: I'm deploying a web-based ERP system for a customer, such that both the server and the client machines will be inside the customer's intranet. I was advised in another question not to use TeamViewer to access the server, using more secure means instead, and so did I. But now I'm concerned about whether or not TeamViewer would be appropriate for the client machines, which are not "special" to this system in particular, but nonetheless I don't want to lower their current security, neither I want to compromise the computer on my end.
My question, then, is whether or not TeamViewer is "good enough" for simple remote desktop support, where it will be used simply to assist the users in the usage of the system, and whether or not I must take additional measures (like changing the default settings, changing the firewall, etc) to reach a satisfactory level or security.
Some details:

I already read the company's security statement and in my non-expert opinion all's fine. However, this answer in that other question has put me in doubt. After some research, UPnP in particular does not worry me anymore, since the feature that uses it - DirectIn - is disabled by default. But I wonder if there are more things I should be aware of that's not covered in that document.
The Wikipedia article about TeamViewer says the Linux port uses Wine. AFAIK that doesn't affect it's network security, is that correct?
Ultimatly, the responsibility of securing my customers' networks is not mine, it's theirs. But I need to advise them about the possibilities of setting up this system, in particular because most of them are small-medium NGOs without any IT staff of their own. Often I won't be able to offer an "ideal" setup, but at least I wanna be able to give advice like: "if you're installing TeamViewer in this machine, you won't be able to do X, Y and Z in it, because I'll disable it"; or: "you can install TeamViewer in any regular machine you want, it's safe in its default configuration; only this one *points to server* is off-limits".
My choice of TeamViewer was solely because it was straightforward to install in both Windows and Linux machines, and it just works (its cost is accessible too). But I'm open for other suggestions. I'm low both in budget and specialized staff, so I'm going for the simpler tools, but I wanna make a conscious decision whatever that is.
Comment: Join.me is a Logmein service that isn't exactly linux friendly. Something to keep in mind if you aren't in love with wine.
Comment: I prefer a self-destructing, on-demand solution like join.me.
Comment: @Joel I'm in love with wine, although I find mixing it with work makes me incredibly unproductive
Comment: I would recommend deploying on premise RHUB remote support appliances. They work from behind your company's firewall, hence are much secured as compared to hosted services.
Comment: UltraVNC offers a self-destructing client-initiated connection tool that's VNC compatible as well for remote-viewing Windows clients.
Answer: There's a couple of differences between using a 3rd party supplier (such as teamviewer) and a direct remote control solution (eg, VNC)
Team Viewer has advantages in that it doesn't require ports to be opened on the firewall for inbound connections, which removes a potential point of attack.  For example if you have something like VNC listening (and it isn't possible to restrict source IP addresses for connections) then if there is a security vulnerability in VNC, or a weak password is used, then there is a risk that an attacker could use this mechanism to attack your customer.
However there is a trade-off for this, which is that you're providing a level of trust to the people who create and run the service (in this case teamviewer).  If their product or servers are compromised, then it's possible that an attacker would be able to use that to attack anyone using the service. One thing to consider is that if you're a paying customer of the service, you may have some contractual come-back if they're hacked (although that's very likely to depend on the service in question and a whole load of other factors)
Like everything in security it's a trade-off.  If you have a decently secure remote control product and manage and control it well then I'd be inclined to say that that's likely to be a more secure option than relying on a 3rd party of any kind.
That said if the claims on TeamViewers website are accurate it seems likely that they're paying a fair degree of attention to security, and also you could consider that if someone hacks TeamViewer (who have a pretty large number of customers) what's the chance that they'll attack you :)
Comment: Very insightful! Right now I'm inclined to trust TeamViewer, my own lack of expertise on this subject might make a custom solution more risky than a ready-made one, short term (as long as that solution is a good one, naturally). But I'll make sure to weight those arguments in my future strategy.
Comment: +1 for "everything in security is a trade-off". This is an answer to many questions
Comment: I would not be so quick to discard the possibility of being a target just because, "what's the chance"
Comment: @micsthepick There is a smiley. I think it was sarcasm, because obviously every teamviewer customer has a problem if the teamviewer service is compromised.
Answer: Take a look at this security analysis of TeamViewer.  In short, it's definitely not secure on untrusted networks: https://www.optiv.com/blog/teamviewer-authentication-protocol-part-1-of-3
Conclusion:

It is my recommendation that TeamViewer not be used on an untrusted network, or with the default password settings. TeamViewer does support increasing the password strength to a configurable length, and using alphanumeric passcodes, but it's unlikely that casual users will have changed this setting.Keep in mind that there is a substantial attack surface in TeamViewer that needs more analysis such as the unauthenticated, plaintext communication between client to server (over 100 commands are supported and parsed on the client side), as well as many peer-to-peer commands, routed through the gateway server. Despite the danger to this much exposed attack surface, the risk is somewhat mitigated by an extensive use of std::string and std::vector instead of C-style strings and arrays.
Comment: That's pretty good info, I wish I could upvote you more than once! I'd just like to note that many of the dangers presented in the linked page can be mitigated by **not** leaving TeamViewer running unsupervised, instead only opening it when you need to, and closing it immediatly after use. That won't protect you against an eavesdropper, but if you can [as is in my case] you can also disable remote control, so an active attacker won't be able to do much damage.
Comment: @mgibsonbr: You can use the SE bounty mechanism to donate some of your rep to Bill for his answer.
Comment: @mgibsonbr, Bill, Please summarize the 3 pages and put up a summary on this answer.
Comment: The link above no longer works.
Answer: I just want to add an answer which I think hasn't been touched upon yet. When you connect via teamviewer to another computer, you share your clipboard with that computer (by default).
Therefore, everything you copy onto your clipboard is also copied onto the clipboard of the computer you are connected to. By installing a clipboard tracking application such as ClipDiary, on the host computer, you can keep a record of everything copied onto the clipboard by the person connecting to you.
Most of the answers here are focusing on the security of the computer being used as the host, but this is also a potential security issue for the computer connecting to the host, especially if you use a password management tool such as KeePass, as the host computer could potentially have a record of usernames and passwords (and potentially URL's if you also copy the URL from KeePass to your browser) on the clipboard history after your session is over.
Comment: Good point! It's very easy to forget this detail, and you never know what is in the clipboard at any moment, since it's invisible... so I'd rather play it safe and disable this option.
Comment: @JMK, Wow, isn't there a way to disable this automated clipboard behavior?
Comment: @Pacerier I think you can just uncheck *Clipboard Synchronization* under Advanced Options in Teamviewer's settings.
Comment: @JMK, It's odd that the other answers here are contradictory. Some says its secure while others say its not.
Comment: My experience with TeamViewer is that Clipboard Sync is turned OFF in the initial installation. You need to turn it on yourself, but after that point it stays on. And I'm not sure if the setting is per-connection.
Comment: @Heraldmonkey I answered this in May 2013, maybe this has changed since
Answer: I don't know enough about TeamViewer to give you an assessment of its risks or whether it is a good choice for your situation.  But I'm going to re-iterate a comment from @Lie Ryan.  If you deploy TeamViewer for this purpose, one potential way to reduce the risk of remote attacks is to set up a firewall (on both endpoints) which blocks all access to the TeamViewer ports except from authorized machines.
Comment: The [webpage](http://www.teamviewer.com/en/products/security.aspx) claims that they use end-to-end encryption using public/private key cryptography, so that the routing servers cannot decrypt the traffic. But it does not go into details how the trust of the public key is managed.
Comment: TeamViewer uses [port 80 outgoing on both ends](http://www.teamviewer.com/en/kb/10-Which-ports-does-TeamViewer-use.aspx). I don't know if it uses end-to-end encryption or if the TeamViewer-company can see/modify the traffic on their relay servers.
Comment: @HendrikBrummermann "does not go into details how the trust of the public key is managed" - according to [this answer](http://security.stackexchange.com/a/36773/6939), not very well...
Comment: @mgibsonbr, Which section exactly?
Comment: @Pacerier uh, it's been almost 3 years since I asked this question, but if I recall correctly it's this part at part 3: "Keep in mind that the initial RequestRoute2 response, containing the public key of the destination, is not authenticated in any way (...), so it can be trivially man-in- the-middled..." Also: "If peer-to-peer encryption negotiation fails for any reason, one of the clients (...) will send a CMD_RequestNoEncryption command, which will turn off all peer-to-peer encryption for the session. Turning off encryption is silent, with no user-noticeable effect."
Comment: @mgibsonbr, Hmm, there should be a setting that can stop these silent disabling of encryption.
Answer: About TeamViewer, there are a couple things that I think you should keep in mind:

You can't easily look at the source and verify its security, and it's a network-facing attack surface. That's not so nice – if you're able to make an OpenSSH server with password-based auth deactivated the internet-facing part instead, do that. (You might want to give the user a method to start/stop the server.) Through the OpenSSH tunnel, you could just use localhost-bound VNC to connect to the display. Of course, this method doesn't work so well if the PCs in question are behind a NAT/overzealous Firewall and you don't have a way to get behind that firewall. Ideas to get around it:

You could use a hack like http://samy.pl/pwnat/ to open them up to connections from the internet.
You could do the SSH tunnel in the reverse direction: When they want support, they start a script that makes an SSH tunnel to your support server and connects a TCP connection to the VNC server to the SSH connection. Your support server has the client's public key in its authorized_keys file with a forced command that connects the client to your reverse VNC client.

If you use it, make sure to never have a system running with that stupid 4-digit passcode system. Yes, they do have exponential lockout times, but first thing, you don't want support to be locked out that easily and second thing, well, what if someone just tries one random combination on 100000 PC running teamviewer? He'll get ~100 established connections without running into any lockout, I think – afaik, the lockout is completely client-side.
Comment: A quick analysis by a third party shows its quite insecure in fact: http://blog.accuvant.com/bthomasaccuvant/teamviewer-authentication-protocol-part-1-of-3/
Comment: @mikebabcock the link is broken
Comment: And Internet Archive to the rescue: http://web.archive.org/web/20160306132655/http://www.accuvant.com/blog/teamviewer-authentication-protocol-part-1-of-3
Comment: I do not think VNC through SSH is more secure than teamviewer.
Answer: Teamviewer is not secure period. Think about it. Teamviewer can be configured to always use the same Partner ID and password. Similar code can be created and launched just by the user clicking on an email. Great tool? Absolutely..for guys like me who support a large bunch of remote users who can't tell a colon from a semi-colon. But secure? No way No how. Teamviewer allows remote access to a PC and can circumvent Cisco VPN or any other VPN security. This crap about the end user having to give out the partner ID and pass is just that...crap. This can be gotten around very easily. Don't get me wrong. I like Teamviewer. But don't kid yourself, it's not secure at all.
Comment: Do you mean not secure for the user or not secure for the server or both?
Answer: I would suggest a native solution such as VNC, enabling you to omit such workarounds as TeamViewer in WINE etc, as well as using the local operating systems package management utility to ensure that the solution stays up to date. For security, use an SSH tunnel. This ensures that all VNC communications are encrypted, including the initial VNC auth/password handshake. This is especially important as a lot of VNC implementations are rather insecure.
In addition as another respondant suggested, use IP filtering to ensure that only those at certain addresses are able to communicate with the VNC server.
Comment: If you this route you could also in theory extend the support to external clients through the use of a VPN.  Much easier to block everyone except a list, then try to worry about everyone, and try to secure the network.
Answer: One way we handle it: if client requests TeamViewer availability, user starts TeamViewer on demand and admin kills it upon tasks completion. Another solution we once deployed in such a case, is that TeamViewer is started from an SSH session by the admin. Alternatively, you might look into "invite-me" desktop sharing tools. Or my favorite: mirroring the Xsession via SSH to your desktop.
Answer: Teamviewer gives the computer user the ability to give a remote session to is PC to anyone in the internet. So, the security of the network passes to the end-user! That's a no-go. I advise you to use VNC.
Comment: Some references, or more detail on the how might help the poster.
Comment: "the security of the network passes to the end-user" - I disagree. TeamViewer by itself does not perform any privilege escalation, so the remote operator can only do as much as the local user could do. There might be other reasons why another choice of tools might be better, but IMHO this is not one of them (the user either has or has not the authority to allow a remote operator, the specific tool being irrelevant).


Does it make sense to paint floors prior to installing laminate flooring?

Question: I am building a new home & am taken aback by all of the never ending dust. Does it make sense to paint the subfloors prior to installing the flooring, in order to seal the dust. We have swept & vacuumed repeatedly, yet the constant drywall & grout dust persists.
Answer: I have always painted my own subfloors. My reasoning is that what ever finished floor material I use will be more easily removed if the subfloor is painted. The carpet underlayment/pad doesn't stick as firmly, Press and stick vinyl tiles adhere  better. My biggest reason is spills are less likely to penetrate into the plywood and cause odor or mold issues later.
Answer: Putting in engineered flooring in our 39-year-old colonial home in MI with a basement.
1) Plan to Kilz/paint the 3/4" plywood sub-floor to try to reduce any moisture that may migrate up from the higher humidity in the basement.
2) Also think the paint will provide a slicker surface for the expansion and contraction of the flooring and the cushion under the flooring as humidity changes a lot in Michigan throughout the year.
Peace, MI licensed builder.
Answer: One reason to not paint them would be to reduce the level VOC's in your home.


Why can't the terms equal $0$ in the leibniz test for alternating series?

Question: The conditions for this test state that the terms have to be greater than zero and decreasing, but looking at proofs of this test it isn't clear to me why the terms cannot equal zero.
Comment: If one of the terms is equal to zero, then, because we assume the sequence to be decreasing, the rest will be equal to zero as well. Hence the series will be a finite sum, and any convergence result becomes uninteresting.
Comment: What is a "term at infinity"?
Comment: One issue here is that your question is very vague.  Try to precisely write out a test, generalizing Leibniz, of the form you want.  Given that it should be easy either to prove that your test is valid or to exhibit a counterexample.
Comment: Of course the terms go to $0$ in the limit, that's a necessary (but insufficient) condition for the convergence of any series.  Otherwise, you need the terms to decrease (in absolute value) to $0$ in order to invoke Leibniz.  The test fails generally, though there may well be other series which you can approach in a similar manner.
Comment: You cannot evaluate a term in a series at infinity, you can just look at its limit. The idea is that it will alternate and approach zero from both positive and negative
Answer: Yes, you can have $a_N=0$ for some $N\in\Bbb N$. But then, since the sequence $(a_n)_{n\in\Bbb N}$ is decreasing, you have $a_n=0$ when $n\geqslant N$. And in that case the test is quite uninteresting.


Problem with Facebook Toolkit

Question: I am using the latest Facebook Toolkit. I want to retrieve all albums of the current user.
I use FacebookService.GetPhotoAlbums(), but the result has an itemcount of 0 :-/ No error is raised.
Do you have similar experiences?
Answer: I would strongly advise moving away from the FDT. Not only is it rarely updated, but it does not support the new OpenGraph API. There is a new OpenGraph-based library another party is working on, but I can't vouch for its quality. The simplicity of the new API also makes it fairly straightforward to roll your own interface.
Answer: You need to obtain the "user_photos" extended permissions to do this. You can go to http://fbgraph.computerbeacon.net/tutorial/section2/ for details of doing this with the Facebook Graph Toolkit.

Problem with Facebook Toolkit


Does verification that owner of domain undergo on Google ever expire?

Question: Recently I've logged into my Webmaster Tools and noticed that I still got verifications on some of the sites that I do not own anymore, for like several years already. It suddenly brought multitude of questions to my mind, for example there were sites that I did together with some ex-partners, that I do not communicate with anymore, because of personal reasons. Does this mean that they still own some rights to my sites from Googles point of view? Shouldn't verification auto expire at some point in time?
Answer: Does this mean that they still own some rights to my sites from Googles point of view?
No, the authorization is one way (i.e. you having access to get webmaster tools data from the following sites) if it is granted. So you having them does not give them any rights to your account nor any other sites that you might have connected to Webmaster tools.
Does verification that owner of domain undergo on Google ever expire?
No it does not expire but it can be manually removed. If you click on "Manage site" there is an option at the end "Delete site".
Comment: Why? If I have verification, can't I for example hold the site from being properly indexed or something similar?
Comment: Sorry for not being too clear, but when saying "authorization is one way" I mean that it's only you who still have access to their webmaster tools data, but not them having any access to your account. Your original question sounded like that was what you were asking.
Yes, you can access and use webmaster tools or even do something like prevent site being crawled. It's an oversight from current owner not to remove your permission to manage webmaster tools for the domain that you have sold.


Identifying feature class permissions in Oracle ArcSDE

Question: I created a new Feature Class, and I assigned some users SELECT privileges to that Feature Class.  I want to look at the list of users that I have assigned privileges to, how do I do that?
Updated
Is there a GUI application to do this?
Answer: via SQL from shell:
select grantee, privilege
from dba_tab_privs
where table_name = 'FEATURECLASS_NAME' and owner = 'SCHEMA_NAME';

this will give you the list of users that have privs to that feature class's business table. if you granted privs via arccatalog, then the privs will be for the entire feature class.
Comment: I was hoping to have a GUI app for this, but still good info.
Answer: It's been a couple of years since i've used oracle and ArcSDE, but I think I used some Oracle SQL(sqlplus from shell) to figure out what was granted.  I don't have the SQL, but it would be something along the lines of: http://oraclepitstop.wordpress.com/2008/05/29/sql-script-to-list-oject-privileges-granted-to-a-particular-user/
select grantor || ' granted ' || privilege || ' on ' || table_name || ' owned by '|| owner || ' to '|| grantee
from dba_tab_privs
where grantee like upper('&GRANTEE_NAME')
order by privilege;

The GDB Toolset might also have this functionality, but it was just as easy(and faster) for me to  set up a batch file to query the info. But you do need to sort through the various sde/gdb/adds&deletes tables that will get reported back.
Comment: I don't see an option in GDB to see Privileges.  :)

Do you know of another GUI app that might have this functionality?
Answer: In response to the update in the question

Is there a GUI application to do this?

Starting from ArcGIS 10.0 (released late 2010, so after this question was originally asked) you can view and modify permissions on a feature class from ArcCatalog.  To do this you must be the owner of the feature class.
In ArcCatalog (or the ArcMap Catalog window):

Browse to the feature class in your geodatabase connection
Right-click on the feature class and select Manage > Privileges

This will open the Privileges dialog which will show you the users that have access to that feature class, and what privileges they have.  You can also grant/revoke permissions and add/remove users access.


Why were the destitute in the dunghill?

Question: The metaphor of lifting the poor from a dunghill (Psalm 113:7, 1 Sam 2:8) or sending the proud to the dunghill (Lamentations 4:5) is quite the visual. In most verses, אַשְׁפֹּת seems to be used more to create the visual than to refer to a specific farm or sewer or person or event, but do we have any information or background about how this metaphor came into common usage?

Is it a mistranslation of rubbish heap or some other word? (that makes sense in context, and has been claimed, but does anyone have a good source for it other than google searched websites that reference each other circularly? And how to reconcile that with the usage in Nehemiah? Is there a clue that נְוָלוּ is the word in Ezra and Daniel but that some English translators translated them into the same word?)
Is it suggesting that a beggar would take any job, including slinging manure, which is the lowliest of professions? (doesn't make sense to me in the context of an agrarian society that would value those who work or care for livestock, or in the context of some of the verses that use this word)
Is there some benefit to a dunghill that the lowliest would find appealing? (dung provides warmth in cold nights, a tall enough heap could shelter from winds or driving rains in a place where no one will bother or try to drive away the person who has been cast out everywhere else... any suggestion from the text or the history that this reading is justified?)
Or is it like memes today, that its origin is lost to the mists of time?
Comment: If you've ever been poor, you'll know what is meant by "dunghill".
Answer: Prior to the "The-Dung Gate" | Shaar Ha-Ashpot שַׁ֥עַר הָֽשְׁפֽוֹת in [Nehemiah 3:14], the worth $ of Dove's Dung דִּבְיוֹנִ֖ים was = חֲמִשָּׁה־כָֽסֶף Chamesh (5) shekels of Kesef (Silver), based on [2 Kings 6:25]. -- The needy could sell Dung!

Why were the destitute in the dunghill?


How does VIM sets the $VIM environment variable?

Question: I was reading http://vimdoc.sourceforge.net/htmldoc/starting.html#initialization, but couldn't immediately find the answer. Is the $VIM environment variable hardcoded in its binary (not read from a config file)? The binary is built differently depending on the OS, so I'm guessing that's how the $VIM differs per OS.
Answer: Linux view, for more details see Doktor OSwaldo answer.
The installation directory is defined during build (to be exact: It is defined when configuring the build.). The default value of $VIM is a subdirectory below the installation directory and is compiled in (<inst-dir>/share/vim on Linux).
You can override this by setting the environment variable VIM before starting Vim.
The compiled-in value of $VIM is part of the output from :version or vim --version. Just search for fall-back for $VIM.
Within Vim you can display the actual value by executing
:echo $VIM

Comment: What I found quite confusing for the beginner is that after downloading and installing vim, you would normally expect it to know where it was installed, or at least to show a very prominent message saying "warning - it will not work properly until you have set this environment variable"
Comment: @Andy I don't understand. What won't work properly? Vim does know where it's installed and sets `$VIM` accordingly without any user intervention. This answer just describes how you might change it, though I'm not sure why you'd want to.
Comment: @Big McLargeHuge That's not what I understand from my experience and from @Ralf's answer, at least for people who downloaded vim rather than compiling it themselves. I installed a binary of vim on my Ubuntu 20.02 (I'm not sure exactly how but I'm guessing probably with apt). It installed into `/usr/share/vim/vim82` but the built-in VIM variable was set to `/usr/share/vim` so I had to override it in my .profile. I can't remember quite what it was that wasn't working, but I was trying to install plugins at the time and this definitely fixed the problem.
Answer: The whole process can be read under :h $VIM:

To avoid the need for every user to set the $VIM environment variable,
Vim will try to get the value for $VIM in this order:

The value defined by the $VIM environment variable.  You can use this to    make Vim look in a specific directory for its support
files.  Example:
setenv VIM /home/paul/vim
The path from 'helpfile' is used, unless it contains some environment    variable too (the default is
"$VIMRUNTIME/doc/help.txt": chicken-egg    problem).  The file name
("help.txt" or any other) is removed.  Then    trailing directory
names are removed, in this order: "doc", "runtime" and
"vim{version}" (e.g., "vim54").
For MSDOS, Win32 and OS/2 Vim tries to use the directory name of the    executable.  If it ends in "/src", this is removed.  This is
useful if you    unpacked the .zip file in some directory, and
adjusted the search path to    find the vim executable.  Trailing
directory names are removed, in this    order: "runtime" and
"vim{version}" (e.g., "vim54").
For Unix the compile-time defined installation directory is used (see the    output of ":version").

Once Vim has done this once, it will set the $VIM environment
variable.  To change it later, use a ":let" command like this:
    :let $VIM = "/home/paul/vim/"

It is sometimes hard to find stuff in the vim help "immediately" but it is a great source. The vim helpfile is a mighty tool which will guide you a long way before you need this site, once you got the hang of it!
Comment: @BigMcLargeHuge I am sorry, I didn't intended to sound rude at all. I just wanted to hint the might of the vim help. Tried to adapt my answer, I hope it is clear now, that I was not at all angry about the question!
Comment: To be fair, this info is kinda buried. Though if you were able to find your way to starting.txt it's not too much of a stretch to search for `$VIM`. `:helpgrep` helps (no pun intended), but then you have to know how to display and navigate the quickfix window. Vim is so unfriendly to beginners, I don't fault anyone for questions like this.


How do I install a new custom keymapping in XKB?

Question: I am attempting to install a custom symbols file in my keyboard mapping in XKB, as found here.  I would like to overwrite how the J key is handled (the first step in emulating a numpad, but for now I am simply applying the same mapping as found in the us symbols file). However, at the step where I load the file using xkbcomp, I get an error.  Please find the error state and file contents below:
The map, which was created by modifying the output of setxkbmap -print, adding "+altkeypad_symbols(altkeypad)" to the end of the xkb_symbols include statement.
~$ cat .xkb/altkeypad_map
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+us:2+inet(evdev)+altkeypad_symbols(altkeypad)"   };
    xkb_geometry  { include "pc(pc105)" };
};

The custom symbols file, a simple toy case of "remapping" the J key to its normal function.
~$ cat .xkb/symbols/altkeypad_symbols
// Emulate the keypad using {j k l u i o 7 8 9} as KP_{1 2 3 4 5 6 7 8 9}

default partial alphanumeric_keys modifier_keys
xkb_symbols "altkeypad" {
    key <AC07> {        [         j,    J               ]       };
}

Attempting to install the new map, yielding an error, made increasingly odd given the fact that the symbol "J" appears on line 5 of the file, not line 7.
~$ xkbcomp -I$HOME/.xkb $HOME/.xkb/altkeypad_map $DISPLAY
syntax error: line 7 of altkeypad_symbols
last scanned symbol is: J
Error:            Error interpreting include file "altkeypad_symbols"
                  Exiting
                  Abandoning symbols file "(null)"
Error:            success in unknown
                  Couldn't write keyboard description to :0

As far as I know, I've very closely matched the syntax of other custom symbols mapping.  Any help resolving the error would be greatly appreciated!
Answer: I believe it is missing a semi colon there
// Emulate the keypad using {j k l u i o 7 8 9} as KP_{1 2 3 4 5 6 7 8 9}

default partial alphanumeric_keys modifier_keys
xkb_symbols "altkeypad" {
    key <AC07> {        [         j,    J               ]       };
}; <<----- HERE!


Role of physics in the zeta function $\zeta$ and the Riemann hypothesis

Question: Hilbert and Polya suggested a physical way to verify the Riemann hypotesis about $\zeta(x)$. If the Riemann hypotesis is true, we can state all eigenvalues of physical problems are real. What is the connection between the eigenvalues and the $\zeta$ function?
Comment: Related: http://physics.stackexchange.com/q/26856/2451 and links therein.
Answer: In http://arxiv.org/abs/1608.03679 , the authors consider a Hamiltonian
$\hat{H}=\frac{1}{I-\exp(-i\hat{p})}(\hat{x}\hat{p}+\hat{p}\hat{x})(I-\exp(-i\hat{p}))$,
where $I$ is the identity matrix (I suppose - I cannot type the symbol they use), and claim that "a formal calculation of the eigenstates $\{\psi_n\}$ and
eigenvalues $\{E_n\}$ of $\hat{H}$ shows that with the boundary condition $\psi_n(0)=0$ for all $n$ the eigenvalues satisfy the property that $\{\frac{1}{2}(1-iE_n)\}$ are the nontrivial zeros of the Riemann zeta function. This non-Hermitian form of the Hilbert-Polya conjecture thus confirms the Berry-
Keating conjecture."


Credit card accounts and credit score

Question: I m relatively a new resident in the US. I opened an account with BofA (oct/2016) and after struggles they approved me for their student secured credit card account (700$). After 4 months I applied for their cash back and I got approved with a credit line of (5000$). After 2 months I got an invitation from discover and I opened another account with a credit line of (5000$) and now they increased it by 1600 more. My credit score FICO keeps showing that it is impacted by the length of oldest account.
My question, I really don't use the very first account and I m thinking of closing it, is it going to affect my credit score? If yes, what is the alternative?
Comment: Paying your bills on time and not over-using the credit you have have a much bigger impact on your score than age of accounts.  That's just minutia used to break down your score even further (Cynically many think it's a way for CC companies that sponsor the scores to keep you from closing accounts).  Just pay your bills, borrow as little as possible, and you won't need to worry about the age of your accounts.
Answer: When you close a credit card, you lose the available credit that counts toward your overall credit utilization.  Higher utilization generally lowers your credit score.
For example, if you have one card with $500/1000 and another card with $0/1000, then your overall utilization is $500/2000 or 25%.  If you close the card with 0 balance, your utilization climbs to 50%, which hurts your score.
However, if you don't need that extra available credit, such as when the limit is small or you don't generally carry balances from month to month, then you don't need the card.  Closing it won't hurt you.
Alternatively, you can contact the card issuer and ask them to change the card to something that you can use, such as a better rewards program, and ask them to both unsecure the card (and refund your deposit) and increase the limit to something similar to your other cards.

Credit card accounts and credit score


How to clone an npc character's face/body as your own?

Question: Is there a way to get a formula or set of parameters for a random npc's physical appearance? Say I want to make my character's face look like Martin or Jeoffry or a Mythic Dawn Acolyte I just slain, what would be my options?
Comment: wow, this is a great idea! +1 for coming up with a question I would have asked myself if it had previously occured to me. BTw to any possible Answer Holders - could this also or instead be performed in skyrim?
Answer: This mod add numbers near sliders on character creation screen,if you know the values this makes them easy to remake.
Unfortunately there isn't any good list of NPC appearance codes online,you will have to find them out by playing with game files.
This is the official oblivion editing tool I would start here and check for values in desired NPC's properties,details...
Wrye Bash is another powerful tool for editing oblivion files,it has some face transplant option by itself but you should be looking just for values.
This and this are 2 more things that could be of use to you,both of them use savegame files to copy the character face,you could get some hints where to look for values or even manage to directly copy npc file.


How does QE reduce long-term interest rates?

Question: It is said to be that, in a QE programme, the Fed reduces long-term interest rates by purchasing long-term securities. How does this work? Why does buying longer maturity securities from banks reduce long-term interest rates?
Answer: "Long-term securities" (i.e. bonds) work like this: You're a big company wanting to expand. You write a bunch of IOU notes that say "I'll pay you back $100 in 10 years". Then you sell these notes by auction.
The amount that people bid defines an interest rate. If you manage to sell them for $90 each, you get $90 and have to come up with an extra $10 in the next 10 years, or $1 per year of interest. If you sell them for $80, you have to come up with $2 per year of interest. If you sell them for $99, it's only $0.10 per year. From that, you can calculate an interest rate.
This also applies to the secondary market. If it's 5 years later (halfway through the term) and I buy the bond for $95, I am getting $1 interest per year for the next 5 years. If I buy it for $99, I am only getting $0.20 interest per year for the next 5 years.
(Of course, I don't actually get any of that money until I sell the bond, or it matures.)
If the Fed is buying up bonds, they are paying an above-market price to do so (otherwise people with bonds would sell them on the market instead of selling them to the Fed). They are also raising prices in the whole bond market as there's less supply of bonds for people who want bonds for some reason. Higher prices mean lower interest rates, as explained above.
Comment: Thanks for the insightful answer! I have an additional question. When the Fed purchases 10 year treasury notes, does that also influence the interest rate for, say, 10 year corporate bonds? That is, are all 10 year interest rates the same regardless of the type of security?
Comment: roflmfao: 10 year bonds don't all have the same market rate (aka yield), because some issuers (and maybe issues) are riskier than others, but they are all _affected_ by the 'risk-free' Treasury rate; see (my answer a year ago at) https://money.stackexchange.com/questions/127956/why-are-bond-interest-rates-set-at-the-interest-rate-set-by-the-fed
Answer: Bonds sold by banks and private parties have a liquidity premium because these bonds can be liquidated for cash in the secondary market.
The amount of liquidity depends upon the amount of cash available in the system relative to the amount of bonds in the market. If  there are more bonds and less cash available to buy them, then there will be less liquidity and the liquidity premium will be higher.
If there is more cash and fewer bonds, the liquidity premium will be lower.  This is the effect of Quantitative Easing because central bank buys bonds and releases cash, causing the liquidity premium to drop, resulting in a decrease in medium term interest rates.


How do I share all my itunes music with a friend?

Question: I would like to share my whole iTunes library with a friend. He also has an ipod so I take it he also has iTunes on his pc ( with his own apple account and Id ). My library is just under 7 gig and I was thinking of using a usb memory stick. Will he be able to add all my music to his existing library, and vice versa?
Comment: Legally? ...No.
Answer: Assuming you have "Copy files to iTunes Media folder" enabled in your "iTunes Preferences", you can find all all your files under:
<code>/Users/yourUserName/Music/iTunes/iTunes Media
</code>
Comment: I believe this will only be valid for future imports, to copy all previous imports, if it wasn't on before, do as follows. Choose File > Library > Organize Library, and, in the window that displays, check Consolidate Files, and then click OK.
Answer: You could also open itunes, hit Command + A, and drag and drop the songs onto a flash drive.


Do different types of mycelium connect to each other?

Question: I've heard that mycelium connect to each other when they are broken. Do they also connect with other types of mycelium to spread the network faster?
Comment: I know you've probably already read this but it is a great article about fungus.  That one fungus organism was in Oregon near where I live, and that made me happy!  Fungus is here and everywhere black thumb.  I would be careful with importing fungus!  https://en.wikipedia.org/wiki/Mycelium
Comment: Very interesting, this Stamets dude.  He doesn't look old enough for  40 years of hands on experience unless these are old pictures.  The problem I am seeing is that fungi are specific to an ecosystem.  The fungi are not able to leave that ecosystem without adaptation and change or death.  Ecosystems are hugely complex, we humans do not understand but a tiny fraction of the complexity.  I couldn't point to fungus and say this fungus is responsible for this or that and thus. Fungus is everywhere and is specific to its environment.  Can't take fungus out of a forest to make another forest.
Comment: Since the plant sale on mothers day I started following Paul Stamets
Comment: Would this question maybe be better suited to https://biology.stackexchange.com ?
It's not really a gardening question & is more about the biology of fungi.
Comment: Short answer, no, they don't combine with other, different fungal mycelium.
Answer: As you stated

...mycelium connect to each other when they are broken

This is true of mycelium in the same way that animals can heal a wound, an organism healing and reconnecting tissue.
The difference is of course that animals have a centralized physiology (centralized system for nutrient intake and managing of bodily functions), where as mycelial masses take in nutrients throughout their entire mass with no centralized governance.
Not only will a single mycelial mass reconnect itself when 'broken' if remaining in close enough proximity and with nutrients available to fuel the healing growth, but also a severed portion of the mycelium can grow independently into a 'clone' of the original organism when removed. Many species of fungus can also be cloned from the tissue of their fruit bodies (mushrooms) to grow new mycelial masses (mushrooms are in large part not much more than compressed mycelium).

Now, to the second part of your question:

Do they also connect with other types of mycelium to spread the network faster?

Let's try to address this incrementally.
Spore germination and growth: A typical single spore germinates into a homokaryotic mycelium, which cannot reproduce sexually; when two compatible homokaryotic mycelia join they form a dikaryotic mycelium. Spore grown homokaryotic mycelium are ONLY compatible if they are of the same species, this would be two mycelial masses of the same type connecting, however, two separate genetically distinct masses of dikaryotic mycelium of the same species (separate organisms) will continue to grow separately.
Additionally, just because a homokaryotic mycelial mass is of the same species as another that it meets, is not a guarantee that they will be compatible.
Competition between fungal species:
Fungi are incredibly competitive with other species of fungi.
A number of different scenarios may unfold when two fungal mycelia meet. If the two fungi are of the same species, they might mate. If they have already mated, then they often reach a kind of compromise, and a stand-off ensues, with neither advancing into the other's territory. If fungi of different species meet, battle commences with one eventually gaining the upper hand and advancing into the opponent's territory. Sometimes there will be stalemate if both are equally adept fighters.
Sources:
https://www.independent.co.uk/news/science/when-mushrooms-go-wild-483119.html
https://en.wikipedia.org/wiki/Arbuscular_mycorrhiza
Suggested further reading:
Mycelium Running: How Mushrooms Can Help Save the World Oct 1, 2005
by Paul Stamets
Radical Mycology, A Treatise On Seeing And Working With Fungi 2016
by Peter McCoy and Natassja Noell
Organic Mushroom Farming and Mycoremediation: Simple to Advanced and Experimental Techniques for Indoor and Outdoor Cultivation Aug 18, 2014
by Tradd Cotter


Why is www.example.com better than example.com?

Question: I remember reading that it is better to use www.example.com instead of example.com on a web server when setting up web sites. Why, exactly, is this the case? I am asking from a network admin POV.
Answer: One may use a domain name for many different types of services. www signifies you serve web pages. But you may think of others, such as ftp, news, nntp, smtp, imap, snmp, ntp... as in the following example list (not complete by any means):
<code>ftp                     File Transfer protocol
http                    Hypertext Transfer Protocol
gopher                  The Gopher protocol
mailto                  Electronic mail address
news                    USENET news
nntp                    USENET news using NNTP access
telnet                  Reference to interactive sessions
wais                    Wide Area Information Servers
prospero                Prospero Directory Service
</code>
These all are associated to different ports and could live on the same server, but the convention is to split them and at least associate them to notionally different (logical) servers, this allows you to actually split them to different physical servers should you need to (for example your www now needs more space, but other services are fine, so you move the logical server to a new physical server).
One way to split them is to give them different subdomain names, hence the www and the like. You can of course use an intelligent loadbalancer that will split and forward your traffic based on criteria such as destination port numbers and other considerations, in this case you will not need the subdomain scheme. But subdomains do make it clear and easy to identify what's what.
In fact you can use any subdomain name you care to think about (providing you remain within the allowed range of characters and length limits), but this could be confusing to your customers.
It is common that modern websites equate the www prefixed domain with the one without prefix - i.e. they both direct your website users to the same web pages.
Answer: Its typical to have both with www, and without configured.
Answer: Saying one is better than the other without explaining why is very subjective. Basically using www is a subdomain of your domain name, and as such gives you an extra set of handles to work with when configuring DNS so that conceivable the handling of the www domain could be passwed of to a load balancer or other such monkey business.
In practice for most small sites, DNS already allows enough freedom to specify various services such as mail to be hosted separatly anyway that the distinction is not meaning full and using the root of your domain as the place you host your website is perfectly acceptable.
It should be noticed that it IS advisable to choose one or the other as canonical and redirect your users to the one you want to use. This will avoid mix-and-match data in search engine indexes and confusion over cookie accesability, visitor statitics, etc.
I generally prefer to use example.com as canonical, but I also have to be aware that many visitors will specifically type in the www. and so I always host that sub-domain as an alias of the canonical plain domain name, then use a rewrite to put them where they should have been to start with. Either way, you will always have some people that type in your address with or without the www when you prefer to other way, so be prepared to handle it.
Answer: I don't think that it's necessarily "better" to have one or the other.  In fact, unless you need example.com to be on a different host somewhere, I'd use both to be user-friendly.


Is there a single term to define all sources (e.g., academic papers, grey literature, books, blogs, etc.)?

Question: Is there a single term that includes all the following types of sources:

Scholarly publications
Government and think tank reports
News reports
Books
Blogs (written by academics)

For a paper, I used all of these sources. I am trying to tell someone how many articles I have read. Is "articles" a valid collective term for this?

"Reviewed 15 articles on .... These included scholarly publications, government reports, books, and blogs."

"Sources" isn't a very clear term for those outside of academia:

"Reviewed 15 sources on ..."
Comment: document ......
Answer: You could use "References."


why don't tags on StackOverflow and Meta StackOverflow have borders?

Question: I've noticed that ServerFault and, recently, SuperUser use borders around the tag buttons, on the questions. I think they get more polished like that. but why don't StackOverflow and Meta StackOverflow also follow this pattern? it'd be more consistent, I believe.
Answer: It's just a matter of styling via the CSS. Jeff et al obviously thought that the SU style looked better within the context of that site.
There have been some subtle changes to the styles here, so it's not beyond possibility that the the tag style could get updated.
You could always make it a formal request. Or I'm sure that someone will be along with a GreaseMonkey script in due course.


Windows 7: Unable to browse to network shares in Explorer, but "map network drive" works fine

Question: I've got a rather interesting problem cropping up on a few machines right now.  I've got a bunch of Windows 7 machines networked with a workgroup at home.  I used to be able to simply open the "Run" box and type in "\\computername\sharename" to browse the contents of other machines, but recently this has stopped working.  In fact, it doesn't even work when attempting to browse to shares on this very computer.  Observe:

(Reliant is, of course, the machine used to take these screenshots)
The effect is the same with both UNC names and IP addresses.
The error message (in this case 0x80070002) actually seems to vary from one attempt to the next, sometimes reading "Network path not found".  Ive done a bit of googling on each of the various error messages that come up, but I have found nothing.
The odd thing about this situation is that I can still access all shares by mapping them as network drives, as illustrated here:

At the moment I can work around the problem by simply mapping each drive as needed, but it's a tedious and annoying process.  Any suggestions/questions are welcome.
Comment: Weird, the same thing is happening on my machine. This has been driving me nuts.
Comment: Is this on every machine or just one?
Comment: It was on most machines, but not all of them.  Chris's solution seems to have fixed it.
Answer: OK, I figured it out. No idea if this is your problem, but here's my fix. I removed the "Network" icon using some registry tweak a "friend" gave me. It removed the following keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}

However this alleged friend failed to tell me that this also screws with your ability to use direct path names (or even browse the network in any sane fashion). Here's the fix:
Windows Registry Editor Version 5.00

; Restore the damned network icon in explorer
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}]
@="Computers and Devices"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}]
@="Computers and Devices"

Just import this reg file, reboot (3 times -- no more, and no less) while chanting the lyrics to a song by Radiohead (any song will do). For me, all is well. I'm going to go murder my friend now.
Answer: If none of the above works [UNC share not working but internet browsing works, Ping works etc]
(1) Use netsh -> Winsock context -> reset it
    (2) If (1) doesn't work goto Run type -> ncpa.cpl. From the applet select "IPV4" properties, if that is what you are trying to troubleshoot and then select "Client for Microsoft networks". Uninstall this and then reinstall this. Reboot.
[Always ensure you have the Administrator account password. I am saying this because you could be logged on via domain user acct which is part of Administrators]
Once system is up, open ncpa.cpl again, From the networking tab - Use Install option(button), select clients and you should find "Client for Microsoft networks", select that and install. Reboot and hope it works this time.
Comment: `netsh winsock rest` is the command.
Answer: Very strange...
I would first suggest you suspect some cached permission set via "remember my credentials" being stored for the browsing getting in the way - i.e. they are wrong u/pw combination.
Have a look at the control panel section

Control Panel\User Accounts\Credential Manager

See if something in there stands out as wrong, or clear anything related to the remove machines and try again.
Comment: The credential manager, I'm afraid, is completely empty.  No luck there.
Answer: I was facing the same issue when I tried to see how it goes for me,
all what I did, is :
[ net share ] on the remote machine to see if c$ is shared
then on my machine, typed :
[ net use /user:Administrator ]
That was exactly everything, then when I used \\remote\c$ it prompted me for the user name and password.
I really don't like solving things this way, but tell how it goes for you.
Comment: I'm not quite sure what you're getting at here.  "net use /user:administrator" isn't valid syntax for the net command.  Do you mean that I should be mounting the location as a network drive as administrator?  If so, that's basically the same as the workaround I've already got.  However, mounting the location as a network drive does not allow me to then browse to it using the \\UNC-Name syntax.
Answer: I had the same problem you are all speaking of.  I tried resetting DNS and re-installing Print and File Sharing.  Nothing seemed to work.  But I reset my CSC cache and restarted the PC and that worked.  Here is the instructions for resetting CSC cache. HOPE IT HELPS!
Issue: Can browse to a network share using IP address but not when using Host Name.
Example: \\192.168.1.1\c  works   ---  \\Servername\c  Does not work
To resolve this problem, re-initialize the cache of offline files. To do this, follow these steps:

Click Start, type regedit in the Start Search box, and then press Enter.

Note If you are prompted for an administrator password or for confirmation, type the password or click Continue.

Locate the following registry subkey, and then right-click it:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CSC
Point to New, and then click Key.
Type Parameters in the box.
Right-click Parameters, point to New, and then click DWORD (32-bit)Value.
Type FormatDatabase, and then press Enter.
Right-click FormatDatabase, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor, and then restart the computer.

Note Make sure that files are synchronized before you add this registry entry. Otherwise, unsynchronized changes will be lost.
Answer: Add the line into hosts file and try again. It might be DNS magic.
126.96.36.199  reliant
If you don't know the reliant's IP just command:

ping reliant

If you use the same share regularly you can create a batch file like this, here I do same on a laptop which one is not the member of the domain and forgets user/password seldomly:
net use \\reliant\c$  password /user:you /savecred

Comment: Or try \\126.96.36.199\c$ instead...
Comment: Same effect, still no love.
Answer: I've run into the problem you're describing many times before and sometimes I've found that running the Network Setup Wizard on each computer to reconfigure your settings will fix the issue.
Remember to restart your computer after running the wizards.
Comment: Sorry, no luck here either.
Answer: I had the same issue, but no solution works. I found another problem that was causing the same issue.
Please check the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{D20BEEC4-5CA8-4905-AE3B-BF251EA09B53}
That one was empty, but should contain the following data:
Category / REG_DWORD / 1
Name / REG_SZ / NetworkPlacesFolder
ParsingName / REG_SZ / ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
Hope that helps someone.
Answer: Guys.
I solved my issue here, easy and simple.
My case: Windows 10 didn't access the Lacie Nas Pro device, but I could access through the Dashboard, or from Mac or even Windows 7.
It was because SMB1 protocol is no longer acceptable for W10... So I just went to my dashboard (logged with user + password) > Device Manager > Customize / Settings.
Down there, you must check for new NAS OS update and update the whole thing... vualá!
Good luck.
Answer: I resolved this way:

cmd -> net use -> this gives you all the active connections.
For each of the non-working connection: net use "<connection name>" /DELETE
Start -> Credentials -> remove all of them
TaskManager -> Kill all EXPLORER.EXE processes, and start a new EXPLORER.EXE
Now you can re-map the network share as a drive.
Comment: Please note that the original question specified that mapping the network share as a drive is *not* an acceptable solution.


Which performs better in time series forecasting, LSTM or SVR?

Question: I have run LSTM and SVR models on various datasets having sample values in the range of 1-4000 and the MAPE obtained in SVR was consistently lesser than that obtained through LSTM. I was told the reverse is true (that LSTM should perform better) but haven't found much information on this online. I would appreciate any feedback about this and any links to articles or papers (so far, I found grossly varied opinions).
Comment: I'd also try [XGBRegressor](https://dask-ml.readthedocs.io/en/stable/modules/generated/dask_ml.xgboost.XGBRegressor.html). `SVR` is more prone to outliers.
Answer: So far I know, Recurrent Neural Network(RNN) is best for time series problem. LSTM(type of RNN), always consider long term dependencies and evaluate new value after understanding the whole series pattern.
Whereas SVR, consider each row as a sample for training data and predict the outcome and will not consider the previous patterns.

For example: 10->20, 20->40, 30->60, and so on ...
LSTM will try understand the whole series and then predict the next
  value, whereas for SVM each row is a individual training sample divided into
  Features/Target and will predict value based upon the different values
  it learnt so far.

Thats the reason RNN is better for timeseries.
Please refer:
https://www.researchgate.net/post/how_I_can_do_sequence_to_sequence_prediction_using_SVM
For SVR explanation
https://machinelearningmastery.com/time-series-forecasting-supervised-learning/
Answer: If you have enough data, LSTMs will definitely outperform SVRs. However, on most real world problems SVRs will perform better due to the small dataset size in my experience.
In the Paper: E-Commerce Price Forecasting Using LSTM Neural Networks from Houda Bakir, Ghassen Chniti, and Hédi Zaher you can find a comparison where LSTMs outperform SVRs, especially in terms of variance in RMSE over several time series.


How can I get the name of last called operator

Question: I'm trying to get what operator had been called before the current operator and make some logic based on that. Is this information accessible?
Answer: Blender records all operator calls in WindowManager.operators list: https://docs.blender.org/api/current/bpy.types.WindowManager.html#bpy.types.WindowManager.operators
import bpy

ops = bpy.context.window_manager.operators
print(ops)
# <bpy_collection[46], WindowManager.operators>

To get the second-to-last operator name in the list, you can use negative indices and Operator.name to get the name: https://docs.blender.org/api/current/bpy.types.Operator.html#bpy.types.Operator.name
print(ops[-1].name) # last operator name
print(ops[-2].name) # second to last operator name

# Join
# Move

... same for Operator.bl_idname: https://docs.blender.org/api/current/bpy.types.Operator.html#bpy.types.Operator.bl_idname
print(ops[-1].bl_idname) # last operator bl_idname
print(ops[-2].bl_idname) # second to last operator bl_idname

# OBJECT_OT_join
# TRANSFORM_OT_translate

Comment: Is there any way to re-do the operators from this list? Basically I wanted to push the most recent operator onto a queue (filtered with some options), then repeat those actions. Basically do bpy.ops["bl_idname first part"]["bl_idname second part"]()


Name of the "object" next to an LCD

Question: I opened up a remote I had and saw there were two soft "objects" next to the display in it. What is it's name and function?
Answer: Zebra strip. It connects the PCB to the display by having vertical conductive paths. The pitch between the conductive strips is finer than the spacing between the PCB pads so that it doesn't have to be aligned exactly. There are conductive contact areas on the glass LCD in the same pattern as on the PCB.
Comment: Why is this answer downvoted? I can't see anything obviously wrong with it.
Comment: @Dampmaskin probably because it answers a question which is a duplicate.
Comment: And the question still has zero votes. Oh well. Not everything is for me to understand I guess.

Name of the "object" next to an LCD


Visual Studio 2010 linker error when using boost::thread

Question: I am trying to using the C++ Boost threading library in Visual Studio 2010 but get a linker error when including the thread library that requires the boost libs.
Here is the linker error after including <boost/thread/thread.hpp>

Error 2   error LNK2001: unresolved external symbol "class
  boost::system::error_category const & __cdecl
  boost::system::generic_category(void)"
  (?generic_category@system@boost@@YAAEBVerror_category@12@XZ)

After some research I got the impression that this error can be caused by a bad installation or installation of the wrong build version so here is the installation steps I took.

Downloaded boost_1_51_setup.exe from
http://www.boostpro.com/download/
Ran the installer selecting all the tick boxes on the threading and
library page
Allowed the installer to add an environment variable to the OS path
In the visual studio project added C:\Program Files\boost\boost_1_51
to additional dependencies in C/C++-> General
Finally added C:\Program Files\boost\boost_1_51\lib to additional
libraries in Linker->General

I have triple checked all the path, all seem fine. And read the boost getting started page several time... I can't find what I'm missing.
I am running windows 8 x64, although I don't think this makes a difference.
Comment: Possible duplicate of [Trying to link Boost 1.52 thread](http://stackoverflow.com/questions/14674374/trying-to-link-boost-1-52-thread)
Answer: Right click your project in the solution explorer and click properties.
Go to the VC++ directories tab and add the boost libraries do the 'Library Directories'.
You could also add the include folders to the 'Include Directories' section.
Comment: Thanks for the reply but this didn't work, the problem isn't with the linker not finding the lib file as it can open it


Bootstrap 3.0.0 adding extra space on row class

Question: I am using Bootstrap 3.0.0. I am trying to have a row that spans the whole screen (as opposed to putting it in a 'container' where it will be centred with the rest of the content.
For some reason, when I do this, the row adds an extra space to the end of the page, causing the horizontal scroll bar to appear. The space is approximately 5px.
My code looks like this:

                hello

                Hello

I have not made any modifications at all, and no custom CSS. Basically I want to change the background colour of the row, but I want it to span accross the entire page.
Thanks
Comment: You could easily just add `.container {max-width:100% !important;}`. Just remind me to not visit your site, though... Looking at such sites on a 1440p monitor is just awful... :)
Answer: This is a known issue in BS 3 - https://github.com/twbs/bootstrap/issues/9862?source=cc
You can workaround it using...
.row {
  margin-left: 0px;
  margin-right: 0px;
}

Answer: Skelly is right ! with that solution you problem will be solved...
but in case you see that your cols are stick to the left or right and are not centered , you can use this code ( with a little change to the Skelly's Code)
.row {
  margin-left: auto !important;
  margin-right: auto !important;
}


Do we consider the dataset to be sample even if the data we are given is complete data in analytics?

Question: I was watching an online video on statistics and in the video we were making inferences on a real estate companies data, to predict our future customers. The instructor had all the previous data of the company present with him, but he said that because we want to make an inference about our future customer, we need to use sample formulas instead of the population ones. So is it that whenever we are trying to predict something, we always consider the data to be a sample, and never population? If yes, is there a time when we make use of the population formulas?
Answer: In the specific case you describe, the real estate companie data is probably a sample of all transactions that occurs. So the data at hand is in fact not exhaustive.
In other cases, it is however true that data analysts tend to apply formula designed to samples also in some the case when we have access to the full universe. (to account for other sources of uncertainty than sampling) This may be changing "soon".
For instance, regarding the computation of standard errors, this exact question is the theme of a (just-published) Econometrica article by some of the most prominent researchers of the field:
Abadie, A., Athey, S., Imbens, G. W., & Wooldridge, J. M. (2020). Sampling‐Based versus Design‐Based Uncertainty in Regression Analysis. Econometrica, 88(1), 265-296.
https://onlinelibrary.wiley.com/doi/full/10.3982/ECTA12675


Auto login on freemember registration

Question: Quick question - can the FreeMember register tag login the user automatically? Apologies if I've missed anything in the docs.
Thanks
Answer: Yes, it can. You just need to make sure this is enabled in the ExpressionEngine settings, which FreeMember inherits.
Go to the ExpressionEngine Control Panel > Members > Preferences, and set Require Member Account Activation? to No activation required.
Answer: I need to leave member activation by email enabled for a certain member group but bypass it and auto-login the user for others after registration, is there some way to do this either by passing the registered member ID to the subsequent page where a 'log-in' plug can be used (dangerous!) or by performing the log-in by means of an extension which fires after registration in Freemember is complete?
I think I saw the idea of 'disabling' require member account activation' elsewhere by setting the variable before the register process starts but I don't recall exactly where this was.
Any thoughts?
Answer: No, it can't.
There's a third-party add-on called Simple Registration
http://wedoaddons.com/addon/simple-registration/documentation
that will do this, though.
TTFN
Travis

Auto login on freemember registration


Made partial to landscaper last spring?

Question: I live in Missouri.
I met with a landscaper last spring, he gave me a price of $3700 to do some work about 9 months ago.  The company didn't have time to do this work or couldn't fit it in or whatever but now, 9 months later.. I'm asking for my (partial payment $2000) back and he's saying they will mail it but I get this funny feeling that they wont. The reason is that I see a lot of online reviews where others are saying they got ripped off by this company.  So my question is, how long do I have?  Like is there some sort of time-span where a 'limitation' kicks in? (I don't know the legal terms).  What can I do if this company doesn't pay me back and keeps making excuses?
Answer: You have 4 years from when you paid.
http://www.moga.mo.gov/mostatutes/stathtml/40000207251.html
Comment: The OP should note that that's four years to commencement of a lawsuit, not four years until he/she talks to an attorney or writes a demand letter.

Made partial to landscaper last spring?


Highlight specific edges of a shape

Question: I have a semi-cylinder and I'd like to highlight the arc on the front, made of lots of vertices and smoothed. How can I highlight this? Best would be some kind of coloured glow to represent the arc.
I tried using a wireframe modifier but it seems the wireframe requires an actual shape, not just a line of vertices.
I wasn't able to add a glow to just the vertices either.
Answer: You can select the vertices you want and duplicate them.  Right click to send them back to their original position.  Then press P and select Separate by selection.

Go back to object mode and select your new object.
If your selection has any faces, enter edit mode and delete only faces.

At this point you have a circle, or a loop, or maybe just a line of vertices.  You're now able to convert this to a curve from Object mode.

You can give this some bevel depth.

And then apply a shader.  For example, volumetric emission.
Answer: Freestyle.
Re question title Highlight Specific Edges of a Shape, fear it would be remiss not to throw freestyle into the ring as an option

Created a simple  line set and added the arc edges to it. Gave some thickness and a stroke color of yellow.
How to add a freestyle stroke to a specific edge in blender?
Then removed any other freestyle influence.
Is it possible to deselect freestyle edges?
Blender Freestyle - how to make line crossings glow more than lines themselves?
Comment: I tried this and only selected the edges of the arc, but it's highlighting more than I actually selected. Any ideas? https://imgur.com/a/TtHoSBv It may have something to do with using ctrl+r to make new vertices and pushing them to the edges to make the corners sharp.
Comment: Possibly. Can you select the unwanteds and "Clear Freestyle Edge" ?

Highlight specific edges of a shape


Blender nodes not compositing

Question: I'm making quick little scene for a friend and I have been following a YT video (youtube.com/watch?v=uFwdpPkenc4).
The guy is using Blender v2.5 and I'm using 2.78a. I've done essentially the same thing as him but my render layer nodes won't composite at the end. I do have my render set to composite along with having both my render view and composite nodes hooked up at the end.
Comment: I would suggest using only one Viewer node and connecting all the test results you'd like to preview to it with Ctrl+Shift+Left click (if using Node Wrangler addon). For now it renders in the end result which is at the point of the first Viewer node. Hard to tell why, as I've tested different Viewer nodes don't interact with that but going with only one would easen the task.
Comment: Disable Alpha in the Composite Node
Comment: What does the viewer node at the end of the tree look like? (right now you are looking at the first viewer node, seeing only the vector blur.) I expect your problem is in the add node. use an alpha over node there.
Answer: If you think in terms of layers, this layer will be your background:

All other images will be composited on top so it doesn't need any transparency or alpha channel. Do not mask it and let the background be flat and uncut.

Over your background you are using a foreground layer. Use Alpha Over instead of Add.
Comment: Thank you so much cegaton, that fixed my problem, I'm still new to 'advanced' blender. I'm just getting into node for this little project.

Blender nodes not compositing


$L^{2}$ Betti number

Question: Let $\tilde{X}$ be a non-compact oriented, Riemannian manifold adimits a smooth metric $\tilde{g}$ on which a discrete group $\Gamma$ of orientation-preserving isometrics acts freely so that the quotient $X=\tilde{X}/\Gamma$ is compact.
We denote $b_{2}^{k}$ by the dimension of $L^{2}$ harmonic $k$-form w.r.t. metric $\tilde{g}$. If $f$ is a smooth function on $\tilde{X}$, we consider the $L^{2}$ harmonic $k$-form on $(\tilde{X},e^{f}\tilde{g})$. we denote by $b_{2,f}^{k}$ the dimension of $L^{2}$ harmonic $k$-form w.r.t. metric $e^{f}\tilde{g}$. Is $b_{2}^{k}=b_{2,f}^{k}$ correct for all k? One can see that its correct when $f$ is bounded, since the metrics are quasi-isometric.
Thanks very much.
Comment: Do you want your harmonic forms to be $\Gamma$-invariant? Otherwise the dimension of $L^2$-harmonic forms has nothing to do with the $L^2$-Betti numbers.
Comment: Yes, the harmonic forms should be $\Gamma$-invariant.
Answer: Dodziuk: de Rham-Hodge theory for L2-cohomology of infinite coverings proves that the class of the representation of $\Gamma$ on the space of $L^2$-harmonic forms is a homotopy invariant of $X$. In particular the $\Gamma$-dimension (in the sense of von Neumann) of the space of $L^2$-harmonic forms does not depend on the chosen $\Gamma$-invariant metric.
Comment: Thanks for your answer. At last, I has a puzzle about the "$\Gamma$-invariant metric". Is this metric on the base manifold $X$ or on the lifted manifold $\tilde{X}$ ?
Comment: A metric on X is the same as an invariant metric on the covering.

$L^{2}$ Betti number


Open a video at a specific time in Media Player Classic

Question: How can I open a video file in Media Player Classic at a specific time in the file?
Answer: There are two ways to do this: favorites or the /startpos hh:mm:ss commandline switch.
Favorites
The GUI has limited support for creating Favorites from the menu. These favorites support relative paths and can be set to remember the file position. The main downside is that all favorites created are shown in a single drop-down with no way to organize or categorize them.
Command line
More convenient, if more cumbersome, is to use Media Player Classic's command line switches, specifically the /startpos hh:mm:ss command. Simply call the executable with a filename and a specific time:
"C:\Tools\mpc-hc.exe" "filePath" /startpos hh:mm:ss

The simplest way to call this in Windows is with a shortcut. The above command can be used as the Target in a shortcut. The Start in option of the shortcut determines whether the path to MPC or the path to the file can be relative or if it should be absolute. If you create the shortcut from the executable folder (such as with an ALT+drag), you'll have to fully qualify the path to the video file.
Alternatively, you can also create a batch file to serve as a shortcut like so:
:: Variables
:: A title is required if you use quotes around the executable path
SET windowTitle="MPCSeek"
SET mpcExecutable="C:\Tools\mpc-hc.exe"
:: Use an absolute path unless this bat file is in the same folder as the video file
SET fileLocation="pathToFile"
SET position=01:09:00

START %windowTitle% %mpcExecutable% %fileLocation% /startpos %position%

The CMD window will instantly close after starting (or restarting) the media player thanks to the START command and usually won't even be visible.
Other switches can be combined with this command. You can get an up to date list by calling the executable with the /? switch, but these are some of the most interesting to use alongside startpos:

/close: close the player after playback (may only work if used with /play)
/playnext Open next file in the folder after playback
/fullscreen: Start in full-screen mode
/minimized: Start in minimized mode
/nofocus: Open MPC-HC in background
/new: Use a new instance of the player
/monitor #: Start player on monitor N, where N starts from 1
start #: alternative to startpos that uses milliseconds instead
Answer: Select play menu and "Go to".
Answer: I have created a tool that will start one or multiple MPC videos at once at a specific time that is given and customizable. Will work with any integer amount of seconds as long as the video is long enough.
Feel free to experiment.
Repository in GitHub


Why sinusoidally varying torque in induction machine not visible

Question: We know that torque in an induction machine varies as \$k\times[\cos(2wt)+\cos(\beta)]\$ but we don't feel it. Why it's so?
Comment: @mkeith, it is proportional to slip in a running, loaded induction motor. I didn't check the equation, but it looks *really* familiar. There are instantaneous fluctuations in torque based on when the poles of the rotor and the stator cross, though, but under any kind of load - including the rotor - they are usually inconsequential to anyone except the team that had to design the machine.
Comment: Is that formula correct? I have not formally studied induction machines, but it was my understanding that the torque was proportional to the slip.
Answer: Evaluate that for 60 hz on an actual machine. Account for the rotational inertia of the rotor mass. Consider that momentum is like a bucket - if you add a drop and lose a drop 60 times a second, nobody is going to see the level change unless they are really looking for it.


Will upgrading a Nexus 4 to Android 5.0 require a "reset"

Question: My Nexus 4 has been bugging me that a new Android is available, since a few weeks.
However, I read somewhere that upgrading would make me lose my data and have to re-install everything. Is that really the case ? (I find it strange that it would be so insistent, if it were true that this causes loss of data/setup).
Comment: If it's about OTA, and your device is not rooted, then it won't reset anything.
Comment: It might not be required by the update itself. But according to the bunch of related error descriptions popping up here since the start of the rollout, you might be required to perform such afterwards, in case you experience trouble.
Answer: There are two ways you can upgrade your device to a latest version of OS:

OTA (Over The Air): This type of upgrade will automatically take care of all the steps required to update your system. The once which you are bugged with is OTA update. One needn't erase data while upgrading using an OTA.
Flashing your device: Usually Google releases device specific factory images on its developer website along with the OTAs. But for this, you will need to erase all the data on your phone and install the factory image.

In your case, you have received the OTA and it's ready to install, and hence shouldn't be worried of losing your data, neither you will be asked to re-install. However, it's always better to have your data, app data, etc. backed up for the worst case scenario.
Comment: Thanks, this makes sense too. The warning I read must have been from early adopters.


How to populate star schema database with data from CSV file using jasperETL?

Question: I'm new to jasperETL and i have to populate star schema database with data from CSV file.
Does anyone know how to perform this task? Maybe there is some tutorial or book, where i can find this information. I searched in the internet but found nothing about this.
Thank you in advance.
Answer: JaspersoftETL is an OEM of Talend. You can find tutorials on the talendforge.org website. Specifically, the tutorial "How to design a Job using Repository Metadata" covers loading data from a .csv file into a table. It should be precisely what you need.


How to create a system where battery power exist as backup power source

Question: This mainly applies to design of a clock but can be applied to many other circuits. The idea is that a device with PIC microcontroller is usually powered via external DC power supply which obviously passes through a voltage regulator; if this power source is lost, the device should switch to run from a battery power source but suspend most of its operations and enter a "minimum operations mode" having detected loss of main power. Are there any application notes on how to do this for PIC or any other microcontroller?
Comment: Any other device on the power supply rail is to be kept unpowered, only the microcontroller must be powered up from battery
Answer: The standard way to do this is with a 'diode OR' circuit. Connect a diode from the power supply and from the battery, with the cathodes connected together and to your target circuit. As long as the battery voltage is lower than the power supply voltage, the battery will only power the circuit when power is off.
If you need to sense whether power is on, put a resistor divider on the power net, before the diode, and sense the divided voltage with your microcontroller.
If your battery voltage is higher than your supply voltage, or may be, there are more complicated alternatives available; look for "Power switch", "Ideal diode" or "Power OR controller" ICs.


prime factors of $ n^{2}+4$ is congruent to 1 or 5 (mod 8)

Question: prove that the prime factors  of $n^{2}+4$ , $ n \in \mathbb{N}$ are congruent to $ 1 \ or \ 5 \ (mod \ 8)$. $$$$ I can that the statement holds for n=1,2,3 , so can i use induction principle ? If there is any other way to solve this? Thanks
Comment: Have you heard about quadratic residues?
Comment: _Odd_ prime factors, maybe?
Comment: If you seek yo prove it directly, that is a proof that constructs the result for all of them. If it is true for infinite $n$ then you require induction or contradiction. For contradiction it would be like assuming there exists an $n$ such that the premis isnt true or factors not congruent to 1 or 5. Then deducing a contradiction would show that they must at least be congruent to 1 or 5. Just to explain that if it helps. Induction would also work.
Answer: If $p$ is a prime factor of $n^2+4$ then $n^2\equiv-4\pmod p$, and $-4$ is a quadratic residue modulo $p$. Because $4$ is a square this is equivalent to $-1$ being a quadratic residue modulo $p$. It is well known that this is so if and only if $p\equiv1\pmod4$ (with the obvious exception $p=2$).
Therefore $p$ is congruent to either $1$ or $5$ modulo $8$, or $p=2$.
Comment: Correct, @Student. Sorry about that. I edited the comment (one of the diamond superpowers is the ability to edit old comments).
Comment: In case you have never seen it, the fact that $-1$ being a quadratic residue modulo $p$ implies $p\equiv1\pmod4$ is explained e.g. [here](http://math.stackexchange.com/q/735400/11619). Probably also earlier, that is one of the most often used tricks in elementary number theory.
Comment: correct to match  one part of the answer
Comment: @mmath: Sorry, what do you mean by *part of the answer*? I don't think there is anything missing :-)
Comment: ok, my apologise . everything is there
Comment: That's ok. I was just worried for a moment. May be I misread of something :-)
Comment: @JyrkiLahtonen: the link you included states that $p \equiv 3 \mod 4$ implies that $-1$ is not a quadratic residue modulo $p$... Shouldn't your first comment say that since $-1$ is quadratic residue, then $p - 3$ is not a multiple of $4$?


Compute, convert and compile XML to CSV using JAVA

Question: I need to convert and compile multiple XML files (in a standard format) to a single CSV file. Because I also need to perform computations on some of the imported elements, XSLT is not an option (Stackoverflow: XML to CSV Using XSLT) unless I perform computations on each converted CSV file.
XPath has been suggested as an alternative to SAX2, but because the final CSV output is large (based on over 100 XML files) I am hesitant to use arrays. (Stackoverflow: Convert XML file to CSV)
Using SAX2 I have been somewhat successful in extracting the tag elements.
If I could append output - for each individual file - to the final CSV output I assume that I would have a more memory stable application.
I hope others would benefit from knowing the answer to the question: How can I efficiently handle computations in conjunction with XML-CSV conversions for large-scale data?
XML file 1
<element id="1">
    <info>Yes</info>
    <startValue>0</startValue>


Kernel Regression

Question: In Kernel Regression with a linear kernel, we have
$$\beta = X\alpha = X^T(XX^T+\lambda I)^{-1}Y$$
and the normal Ridge Regression solution is
$$\beta = (X^TX+\lambda I)^{-1}X^TY.$$
How can you prove that $X^T(XX^T+\lambda I)^{-1} = (X^TX+\lambda I)^{-1}X^T$?
Answer: Starting with
$$
(X^TX)X^T + \lambda IX^T = (X^TX)X^T + \lambda IX^T
$$
Use the associativity of matrix multiplication, and the fact that multiplication with a diagonal matrix is commutative, to obtain
$$
(X^TX)X^T + \lambda IX^T = X^T(XX^T) + X^T\lambda I
$$
Using distributivity of addition / multiplication,
$$
(X^TX + \lambda I)X^T = X^T(XX^T + \lambda I)
$$
for $\lambda > 0$, the matrices in the parentheses are positive definite and have an inverse. Simply multiply both sides on the left by $(X^TX + \lambda I)^{-1}$ and on the right by $(XX^T + \lambda I)^{-1}$.

Kernel Regression


how to revoke x.509 certificates?

Question: I recently accepted some x.509 certificates on my Ubuntu 16.04 because of open-connect and I wonder how can I delete or revoke them on my system. My problem is I have no idea what were the details of those certificates and some how I need to sort them by time to find last ones and then delete them.
Answer: I presume that you want to revoke client certificates on a web server like apache?
If so you need a Certification Recovation list.
Create with openssl a revoke  file:
<code>openssl ca -config openssl.cnf \
      -gencrl -out myserver.crl.pem
</code>
Then, install that file in apache config.

how to revoke x.509 certificates?


Why do images taken with my DSLR end up half black and half bright purple?

Question: I use a Canon Rebel T6, and it worked great for about a year and a half until the other week when I'd take a picture and look at it, it would be a half black, half purple screen. Videos work perfectly fine, and everything looks great until I take a picture. It looks the same on my computer, and I've tried to reset the camera as well. Does anyone have any idea what could cause this and if there's any way to fix it?
Comment: I feel like all of these "my digicam is saving busted image data" all devolve to the same "get your camera serviced if it is worth it".
Comment: Did you try to make a bulb exposure?
Answer: When video is properly exposed and still images are not, the most likely culprit is the shutter mechanism.
In your case, it looks like the first shutter curtain is hanging up when it is about halfway open. Thus the dark half of the frame that is still covered by the unopened shutter curtain. The malfunction apparently delays the second curtain from closing to end the exposure. Thus the other half of the frame that is grossly overexposed.
Remember, the top of the camera is the bottom of the picture due to the inversion of the image by the lens.
This is fairly easy to confirm:

Set the camera in Manual exposure mode
Remove the lens
Activate "Live View" to flip the mirror up
Set a long shutter time such as 1" (one second)
Press the shutter button and observe the shutter curtains

What you should see is the first curtain open from top to bottom very quickly, then the second curtain close from top to bottom.
You can also dial up a shutter time above the flash sync speed. Try 1/250 second. What you should see is the first curtain begin to open and then the second curtain beginning to close before the first curtain is all the way open. The open slit between the two curtains should travel across the sensor from top to bottom at a constant speed. It will happen fast, so don't blink or you'll miss it.
Here's a super slo-mo of shutters operating at fast speeds:
Answer: The likely answer something loose or damaged around the camera's CMOS sensor or shutter.
In my personal experience, whacking it while holding it in the correct orientation that puts the sensor back against the motherboard is useful - but it should be opened up and repaired.
Given that a lower resolution mode like video works fine, it may be electric or water damage.
Comment: It is almost certainly the shutter, not the sensor.  Otherwise, video mode would be affected.  Also, consumer camera gear hasn't used CCDs since the 80s.  Everything uses CMOS sensors now.
Comment: @dgatwood it is not really a point of interest if there is a CCD or a APSC or a holahopteenieweenie photon collecting sensor. The point was: its maybe broken. But I support the assessment, that the cam is broken. Sure,video works, so it could be something else than the sensor, but something is brocken.
Comment: @dgatwood There are several DSLRs and DSLTs from 2009 and 2010 which use CCD sensors, but the T6 (1300D) specifically uses CMOS.
Comment: The previous comment asked why the answer was downvoted.  I was just proposing the most likely reason why someone would have done so.
Comment: Percussive maintenance is certainly a way to FIND intermittent faults :) BTW, more CCD cameras that are def not from the 1980s: Pentax K10D, Nikon D200 (though these two might not be pure consumer by some definitions), Sony W800, Kodak Z8612IS....
Comment: It is either a stuck shutter or a faulty CCD sensor - I don't understand why I am downvoted? I was a photographer for a major Toronto news group for a number of years and worked with many abused cameras.
Comment: @dgatwood the 80s? Humour? I can't tell
Comment: Possibly someone downvoted for the suggestion of hitting the camera?


Using strong induction to get the AM-GM inequality for $2^n$ numbers

Question: The arithmetic mean of $k$ numbers $a_1, a_2, \ldots, a_k$ is their average $\frac{a_1+a_2+\cdots+a_k}{k}=AM$. Their geometric mean
is $\sqrt[k]{a_1a_2\cdots a_k}=GM$. I am asked to show this:

Use induction to prove: If $k=2^n$ and if all the numbers $a_1, a_2, \ldots, a_k$ are nonnegative, then $AM \geq GM$.

I'll be honest, I have no work for this problem.  I've looked into many examples of strong induction, but most of them are abstract.  Please give me insight for what method to best utilize for strong induction.
Comment: http://www.proofwiki.org/wiki/Cauchy%27s_Mean_Theorem#Theorem
Answer: The case $k=2^n$ can be proved using ordinary induction on $n$. The induction argument is structurally natural, and there is no reason to think that there is a smoother proof by strong induction.
The standard proof, due to Cauchy, can be found here. Full details are given, so the link should be sufficient.  If you have trouble with the induction step, work out what the proof says for the particular cases $k=4$, then $k=8$, and everything will be clear.
Cauchy actually proved the full Arithmetic Mean/Geometric Mean Inequality, by first dealing with the cases $k=2^n$, and then going backwards to deal with $k$ not a power of $2$. It is an elementary but very clever proof.
Answer: The use of induction (first ordinary induction to prove the result for powers of $2$, then upward-downward induction for the general case) to prove the Arithmetic-Geometric Mean Inequality appears in my lecture notes on induction (Theorem 21 in $\S 12$).
I agree that this argument is somewhat tricky.  I am currently teaching a "Spivak calculus course" (i.e., very strong, very committed university freshmen) and I put this argument into my notes (which originated in a different undergraduate course) expressly for the current course but have not, so far, had a chance to mention it in class.  I think many if not most young students would have trouble supplying a complete proof.


What is the direction of a comet's dust tail before and after perihelion?

Question: I recently created a visualisation of comet ISON's orbit. However, I received a critique that the dust tail of the comet should be pointing away from the Sun after perihelion.
As far as I know, the ion tail of the comet definitely points away from the Sun as it is blown away by the solar wind.
I want to know what is the direction of the dust-tail of the comet, before and after the perihelion. Is it always trailing the path of the comet (to a fair degree of approximation) or are there other significant effects?
Answer: Comet tail always aims away from the sun, as it's torn from the comet's gas cloud by solar wind. It trails slightly behind, as the comet moves along its orbit while the gas travels directly away, but that's relatively minor - the speed at which the gas and particles are pulled away forming the tail is much higher than the comet's orbital velocity.
Your visualisation shows it trailing behind the comet as if it was moving in some gaseous/liquid medium that stops the lighter particles while letting the heavy comet head travel ahead. This is not the case - as the comet is far away from the sun, the gas cloud just forms its atmosphere and travels with the comet. As it approaches though, the intensity of solar wind increases and it pulls away the atmosphere which can't be protected against it by magnetic field or strong gravity, as the comet has neither.
Comment: There's more than a single comet tail, for example one of dust particles and the other of gas molecules (the easiest to observe them separately is by using [narrowband filters](http://www.lpi.usra.edu/books/CometsII/7013.pdf) in the visible part of the electromagnetic spectrum, or even RGB filtering by camera's CCD sensor), and sometimes even the third tail can be observed, e.g. with [comet Hale-Bopp's sodium tail](https://en.wikipedia.org/wiki/Comet_Hale%E2%80%93Bopp#Sodium_tail). All of these of course on top of the coma (exosphere surrounding the comet due to gassing).
Comment: Although the visualisation appears like you described (liquid medium), it is an emergent pattern. Actually, I have modelled it as: older particles in the tail getting dispersed while comet is emitting newer particles. Aside, does your answer take into account the different types of comet tails?
Comment: @HRJ: Then change parameters, much stronger influence on the particles - faster movement and more of them - relative to the comet movement. Different fractions of the tail may be scattered at various speeds and form various cones, and the visible/observed angle of the cone may depend on our viewing angle from Earth (it may be even an ellipse if Earth is within the cone as the comet approaches the Sun) but despite differences in angles, intensities, the cones are *always* directed by solar wind,  away from the Sun. Not necessarily *exactly away* but absolutely not "sideways".


Tracking changes in Windows registry

Question: Is there a way to track changes in Windows registry? I'd like to see what changes in the registry are made during installation of various programs.
Answer: Process Monitor allows you to monitor file and registry activity of various processes.
Comment: But how to do that? Using some instruction like this one:    http://www.howtogeek.com/school/sysinternals-pro/lesson5/all/ ?
Answer: Can monitor registry changes made by specific program.
https://www.nirsoft.net/utils/reg_file_from_application.html
UPDATE: Just download NirLauncher (which includes all applications from NirSoft). It is one of the best additions to your Windows toolbox.
https://launcher.nirsoft.net/
Comment: For me `RegistryChangesView` (https://www.nirsoft.net/utils/registry_changes_view.html) from NirLauncher package was more useful: it creates two snapshots (e.g. before and after the installation) and then compares them. The result could be exported to a `.txt`-file. In my use case it found 301 registry change after the app installation. In the same time `RegFromApp` (attached to `msiexec.exe` process) found just 1 change.
Answer: Regarding WMI and Registry:
There are three WMI event classes concerning registry:

RegistryTreeChangeEvent
RegistryKeyChangeEvent
RegistryValueChangeEvent

Registry Event Classes
But you need to be aware of these limitations:

With RegistryTreeChangeEvent and RegistryKeyChangeEvent there is no way of directly telling which values or keys actually changed. To do this, you would need to save the registry state before the event and compare it to the state after the event.
You can't use these classes with HKEY_CLASSES_ROOT or HKEY_CURRENT_USER  hives. You can overcome this by creating a WMI class to represent the registry key to monitor:

Defining a Registry Class With Qualifiers
and use it with __InstanceOperationEvent derived classes.
So using WMI to monitor the Registry is possible, but less then perfect. The advantage is that it is possible to monitor the changes in 'real time'. Another advantage could be WMI permanent event subscription:
Receiving Events at All Times
a method to monitor the Registry 'at all times', ie. event if your application is not running.
Answer: A straightforward way to do this with no extra tools is to export the registry to a text file before the install, then export it to another file after. Then, compare the two files.
Having said that, the Sysinternals tools are great for this.
Answer: Regshot deserves a mention here.  It scans and takes a snapshot of all registry settings, then you run it again at a later time to compare with the original snapshot, and it shows you all the keys and values that have changed.
Answer: There is a python-hids called sobek ( http://code.google.com/p/sobek-hids/ ) that is able to monitor some parts of the SO. It's working fine for my for monitoring file changes, and although the doc sais that it's able to monitor registry changes it does not work for me.
Good piece of software for easily deplay a python based hids.
Answer: There are a few different ways. If you want to do it yourself on the fly WMI is probably the way to go. RegistryKeyChangeEvent and its relatives are the ones to look at. There might be a way to monitor it through __InstanceCreationEvent, __InstanceDeletionEvent and __InstanceModificationEvent classes too.
http://msdn.microsoft.com/en-us/library/aa393040(VS.85).aspx
Answer: When using a VM, I use these steps to inspect changes to the registry:

Using 7-Zip, open the vdi/vhd/vmdk file and extract the folder C:\Windows\System32\config
Run OfflineRegistryView to convert the registry to plaintext

Set the 'Config Folder' to the folder you extracted
Set the 'Base Key' to HKLM\SYSTEM or HKLM\SOFTWARE
Set the 'Subkey Depth' to 'Unlimited'
Press the 'Go' button

Now use your favourite diff program to compare the 'before' and 'after' snapshots.
Answer: I concur with Franci, all Sysinternals utilities are worth taking a look (Autoruns is a must too), and Process Monitor, which replaces the good old Filemon and Regmon is precious.
Beside the usage you want, it is very useful to see why a process fails (like trying to access a file or a registry key that doesn't exist), etc.
Answer: PhiLho has mentioned AutoRuns in passing, but I think it deserves elaboration.
It doesn't scan the whole registry, just the parts containing references to things which get loaded automatically (EXEs, DLLs, drivers etc.) which is probably what you are interested in. It doesn't track changes but can export to a text file, so you can run it before and after installation and do a diff.

Tracking changes in Windows registry