Is it possible to automatically make check-outs from any VCS?

Question: Let's take a web development environment, where developers checkout a project onto their local machines, work on it, and check in changes to development.
These changes are further tested on development and moved live on a regular schedule (eg weekly, monthly, etc.).
Is it possible to have an auto-moveup of the latest tagged version (and not the latest checkin, as that might not be 100% stable), for example 8AM on Monday mornings, either using a script or a built-in feature of the VCS?
Answer: Yes, it is possible. This is usually a feature provided by continuous integration tools. Typically they will get the latest source from version control, build the project, test it (running unit tests) and possibly deploy it on a (test) server.
If you don't require all those steps, you can easily do the same thing with some shell scripting or similar (i.e. checkout from version control and copy to the production folder on the server).
Answer: Certainly, but the exact product may be dependent upon the VCS you are using.
What you might want to do, is have a a few different branches, and migrate up as you progress. E.g., Development -> Stable-Dev -> Beta -> Production. You can then simply auto-update to the latest version of Stable-Dev and Beta for your testers, and always be able to deploy a new Production version at the drop of a hat.
Answer: Anything you can do with cvs can be done with the command line, and I am pretty sure svn is the same. Just work out the functionality you want and stick it in a shell script or a command file.
Answer: The only two I have experience with are SVN and Mercurial. For Mercurial, you specify which branch you want it to update from (let's say default) and then whenever you merge a branch into default, you can just have the server run:
hg update

Which updates your repository to the latest version of the branch you set it to.
SVN is the same concept, you only check out which branch you want initially
svn co http://host/repository/branchname/

then you have your server update that with a cron job, ala
svn up

In theory though, any VCS that supports branching (all the good ones do : git, mercurial, SVN, etc...), should be able to do something similar to this.
Answer: I doubt many VCSs provide this ability directly, however it should be very simple to script. Either a date or branch based checkout.
Answer: As a follow up,
I'm of the opinion that an app should do one job and do it well. Often if you start combining tools into one product, none of them will shine, and most of them will be "'alright, sort-of".
If I was doing something like this, I would get myself something like SVN, ANT, and Subversion Ant Library (http://ant.apache.org/antlibs/svn/index.html) - your millage may vary though.


Can I exclude some concrete urls from  inside ?

Question: I want some concrete filter to be applied for all urls except for one concrete (i.e. for /* except for /specialpath).
Is there a possibility to do that?

sample code:
<filter>
    <filter-name>SomeFilter</filter-name>
    <filter-class>org.somproject.AFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>SomeFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

Answer: The standard Servlet API doesn't support this facility. You may want either to use a rewrite-URL filter for this like Tuckey's one (which is much similar Apache HTTPD's mod_rewrite), or to add a check in the doFilter() method of the Filter listening on /*.
String path = ((HttpServletRequest) request).getRequestURI();
if (path.startsWith("/specialpath/")) {
    chain.doFilter(request, response); // Just continue chain.
} else {
    // Do your business stuff here for all paths other than /specialpath.
}

You can if necessary specify the paths-to-be-ignored as an init-param of the filter so that you can control it in the web.xml anyway. You can get it in the filter as follows:
private String pathToBeIgnored;

public void init(FilterConfig config) {
    pathToBeIgnored = config.getInitParameter("pathToBeIgnored");
}

If the filter is part of 3rd party API and thus you can't modify it, then map it on a more specific url-pattern, e.g. /otherfilterpath/* and create a new filter on /* which forwards to the path matching the 3rd party filter.
String path = ((HttpServletRequest) request).getRequestURI();
if (path.startsWith("/specialpath/")) {
    chain.doFilter(request, response); // Just continue chain.
} else {
    request.getRequestDispatcher("/otherfilterpath" + path).forward(request, response);
}

To avoid that this filter will call itself in an infinite loop you need to let it listen (dispatch) on REQUEST only and the 3rd party filter on FORWARD only.
See also:

How to prevent static resources from being handled by front controller servlet which is mapped on /*
How to handle static content in Spring MVC?
Comment: Ypu should take the compnent library filter and extend it in order to add the code you want to use to perform the exclusions.
Comment: My problem is that the filter is not mine, it's from component library.
Comment: @BalusC If the "/specialpath" just serves a static resource like js, css etc, does chain.doFilter() make the response slower? Is there a method to serve the resource directly without chaining the filter?
Comment: @BenhurCD: I have really no idea how you could ever come up to this performance concern.
Answer: I used an approach described by Eric Daugherty: I created a special servlet that always answers with 403 code and put its mapping before the general one.
Mapping fragment:
  <servlet>
    <servlet-name>generalServlet</servlet-name>
    <servlet-class>project.servlet.GeneralServlet</servlet-class>
  </servlet>
 <servlet>
    <servlet-name>specialServlet</servlet-name>
    <servlet-class>project.servlet.SpecialServlet</servlet-class>
 </servlet>
 <servlet-mapping>
    <servlet-name>specialServlet</servlet-name>
    <url-pattern>/resources/restricted/*</url-pattern>
 </servlet-mapping>
 <servlet-mapping>
    <servlet-name>generalServlet</servlet-name>
    <url-pattern>/resources/*</url-pattern>
 </servlet-mapping>

And the servlet class:
public class SpecialServlet extends HttpServlet {
    public SpecialServlet() {
        super();
    }
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.sendError(HttpServletResponse.SC_FORBIDDEN);
    }
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.sendError(HttpServletResponse.SC_FORBIDDEN);
    }
}

Answer: This approach works when you want to prevent a certain filter and all the following ones. It should work well if you eg. want to serve some content as static resources within your servlet container instead of letting your application logic (through a filter like GuiceFilter):
Map the folder with your static resource files to the default servlet. Create a servlet filter and put it before the GuiceFilter in your web.xml. In your created filter, you can separate between forwarding some requests to the GuiceFilter and others directly to the dispatcher. Example follows...
web.xml
<servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/static/*</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>StaticResourceFilter</filter-name>
    <filter-class>com.project.filter.StaticResourceFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>StaticResourceFilter</filter-name>
    <url-pattern>/static/*</url-pattern>
</filter-mapping>

<filter>
    <filter-name>guiceFilter</filter-name>
    <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>guiceFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

StaticResourceFilter.class
public class StaticResourceFilter implements Filter {

    private final static Logger LOGGER = LoggerFactory.getLogger(StaticResourceFilter.class);

    private static final String RESOURCE_PATH = "/static/";
    @Override
    public void init(final FilterConfig filterConfig) throws ServletException {
        LOGGER.info("StaticResourceFilter initialized");
    }

    @Override
    public void doFilter(final ServletRequest request, final ServletResponse response,
                         final FilterChain chain) throws IOException, ServletException {

        String path = ((HttpServletRequest) request).getServletPath();
        if (path.toLowerCase().startsWith(RESOURCE_PATH)) {
            request.getRequestDispatcher(path).forward(request, response);
        } else {
            chain.doFilter(request, response);
        }
    }

    @Override
    public void destroy() {
        LOGGER.info("StaticResourceFilter destroyed");
    }
}

Unfortunately if you just want to skip a single step in the filter chain while keeping those that follows, this will not work.
Comment: In multi-context setups, using `.getRequestURI()` will break (causing a 404 most likely) because `.getRequestDispatcher` resolves _relative to the context path_. If your context path is `/a`, then in your example the request URI would be `/a/static`, and using `getRequestDispatcher("/a/static")` will cause it to resolve against `/a/a/static` instead. Fix: use `.getServletPath()` instead of `.getRequestURI()`. I'll submit an edit to fix this, but just wanted to leave a comment FYI
Comment: I tried to go with your solution, but for the files that I apply the filter and break the chain,  I get the followin error; Uncaught exception thrown by filter Static Resource Filter: java.io.FileNotFoundException.  Any idea why ?
Answer: I don't think you can, the only other configuration alternative is to enumerate the paths that you want to be filtered, so instead of /* you could add some for /this/* and /that/* etc, but that won't lead to a sufficient solution when you have alot of those paths.
What you can do is add a parameter to the filter providing an expression (like a regular expression) which is used to skip the filter functionality for the paths matched.
The servlet container will still call your filter for those url's but you will have better control over the configuration.
Edit
Now that you mention you have no control over the filter, what you could do is either inherit from that filter calling super methods in its methods except when the url path you want to skip is present and follow the filter chain like @BalusC proposed, or build a filter which instantiates your filter and delegates under the same circumstances. In both cases the filter parameters would include both the expression parameter you add and those of the filter you inherit from or delegate to.
The advantage of building a delegating filter (a wrapper) is that you can add the filter class of the wrapped filter as parameter and reuse it in other situations like this one.
Answer: I also Had to filter based on the URL pattern(/{servicename}/api/stats/)in java code .
if (path.startsWith("/{servicename}/api/statistics/")) {
validatingAuthToken(((HttpServletRequest) request).getHeader("auth_token"));
filterChain.doFilter(request, response);
}

But its bizarre, that servlet doesn't support url pattern other than (/*), This should be a very common case for servlet API's !
Answer: I have encounterd the same issue, but I find a anwser showing below.
web.xml

    <init-param>
            <param-name>freePages</param-name>
            <param-value>
            MainFrame.jsp;
            </param-value>
    </init-param>

filter.java
strFreePages = config.getInitParameter("freePages"); //get the exclue pattern from config file
isFreePage(strRequestPage)  //decide the exclude path

this way you don't have to harass the concrete Filter class.
Answer: If for any reason you cannot change the original filter mapping ("/*" in my case)  and you are dispatching to an unchangeable third-party filter, you can find useful the following:

Intercept the path to be bypassed
Skip to and execute the last ring of the filter chain (the servlet itself)
The skipping is done via reflection, inspecting the container instances in debug mode

The following works in Weblogic 12.1.3:

      import org.apache.commons.lang3.reflect.FieldUtils;
      import javax.servlet.Filter;

      [...]

      @Override
      public void doFilter(ServletRequest request, ServletRespons response, FilterChain chain) throws IOException, ServletException {
          String path = ((HttpServletRequest) request).getRequestURI();

          if(!bypassSWA(path)){
              swpFilterHandler.doFilter(request, response, chain);

          } else {
              try {
                  ((Filter) (FieldUtils.readField(
                                (FieldUtils.readField(
                                        (FieldUtils.readField(chain, "filters", true)), "last", true)), "item", true)))
                  .doFilter(request, response, chain);
              } catch (IllegalAccessException e) {
                  e.printStackTrace();
              }
          }
      }

Answer: I was able to handle this in Spring 2 as following
 private boolean isInPath(ServletRequest request) {
   String PATH_TO_VALIDATE = "/path/";
   String path = ((HttpServletRequest) request).getRequestURI();
   return path != null && path.toLowerCase().contains(PATH_TO_VALIDATE);
}


Seeing a Devil is possible?

Question: Can anyone see a devil? Is it possible? If someone saw a devil then what are the consequences? And what are the reasons that why that specific person saw a devil?
Comment: I would recommend reading this book "kitab Syhafi M3 Jinni Muslim" A book about a conversation between a Journalist and a Muslim Jinn! First I though it was made up but he seems to backup the majority of statements from the Quran and hadeeth!
Comment: unfortuantly I asked a similar question http://islam.stackexchange.com/questions/28628/is-it-haram-to-talk-to-jin but there are no detailed answers
Answer: First of all, it depends on what do you mean by "seeing". Seeing his true form? Or any form?
According to this fatwa, it is possible somehow. There are 3 mentioned cases:
1) The jinn may appear in the form of a human being as recorded in Sahih al-Bukhari when a devil came to Abu Hurairah (Radiya Allahu Anhu) in the shape of a poor man and Abu Hurairah found the devil taking much food of charity.
2) The jinn may appear in a form of black dog as confirmed in Sahih Muslim that the Prophet (Sallallahu Alaihi wa Sallam) said: "A black dog is devil". Ibn Taimiya (May Allah's Mercy be upon him) said: 'The black dog is a devil, and the jinn often appear in its form, since the black color can bring the devilish powers more than other colors.
3) The jinn can appear in the shape of snakes. Thus, the Messenger (Sallallahu Alaihi wa Sallam) banned killing home snakes lest may any of them be a Muslim jinn. Abu Said al-Khudri (Radiya Allahu Anhu) said that Allah's Messenger (Sallallahu Alaihi wa Sallam) said: "There are Muslim Jinn in al-Madina: If one appears to you, in any form, you are to admonish it to depart for three days. If it appears after that, you must kill it, for it is truly a devil". [Reported by Imam Muslim]
Comment: Regarding point 3, does that suggest that the Jinn should not appear to us in any form!
Comment: Can you share the Hadith on the Black "Dog" & Black "Cat"?

Seeing a Devil is possible?


Thermoelectric Cooler sensor

Question: My team and I are testing our Peltier Thermo-Electric Cooler Module+Heatsink Assembly - 12V 5A from Adafruit. We are using an external power source and sensors to get readings for the current, voltage, and temperature. The problem we are facing is that the sensors are reading the fan RPM and not the frequency for the power. We cannot disconnect it as this causes a huge temperature difference in the module. Any advice? This may be sensor or code related.
Comment: Please post links to datasheets for your components.  A schematic showing how everything is hooked up and even posting your code will help get you a good answer.
Comment: What is "the frequency for the power"?  Isn't the power source DC?  Also, please detail each sensor.
Answer: If you want to measure the power to only the peltier, do one of these things:

Put the fan on a seperate supply
Get 2 mulitmeters (one for voltage and one for current) and connect them to the peltier (current in series and the voltage across the peltier)
If your fixing the voltage to the fan and peltier the fan will be a fixed load and will not vary, if you can measure the current to only the fan, it can be subtracted from the value on the power supply to find the peltier current (assuming that the fan and peltier are in parallel with the supply, don't run them in series).

Thermoelectric Cooler sensor


Concept of Real and Virtual Images

Question: I still can't understand the concept of Real and virtual images.  What exactly is meant by a screen? Does it mean like a sheet of paper? I can shine torch light from both plane and convex mirror onto the paper, what's the difference? In both mirrors the light gets reflected into my eyes.  Is it just the vertical inversion of the image which defines it as real? Are virtual and real images just different names for images with different properties and is there more to it? Is it all about the human eye's perception? After all, even the light rays involved in formation of virtual images stay here only and don't go into the mirror.
Comment: Related:  [https://physics.stackexchange.com/a/106360/5739](https://physics.stackexchange.com/a/106360/5739)
Answer:
What exactly is meant by a screen? Does it mean like a sheet of paper?

It just means a flat surface that the light rays can fall on to form an image. Could be a piece of paper, could be a wall, could be a cinema screen.

I can shine torch light from both plane and convex mirror onto the paper, what's the difference?

Perhaps it's easier to understand with a magnifying glass. Find one, turn off the lights or otherwise make the room dark, and turn on the TV (or your PC/laptop, or your phone - just hold it far from the lens), and bring the magnifying glass close to the wall opposite to it, and try to focus the light coming from the device.
You're going to get a tiny (inverted) image of the device's display on the wall. Like, you projected the TV onto the wall and you can watch it like that. That's a real image. A similar kind of thing happens in your eye; your eye lens creates such an image on your retina, that's how you see.
Here's a magnifying glass projecting an image of a window:

(Taken from this article - do check it out.)
BTW, this also means that when you focus sunlight "to a point", it's not actually a point, but a tiny image of the Sun.
This happens because light rays converge to form an image. If instead you have something that makes the rays diverge (spread out), like a convex mirror (or a diverging lens), you cannot form an image in this way. But, if you extend the reflected rays back beyond the mirror's surface, as if they were straight lines coming from "inside" the mirror, you can sort of "read" them backwards so that they converge again, forming a "virtual image". When you look into it, it looks like this virtual image is where the light rays are coming from.
This

looks like this to an observer on the left
Answer: To understand virtual and real images, you need to have a clear understanding of what an image or an object is:
Object : An object is a point from where incident light rays physically originate or appear to originate from
Image : A point where reflected light rays physically meet or appear to meet
Now a real object is defined as a point from where light rays physically originate. A virtual object is a point from where light rays only appear to originate from.
NOTE An object in optics (whether real or virtual) is not necessarily a physical object, an image formed by one mirror can act as an object for another mirror.
A virtual object is a point where reflected light rays physically meet, while a virtual object is a point where the light rays only appear to meet. Since at a virtual image there is no physical meeting of rays it cannot be obtained on a screen, because to obtain an image on a screen it is necessary that light rays physically meet on the screen

Concept of Real and Virtual Images


Can't ssh via hostname

Question: My issue is that I can't ssh agains the hostname, during troubleshooting I did a host look up and tried to ssh via IP which worked.
The error message I get is...
Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host

Which would describe a key mismatch which I was able to confirm matched by consoling into the sever directly.  I had someone with access manually push the key to one server which seemed to resolve the issue however I need to access over 300 servers via ansible.  My guess is git commit or whatever (super new with no clue :/) is having an issue.  Any suggestions what could be the problem.
the output:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/<user>/.ssh/config
debug1: /Users/<user>a/.ssh/config line 1: Applying options for *.<server>
debug1: /Users/<user>/.ssh/config line 13: Applying options for *.<server>
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/tmp/ssh-<user>@<server>:<port>" does not exist
debug2: ssh_connect: needpriv 0
debug1: Executing proxy command: exec ssh <proxy server name> nc -w 120 <server name> <port>
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/<username>/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /Users/<username>/.ssh/id_rsa type 1
debug1: identity file /Users/<username>/.ssh/id_rsa-cert type -1
debug1: identity file /Users/<username>/.ssh/id_dsa type -1
debug1: identity file /Users/<username>/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: permanently_drop_suid: 501
debug1: Local version string SSH-2.0-OpenSSH_6.2
Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host

To provide an update, the issue doesn't seem to be related to my key after all. It seems to be related to my local system(mac OS 10.10.4) After my keys were properly pushed to the server contained in my ~/.ssh/config file I can SSH and connect to the servers in question. However I still cannot from local system. I can however SSH via IP, I believe this is a dns issue...maybe need to flush? FW is disabled.

ssh: connect to host port 3422: Connection refused

When I connect to one of the servers in question, my key matches what is located under ~/.ssh/authorized_key, in regards to GitHub, I add it there where in turn I BELIEVE gets pushed to all server via Ansible.
Comment: This is good stuff I appreciate all, will update ASAP.  Thanks again...
Comment: Please edit your question and add the output of `hostaname` and `ifconfig` Also are you using a "sudo" before the command?
Comment: That error message has nothing to do with hostname, "Permission denied (publickey)." you need a key, talk to the sys admin
Comment: could be for any number of reasons, see http://askubuntu.com/questions/311558/ssh-permission-denied-publickey and http://serverfault.com/questions/39733/why-do-i-get-permission-denied-publickey-when-trying-to-ssh-from-local-ubunt
Comment: Disregard above comment I had a whitespace infront of hostname...still getting original error
Comment: This is very unclear. Do the servers have your key or don't they? And what does git have to do with this?
Comment: Yes, when I connect to one of the servers in question, my key matches what is located under /.ssh/authorized_key, in regards to github, I add it there where in turn I BELIEVE gets pushed to all server via Ansible...my apologies, my background is in networking and am new to this all.  I'm working on it and will update with a resolution soon I hope :/
Comment: Ok issue resolved....here's how  under the config file my user name exist all the way at the bottom i.e..  last line, how we resolved was added my username again under the first host declaration.  Able to ssh to all the servers now
Comment: how do I mark as resolved or answered?
Answer: Ok, issue resolved....here's how:

Under the config file, my user name was all the way at the bottom, i.e..the last line
resolved by adding my username again under the first host declaration.

I am able to ssh to all the servers now

Can't ssh via hostname


Best practices for a Password Management System

Question: I'm working on a password management system which stores the passwords of a bunch of services (gmail, bank of america account, youtube etc). The user will be able to launch each of these services by logging into my application. The application will then POST the username and password associated with that service to that service's login url in a new tab and you will be immediately logged in. My question is, this method exposes the actual password of the user to the client side (since I'm creating a form with username and password, in plain text, as hidden fields and calling form.submit). I'm wondering is there any other method by which this can be achieved? How do all the password management sites work? Your help is appreciated.
Answer: Do it server side, what else can I say? Anyway, I can only see this as a learning experience, not something that would eventually go into production. cUrl could be a good start. Why do you use form.submit anyway?
Answer: This is called "formfill" in terms of access management terminology, if you are thinking about access gateway (http). If you are thinking about browser plugin, have a look at the firefox autofill plugin. And which finally reduces to single sign-on.
Single sign-on are done different ways,-

some servers uses active directory to store all the passwords and later access using the master password , i.e. the active directory password of that user to access his credentials.
Some uses SAML
Some uses e-directory

Whatever you use, if it is server-side application (e.g. Appache supports formfill), it parses all the forms based on form name or resource path and fills credentials based on the authenticated session from the user.


Maximum number of classes, visualforce pages and page layouts per saleforce org?

Question: Is there and if so, what is the maximum number of classes, visualforce pages and page layouts that can be created per salesforce organization?
Answer: I think there is no limit for VisualForce Pages but the Maximum number of class and trigger code units in a deployment of Apex is 5000. You can get all the limits here.
Salesforce recommends creating no more than 200 page layouts. Although there is no limit, it can be difficult to manage your page layouts if you have more than 200.
Comment: I think I accidentally edited your answer instead of posting a new one. I apologize for that. I have reverted that
Comment: Thanks @Saroj Bera...is there limits for visual force pages too?
Comment: I could not find the limit, but you would probably hit other limits first like 3 MB of apex code limit and 5000 classes.
Answer: There is a limit of 3MB/3 million characters on classes and triggers combined excluding test classes and comments.
This limit can be increased by raising a case with Salesforce Support depending on type of edition you have.
Each class cannot have more than a million characters.
There is no limit on page layouts or VF pages. However large number of layouts and pages will be difficult to manage.
Update:
The code limit is doubled in Summer 18 to 6 million characters.


Linear span of the empty set

Question: Why is the span of the empty set defined to be $\{0\}$? It is known that the span of any nonempty set of vectors in a vector space $V$, gives a subspace of $V$, and it is stated in "Linear Algebra Done Right" by Axler, that to be consistent with this, the span of the empty set is defined to be $\{0\}$? Is this the only reason or does this definition prove useful in other ways later on?
Comment: This also implies $ \rm Span \{ ~ \mathbf 0~ \} = Span \{ \}  $
Answer: If you want to stay coherent, you almost never have a choice for such "empty" definitions.
Here, the span of $X$ is the set of linear combinations $\sum_{x\in X} \lambda_x x$. So the question boils down to what is an empty sum. It has to be $0$, because when you add an empty sum to $s$, you want to get $s$. An empty operation is always the neutral element for this operation, like an empty product is $1$.
So here, $Span(\emptyset)$ is the set of all possible empty sums, which is $\{0\}$. It is also a good remark that this is coherent with the fact that for any set $S$, $Span(S)$ is a vector space.
Answer: The linear span of a subset of a vector space is the smallest linear subspace which contains it or, equivalently, the intersection of all the linear subspaces which contain it.
If you carry out this for the empty set, you'll get the correct result.

Linear span of the empty set


Mathematica classify NeuralNetwork default parameters

Question: We have trained a Neural Network on Mathemetica classify with one hidden layer and received good classification results. We would like to know the default parameters beside it has one hidden layer? Such as network architecture(fully-connected or convolution), optimizer,active function,learning rate..
Answer: Lets define a Classifer that uses a Neural Net as a method with some training data.
train = {{1, 2, 3} -> "Red", {2, 6, 2} -> "Blue", {4, 9, 2} ->
  "Green"}
classModel=Classify[train, Method -> "NeuralNetwork",
 TargetDevice -> "GPU"];

We can then Use Keys[] and Values[] to explore the options that
Classify[] uses.
Keys[classModel[[1, "Model"]]]
Values[classModel[[1, "Model"]]]

We can specify the network, training and even the options to view the learning rate, optimiser method etc
ClassNN = classModel[[1, "Model", "Network"]]
TrainingNN = classModel[[1, "Model", "Training"]]
OptionsNN = classModel[[1, "Model", "Options"]]


How do I get a hacker out of my phone?

Question: The other day my phone number was added to my Google account, data was turned on and off. Different things have been happening. I have a LG V35 and it has an LG VPN section and when I check the log. It shows background scripts or whatever being run in my phone. I do not have a VPN. I tried resetting my phone to factory and it didn't work. Please someone help me get this person out of my phone. The other day it said it got one profile.
Comment: imagine i would give you full remote access via USB debugging on my phone. what exactly would you do if you were the "hacker"? btw you would need root access for a backdoor, and for this you need physical access to my device at least once. And why should a 'hacker' switch off internet connection when this is the only way for remote access? You are really not that interesting..
Comment: Its the log from the app itself. I dont think its from some hacker.
What other problems are you having that suggest it is hacker?
Comment: My Google phone number being added to my Google account. Me having to toggle my data on and off like somebody battling over a light switch.
Comment: @alecxs agreed. This looks over-consciousness without evidence. Or may be the issues are something else.
Comment: My phone is not rooted. I have no VPN. A guy did have physical access to my phone and messed around with developer options and what not. He was telling me how he could hack into people's Wi-Fi and all kinds of shit.
Comment: @Chrissorey you shouldn't be that helpless. Device is yours, in your hands, no one can control it better than you. A Factory Reset returns the device to its original state. Any modifications made by user are reversed except if the device was rooted and partitions other than `/data` and `/cache` e.g. `/system` or `/vendor` were modified. But that doesn't seems to be the case with your device. Another (minor) possibility is to take control of device at kernel or bootloader level e.g. through rootkits. But isn't possible by just making a few changes in Developer Options or so. That needs hacking.
Answer: Look through your installed app (in settings). Is there some new weird app you have never seen before and not installed yourself which is labeled as "System-App"? Yes? Your are screwed. Only way to get rid of it is to re-flash the whole ROM. Well you could also root your phone and use one of countless apps/modules to remove System-Apps. But God knows what the virus will do when it gets root access.
I have seen this years ago on a Huawei Mate 1. The app was turning on WiFi and Data permanently to load ads and malware. Factory reset did nothing. Clean flash of a new ROM was the only way.

How do I get a hacker out of my phone?


Venting a portable a/c into another room that is closed off with the window open

Question: I have a portable air conditioner in my bedroom, and I use it only at night when I am sleeping, and only maybe 10 nights a year. I hate to block up the window with the unwieldy vent hose set-up several months out of the year just for this infrequent use. So I was thinking of an unusual set-up. There is a bathroom door going into this bedroom, but I never use that door because there is a secondary door to the bathroom from the hallway. The bathroom happens to have a large window. I was wondering if it would work to vent the a/c unit by cutting a hole in the door between the bedroom and the bathroom and having it vent into the bathroom. I would have both doors of the bathroom closed, with draft-stoppers to block the gaps at the bottom to minimize heat seeping through, and I would keep the bathroom window wide open, so there would be dissipation of the hot air coming out from the a/c hose. I could even add a portable fan in the bathroom positioned so it is drawing the hot air coming out of the hose out towards the window. In addition to not hampering the use of the only bedroom window, this set-up has another attractive aspect. To reach the window, the unwieldy 5.9" diameter hose has to do two gradual S curves from the back of the a/c unit , and this takes up a lot of space. (Sharp curves are frowned upon.) By positioning the hole in the door EXACTLY at the height the hose comes out of the back of the a/c unit, I don't have to have any curve in the hose at all. It would be a straight 12" connection to where it goes into the hole in the door. This would save a lot of space.  The two problems with this idea is - if I have to go to the bathroom during the night, I could see the other door to access it, but it would be very hot in there! But how much time would I spend in there? Two minutes? I could take the heat for 2 minutes. A bigger problem is the hole that would be left in the door after the a/c season if over and I remove the hose. You would think I could find a simple white plastic cap to go over this hole, but my search on google has not been successful. All sorts of flanges made for portable a/c hoses, but no simple cap or plug. I would appreciate any ideas for this, and also ask if anyone can see a fatal flaw in this idea!!
Comment: Yikes, if you think a hose out the window setup is unsightly, cutting a hole in a door would be way worse in my opinion.
Comment: Welcome to [diy.se]! Please [edit] your post to include some formatting so that it's easier to read. Double space between paragraphs would be _most_ helpful! Then you can take the [tour] to see how this Question & Answer board differs from most online discussion forums while you're waiting on an answer.
Comment: Do you understand [how air conditioning works](https://www.youtube.com/watch?v=_-mBeYC2KGc) and what is happening with that air?  Have to understand technology in order to wield it.
Answer: In theory this could work.  Probably not, and it depends a lot on the details. The biggest obstacle IMO is you need to cut a hole in your bathroom door to find out.
Let's solve the easy part first: You can repair the hole by camouflaging it.  Mount a door mirror over it, or cover it with wood and put a picture frame around the wood, like the apartment door in Friends.  Maybe something toilet themed.  Be creative.

Now for the A/C: An A/C moves heat and moisture from one place to another.  Usually to the outside.  The two most common examples of moving the heat to another inside space are 1) When they put a cashier's booth in a large underground parking lot and install a window A/C in it, venting to the parking lot.  2) Your refrigerator, which moves heat into your kitchen.
Here's the catch: In both of these examples the heated space is much much larger than the cooled space.  In your case, your bathroom is much smaller than your bedroom, and if you sometimes open your bedroom door to enter or leave it makes the challenge even harder by admitting new warm moist air.  It all comes down to how effectively that open window works.   If you seal both doors tightly and put a fan in the window, there will be no air flow.  The fan will mostly create turbulence.  It will help a bit.  But whether it will work enough comes down to experimentation.  If not, the bathroom will become so hot that the A/C will cease to work efficiently or at all.
An idea
Well, the best idea of course would be to use it the way it's intended.  But anyway.  Rather than seal both bathroom doors, you could open the window, install a powerful exhaust fan in it, well sealed all around the edges, seal the bedroom door, leave the other bathroom door open, and open a couple of downstairs windows.   This will create excellent air flow through the bathroom, and I think the A/C should work perfectly well.
Really?
The spectacle of a powerful exhaust fan installed in your bathroom window with sealant and tape, an extension cord running through the bathroom, the need to actively manage the entire system by keeping the other door and downstairs windows open, .... is all that really more aesthetically pleasing to you than just using the provided hose in your bedroom window?
My advice would be, if the entire plan is the one described in your Question, don't do it.  It's a big gamble to destroy your bathroom door for a plan that is unlikely to work very well, or at all.
Comment: Use the bedroom window to exhaust the portable a/c. Does the unit have a collection bottle for the condensed water or does the condensate go out the heated air stream?
Comment: The hose sticking out of the door into the bathroom would be 5 feet away from a big window - 39" wide - which would be left open during the night (which is the only time I ever turn on the a/c in the bedroom) The bathroom would be a completely sealed space (with gap stoppers under both doors). The only time the other door (not the one with the hose) would be open while a/c is on is if I use the bathroom in the middle of the night - then it would be open for 10 seconds going in and 10 seconds going out. A fan with the back near the hose would point to the window to channel the hot air out.
Comment: Jim - The a/c unit has a tube in back that I have to put a collection bowl under. The hose venting in the bathroom would have no moisture coming out of it, just hot air. Even if some of the hot air stays trapped in the bathroom, surely at least half would go out the open window, especially if helped by the added portable fan? I suppose the air outside the window could be just as hot as in the bathroom, but I live just across the lake and it never gets that hot. That is why I don't want to block my bedroom window all season just for the rare use of the a/c.
Comment: Jay, you wrote "Here's the catch: In both of these examples the heated space is much much larger than the cooled space. In your case, your bathroom is much smaller than your bedroom," - Both your "heated space" examples are enclosed spaces, large though they may be.  MY "heated space" would be open to the outside, so would not be just my small bathroom, but the bathroom PLUS the entire outside space out the open window. In which case my "heated space" would be way larger than my "cooled space"
Comment: Yes, if the heat escapes through the window as fast as it's produced this will work.  Only one way to find out. Also watch for mold in the bathroom due to constant humidity, but if the machine is designed to keep the exhaust air dry that might be ok


Change pandas plotting backend to get interactive plots instead of matplotlib static plots

Question: When I use pandas df.plot() it has matplotlib as a default plotting backend. But this creates static plots.

I would like interactive plots, so I have to change the pandas plotting background.
How do I do change the plotting backend of pandas to have a different library creating my plots when i use .plot()?
Answer: You need pandas >= 0.25 to change the plotting backend of pandas.
The available plotting backends are:

matplotlib
hvplot >= 0.5.1
holoviews
pandas_bokeh
plotly >= 4.8
altair

So, the default setting is:
pd.options.plotting.backend = 'matplotlib'

You can change the plotting library that pandas uses as follows. In this case it sets hvplot / holoviews as the plotting backend:
pd.options.plotting.backend = 'hvplot'

Or you can also use (which is basically the same):
pd.set_option('plotting.backend', 'hvplot')

Now you have hvplot / holoviews as your plotting backend for pandas and it will give you interactive holoviews plots instead of static matplotlib plots.
Of course you need to have library hvplot / holoviews + dependencies installed for this to work.
Here's a code example resulting in an interactive plot. It uses the standard .plot() pandas syntax:
import numpy as np
import pandas as pd

import hvplot
import hvplot.pandas

pd.options.plotting.backend = 'hvplot'

data = np.random.normal(size=[50, 2])

df = pd.DataFrame(data, columns=['x', 'y'])

df.plot(kind='scatter', x='x', y='y')

Comment: Plotly backend is available with plotly >= 4.8.0
Comment: Is it possible to use plotly as plotting backend as well?
Comment: How would you adjust the size of the plot when using plotly as a backend?
Comment: Note that the **arguments** of the plot functions do not seem to be standardized. Therefore, it might not be possible to easily switch the alternative plotting backends for existing code.

For example the matplotlib based plot function supports an "ax" argument, that can be used to consider **subplot layouts**: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html

The plotly based plot function supports a facet argument that could be used for similar purpose:  https://plotly.com/python/pandas-backend/    https://plotly.com/python/facet-plots/
Comment: For subplots with bokeh see for example https://stackoverflow.com/questions/66905779/how-to-incorporate-subplots-option-when-plotting-a-data-frame-using-pandas-bokeh
Answer: As of plotly 4.8.0 you can use plotly for interactive plotting with pandas 1.0+.
Update with pip install -U plotly
Set the plotting backend to plotly:
pd.options.plotting.backend = "plotly"

df = pd.DataFrame(dict(a=[1, 2, 3], b=[2, 4, 6]))
df.plot()

Here's the announcement
Note that these backends don't have full alignment with all the arguments that work with the default matplotlib backend.
Also note that Altair requires altair_pandas installed.
Comment: somehow I keep getting the error  'Could not find plotting backend 'plotly'. Ensure that you've installed the package providing the 'plotly' entrypoint, or that the package has a top-level `.plot` method.'
Should we not mention anything with df.plot(backend = 'plotly') along with the above statement?
Comment: @julianjoseph sounds like pandas is looking for plotly and not finding it. Do you have an updated version of plotly and an updated version of pandas installed - and they are the versions that are active in your environment? You can check by importing both libraries and checking their __version__ attributes.  If using Jupyter and recently upgraded or installed the packages, you could try restarting your kernel.
Answer: To change the pandas plotting backend for the whole session, use:
pd.options.plotting.backend = 'plotly'

To change the pandas plotting backend only for one particular plot, use:
df.plot(backend='plotly')

See also:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html
https://pandas.pydata.org/docs/user_guide/options.html?highlight=plotting%20backend#available-options
Answer: You can also alternate backends using the backend to the plot method itself:
df.plot(backend='matplotlib')

I'm learning a new backend and I use it when I want to reproduce my chart in matplotlib. The parameters of the plot method aren't the same in different backends.


Replace newlines with spaces in the question hover-text

Question: On the main page of StackExchange sites, hovering over any question link produces a quick preview of the body of the question, which is a very nice feature. However, newlines in the body are reproduced as newlines in the hover-text source. This causes Firefox 3.6 to silently drop the newlines, mashing together text from different paragraphs in jarring, poorly-punctuated fashion (e.g. "… by clicking DraftsI'd like to see …", or "…deleted their own question?I provided an answer…"). It would be nice if the backend could replaced newlines with spaces instead.
Comment: Odd, the very same spec [claims](http://www.w3.org/TR/html401/intro/sgmltut.html#h-18.104.22.168) that the `title` attribute is `%Text`, and that ``?
Answer: You're taking that part of the spec out of context. Here it is in full:

In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them.

In other words, you're limited to that small set of characters (which, you should note, does not include spaces) iff you don't put the attribute in quotes.
A title attribute (the value being used here) should contain human readable text. This definition of CDATA says:

CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows:

Replace character entities with characters,
Ignore line feeds,
Replace each carriage return or tab with a single space.

Given that, it's clear that line feeds, carriage returns, and tabs are valid characters.
What it appears you'd like is for SO to change their line feeds (per the spec, ignored by FF) to carriage returns (per the spec, converted into spaces). Is that correct?
Comment: Whoops, I think you're right. I've removed the part of the question talking about the HTML spec.
Comment: I just checked Firefox's behavior, and it does follow the spec with respect to line feeds and carriage returns. So, yes to your last paragraph.
Answer: Note that neither IE or Chrome or Safari have this behavior. They all display newlines in the title as, well, newlines.  So I kind of consider this a bug in Firefox, honestly.
Opera also makes this mistake, but I expect softheadedness from Opera.
Comment: Two questions: (1) As Dori's answer notes, Firefox is merely following the HTML 4.01 spec. (2) Even if you disagree with the W3C and consider it a browser bug, is it your policy to not work around browser bugs?


wmctrl move window to workspace

Question: I am trying to use wmctrl to move a window to a workspace.
By wmctrl -l window is
 0x03e00057  9 meer montazo - Google Search — Mozilla Firefox

Command and output is
 /usr/local/bin/wmctrl -v -i 0x03e00057 -t 3
 envir_utf8: 0
 No window was specified.

My understanding is that -i points to the hex id of the window (first field in the output list?), which in my simple mind i am doing here. Where am I astray?
Answer: From the documentation of -t <DESK>:

Move a window that has been specified with the -r action to the desktop <DESK>.

Thus:
wmctrl -i -r 0x03e00057 -t 3

-i means that any argument that specifies a window is a window ID rather than a substring of the window title. It's a simple option, not followed by a window ID. It applies to the <WIN> argument of -c, -r, -R`, etc.

wmctrl move window to workspace


How does coffee grind size affect coffee taste

Question: I have a grinding machine with a lot of different settings. Even between the categories of Fine and Medium there are sub levels of grinding. I'm not sure how they relate to the flavor of the coffee. Is there any research that shows how the grind affects the taste of the different types of roasts?
Comment: What coffee grinder is that? Answers might be more specific if you give us that information
Comment: @PythonMaster, it looks like a Capresso Infinity from the listings I found of products for sale.
Answer: The main reason for different grinds is the different brewing processes. If the water is exposed to the grounds for a very short amount of time (e.g., 10-15 seconds for espresso), you need a finer grind to provide enough surface area to extract the coffee from the beans. If the brewing time is long (e.g., the ~4 minutes of french press), you need a coarse grind to avoid over-extracting the grounds and getting something too bitter to drink.
That's really the heart of it. If the grind is too coarse for your brewing method, your coffee will end up under-extracted, weak, and acidic. If it is too fine a grind, your coffee ends up over-extracted and bitter. Your grinder is a good brand; if you still have the manual, it includes a guide to grind vs. brewing method. If not, the capresso.com site includes PDF versions.
Comment: +1 For the info! So it will depend on the time used to make coffee?
Comment: That's the rule of thumb, yes. I realized after posting my answer that I hadn't addressed your question about roasts, but that's because each roast is more of a "constant," stable within themselves, while grind and brewing method are where the drinker has control.
Answer: In your title, you mention grind consistency. This is different from but related to grind size - an inconsistent grind (such as a whirling-blade type "grinder") will have sizes all over the map, from dust to half a bean. The dust will be over-extracted, and the half-a-bean won't contribute much flavor at all.
A consistent grind (one with particles in a small range of sizes, neither excessively large nor excessively small) makes it more feasible to get the contribution of all the coffee grounds to the beverage without over-extracting any of the grounds - thus making it possible to get a more consistently predicable cup of coffee, without off flavors from some part of the grounds and no flavor from another part.
Having fine control over the grind size in a consistent grinder makes it possible to adjust the grind to produce the best cup (to your taste) in the equipment you have for brewing.
Answer: It's already been stated that grind size will change depending on your brewing method.
Here is a quick break down of which grind size aligns with what brew type(the most popular ones).
Keep in mind everybody's taste is different, You may have to make small adjustments to find yours.

Coarse - French press , Cold Brew
Medium to Medium/fine - Manual drip, Automatic drip
Fine - Espresso, Turkish

You might find this resource helpful.
Happy Coffee!
Answer: Basically the finer you grind your beans the more extraction you will get with more of the soluble coffee being in contact with your filtered water. Finer= stronger. Espresso is very fine as the extraction process takes about 20 seconds with water under a lot of pressure being forced through the bed of firmly tamped coffee grounds. While using a French press/ Cafetiere the grounds are quite course so as to not let too much insoluble coffee through the filter gauze & the coffee is steeped for minutes( time is up to you) & not seconds. Longer you let it steep the stronger & bitter your coffee will be much like a cuppa tea!


How to disable remote debugging in VS2008 C#.NET Windows app

Question: I am trying to debug a C#.NET Windows application that I'm developing to be a client for a third-party web service. I do not want to do any remote debugging with the web service, but my code fails at the line that calls the web service. I get this error:
"Unable to automatically step into the server. Connecting to the server machine "machine.name" failed. The debugger cannot connect to the remote computer. This may be because the remote computer does not exist or a firewall may be preventing communication to the remote computer. Please see help for assistance."
I do not want to step into or have the debugger connect to the remote computer. I just want to debug my local code and nothing else. I can find no information anywhere that would tell me how to do this.
Answer: It seems that you manually have to set it (through code) in your application.
How do you find what debug switches are available? Or given a switch find out what is being disabled?


How do employers determine how much tax to withhold?

Question: I work two jobs, both are casual, and I am claiming the tax free threshold from one job. Each time I am paid from the other job (the one I am not claiming the tax free threshold from), my employer withholds a different amount of tax per working day, anywhere between $80 and $125 per day. I am wondering how my employer determines how much tax to withhold each pay period since it seems to be done completely randomly.
Answer: Likely the answer is : They do what they are told. Most employers do not run employee tax calculations - they hire a company to do it. Unless you are really large, doing those calculations yourself is stupid - there are liability issues that an external firm has to handle via their insurance. Also there possibly are a lot of regulations and updates, so unless you are in the business of writing this software or providing this service, you are just running a minefield of things you can do wrong.
The more detailed answer is: they follow the law. Likely it depends only on your income of the day, with some extras in case. There are rules (not even guidelines) for this, and the software that is used (no one does that by hand) just follows them.
They actually are published, i.e. https://www.ato.gov.au/calculators-and-tools/tax-withheld-calculator/
Comment: Even if you are really large, you outsource it.  (The last time my paycheck wasn't generated by a payroll outsourcer was when I worked for a payroll outsourcer...)
Comment: Pretty much yeah. It is utterly stupid to not do it - if you do it, you can always claim an error was not YOUR error.
Answer: Do you work for an hourly wage, or a salary?  I'm betting it's an hourly wage.
For each paycheck, they have to assume that's what you make every pay period (because the payroll system isn't smart enough to know how much you're going to earn for the whole year and use that tax rate).
Comment: An hourly wage. And because it's casual the number of hours I work each pay period varies.
Answer: In your primary job you claimed the tax free threshold.
in your secondary job, you would have informed them you have 2 jobs.
The first job is taxed from the tax free threshold,
the second job is taxed at the highest threshold, to ensure you pay enough total tax between the 2 jobs and don't receive a debt when you do your tax return. the extra tax paid will be refunded to you.
For example if you earned $30k at each job you would be in the first and 2nd bracket individually.
but with a total of $60k, every dollar above $37000 should actually be taxed at the 3rd bracket! (32.5%)
<code>$0      – $18,200   0%
$18,201 – $37,000   19%
$37,001 – $90,000   32.5%
</code>


Can my property be taken as a payment for a relative's loans?

Question: My aunt went to several loans to which she isn't capable of paying as of now. Now, the lenders are visiting our house and trying to find her and she currently lives in the same residence with me, additionally I have been failing to contact her for a while now . I come to ask if the lender can also take my property as payment for her loans for that is something that I wouldn't want to happen.
Comment: There's a lot of info missing here. Are the loans taken out in your aunt's name, are you a co-signer or in any way associated with the loans? Are the loans unsecured, secured on your property, or secured in some other way? Does she co-own the property you live in? I don't understand what you mean that "she currently lives in the same residence with me, additionally I have been failing to contact her for a while now". If she lives with you why can't you contact her?
Comment: Where are you (jurisdiction)? In some places, you might inherit her debts after she dies, but it's unlikely you'd be responsible for her debts while she's alive. If the house ownership is shared between you and your aunt, a sale of the house could be forced (but you'd get your part, and you could also buy out your aunt's part).
Comment: She left and I think could have hid after seeing the lenders. I do not want my property to be diminished because of her irresponsibility.
Comment: Your assets (i.e. stuff that you own) are safe as long as you didn't sign anything with respect to the loan. If debt collectors show up at your door, tell them to go away unless they have a warrant of sorts. Call the police, if you have to: these guys are often VERY pushy and not concerned at all with your rights.
Answer: The laws regarding debt collection vary by country, and even by local jurisdiction. In addition during the current health crisis there may be additional protections.
Now regarding your responsibility:
If you and your aunt are co-signers on a debt you are also responsible for the debt.
If you and your aunt are both on the credit card, you are both responsible for the debt.
If you are using your aunts car, and the car is collateral for a debt, then you could lose access to the car if it is repossessed, even if you aren't a cosigner.

she currently lives in the same residence with me

If the place you live is collateral for a loan she has, then you might not be able to live there anymore. If she is renting the place, and you are on that same lease you are also responsible for the lease payment. If you aren't on the lease, but she is, you could be evicted.

Now, the lenders are visiting our house and trying to find her and she
currently lives in the same residence with me, additionally I have
been failing to contact her for a while now .

What they can do to contact her, and what they can say to you is governed by the laws in your area. Even if they stay within the bounds of the law, they want your help to get rid of the debt. They want you to talk to her. They would also love it if you would pay money against the debt even if you don't have to.
Local law also covers what happens if your aunt passes away. In some places the relatives can also inherit the debts, on other places they don't.
Comment: Sorry for the lack of information from my post. I am in the Philippines. I did not sign anything regarding her debts. II would like to help with the process but I have no knowledge on her actions these past few weeks. This is stressing me out for what I only have is a laptop for my studies and this might be taken due to her actions.
Comment: @Kaixzer I don't know anything about the Phillippines. In western countries they can only take her stuff. Is it your laptop or her laptop? However, there is some risk that they might *think* the laptop is hers and you would have to sue them to get it back. Again, this might be wrong for the Phillippines.
Comment: This is entirely my own laptop which I earned for to buy and I am willing to present my proofs for that matter. Thank you for the response.
Answer: I guess it comes down to three questions to me, considering this is a family member you're speaking of:

How badly do you want to get rid of the debt collectors coming to your home?

How much do you love your aunt?

How large is the debt?

ANSWERS TO THESE QUESTIONS:

Since the house you live in is the only address the debt collectors have for contacting your aunt (since she listed it as her place of residence too), you can count on them continuing to visit your home until the matter is settled, so if you don't want them constantly at your house then you can pay the debt.

If you love your aunt enough to keep her out of trouble with the debt collectors, you can choose to pay the debt, or at least make payment arrangements to satisfy the debt collectors until or unless you can get ahold of your aunt to settle it with her.  Sometimes for the sake of family we'll do things we wouldn't do for anyone else, and this might be one of those situations.

If the debt isn't too large then it might be easiest for you to pay it so that the whole matter is settled and your life can go back to normal.  Then, you can always talk to your aunt and come up with an arrangement with her to repay you what you had to spend to settle the debt.

These things are never easy, especially when it comes to family.  I don't know the specific debt collection laws in your country, but the questions and answers I put here can apply to anyone in any country, because they're just common sense ways to look at your situation.  The fact of the matter is, your aunt made a debt with people who are entitled to collect it, and even if they can't do anything directly to you (like evicting you or forcing you to pay the debt), they can still make your life miserable (such as by coming to your house all the time, as long as they aren't breaking your country's laws on how they go about it) until or unless they get paid.
Much of this is going to depend on how you choose to handle it.  To me, if the debt is small enough that it makes more sense to pay it and be done with dealing with the debt collectors, I'd probably go that route, but that's just me.


Linux Router - Share bandwidth per IPs with current active connections

Question: We have a Linux machine running as a custom router, currently utilising Shorewall.  This sits between our incoming internet connection and the internal LAN.
What we would like to achieve is 'fair use' of the bandwidth on a per IP basis.  If only one person currently has an active connection then they get 100% utilisation of the line.  However if 20 people have active connections then they should each get 5% utilisation of the line.
This should be irrespective of the number of connections held by each user.  For example, say we have two users, Bill and Ted, that both have active connections.  Bill has a single active connection while Ted has ten active connections.  Bill should get 50% utilisation for his single connections whilst Ted should get 5% utilisation for each of his ten connections, giving Ted a total utilisation of 50%.
Answer: Try using HTB or TC shaper, you can just limit each IP to use not more then you set for it in such a way.


Can tab just mean "insert tab character"?

Question: Is there a way to set the tab key to simply insert the tab character in a notebook? I often find the sometimes mysterious "features" bound to that key detrimental.
Answer: You can try (for a single notebook)
CreateDocument[{},
 NotebookEventActions -> {{"KeyDown", "\t"} :>
  NotebookWrite[SelectedNotebook[], "\t"]}]

or (for global application)
SetOptions[$FrontEnd,
 FrontEndEventActions -> {{"KeyDown", "\t"} :>
  NotebookWrite[SelectedNotebook[], "\t"]}]

Does this meet your needs? For me it had an effect in Input cells but didn't block autocomplete behavior, though if that's what's getting in your way it can be disabled in Preferences.
Comment: Thanks, it works! Can you map any key that way? Where is this type of thing documented?
Comment: My pleasure. You can catch/handle single key presses, but not combinations like Ctrl + _ (it's been suggested that may be possible in the future). The docs aren't great, but there is some info in the section on `EventHandler`. If you are interested in mapping special keys (e.g. tab) you'll need to refer to them either using regex formats ("\t","\n",etc.) or in Mathematica-ese (see "Structural Elements and Keyboard Characters")
Comment: Thanks for the info. I thought I might try to implement a "block tab" of selected lines (which would be *so* nice). It's been requested [here](http://mathematica.stackexchange.com/q/39876/9150), but they didn't end up using the tab key. I'll have to explore more to find out why.
Comment: @RicoPicone That's an interesting question. It also made me realize I mispoke: you can catch some combinations of keys such as Control (as LeonidShifrin shows in his answer). But I know that it is somehow limited (though I can't remember the details). I must be something like you can't capture the Alt key or Ctrl+Alt.
Comment: @RicoPicone Just took a stab at "block tab": see [here](http://mathematica.stackexchange.com/a/48621/5059)


Front derallieur compatiiblity

Question: I am in need of a front derailleur and my previous one is a Shimano Altus 3x8, (triple chainset), (8 speed cassette).
Would any other like a tourney or any others work?
Comment: Actually sorry, realsied it was altus! Now I can find one
Answer: The compatibility info at si.shimano.com is a great resource for Shimano compatibility questions. You can also find the specification handbook (including current models on the web version and pdf archives of the handbook going back to 2004), as well as service documents by model (dealer manuals, exploded views, etc)
The parameters that need to be compatible for a front derailleur are:
Front speeds: triple or double
Top gear teeth: the number of teeth on the large chainring. an FD outer cage plate meant for a 38T will not sit low enough on a larger chainring like a 44.
Rear speeds/chain: different numbers of rear cogs require different chains, and both the width and the profile of the FD cage are designed to match a specific chain. 6, 7, and 8 speeds all use the same chain width.
Shift family: how much cable does the shifter pull? When it comes to switching front shifters, the front drivetrain compatibility chart is not quite exhaustive. I believe all Shimano MTB 3x front shifters pull the same amount of cable, but I could be wrong on that.
Total capacity: maximum accepted difference between big chainring and small chainring teeth count.
Top-mid tooth difference: for triples, how much smaller is the middle ring than the big ring? 3x FDs tend to have some shaping that's specific to where the chainring is expected to be.
Chainline: distance from the center of the bike to the center of middle chainring, or the average of the chainrings on a double.
Chainstay angle: angle between the line through the center of the  rear axle and the bottom bracket, and the seat tube to which the FD is mounted. Only a concern generally for clamp band derailleurs, and generally only for MTB type front derailleurs. Can be measured directly, found in the geometry tables for a bike, or by referencing the old FD's specified range of chainstay angles.
Mount type: how it attaches to the frame. Could be a:
-Band clamp: usually includes shims for use with smaller seat tubes
-Braze-on: road bikes, sort of a curved plate on the side of the seat tube, with a vertical slot for the fixing bolt
-Direct mount: mountain bikes, either High Direct/DM, consisting of one threaded hole next to a vertical slot/groove; or E-type/Low Direct, with two bolts a little under an inch apart horizontally
-E-type with bottom bracket plate adapter: older style mtb front derailleur mounted to a plate held by the bottom bracket cup)
Swing/action:
-top swing/low clamp: the derailleur parallelogram swings above the main pivot, generally corresponding to a lower clamp position for a band-type derailleur
-down swing: more traditional style where the cage swings below the main pivot, generally placing the clamp band further up the seat tube
-side swing: instead of a vertical parallelogram, the parallelogram is horizontal; can be had in low, mid, or high clamp band configurations as well as direct mount.
Pull:
Top pull: cable must approach from the top of the derailleur
Down or bottom pull: the cable must approach from below the derailleur
Dual pull: the cable can approach from either above or below the derailleur
Side swing: side swing front derailleurs require the cable to enter from the front, usually with full-length housing along the downtube

Front derallieur compatiiblity


AMD 8 core vs. Intel 8 core - Are they too much different?

Question: So somebody was telling me that an AMD 8 core processor only really has 6 cores as opposed to an Intel having a full 8 cores. Is there any truth to this at all?
Comment: Related: [How do the cores in an AMD Bulldozer module compare to Intel HTT virtual cores and two separate cores, in terms of multitasking performance?](http://superuser.com/questions/469134)
Comment: Please put more information in your question. There are many CPU generations, and you are asking about "intel 8 core" and "amd 8 core".
Answer: I'm pretty sure the person you were talking to had no idea what he was talking about at all.
Now, I'm assuming we're talking about the 'current' earthmoving machinery named AMD cores, and current mainstream (haswell/broadwell) based cores.
Lucky for us, wikipedia has a great image of an AMD Bulldozer core

Notice - One 8 core processor has 4 modules, with a ton of shared bits. Essentially, you can run two integer threads at once, but you have less floating point unit processors.
.

Intel on the other hand has 4-8 core processors that do hyperthreading (Standard processors go up to 4. Enthusiast editions go up to 8). Essentially, an intel processor core is functionally similar to a AMD module - it runs two threads, and has a single FPU and a single core which does hyperthreading.
In real world workloads intel tends to be better at single core workloads and AMD is probably better at multithreaded workloads. Intel probably has better floating point performance (but at some point, you're better off throwing that to a gpgpu). However Intel has a massive advantage in other respects - they are head of everyone else in physical design, and their processors are a lot more power efficient.
Comment: So, to answer my question, in technicality they both have 8 cores, AMD just has more shared parts?
Comment: I would consider a AMD module of two 'cores' *comparable* to an intel core
Comment: @user2544765 - I do believe that AMD does not use hyper-threading, so an 8-core AMD product has 8 physical cores while a 4-core HT Intel product has 4 physical and 4 virtual/HT cores.  The end result is basically the same but there are some minor differences between the two.  One would think AMD's product would be faster for that reason but their current designs do match tit-for-tat with Intel's products. (DragonLord) explains the reason Intel's design outperforms AMDs.
Answer: An AMD 8-core FX (or other Bulldozer/Piledriver/Steamroller/Excavator-architecture) processor actually does have 8 integer processor cores. However, AMD puts pairs of cores into modules, each of which has several shared resources, including an L1 instruction cache, L2 cache, and (relatively large) floating-point unit. As such, an AMD 8-core processor of this type has 4 FPUs. The person you spoke with was most likely alluding to this aspect of the architecture.
In an Intel 8-core processor (and I assume you're talking about the i7-5960X), each core is essentially independent, with separate FPU and L1/L2 caches for each core. An Intel 8-core processor therefore has 8 FPUs, which allows it to perform more floating-point operations per unit of time than the corresponding AMD part. Intel processors also tend to do far more work per clock cycle than AMD processors (e.g. 1 GHz on an Intel Haswell processor is worth far more than 1 GHz on an AMD Piledriver processor).
In addition, most modern Intel processors (since Nehalem, and up to and including Haswell) have a feature called Hyper-Threading (HT), which further increases the amount of work each core can do by presenting two logical cores to the operating system per physical core to further increase performance with heavily threaded workloads. In doing so, the processor makes fuller use of each core's resources. However, despite what the operating system may show, it's not the same as doubling the cores. The processor just utilizes otherwise unused parts of the processor core. A quad-core Intel processor with HT will appear to the operating system as having 8 cores, and an 8-core Intel processor with HT will appear as having 16 cores. It's up to the OS to ensure efficient use of each physical core.
Comment: Why nobody liked your answer?


How to switch micro DC motors fast?

Question: I'm planning to make a micro/nano quadcopter and I've bought all major components so far. The only thing that I can't figure out are motor drivers. I was planning to use some kind of transistor to do that for me (motors are 3.7V @ 1.5A marked). So I was wondering if that is a good idea? No commercial drivers can fit since it needs to be lightweight and I have 4 motors that need to be driven separately.
Comment: The typical solution for a micro/nano quad is a good surface mount logic level FET operating as a low side switch (ie, connected in the negative line of the motor) and with a pulldown resistor on the gate.  The DMN2041L is commonly used to "upgrade" toys made with marginal FETs so could be a good place to start for a custom effort.
Comment: How do you plan to control the speed? Radio link? Trailing wire?
Comment: Nope, i will use arduino as a controller, and i will control arduino through NRF24l01 wireless module. That is why i need 2A transistor since arduino can provide 50mA on its outputs.
Answer: You will need to make your own bi-directional discrete H bridge (if you want to drive propellers in both directions) or a half bridge if you want only one direction.
Don't get 2A transistors, get something like 8-10A rated MOSFETs and ensure your design can survive inductive loads and over-voltage spikes from the motors. Do the proper research into H bridge motor driving and see some example designs.
You can get "complementary" N and P Channel MOSFETs in nice little SOIC-8 packages or perhaps DIP-8 which are rated for the 8-10A I suggested. Use these to make nice compact motor drivers for each of your motors.
Make sure the transistors are "logic level gate drive" meaning they turn on/off with only 1-2 volts.
You are right that there are not many commercially available modules or packages easily purchasable for this use. You'll find there are some nice integrated ICs that can do what you want though, they are just large (usually 20+ pins) and will not fit well on your nano-copter design.
I expect you'll need to make a PCB to hold the driver.
Comment: Just put a diode on the NPN to solve your overcurrent problems (make sure you get the right one and read up on it), you don't need to oversize your mosfet. Throwing margin on a design is not a good way to solve problems.
Comment: no @laptop2d, that is not the reason why I said to use a 8-10A FET rather than a 2A one. It's because the ratings on the devices are under certain conditions, and are useful more as a constant "on" current. When switching, the Rds_on is important to have low, which results in a higher "rating" being listed for the component.
Comment: @laptop2d Also how will a diode solve overcurrent? I don't think you know what you are talking about.. All the diode will do is drop approx .7V (depending what diode it is) and will not really help as you can easily short circuit hundreds of amps through a diode. No overcurrent protection.

How to switch micro DC motors fast?


What is the Guru-parampara of Sri Ramakrishna's Vedanta-sadhana?

Question: Can someone provide the Guru-parampara of Bhagavan Sri Ramakrishna's Vedanta Sadhana? He was a disciple of Sri Totapuri as an Advaintin Monk.
Answer: According Swami Alokananda,Totapuri was a dasanami monk of the naga sect.His Marhi started with Bhagavan Puri. Siddha Baba Rajpuri built an ashram at Baba Ladana near Kaithal where from Totapuri went out for parivrajana and came to Dakshineswar wandering at various places.The lineage is

Bhagavan Puri >Jagmohan Puri > Janged Puri > Haridwar Puri > Manasa Puri > Saraswati Puri > Raj Puri > Siddha Puri > Bhandar Puri > Dalel Puri > Jnan Puri > Tota Puri > Sri Ramakrishna Paramahansa

Reference : http://www.rkmdelhi.org/articles/srimat-totapuris-origins-in-ladana-haryana/
Comment: What is the Guru Parampara of Bhagavan Puri?
Comment: But do we know who Bhagavan Puri's direct Guru was?
Comment: @user17294- it is incorrect to connect Adi Shankara with Bhagavan Puri or his parampara...Adi Shankara only has the four Amnaya Peethas established in four parts of India which are having an unbroken chain of Jagadgurus. Ramakrishna Paramhamsa does not come from that order..in fact he was a householder poojari...
Comment: @KeshavSrinivasan  Bhagavan Puri was a dasnami naga sect of Puti lineage and belonged to the Mahanirvani Akhada.The details of Puri sect I have given in answer of a different question already. It stars from Adi Shankaracharya of course, whose Adi Guru was Sriman Narayana
Comment: @KeshavSrinivasan no that information is not available


Referenced node as menu item

Question: is it possible to create a menu item that links to the node that references the current user? I can create a more or less suitable solution with views: a page that contains the referenced node but it'd be more user friendly if the menu link contained the URL of this node.
Answer: Try Menu token

Menu Token module provides tokens, that could be used in title or in
  path of menu items (links). For example, if you create a menu item
  with path: "user/[current-user:uid]", the url will be changed "on fly"
  to: "user/1" (assuming you are user 1).
Tokens are provided by Token module. Menu Token allows to use both
  global tokens and entity ones: node, user, term, etc. Entity tokens
  have several methods of substitution: from context, random and user
  defined.

If that does not work, you will have to do a custom redirect, either in code or using page manager (part of ctools)
Comment: Thanks a lot. As far as I see, Page Manager should do the job but I couldn't make it recognise the user reference field so far.
Comment: Thanks again. Finally I managed to fix the custom page created by the Page Manager: I created a Views context which provided the necessary node ID.

Referenced node as menu item


Example of an infinite dimensional reflexive Banach algebra

Question: If a $C^\ast$-algebra is reflexive (as a Banach space) then it is finite dimensional. Can anyone provide (or give a reference to) a nice example of an infinite dimensional non-commutative Banach algebra which is reflexive as a Banach space (perhaps even uniformly convex)?
Comment: I don't know how nice it is, but the algebra of Hilbert--Schmidt operators is a Hilbert space as a Banach space.
Comment: Just take a reflexive Banach space and turn it into a Banach algebra by setting 1) $xy=0$ for all $x,y$, 2) $xy=\phi(x)y$ with some functional $\phi$ with $||\phi||\le 1$, 3) add a unit to example 2). I guess none of these would be "nice"... and 1) isn't even noncommutative.
Comment: Was there any reason why you wanted it non-commutative? There are semisimple commutative Banach algebras with no non-trivial idempotents that are isomorphic to Hilbert spaces.
Comment: Yes, there is a reason :) I'm doing some potential theory on normed spaces, and wanted a couple of concrete examples of spaces which are NOT algebras of functions.
Answer: If $G$ is a compact group, and we choose the normalized Haar measure $\mu$ on $G$, then $L^2(G)$ is a Banach algebra with convolution. Indeed, if $f$ and $h$ are in $L^2(G)$, then we use Hölder's inequality at the second step, together with the fact that the constant function 1 has $L^2$-norm equal to 1, to compute
\begin{align*} |f\ast h(x)|\leq \int_G|f(y)h(x-y)|1\ d\mu(y)\leq \|f\|_2\|h\|_2.
\end{align*}
Thus
$$\|f\ast h\|_2\leq \|f\ast h\|_{\infty}\leq \|f\|_2 \|h\|_2.$$
This Banach $\ast$-algebra is not only reflexive, but it is also a Hilbert space.
EDIT: I was short of time yesterday when I wrote this, and in particular didn't see Ozawa's comment. I want to add that our examples are closely related. In fact, and this is based on a conversation with Chris Phillips, write $L^2(G)=\bigoplus_{\pi\in\widehat{G}}H_\pi$ according to Peter-Weyl Theorem, and give the Hilbert-Schmidt operators on $H_\pi$ the Hilbert-Schdmidt norm: $\|T\|=tr(T^*T)^{1/2}$, with composition as product, and the usual adjoint of operators on Hilbert spaces. Then I think that $L^2(G)$, with convolution as product and complex conjugation as involution, should be isomorphic to the direct sum (over $\pi$ in $\widehat{G}$) of the Hilbert-Schmidt operators on $H_\pi$.
The example I gave is, in some sense, a sum of a bunch of Ozawa's examples.


Will this chain work on my bike?

Question: I've bought the Shimano HG40 chain which is advertised as a 5,6,7 and I think 8 speed chain. I've just received it and it also says 15,18,21,24. (Obviously including the front gears). My bike is a 2x6 so it's got 12 gears, why isn't that listed and will it still work? Surely it has to since it seems to be one of the only chains for 6 speed.
Thanks, Harvey.
Answer: It will work adequately on your 6 speed rear cluster.  Its basically 8 speed chain which is identical width to 7 speed chain, and its "good enough" for 6 speed.
Curiously, on a supplier's website for HG40  I notice this line:

Shimano Altus HG40 6-7-8 Speed Chain
7.3mm chain width, optimised for 7- and 8-speed HG drivetrains

6 speed is 0.5mm wider but given the tolerances of the day, that should work adequately.  You have to move the derailleurs a tiny bit further to make a shift if its friction shifting.  The FD cage may need to be closed up slightly.
Finding 5+6 speed chain will be interesting - even KMC's own chain checker only lists 8 speed chain as the best option.  http://www.kmcchain.eu/chain-road_cross-multispeed-5_speed
Apparently "clarks CL20" is 5 and 6 speed chain and may be found at various on-line suppliers.
6 speed is a comparatively old standard and is way less common now, so not worth printing on the packaging?
As per https://en.wikipedia.org/wiki/Bicycle_chain#Width

6 speed – 7.8 mm (5⁄16 in) (all brands)
7 speed – 7.3 mm (9⁄32 in) (Shimano HG), 7.1 mm (9⁄32 in) (SRAM, Shimano IG)
8 speed – 7.3 mm (9⁄32 in) (Shimano HG), 7.1 mm (9⁄32 in) (SRAM, Shimano IG)
Comment: Thanks very much, it's an 80s bike I'm restoring (should be working today :)) so that's why it's 6 speed, I'm doing it period correct too so no upgrade, it's got downtube shifters too so I don't need to worry about the indexing being off. Cheers.
Comment: As you're using "5/6" in your answer, can I assume that chain width wise the 5- and 6-speed chains are identical? Also, regarding the last list: the [wiki](https://en.wikipedia.org/wiki/Bicycle_chain#Width) seems to be updated and the 7.8 mm width for 6-speeds is no longer mentioned. Not sure if the wiki is correct, therefore not editing this myself.
Comment: I've used 7 speed clark chain and its suspiciously cheap.  But it hasn't failed on me yet, and comes with a chromed quicklink compared to the dull grey chain.

Will this chain work on my bike?


Proxy Server for ubuntu!

Question: i tried using finch vpn and many other things.But they wont provide a proxy server as the network is blocked by security. Even i tried installing psiphon through vine but it wont work. any suggestions.thank you!
Answer: I don't know what other proxy servers you have used and of course there are lots of proxy servers for Ubuntu.But i have used Squid and it really works.I have also use Tor Browser that is installed in your Ubuntu by default and it works perfectly for me.I have used another proxy server called uproxy that is an extension for chrome and firefox and it works good too.Let me know if these three don't work for you and what kind of problems you have with them.

Proxy Server for ubuntu!


Can you "win" Dwarf Fortress?

Question: Can you "win" a game of Dwarf Fortress? Is there like an ending or some victory condition? Or does the game just go on forever sort of like The Sims?
Answer: Dwarf Fortress is a "sandbox" game, like Minecraft.  Sandbox games typically have no set objectives and, yes, no official way to win them.
Unofficial ways to "win" would be along the lines of player-set goals or challenges like these.
One could definitely consider a successful fort that accomplishes a major goal/challenge or two as "winning" the game, as you've likely mastered it by now, but you haven't officially won it, because doing so is impossible.
Comment: "Unofficial" ways usually just include any goals the player sets for him or herself -- building some crazy structure, a fortress under the ocean, breaching the HFS and conquering the resulting... fun. Et cetera.
Comment: I can't believe a good answer to this question doesn't mention FUN.
Comment: what do you mean by "official"? are there "unofficial" ways then since you're insinuating that there are?
Comment: Ah, that's interesting. Is there a list of these somewhere?
Comment: @philthemustard [Here's a few](http://dwarffortresswiki.org/index.php/40d:Challenges).  They seem to be more challenges than goals, but should still be interesting.

Can you "win" Dwarf Fortress?


Does D/D/D oracle King d'arc's effect work on all card effects that take life Points?

Question: What I want to know is, will D/D/D Oracle King d'Arc's effect work on cards like Exchange of Spirit and The Winged Dragon of Ra's second effect as they state you must "pay" life points not "take damage".
Answer: The answer is no. Paying lifepoints and taking damage are two different things, just like an effect that sends a monster to the graveyard is different from an effect that destroys a monster. The wording is important. Because the word that the card text uses usually matters, paying lifepoints for any reason will not equate to taking damage for cards like D'Arc. You can read more about taking damage vs. paying lifepoints here.
Any cards that specifically inflicts damage to yourself will work, however. Blazing Mirror Force and Ring of Destruction both fit the bill, while also offering useful destruction effects. If you want a full list of cards that do this, you can find it here.
Comment: *"Paying lifepoints and taking damage are two different things"* - I'd like to highlight this part, which basically sums it up. The wording is indeed specific for a reason.


Prove the supremum of Mittag-Leffler function

Question: I find two interesting limits :
\begin{align*}
\frac{1}{2}& =\lim_{s\to 1^-}\sum_{n=0}^{\infty}\left(-1\right)^n\frac{\Gamma(1+ns)}{\Gamma(1+n)}\\
& =\lim_{s\to 1^+}\sum_{n=0}^{\infty}\left(-1\right)^n\frac{\Gamma(1+n)}{\Gamma(1+ns)}.
\end{align*}
But I have no idea about the second. The process that I investigated it produces a problem :
$$\underset{x\geqslant 0}{\sup}\left|\sum_{n=0}^{\infty}\frac{\left(-x\right)^n}{\Gamma(1+\alpha n)}\right|=\begin{cases}
1& 0<\alpha\leqslant 2\\
+\infty& \alpha>2
\end{cases}.$$
But I have no way to prove it. Thanks for any help.
Comment: @LSpice Thanks.
Answer: Your original limits can be generalized: for $0<\alpha<\beta$, if we let $$G(\alpha,\beta):=\sum_{n=0}^\infty(-1)^n\frac{\Gamma(1+n\alpha)}{\Gamma(1+n\beta)},$$ then $\lim\limits_{\alpha\to\beta^-}G(\alpha,\beta)$ and $\lim\limits_{\beta\to\alpha^+}G(\alpha,\beta)$ are both equal to $1/2$ (see the last section).

For the "produced" problem, we have the following integral representation: $$F_\alpha(x):=\sum_{n=0}^\infty\frac{(-x^\alpha)^n}{\Gamma(1+n\alpha)}=\frac{1}{2\pi\mathrm{i}}\int_\lambda\frac{e^{xz}\,dz}{z(1+z^{-\alpha})},$$ where the contour $\lambda$ encircles the negative real axis and the poles of the integrand (we assume that the principal value of $z^{-\alpha}$ is taken here). This is shown using the geometric series for $(1+z^{-\alpha})^{-1}$, with $\lambda$ deformed if needed for $\Sigma\leftrightarrow\smallint$, and Hankel's contour integral for $1/\Gamma$.
Using residues, we can shrink $\lambda$ to encircle the negative real axis closely (or even evaluate $F_\alpha$ completely if $\alpha$ is an integer). For $\alpha>2$, the residues bring exponentials of the form $e^{cx}$ with $c>0$, which imply the unboundedness of $F_\alpha$. For $0<\alpha<1$, the integrand has no poles, and we obtain (in the limit of "closely") $$F_\alpha(x)=I_\alpha(x):=\frac{\sin\alpha\pi}{\alpha\pi}\int_0^\infty\frac{\exp(-xt^{1/\alpha})\,dt}{1+2t\cos\alpha\pi+t^2},$$ positive and decreasing in $x$. For $1<\alpha<2$, there are poles at $z=\exp(\pm\mathrm{i}\pi/\alpha)$, so this time $$F_\alpha(x)=I_\alpha(x)+\frac{2}{\alpha}\exp\left(x\cos\frac\pi\alpha\right)\cos\left(x\sin\frac\pi\alpha\right),$$ which makes a proof of $|F_\alpha(x)|\leqslant 1$ tedious this way (but still possible I believe).

The same approach applies to our "generalized limits". We have $$G(\alpha,\beta)=\frac{1}{2\pi\mathrm{i}}\int_0^\infty e^{-t}\int_\lambda\frac{\exp(t^{\alpha/\beta}z)}{z(1+z^{-\beta})}\,dz\,dt$$ and, if we deform $\lambda$ to fit in $\Re z<1$ strictly, then both $\alpha\to\beta^-$ and $\beta\to\alpha^+$ can be taken under the integrals, and moreover, the integrations can be interchanged, resulting in $$\frac{1}{2\pi\mathrm{i}}\int_\lambda\frac{dz}{z(1-z)(1+z^{-\alpha})}=-\operatorname*{Res}_{z=1}\ldots=\frac12$$ (by completing the part of $\lambda$ inside $|z|=R$ with the larger arc, and taking $R\to\infty$).
Comment: I'm still looking for a *simple* way to show $|F_\alpha(x)|\leqslant1$ for $1<\alpha<2$. The above shows that $F_\alpha$ is a difference of two functions, an exponentially decaying oscillating one, and a decreasing tending-to-zero one. Perhaps an alternative integral representation would do, or even the original contour integral could be modified suitably.


What is meant by outliers in text data set. How to detect them?

Question: I know that outliers are present in data but their behaviour varies a lot from remaining data points. But today while learning about naive-Bayes  they mentioned that naive-Bayes can affected by the outliers. But which points in data set are termed as outliers and how do we identify them?
Comment: Please note, Small correction naive Bayes is less affected by outliers
Answer: I define an outlier in the following ways.

It can be a wrong data entry (Eg. human typing error)
It can be a data that has values that are not relevant (Eg. an entry of total which is calculated as the sum of the above columns. This data can be misleading at times so it should be removed)
It can be a data entry that is all or most fields blank (Eg. a row in the data where all fields are blank. This row maybe not contributing anything to the analysis)
It may be extreme values which fall way out of the range of the other data (Eg. when we are calculating the age of Humans, anyone with age (say) above 120 years is an extreme case and that can be ignored depending upon our analysis goal)
Answer: In my view, the words which are not seen in training data can be considered as outliers as it leads to the probability of the word to zero, in case of naive bayes.
Also,I think too frequent and too rare words in the corpus can also be considered as outliers as they effect the model.
Comment: I got a little intuition by various internet sources. words which are not seen in training data are not consider as outlier. As you said the words which are rarely occur and sentences which forms sparsity in vector when we convert sentence to vector are considered as outliers
Comment: Thanks for the update
Answer: Since most models are built using pre-trained embeddings the problem of outliers in textual data is not that prominent. This is because the training is done on millions of words/sentences and outliers if any do not have an effect.
Coming to the specific problem statement, outliers in textual data could mean many things. For e.g assuming you are collating all news articles related to 'tech'. Now if there is a 'health' article in that corpus, then this is an outlier. Credit card fraud detection is another area where we train models to detect outliers in textual data.
The typical way to identify these outliers is via clustering. The techniques vary mildly from paper to paper


How to express FM and PM the most simple way?

Question: I'm trying to understand how to tell phase modulation from frequency modulation by looking at their respective expressions, simplified, particularly frequency modulation. Also, it would be nice for someone to illustrate mathematically the difference between vibrato and FM synthesis.
Comment: Can you please clarify your question as, at the moment, it is a bit too broad. In the meantime, please note that In principle, there is no difference between vibrato and frequency modulation. Particular practical details might differ of course, such as ["modulation index"](https://en.wikipedia.org/wiki/Modulation_index). As far as modulation is concerned, [this](https://en.wikipedia.org/wiki/Modulation) is an excellent starting point. AM happens "outside" of the carrier's argument,  FM/PM happens "inside" the carrier's argument.
Comment: @A_A What is the simplified expression for modulating the frequency of a sine wave with another sine wave, so that when the modulators amplitude =1, the carrier frequency doubles up and down. I think that's what I really wanna know.
Answer: In the simplest terms, the difference between analog Phase Modulation (PM) and Frequency Modulation (FM) can be defined according to which of the two (phase or frequency) is being directly proportional to the message signal as outlined by the following:
An angle modulated signal is defined as: $$x(t) = A_c\cos(\omega_c t + \phi(t)) $$ Where $\theta(t) = \omega_c t + \phi(t) $ is the instantaneous angle  of the modulated cosine, $\phi(t)$ is the instantaneous phase and  $ \omega_i = \frac {d\theta(t)}{dt} $ is the instantaneous frequency
Now consider the phase being given by $\phi(t) = K_p m(t)$ , where $m(t)$ is the message signal and $K_p$ is a simple constant for phase modulation. As clearly evident, here the Instantaneous Phase, $\phi(t)$, is directly proportional to the amplitude of the message signal $m(t)$ and hence this type of angle modulation is called as Phase Modulation (PM)
On the other hand, consider a message signal $m(t)$ such that $\phi(t) = K_f \int {m(\tau)d\tau}$, where $K_f$ is the constant for frequency modulation, then the instantaneous frequency is: $$ \omega_i = \frac {d\theta(t)}{dt} = \omega_c + K_f m(t) $$
As can bee seen, now instead, the instantaneous frequency in radians is directly proportional to the amplitude of the message signal $m(t)$ and this type of modulation is, therefore, called as Frequency Modulation (FM)
Comment: How would you express "frequency deviation" in terms of the amplitude of the modulator and the carrier (baseline) frequency? Is it $frequency  deviation=\omega_\Delta=|(A_m+1)*\omega_c-\omega_c|$ where $A_m$ is the modulator amplitude and $\omega_c$ the carrier frequency?
Comment: Instanteous frequency deviation is $$\Delta {\omega_i} = \omega_i - \frac{d\theta(t)} {dt} = \frac{d\phi(t)} {dt} $$ you would plug $\phi(t)=K_p m(t)$ for PM and $\phi(t)=\int K_f m(\tau)d\tau$ for FM.
Comment: Does $ A_m=1$ represent a doubling frequency in the expression $sin(\omega_c t+\frac{\omega_c}{\omega_m} A_m cos(\omega_m t)-\phi)$?


Roller Coaster Tycoon 1 underground bathroom

Question: I have a long underground path in my park. I want to add a bathroom to this road underground. Is this possible in RCT1? And how?
Comment: I don't think that's possible. But you can dig a hole and build the toilet inside (and cover the hole with a road) if you want.
Comment: @Nolonar Any reason you made that a comment and not an answer? It seems like the accepted answer here
Comment: @StevenVascellaro. Because I no longer have access to the game, I can't verify if my answer is actually correct or not.
Comment: You cannot have a ground surface above buildings, so Nolonar's answer is correct. I've often wished for the same as you, though...
Comment: Not exactly what I was hoping for. Thanks for your answer.
Answer: In the original release of RCT1, this is not possible as you can only build tracked rides and pathways underground, and that is if they start above-ground first (you can start building above-ground and then remove the above-ground track once the ride goes underground. Attractions such as shops, toilets and single-piece gentle rides cannot be placed underground for that reason.
In RCT2 and the Android re-release of RCT, you can move an attraction underground using the shift key and the onscreen arrow controls respectively.
Answer: It's been a while, but in two of the scenarios in base RCT there are completely underground rides - rollercoasters specifically. I don't think placing non-tracked rides like the merry go round or shops was allowed.
To achieve this you build your ride and then lower the ground underneath causing it to "close over". That's what I remember at least, doing things underground could be a pain at best.


End-to-End Testing EmberJS using Selenium WebDriverJS

Question: We're starting to think about using an approach similar to Protractor to allow writing end-to-end acceptance tests in Node that use the Selenium WebDriverJS bindings. From looking through the Protractor guides/source, I've noticed that angular directly exposes a way to know that all timers/events/pending updates have been flushed and the application is back in steady state. is there an official way to do the same with ember?
Answer: ember-testing's wait helpers

will wait for all preceding asynchronous helpers to complete prior to progressing forward.

Cory Forsyth's blog post on this topic is helpful for explaining how this works in more detail.
You can register your own test helpers if the built in ones aren't adequate.