How to find what causes the mismatch between the reported and the actual used space?

1. The setup  I have a 4 TB WD Red HDD with one ext4 partition /dev/sdb1 mounted on an Ubuntu 16 LTS Server under /DataVolume. The mounted drive is then served on the network by a samba server.  Ubuntu Server is running on a virtual machine hosted by VMware ESXi 6.5.  On the ESXi the drive is setup as RDM (Raw Device Mapping).  The drive is empty (fresh after recreation of the partition table).  2. The problem  df -T /dev/sdb1 gives the following result:  Filesystem     Type  1K-blocks  Used  Available Use% Mounted on /dev/sdb1      ext4 3845577736 69648 3650140872   1% /DataVolume   Used space  Reported: 69648/1024 = 68, ... MB  Calculated: (3845577736 - 3650140872) / (1024 * 1024) = 186,... GB  The calculated used space is much more than the reported value.  Free space  3650140872 / (1024 * 1024 * 1024) = 3,39 ... TB  Capacity  3845577736 / (1024 * 1024 * 1024) = 3,58 ... TB  3. Research   a similar problem is discussed and it is mentioned, that:     This problem occurs if you mapped a drive to a share that links to a   mounted volume by using NTFS volume mount points or by using symbolic   links.   RDM indeed uses symbolic links, however, no useful info is provided to remedy the problem.  4. Further details  The output of ls -al /DataVolume/ is:  total 28 drwxr-xr-x  4 root root  4096 Feb  2 06:05 . drwxr-xr-x 25 root root  4096 Feb  2 12:06 .. drwx------  2 root root 16384 Feb  2 06:02 lost+found drwxr-xr-x  5 root root  4096 Feb  2 06:05 shares   The output of du -sh /DataVolume/ is:  36K     /DataVolume/    Disk usage as reported by Windows 7 (same as df -h):      Disk usage as reported by Ubuntu 17 Desktop (the used space is more accurate):     5. The question  Does someone know how to find what is consuming this space and causes the mismatch?  EDIT:  The question is indeed very similar to . However, if I understand it correctly, the problem there is a smaller reported capacity of the drive. In my case there are 186 GB used in an empty drive. I would rather consider it related to the link I've provided, since the size of the used space is close to the size of the used space of the drive holding the simbolic link to the RDM.


I accidentally rsynced .thunderbird to user@host instead of to user@host:/home/user.  Where is .thunderbird now?  Is there a good way to search for the folder?


I know from the  that it is not possible to introduce direct abbreviations like \newcommand{\bal}{\begin{align}} % doesn't work \newcommand{\eal}{\end{align}}   % doesn't work  or \newcommand{\bal}{\align}    % doesn't work \newcommand{\eal}{\endalign} % doesn't work  What is puzzling me is that \newenvironment{foo}{\align}{\endalign}  does work, at least if one is well-behaved enough to diligently type \begin{foo}...\end{foo}, since \foo...\endfoo won't work either. I'd really appreciate some help to shed some light on what is going on behind the scenes :-)


Is IE 32-bit by default? even on 64-bit machines?

I know this is a simple question, but I am having trouble finding a clear answer. Is IE 32-bit by default even if you're running a 64-bit Windows OS? It seems that that is the case, even on Windows 8, but I can't find a clear message that states just that.  The problem is that I am refactoring a webpage embedded VPN ActiveX control, and need to decide if I need to use an entirely different technology or not.


Is this statistic about how many Latinos/Hispanics have a PhD in the USA correct?

,      < 2% of people in the US have a #phd   Of those, 6.5% are Hispanic   By defending my PhD yesterday, I just became part of the 0.13% in the US that is #LatinoPhD   I find this statistic hard to believe, or if it is true maybe it is intentionally represented to look like a racial problem (although in my opinion Latino is not a race). Regarding my field, almost 40% of references are from Spanish surnames, 40% Chinese, and 20% European. Based on this analogy (maybe false) I think her statement is wrong. Is there any way or any source that can prove her claims?


A previous poster on the regular forums (  ) said /var/log/daemon.log, but I don't seem to have such a file. Do I need to enable logging?


I want to install Ubuntu 16.04.2 over my old Ubuntu which will not boot

I have Ubuntu 16.04 lts.  While removing some applications using synaptic my system crashed and then I restarted my laptop, but the system wouldn't boot.  Now I have Ubuntu 16.04.2 on a USB flash drive.  How can I install Ubuntu 16.04.2 LTS from the USB to my  laptop before booting the laptop?


Ubuntu 17.10 gnome-software process using large amounts of memory

I've been running Ubuntu 17.10 for a good while. Starting yesterday (April 9) the process gnome-software started using large amounts of memory. I don't know if it is related to the update that I took that day.  gnome-software grows to use up to 7G of memory (my system has 8G of RAM.)  This expands into eating up swap and root. My root usually runs at 51% of its total disk space and it went up to 96%. System ground to a halt. Had to power off. Only after some automatic disk cleaning (?) did root return to 51% usage on its own.  This happened twice yesterday and it is starting again today.  After running only 1 hour gnome-software is now using (according to system monitor) virtual mem=5.4G, Resident me=4.7G, memory=4.7G    More info:    This is continuing to happen.  The root disk space is being used in at least the file /var/log/syslog.  Over the last few hours it has grown to 4.9G in size.  I have to manually kill the gnome-software process and delete the log file to keep the computer functional.  When gnome-software starts using memory, the CPU jumps up and down  from 100% to 0%.  This can be seen in the system monitor program in the resources tab. I verified this by stopping the gnome-software process and CPU usage goes to almost nothing.  Telling the process to continue show CPU usage jumping all over again.  This CPU usage doesn't show up in "% CPU" on the process page.  Probably due to the refresh interval?    Even more info:    This is the error that repeats over and over in /var/log/syslog when this is happening. syslog was 1.7G when I caught it this time.  Apr 10 20:27:31 rwkeating-XPS-8300 gnome-software[2485]: g_byte_array_remove_range: assertion 'index_ + length <= array->len' failed Apr 10 20:27:31 rwkeating-XPS-8300 gnome-software[2485]: Ignoring unexpected response   I verified this by pausing the gnome-software process while doing a tail on syslog and then un-pausing the gnome-software process only to see the error flooding the log.  So it is caught in this loop.  Don't know what it means ... yet.


Fresh install ubuntu 13.10 x64: no skype in software center, no mouse speed adjustment... I have tried numerous Terminal tricks, following amatory blogs. P


A word or phrase to describe someone who is obsessed with words?

I want to be able to describe the love for, or obsession with, words. It may also be a condition from other's perspective. It maybe because he is a lunatic who wants to aggrandize his vocabulary, a crazy person who can't forget the words he hears wafting around, or someone who wants to set a world record or something. Try fitting it in these:  He is a _______ who can blurt a thousand synonyms for good. He is so ______ that he can be called a dictionary with a heartbeat. He is showing what a _____ he is. If thesaurus was a ghost, he would be dwelling in that _____'s body.  Any word or phrase would do.


How do you interpret the radian in physics?

When calculating $\sin x$, $x$ needs to be radian to calculate it. so for example when solving Uniform Circular motion, $x(t)$, $y(t)$ can be expressed $$x(t)=R\cos(ωt) [m] $$ $$y(t)=R\sin(ωt) [m]$$ and when we differenciate it $$v_x(t)=-Rω\sin(ωt) [rad*m/s]$$ $$v_y(t)=Rω\cos(ωt) [rad*m/s]$$ how do you interpret rad in this way? furthermore $$a_x(t)=-Rω^2\cos(ωt) [rad^2*m/s^2]$$ $$ a_y(t)=-Rω^2\sin(ωt) [rad^2*m/s^2]$$ do we just ignore $$[rad],[rad^2],[rad^n] $$to see the unit as [m/s]? or is there a meaning in it when the unit is written with rad? also for $e^{iωt}$ I heard ω needs to be $rad/s $ does that mean $e^{\text{blank}}$ the blank needs to be [rad] to have the meaning?


How do I check what kernel options were compiled without looking at /boot/config-*

How do I check what options are compiled into a Linux kernel without looking at /boot/config-* and if I don't have access to the /boot/config-* file that's left over?


How do I escape a global variable in PHP?

So escaping a normal String is no problem with   $username = $mysqli->real_escape_string("Peter");   But how do I escape a global variable with user input? For example, I get the Username from the input field and saved it in $username. What have I to do now?  $username = ($_POST["Username"]);`


I walk into a store and ask the clerk: "Do you have any diet Dr Pepper?" The clerk answers, "We have regular Dr Pepper."  Searching for a description of this type of response, I've found a lot of material on question dodging. But in this case, the respondent doesn't intend to dodge the question or avoid answering it.   I repeat, this isn't question dodging, evasion, or obfuscation like a politician might engage in. In those cases, the politician doesn't want to answer the question, and knows he isn't answering the question.  In this case, the respondent knows the answer to the question, and thinks he is providing it sufficiently. In his mind, his response logically implies an answer to the question posed, but that logic is bad/does not follow.    I find this type of answer extremely annoying. Basically the respondent is implying an answer to my question and making me decode his response, when he could instead just answer my question directly. The problem with this type of response in general is that I would be expected to take future actions/make future decisions as if I have the information I requested, when I really don't.  Descriptions of this type of answer that I've found are "non-answer" and "non-response," but I was just wondering if there was an explicit name for this horrible communication tic.


I have the above code and before the insert of try-catch I had this error at logcat     java.lang.NullPointerException: Attempt to invoke interface method   'java.util.Iterator java.util.List.iterator()' on a null object   reference   The problem was into the for loop for the List cellInfoList. Where exactly is the problem.  List<CellInfo> cellInfoList = tm.getAllCellInfo();             try {                 for (final CellInfo info : cellInfoList) {                     if (info instanceof CellInfoLte) {                         final CellSignalStrengthLte lte = ((CellInfoLte) info).getCellSignalStrength();                         final CellIdentityLte identityLte = ((CellInfoLte) info).getCellIdentity();                         test1 = lte.getDbm();                         //lte.getTimingAdvance();                         test2 = identityLte.getMcc();                         //identityLte.getMnc();                         test3 = identityLte.getCi();                     }                 }             } catch (Exception e) {                 Log.e(TAG, "Unable to obtain cell signal information", e);             }   Thank you


Why are \colon and \mathpunct{:} not equivalent?

According to , \colon is of type \mathpunct. But in the MWE below, the outputs of the two lines are not identical. Why not?  \documentclass{article}  \usepackage{amsmath}  \begin{document}  \begin{align*}     & g\colon X\to Y\\     & g\mathpunct{:} X\to Y \end{align*}  \end{document}


Why do we double-quote a dollar sign evaluation in Bash?

I know single quotes will not evaluate what's inside, and double quotes will. I often see people quote-quote the dollar sign evaluation. Here are some examples:   for i in "${indices[@]}"; do if [ "${a}" == 0 ]; then ffmpeg -framerate 2 -pattern_type glob -i "*.png" -pix_fmt yuv420p output.mp4   What if we don't double-quote the dollar sign expression? AFAIK, the for loop still works.


How can change in cost function be positive?

In  it says     To make gradient descent work correctly, we need to choose the learning rate η to be small enough that Equation (9) is a good approximation. If we don't, we might end up with $\Delta C>0$, which obviously would not be good! At the same time, we don't want $\eta$ to be too small, since that will make the changes $\Delta v$ tiny, and thus the gradient descent algorithm will work very slowly. In practical implementations, $\eta$ is often varied so that Equation (9) remains a good approximation, but the algorithm isn't too slow. We'll see later how this works.   But just a few paragraphs before we established that $\Delta C\approx−\eta\nabla C⋅\nabla C=−\eta\|\nabla C\|^2$ is obviously always negative (for positive $\eta$). So how can $\Delta C$ be positive if we don't choose a small enough learning rate? What is meant there?


Is there a way to deep copy non serializable object?

I have to copy an Arraylist to a new Arraylist. In the old Arraylist there are multiple elements which changes at runtime.One of them is the module settings parameter inside the Arraylist. I would like to deep copy the values of the arraylist so that I can use it for undo operation. I tried using Binaryformater and Datacontract. Both can't be done for non serializable object. Can anyone help , pls?


Is the function $f(x)= {\sin x \over x}$ uniformly continuous over $\mathbb{R}$?

Is the function $$f(x)= {\sin x \over x}$$ Uniformly continuous over $R$  How do i approach this ? I need some hints.


Metasploitable 2: Unable to fetch some archives

I just installed Metasploitable 2 from  on VMware Workstation Pro. After logging in, I tried sudo apt-get install whois and I got this error: Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed:   whois 0 upgraded, 1 newly installed, 0 to remove and 139 not upgraded. Need to get 31.9kB of archives. After this operation, 279kB of additional disk space will be used. WARNING: The following packages could not be authenticated:   whois Install these packages without verification [y/N]? y Err http://us.archive.ubuntu.com hardy/main whois 4.7.24   404 Not Found [IP: 91.189.91.38 80] Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/w/whois/whois_4.7.24_i386.deb 404 Not Found [IP: 91.189.91.38 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?  This happens with anything, not just whois. I tried sudo apt-get update (with and without -fix--missing), and it ends up with a lot of "Failed to fetch" and ends with an error ("Some index files failed to download..."). If I try sudo apt-get upgrade, I get the same result as installing. I also tried -o Acquire::Check-Valid-Until=false. The date command returned the time in EDT, 7 hours behind my clock, which is correct. I am also connected to the internet since I am able to ping 8.8.8.8. Please can you help me fix it?


I've implemeted jquery datepicker on a textbox and datepicker is poping up with browser's default autocomplete that's confusing for the usera. I've tried autocomplete="off" but it's not working.


Suggestions for sharing and using data between Ubuntu and Windows 7 dual boot

Note: TL;DR, scroll to bottom for summary. I recently set up my computer for a dual boot between Ubuntu 9.10 and Windows 7. My current drive setup is as follows.  | A1 |     A2       | | B1    |  B2  | B3 |        A1: 100 mb, windows 7 "System   Reserved" boot partition      A2: 230 gb, data section, this one   needs to be shared between the   operating systems      B1: 125 gb, windows 7 OS      B2: 123 gb, ubuntu OS      B3: 2gb, linux swap space     Pretty much I want to have my documents, music, pictures, videos, etc accessible from both operating systems. My first attempt involved making the data (a2) partition NTFS, and moving my home folder from ubuntu to the data partition. However, as I read NTFS does not work nice with permission, and it messed up my home folder. My next idea is one of the following: 1) format the data partition to ext2/3/4 and move my home folder from linux there, and get a driver to read ext partitions in windows 7. The problem with that is that most of the ext drivers/software are not compatible with windows 7 or do not integrate with windows explorer (I really don't want to open a separate software window just to access my data, plus it's probably not compatible with other software.)  looks promising, but I'm not sure how it works with ext4 and windows 7 (not officially supported, when trying in Vista Compatibility Mode, it tells me I need to format the ext drive to use it). My next idea, 2) keep the home folder in ubuntu where it is, but create symlinks for the Documents, Music, etc folders to an NTFS formatted Data (A2) partition, and add those locations to the windows 7 libraries. I'm not totally sure how the permissions would work out, but it should be fine since it's only the documents, music, etc and not the important config files in the rest of /home/user/. Correct me if I'm wrong. Currently, symlinks is my best idea, although i'm not sure how it will work.  Any suggestions, additions to my ideas, links, pointers, whatever would be greatly appreciated. Even if it means I should reformat both my drives and repartition (2 250gb drives if you want to suggest a setup for that), I won't be too opposed if that's the best suggestion (I've gone through the format/install/format/reinstall process 5 times over the past 3 days, once more won't hurt me).    TL;DR, summary:  I have two hard drives. One is partitioned for Ubuntu and Windows 7, the second one I want accessible to both operating systems to store documents, music, pictures, videos, etc. Suggestions on how to set up the data drive.    P.S. bonus if I can get an apache server document root folder working between the two OS's as well (permissions could become very complicated, so don't worry too much about that)  P.P.S. Related question, but data viewing is one way:


I have 93.1GB for my windows partition or drive, however, I have no idea why there is so little usable space (1GB left), is there any software here that takes up so much space and can be removed harmlessly? I only use mathematica, microsoft offices, python, and in principle all others are redundant. Is it true that i have many software development libraries installed but can be removed?


Solving a little Diophantine equation:$(n-1)!+1=n^m$

How can I solve this Diophantine equation: $$(n-1)!+1=n^m$$ with $n,m$ positive integers?  From Wilson's theorem we can note that $n$ is a prime number. I proved to rewriting the equation as:$$(n-2)!=n^{m-1}+n^{m-2}+....+1$$ but in vain. I proved to solve also through the theorem LTE bur I analysed only some cases without obtain a general solution.


Calculator program keeps resulting with the answer "0"?

Okay so, I've written this code and gone over it many times to see if I can find my error. Unfortunately, I cannot find it and am becoming frustrated with myself. I've decided to post my code online. This is the actual Calculator class with the methods. The input class (not on this post) gets a user input and returns it as a string. Can someone please help me? Thanks bros.  public class Calculate extends UserInput{  int num1; int num2; int returnValue; String operation; String userInput1; String userInput2;  public void calculate() {     userInput1 = getUserInput("Enter a number: ");     num1 = Integer.parseInt(userInput1); //Changing userInput to int     operation = getUserInput("Enter an operation (+,-,*, or /): ");     userInput2 = getUserInput("Enter a second number: "); //Changing second userInput to int     num2 = Integer.parseInt(userInput2);      if(operation == "+") {         addition(num1, num2);     } else if (operation == "-") {         subtraction(num1, num2);     } else if (operation == "*") {         multiplication(num1, num2);     } else if (operation == "/") {         division(num1, num2);     }      System.out.println("Result: " + returnValue); }  public double addition(int x, int y) {     returnValue = x + y;     return returnValue; }  public double subtraction(int x, int y) {     returnValue = x - y;     return returnValue; }  public double multiplication(int x, int y) {     returnValue = x * y;     return returnValue; }  public double division(int x, int y) {     returnValue = x / y;     return returnValue; }  }


Map of degree two from $S^2$ to the torus $T^2$.

Prove that there is no map of degree two from $S^2$ to the torus $T^2$.   I'm struggling with this problem. I've tried lifting the map to the covering space but I'm not sure what to do from there. I keep getting results that I know are wrong. Most examples I can find of problems like this involve maps from $T^2$ to $S^2$, and I think those call for different techniques than what is needed here.


Solving the integral $\int_{0}^{\pi}{\log(\sin x)}\,\mathrm dx$

Solve this integral$$\int_{0}^{\pi}{\log(\sin x)}\,\mathrm dx$$   I have tried this by breaking the limit from $0$ to $\pi/2$ and $\pi/2$ to $\pi$, but I am unable to solve the 2nd part.


Making separate Python installation that can call ArcPy?

I see a lot of Q&As asking how you can create a separate Python installation (e.g. the Anaconda or Python XY distribution) that can use arcpy, while not 'breaking' the original ArcGIS python installation.  I had this same problem, and I think I have found a 'universal' solution. So far we have done this on about 8 computers at work and it all works fine.   How to install a separate Python distribution that can use ArcGIS?


There is this specific type of bibliography I really want to do in TeX (picture below).  I don't have that many books in my thesis that I need some organizing tool like BibTeX, a mere reproduction would do the trick. Still, I'm not really sure how to do that efficiently.  I thought about making a table for year / title, but then the author in bold crosses the columns.   I thought about typing the author in bold, then having a table for his books, then another author - another table - but even if I do that I have the problem that long book titles get cut off, because I cannot naturally write over two lines in a table.  This would be possible with minipage, but before I start to do a \textbf{Author} then \minipage and then \textbf{Author} again I thought about asking you guys.  ...also: how can I do this slightly bigger blank line after each section of books?    --


Number Theory - Find all $n$ such that $x^2 ≡ x$ (mod $n$) for $x$ ≡ 0,1 (mod $n$) only

When $n = p^k$, where p is prime and k is a positive integer if $x^2  ≡ x$ (mod $p^k$), then $p^k$ divides $x^2-x = x(x-1)$, since $x$ and $x-1$ are coprime, $p^k$ divides either $x$ or $x-1$, so $x ≡ 0$ (mod $p^k$) or $x ≡ 1$ (mod $p^k$). When n is not in the form of $p^k$, on checking of counterexamples, $4^2  ≡ 4$ (mod $6$), where $4$ is not congruent to $0,1$ modulo $6$ and $6$ is a product of distinct primes. Please suggest the general approach to prove that there exists solution other than $x ≡ 0,1$ (mod $n$) for this case.


I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. Anyone please help! (I'm still using Windows 7)


When I was about 10 years old playing with lamps, I accidentally picked up a wire completing a circuit for a lamp plugged into the wall (120 V AC U.S. standard). I'm not sure if it was the hot or neutral wire, but I had completed the wire from hand to hand. I had a shock and dropped the wire in slightly less than a second.  According to what I see online, which says milliamps can kill me, how did I survive for this long, with no burns or negative health effects? I remember immediately running up to my mother and saying I just got shocked by a house socket with a big grin on my face! (she was not happy!)


I am trying to write a tex file in Kile with font \textt.  This font looks like following typing in a book .  But when after \begin{document} I wrote \tt or \texttt, the text was exceeding line in the pdf file; in other words, it was showing some warning.  How can I settle the \texttt font in Kile?


Flying to UK to reset 90-day rule for USA's Visa Waiver Program?

I have an Australian passport and will be visiting the US as a tourist. Under the VWP, I know I'm allowed to stay in the US for 90 days maximum. My dates are 5 November 2014 to 2 February 2015.   I would like to stay on for just another two weeks until 16 February 2015.    I understand that going to Canada and Mexico and then coming back to the US doesn't give me another 90-days, but what if I go to London for let's say a week instead and then re-enter the US, will that give me a new 90-day period?   I am not trying to do a visa run, but really want to extend my stay for two more weeks before I DEFINITELY leave the US on 16 February.


Continuing a bit from above, I managed to get some systems to upgrade from Ubuntu 14 to 16.  Now, after that's done, the systems aren't able to do any subsequent upgrades.  I know this is not the latest version of the kernel on my "patching server":  root@FOO:/etc/apt# apt-get install linux-generic-lts-xenial Reading package lists... Done Building dependency tree Reading state information... Done linux-generic-lts-xenial is already the newest version (4.4.0.142.148). The following package was automatically installed and is no longer required:   libio-string-perl Use 'apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@FOO:/etc/apt#   I've done a apt-get update to make sure I'm pulling down any new lists of packages.  An apt-get upgrade after that turns up nothing to update, which is definitely not right if everything is working.  I'm going to keep troubleshooting and adding information here as I come up with anything that might be valuable.


Caching using MemoryCache not working in ASP.NET WEBI Delegating Handler

I have requirement to read a pretty much static JSON file on every request. I'm using ASP.NET web API 2 targetting .NET 4.5. I had inteded to use the System.Runtime.Caching.Memory cache for the same. I'm using this Caching in the Delegating message Handler. To my surprise the cache is not working at all. Every time the request is coming, the cache key does not seem to exist and it just keeps loding the file. To test the same I was using IIS Express 8.0 and used break point n VS 2012.  My code is as below  public class AuthenticationHandler:DelegatingHandler {      ObjectCache currentCache = MemoryCache.Default;      protected override System.Threading.Tasks.Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)     {         if (!request.Headers.Contains("source"))             request.Headers.Add("source", "1");         var exclusionList = GetFromCache();         if (exclusionList.Exists(item => request.RequestUri.OriginalString.ToLower().Contains(item.ToLower())))         {             return base.SendAsync(request, cancellationToken);         }         else if (request.Headers.Contains("id"))         {             return base.SendAsync(request, cancellationToken);         }         else         {             TaskCompletionSource<HttpResponseMessage> responseMessageTask = new TaskCompletionSource<HttpResponseMessage>();              HttpResponseMessage response = request.CreateErrorResponse(System.Net.HttpStatusCode.BadRequest, "Session id not present in the header");             responseMessageTask.SetResult(response);             return responseMessageTask.Task;         }      }     private List<string> GetFromCache()     {         //ObjectCache currentCache = MemoryCache.Default;         //var currentCache = HttpContext.Current.Cache;         CacheItemPolicy expirationPolicy = new CacheItemPolicy();         var exclusionList = currentCache.Get("__ExclusionList") as List<string>;         if (exclusionList == null)         {              string filePath = HostingEnvironment.MapPath("~/config/Exclusion.config");             string jsonConfig = File.ReadAllText(filePath);             exclusionList = JsonConvert.DeserializeObject<List<string>>(jsonConfig);             CacheItem item = new CacheItem("__ExclusionList");             item.Value = exclusionList;              expirationPolicy.ChangeMonitors.Add(new HostFileChangeMonitor(new List<string>() { filePath }));           }         return exclusionList;     } }   In the GetFromCache function, when  I put the break point in if segment, I see that the content is always loaded from the file and not from cache at any instance. Can you please tell me if I'm missing something?


Why is “Object” capitalized in the Declaration of Independence?

But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security.  Thomas Jefferson Why are the 3 bold words capitalized?


Pretty sure that my edit was correct but it was rejected?

I just . Namely, the C++ function:  void returnCharPtr(char * someString, int n);   cannot return any CharPtr because the someString pointer is passed by value. Also, the intent of the author was clear:      So, another option is to pass the parameter as an argument, so you process your string in a function but don't create a new copy.   But as the change was rejected (3 vs 2) the post stayed in an incorrect state (IMHO).   I left a comment to the author. Can I argue with the editors' decision?


What could the new physics be if the experimental value of the muon's $g-2$ factor turns out to be truly different from the theoretical value?

I was really excited to read about a recent experiment at Fermilab.  one can read the article. A dicrepency was seen between the calculated value of the muon  $g-2$ factor, in the context of the standard model, and the experimental value. A truly breathtaking experiment! Finally new physics! But what is the new physics? What are the new particles? What is the new force? Can a substructure of the muon be responsible? Does it have to be substructure? What new particles could be involved, if no substructure is involved? EDIT What if the value that is found in experiment turns out to be truly different from the theoretical value? I'm already inclined to think that this is already the case, in all my excitment, but I should not, indeed, jump too high too soon. But suppose there comes a point in the future tyhat there is no doubt anymore. IF. What could the new physics be? Like the magnetic moment of the proton showed a value hinting to substructure (three quarks), this could also be the case for the muon. What else could be the case if substructure is not involved? And now I see the list given below, by @G.Smith...


What is an advantage of getting dividends from stock?

I have seen multiple questions on this site that mention how when a dividend is paid out, the price of stock drops by the same amount, which makes it so that getting the dividend does not actually amount to profit for the shareholder.  And aside from having the same net worth the day before and the day after the dividend is paid; you have to pay taxes on the dividend; as well as not having it automatically re-invested as regular stock growth would be.  Given that, why would you ever want a dividend? Certainly there's a "feeling" of getting regular income from the stock; but you couldn't get that same regular income from a non-dividend stock by selling a small portion of the stock at regular intervals? As far as I understand, the math on this should work out the same as getting a dividend in regards to how much your stock holdings are worth afterwords.  Are there any financial advantages to having a stock that pays dividends? If not, why do some companies bother doing it; and why don't people avoid the stocks that do it?


Sum with binomial coefficients: $\sum_{k=1}^m  \frac{1}{k}{m \choose k} $

I got this sum, in some work related to another :  $$S_m=\sum_{k=1}^m  \frac{1}{k}{m \choose k} $$  Are there any known results about this (bounds, asymptotics)?


How to prove $\lim_{x \to \infty}\frac{\log(x)}{x}=0$?

I will soon make a math exame where one can't use L'Hôpital's rule, integrals concept neither the formal limit definition. The most I can use is the derivative definition and the algebraic ways to solve limits.  My thought was:  Let $\displaystyle \lim_{x \to \infty} \frac{\log(x)}{x}=y$, so $\displaystyle \lim_{x \to \infty}\log(x^{\frac{1}{x}})=y$.  Then,  $$\displaystyle \lim_{x \to \infty}e^{\log(x^{\frac{1}{x}})}=e^y \Leftrightarrow$$   $$\displaystyle \lim_{x \to \infty}x^{\frac{1}{x}}=e^y $$  I ended with an indetermination.  How can I proof the $\displaystyle \lim_{x \to \infty}\frac{\log(x)}{x}=0$ with the restritions and as formal it can get? Thanks.


I have an iMac with Mac OS X 10.8 (Mountain Lion). When I open the Mac App store, and try to download an App, it asks me for the login. When I enter my Apple ID's email and password and click login, the button become gray for a moment, and then asks me for the credentials again. There is no error message displayed. The email and passwords are correct, since if I try an incorrect password it tells me that it is wrong.


Tag selection autocomplete dialog crashes my browser(s)

About one time out of three, when I start typing a tag name and launch the autocompletion script, the script crashes with this error (on firefox):     A script on this page may be busy, or it may have stopped responding.   You can stop the script now, open the script in the debugger, or let   the script continue.      Script:   …ibs/jquery/1.7.1/jquery.min.js:3   This happens on all sites on the network, on both firefox (40.0 and previous versions) and chromium (45.0.2454.85). There seems to be no pattern to it, the same seed word will sometimes work fine and sometimes crash. On firefox, I need to wait until the error above occurs (and can't use my browser in the meantime) and on chromium I need to close the offending tab.   This is on 64 bit Debian. It may or may not be related to .  I just checked and this doesn't seem to (so far) occur with another account on the same machine, which would suggest that it is somehow a problem on my end. Any ideas what could cause this? It can't be an extension issue since it occurs in both firefox and chromium. What would those two share that could produce this issue?


Boot Ubuntu from USB: No default or UI Configuration Directive Found!

I tried rename isolinux.cfg and isolinux.bin to syslinux.cfg and isolinux.bin, respectively. Then, I renamed isolinux (file) to syslinux. But, when i opened syslinux, the file is empty. Can anyone solve this issue for me, pls. Thanks a lot!!


Split a string using multiple delimiters in java

I need to split a string base on two delimiters: one or more space and quote    public static void main( String[] args ) {     String[] aStr = {"Header  \"2018-02-23 picture test\"", "Average Value \"A B \"  3.14"};      for(String str: aStr) {         for(String str1: str.split("\"|\\s"))             System.out.println(str1);     } }   My desired output:  Header 2018-02-18 picture test Average Value A B 3.14


How to identify the process that's sending error messages to terminal?

The following error message occasionally appears in my terminal:  Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory   ... which is pretty annoying.  I have searched online for solutions to this error, without success.  Is there any way to at least identify the process responsible for sending these error messages to my terminal?  Let me clarify that, as far as I can tell, these error messages appear "out of the blue".  In fact, they appear asynchronously with respect to my interactions with the terminal (more often than not I see them for the first time when I return to a terminal window that has been unattended for some time).  I'm sure there's a definite, deterministic cause for these messages, but it is not one that I can readily identify.  In short, I have not noticed any pattern or regularity to their occurrence.  In particular, in my case their occurrence has nothing to do with running MPlayer, or any other video playback program.  (Please refer to .)  For one thing, the machine in question is a work machine, and I rarely watch any videos with it.  In the very few instances in which I've watched a video on this machine I've used VLC, not MPlayer, and these errors never appeared in these rare occasions that I used VLC.


Find text to trigger a particular emoji in Predictive Keyboard

Sometimes, iPhone suggests emojis based on the text you have typed, like so   I have been trying to trigger this emoji 😝 on the Predictive bar shown above without success. I know there is some personalization involved, but is there a way to find the text that can trigger a particular emoji? I would think there is are some default text mapping to each emoji.


Is $ \sum\limits_{n=1}^\infty \frac{|\sin n|}n$ convergent？  It seems to be divergent to me because of this (i know that's not a proof just a thought):  $|sin(n)|\leq 1$ but for about half the values of n, $1/2<|sin(n)|$ for these values the series $ \sum\limits_{n=1}^\infty \frac{1/2}n$ diverges therefore $ \sum\limits_{n=1}^\infty \frac{|\sin n|}n$ diverges.  Can someone give me a hint or tell me if I'm at least going in the right direction.  Thank you so much


CONVERT TIME FROM 12-HOUR FORMAT TO 24-HOUR FORMAT

This is a question from hackerank i've some doubt in the code i have written : Sample Input  : 01:23:32PM Sample Output : 13:23:32 import java.util.Scanner; public class Solutions {     public static void main(String[] args) {         Scanner sc = new Scanner(System.in);         String time = sc.nextLine();         int n = time.length();         String session = time.substring(n-2);         if(session == "AM") {             if(time.substring(0,1) == "12") {                 String x = time.replace("12","00");                 String y = x.substring(0,n-2);                         System.out.println(y);             } else {                 System.out.println(time.substring(0,n-2));             }         } else if(session == "PM") {             if(time.substring(0,1) == "12") {                 System.out.println(time.substring(0,n-2));             }             else {                 String hour = time.substring(0,2);                 int newformat = Integer.parseInt(hour) + 12;                 String newTime = String.valueOf(newformat);                 System.out.println(time.replace(hour,newTime));             }         }     } }


When departing from Schengen to other outside-Schengen countries does the company (Easyjet, Ryanair) and the police checking the documents before boarding have a legal obligation not to board people without a passport? Is there a specific law about this?  Thanks:)   EDIT: I discovered airline do not have responsability towards passengers (see point 13.2 here  ). What I find crazy is that the policeman that was checking the documents for this particular flight told me twice that I could take the flight and that the national ID was fine to flight to exit Schengen area. I asked him surprised if it was true and he confirmed it. It's crazy that you can't trust a policeman. I thought he knew more than me about it.


I am running approx 40' of cable thru the unfinished attic in order to install two additional receptacles in the kitchen.  The easiest and least obtrusive way for me to do this is to attach 1x3 or 2x4 lumber to face of the rafters to serve as a raceway, then staple the cable every 4 feet or so onto the surface of this raceway.  The wood strips will be attached to the rafters approx. 4' up from where the rafter tails meet the floor. At the end of the run, the cable will drop into the kitchen wall.  Does this installation meet current NEC code, or is there something else I need to do to make this meet code?  Tks.


I have heard about a BSD project called UbuntuBSD, i just want to know that, is that a official project of ubuntu and canonical?


Installing Ubuntu/Debian packages on Arch

I am considering switching from Ubuntu Linux to Arch Linux. I have a long list of packages that I've installed using apt-get that I would like to install right after I install Arch itself.   Is there any tool to install Ubuntu packages on Arch? If not, can you confirm that I will have problems with finding many of the packages available for Ubuntu also available for Arch?


property of integral of complex valued function of real variable

i have a question about this.   if $f(t):[a,b] \Rightarrow \mathbb{C}$ is a continuous function, then is there a property in complex analysis that states,   $ | \int_a^b f(t) dt | \leq \int_a^b |f(t)| dt $ ??  I know there is one for real valued function, if yes, then is there a simple proof for it that use this property for real function to extend it to the complex case??   thank you.


I've been trying to login with my VeriSign OpenID on my mobile phone. The first two attempts were seen as suspicious, whereas the third said unknown OpenID provider. Does this not work on the mobile website, or am I just missing something?


How to split numbers into columns with negative and positive values, without empty cells?

Given positive and negative values in column A of an Excel sheet, I want column B to list the positive values from column A, and column C to show the negative values, in the order in which they appear in column A.   However, I don't want any empty cells in columns B and C.   So, I do NOT want:     A     B     C ----------------  All   >=0    <0  100   100 -300        -300 -800        -800  900   900  700   700 -200        -200  900   900   But instead, I want:     A     B     C ----------------  All   >=0    <0  100   100  -300 -300   900  -800 -800   700  -200  900   900  700 -200  900


Last upgrade crashes network manager (no internet connection, no applet)

While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.  This error is being shown by files:  **(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files   (nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid   (nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries   (nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files    Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.


How to restore Nautilus Launcher icon quicklist to default

After an update I ended up with this:    How can I add the default Files quicklist options which are not bookmarks (Documents, Downloads, Music...)  The same happened to Nautilus when I opened it, but I added the options in ~.config/user-dirs.dirs but now the Launcher icon is missing this options.


How does an antiparticle respond to a gravitational field?

A related  provided a little overview.  However, here's the question: If an anti-particle acquire a negative mass $m$ in QFT, doesn't $F=ma$ indicate that the anti-particle will accelerate in the opposite direction of the acting force? Why the Newtonian gravity law does not work for antimatter as mentioned in the Wikipedia webpage? What exactly is the nature of a negative mass?


Proving injective continuous function is homeomorphism

If $n\in\mathbb{N}$, and X is a compact metric space, show that every continuous injective function $f:X\to\mathbb{R}^n$ is a homeomorphism of X.    $(f\subseteq\mathbb{R}^n)$  So I persumed that I have to show that f is an open map from $X\to\mathbb{R}^n$: Let U be an open set in X. Then $U^c$ is closed in X, which is compact, so $U^c$ is also compact. Since $f$ is continuous $f(U^c)$ is compact in $\mathbb{R}^n$.  Then I got stuck. Does this lead to $f(U^c)$ being closed in $\mathbb{R}^n$? is it sufficient enough?


I just installed Ubuntu 16.04 LTS Server. And I want to disable hard drive when it is not used for a long time using SMART capabilities.  So, is it possible to prevent any Ubuntu writes on a hard drive in idle? And from what things should I start?


What is the purpose of a swap partition? How do I know I have just enough swap partition?  Not too much/little.   My Ubuntu PC is used for typical stuff:   Web (email, facebook, etc.) Some movies gaming is rare


I'm looking for a novel, the main character is a smart man (doctor or physicist) who just die, his spirit have been harvested by a superiors consciousness. The man ask to the superiors consciousness to let him "die" (let his spirit disappear), what is denied. The man then promise to try everything possible to disappear or kill the superiors consciousness. It respond by "That exactly what I want from you". Indeed the superiors consciousness want to die too and try to find a way to disappear by collecting smart minds in the hope one of them find the solution.  It may be .


Find the number of solutions to $x_1+x_2+x_3+x_4+x_5\leq 12$ where $1\leq x_i\leq6$ for $i=1,2,...,5$. (Die Application)

When a die is rolled, one of the first six positive integers is obtained. Suppose that the die is rolled five times and the sum of the five integers thus obtained is added. The five throws constitute a trial. Find the number of possible trials such that the sum is at most $12$. This can be written as $x_1+x_2+x_3+x_4+x_5\leq 12$ where $1\leq x_i\leq6$ for $i=1,2,...,5$. However, this restriction is making this problem difficult for me. I know that I can figure out the solution by considering the generating function $G(x)=(x+x^2+x^3+x^4+x^5+x^6)^5$ and take the sum of all the coefficients that are less than or equal to $12$, but I want to know how to do this with the stars and bars technique. I know that I can rewrite the linear inequality as $x_1'+x_2'+x_3'+x_4'+x_5'\leq 7$ so we can count the number of positive integral solutions, but then we have still over counted and we need to use the restriction $x_i\leq 6$. I do not know how to do this. Any solutions or hints are greatly appreciated.


How were the first microprocessors programmed?

This has just dawned on me that if you're writing an operating system then what are you writing it on? I ask this as I am reading a microprocessor fundamentals book from 1980 and this question popped in to my head:   How was the first microprocessor chip programmed?  The answer may be obvious but its bugging me.


Late 2013 Macbook Retina Windows 7 x64 Bootcamp "No device drivers found"

I have been trying for days to get Windows 7, 64 bit installed on my late 2013 Macbook Retina using bootcamp and always run into the same problem - when the Windows installation starts it gives an error message saying "No device drivers were found for my CD/DVD device..." and prompts be to try to browse to a location to find the drivers.   When I try to browse for the drivers I see two drives:   BOOTCAMP (C:) BOOT (X:)  Program Files sources Users Windows    (C:) is my bootcamp partition and I am assuming that (X:) is my install drive, but the file structure looks nothing like what it looks like from Mac OS X.  I never get the prompt asking me which partition to install Windows on.  I am using a USB drive and a Windows 7 64 bit ISO with Bootcamp Assistant. Everything goes smoothly in BCA. I have tried several different ISOs including one recommendation to use a specific ISO that is supposed to be a "full" version which includes additional drivers, but still with no luck.


Need a regex pattern to resolve the email validation of Inputs in JavaScript for Angular

Need to solve the email validation by using a Regex pattern, The Regex pattern should solve all the possibilities that are mentioned in the below link.    Already build 50% of pattern but it is not working for all test cases.     ^[a-zA-Z0-9_]+[a-zA-Z0-9+-]+[.]?[a-zA-Z0-9]+@[a-zA-Z0-9]+[.]{1}[^(web)^(.)][a-zA-Z]+[.]?[a-z]?[a-z]?[a-zA-Z0-9]$   My pattern validation is not passing the tester's test cases.


how to pass variable inside replace java-script function

I'm using the below code to trim the string based on the condition like 15 characters per line, in this below code, 15 was hard-coded.But I need to make it dynamic like defining variable and pass into replace function.  var str = "Here's to your next step.Keep Walking.Keep Watching" result = str.replace(/(.{1,15})(?:\n|$| )/g, "$1|\n"); console.log(result);   How I need  var trim_val =15; var str = "Here's to your next step.Keep Walking.Keep Watching" result = str.replace(/(.{1,trim_val})(?:\n|$| )/g, "$1|\n"); //here i have to pass that variable console.log(result);   Thanks in Advance


Exception in thread "main" java.lang.NullPointerException in recursive linking

I'm a new one to use java. My problem may seem naive but I really don't know what to do. Here's the code:  class Employee{     String name;      Employee supervisor; }      public class EmployeeTest{         public static void main(String[] args){             Employee emp = new Employee();             emp.name = "Xhaka";             emp.supervisor.name = "Origi";         if(emp.supervisor == null){             System.out.println( emp.name + " is the boss and has no supervisor!" );         }         else{             System.out.println("The supervisor of " + emp.name + " is " + emp.supervisor.name);         }     }  }   When I tried to compile it, it shows the problem with this:Exception in thread "main" java.lang.NullPointerException.  How can I solve this question?


Why don't sandwich toasters have an on/off switch?

The absolute majority of electrical appliances have an On/Off switch. However, the absolute majority of sandwich toasters do not - you just plug them into the socket and unplug them when you're done. At least, that's the case for all household sandwich toasters I've ever seen. I'm referring to this device, not the vertical toaster (where the lever doubles as a switch):    It looks like some models do have a switch, but apparently these are just the larger/industrial types, not the common variety.  Why is that?


How can root user create file/directory unwritable for itself?

Normal users can chmod files to make them unaccessible like  evgeniy@ubuntu:~$ touch test evgeniy@ubuntu:~$ chmod 444 test evgeniy@ubuntu:~$ echo 'test' > test bash: test: Permission denied   Can something like this be simulated for the root user?


Is mana generated by a sacrifice ability permanent?

I have a couple of  cards.  They have      {T}, Sacrifice Generator Servant: Add {2} to your mana pool. If that   mana is spent on a creature spell, it gains haste until end of turn.   (That creature can attack and {T} as soon as it comes under your   control.)   Must this mana be used immediately or can it be used in a future round?  And if it's used, does it disappear forever after being used?  Thanks!


The animate of search is slow (I was using Unity Tweak Tools and CCSM to turn some animation off, but search animate on dash is slow still), anyone knows how to turn it off?


How to prove the positive definite property of the semidefinite matrix with regularization?

If I have a positive semidefinite matrix $A_{n\times n}$, I want to transform it to positive definite matrix. I plug the following operation to the original matrix: $$B=A+\lambda I_{n}$$ where $\lambda > 0$. I want to know whether B is positive definite matrix. Could anyone proof it?


App store require Documents for authorized to distribute the content

i publish my application on app store but it's not accepted in several time and the reviewer request for the document for authorized to distribute the content but i don't know how to document ?  the app store reviewer Answer :     Thank you for your message. Please respond with documentation attached, using the upload feature, evidencing that Jenyar has been authorized to distribute the content owned by the artists. Once Legal has reviewed your documentation and confirms its validity, we will proceed with your application review.   please if anybody know about this guide me Thanks


I have calulated an OLS with and without a constant term. However, besides that the values are different I haven`t really found anything valueable?  Therefore my question is:  Whats the biggest difference in calculating a simple regression model with/without a constant term?  I really appreciate your reply!


How do I scan a thousand double sided pages into a PDF?

My scanner (Brother MFC-J825dw) will only scan one side at a time in the sheet feeder. I have a document that is double sided. How can I make a PDF out of it so the pages are in order, automatically? If I scan both sides, I end up with 2 PDFs, one with even pages, and one with odd pages (that might be backwards). I have a PDF editor (PDF Viewer Plus) that can insert/delete/move pages, but that gets ridiculous for so many pages.


Prove that $\tan \left(\frac{3\pi}{11}\right)+4\sin \left(\frac{2\pi}{11}\right)=\sqrt {11}$

Prove that $$\tan \left(\frac{3\pi}{11}\right)+4\sin \left(\frac{2\pi}{11}\right)=\sqrt {11}$$  Hints please !


Remove B tag with inline css Using regex

I have a content like this.  Citation1: First Citation   I want to remove all  tag using regex I am using below but its not working with multiple b tag.  function removeBoldString(str) {     const re = new RegExp('()|()', 'g');     return str.replace(re, ''); }


C# Create lambda over given method that injects first paramater

In C# I have following methods defined in given class (non static): int MyMethod(ScriptEngine script, int a, int b) {     return a + b; }  void MyMethod2(ScriptEngine script, string c) {     // do something with c }  I want to create wrapping lambda / Action / Delegate / MethodInfo (all are accepted by script engine) that automatically passes ScriptEngine and this from given, predefined variables. So far I've experimenting with: // With overloads up to 16 template parameters Action<T1> Wrap<T1>(Action<ScriptEngine, T1> func, ScriptEngine script) {       return (Action<T1>) ((t1) => func(script, t1)); }  But when called on MyMethod2 I've got The type arguments for method … cannot be inferred from the usage. Try specifying the type arguments explicitly. If I specify the template arguments explicity, it works, but I want to avoid such specification. Is there any other way (not neccesery following my solution) I can create such wrapper automatically (or semi-automatically)? It is worth mentioning that there is a dedicated abstract method void RegisterAll(ScriptEngine script) that can register required members of given subclass. Here is an example of what I am trying to achieve: class ScriptEngine { // Stub to have complete example, actual implementation is defined elsewhere     void RegisterApi(string name, MethodInfo methodInfo) { }     void RegisterApi(string name, Delegate delegateSelf) { } }  class Api {     int MyMethod(ScriptEngine script, int a, int b) {         return a + b;     }      void MyMethod2(ScriptEngine script, string c) {         // do something with c     }      void RegisterAll(ScriptEngine script) {          // Is there any way to shorten this up (not providing MyMethod twice, not providing template arguments?)         script.RegisterApi(nameof(MyMethod), (Delegate)Wrap<string>(MyMethod, script));     }  }  The problem is how to improve this RegisterApi method so it:  Takes the method only once Does not require specifying arguments via template method


Mathematical background for Quantum Mechanics

What are some good sources to learn the mathematical background of Quantum Mechanics?  I am talking functional analysis, operator theory etc etc...


Can employer track IP usage on home computers through VPN?

My work PC computer(in my home office) is connected to my home router via ethernet cable and I'm connected to my company server through VPN (NetExtender). If I'm logged onto the remote terminal server on my work PC and I have my personal macbook connected wirelessly through the same router, can they track my internet usage on my personal macbook because they are using the same router?


How to use Subsurface Scattering in Principled BSDF

The Subsurface Scattering in Principled BSDF is a bit confusing:  Where can I find some recommended presets (like in other software)? What is the main difference between SSS Color and Radius? (Technical papers don't help very much, I'm not an engineer)


I am getting an attachment via a Salesforce email service and in the Email service apex class logic, I query the user object by the email from address and set the ContentVersion owner as the user coming from the Query.  I am getting this error while performing this operation.  INVALID_STATUS, Documents in a user's private library must always be owned by that user.: [OwnerId]  Here is my code :  global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {          Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();          //Get users for the incoming email address and also community user         List<User> lstUsersFromCommunity = [SELECT Id                                              FROM User                                              WHERE Profile.UserLicense.Name = 'Partner Community';                                             AND Email =: email.fromAddress];          //Process only if the incoming email address is belongs to a valid community user         if(lstUsersFromCommunity.size() > 0){             //Get the user from the results list             User user = lstUsersFromCommunity.get(0);             try{                 //Create a list of ContentVersion to store new ContentVersion records                 List<ContentVersion> lstVersion = new List<ContentVersion>();                  //Iterate over the incoming email attachments                 for (Messaging.Inboundemail.BinaryAttachment binaryAttachment : email.binaryAttachments) {                     //New ContentVersion record                     ContentVersion newContentVersion = new ContentVersion();                     newContentVersion.versionData = binaryAttachment.body;                     newContentVersion.OwnerId = user.Id;                     newContentVersion.ContentLocation = 'S';                     newContentVersion.SharingOption = 'A';                     newContentVersion.Origin = 'H';                     newContentVersion.title = email.subject;                     newContentVersion.pathOnClient = binaryAttachment.fileName;                     lstVersion.Add(newContentVersion);                 }                 insert lstVersion;             }catch(Exception ex){                 System.debug('### EXCEPTION :  ' + ex.getLineNumber() + ' : ' + ex.getMessage());             }         }else{             //No user in for the from email address         }          return result;     }


Change pivot point without moving the current position?

So I animated some objects rotating, and the pivot point is on top. but now I want to move the pivot point to the side a bit while still being on top, but the object positions are already animated. help please?


400 people are in a room. What is the probability of two random people having the same birthday?

There are 400 people in a room. I pick two people at random. What is the probability that they have the same birthday?   I know that there must be two people in the room who share the same birthday through pigeonhole principle.   But if I pick two people at random I am not sure how to calculate the probability.


Why is the amount of light a lens lets in called the 'lens speed'?

It seems very counter intuitive that the amount of light let in by a lens is referred to as the lens speed. This term confused me for a while because I couldn't logically see how a speed would be associated with a particular lens, being either fast or slow.   Is there any reason why this is referred to as the speed of the lens?


Do upvotes on comments help me in any way apart from badges

I can understand their unique contribution, but from a reputation point of view, does it help me in any other way (other than badges)? Does Stack Exchange take upvotes on comments into account somehow?


How to run/kill/etc process when laptop on battery?

I need to run a script when my laptop starts working on battery. Is there a log event or something like this?


I was wondering about the following modelling problem, but I can't think of an appropriate way to solve it.   Imagine two variables without a linear relationship, but a one increases, the variability of the other increases.   In this case, while there is no relationship between the variables, we might assume we don't know anything, but we do know that a lower score in x means the range of values for y is much smaller.  So it not true that we know nothing. So it seems like we could build a model with some explanation for how variation changes, which is a better model that no relationship  Below is some R code showing what I mean. The application I have in mind for this is slightly more complicated, but I am unsure if I can even pass this hurdle.   What kinds of methods are available to solve this kind of problem?   set.seed(123) df = data.frame(   y = rnorm(1000, mean = 0, sd = 1:1000),   x = 1:1000  ) plot(df$x, df$y)


I have trouble with \url and \footnote  \documentclass[margin=5mm]{standalone} \usepackage{hyperref}  \begin{document}  my text \footnote{\url{https://webbook.nist.gov/cgi/cbook.cgi?ID=C69727&Type=HCOMBS#HCOMBS}}  \end{document}   this is the error message:  ! Illegal parameter number in definition of \Hy@tempa.H ...gi/cbook.cgi?ID=C69727&Type=HCOMBS#HCOMBS}}  Without the &Type=HCOMBS#HCOMBS link portion the code works fine, so I guess the problem lies in & character. Any suggestion?  Thank you in advance


Why doesn't the setInterval stop when the keyword 'return' is called?

I have a setInterval which is supposed to alert the amount of incremented a every 1 second only under a condition which is if a <= 5, else it should make return a = 1, which means it should turn a back to 1 and stop the setInterval from executing as initialized, but surprisingly it starts to execute the setInterval over and over again, each round with a = 1 incrementng. I want the setInterval to be executed only if a <= 5 and as soon as this condition isn't true, then stop the setInterval and turn a back to 1, I don't want it to start the functoin over and over again, though it is turning a back to 1. How can I make this happen?   function doSomething() {    let a = 1;    foo = setInterval(() => {      if (a <= 5) {       a++;       console.log(a)     } else {       return a = 1;     }    }, 1000)    return 0;  } setTimeout(doSomething, 5000);


Javascript this when invoking a constructor?

I am trying to use this when invoking a constructor function. I am passing an object literal into the constructor as an argument.  var testView = new View({   element: '.testEl',   model: player,   initialize: function() {     var self = this;     setTimeout(function() {       self.model.set({         name: 'Billy'       });     }, 5000);   } }); // view instance   But when I log this inside the object it just gives me View {} but none of the methods inside.  I want to access the model, obviously I am lacking some knowledge here and I am asking why does this not work as expected in the example above?  The view looks like  // View var View = function(object) {   object.initialize.call(this);   this.element = document.querySelector(object.element);   this.element.innerHTML = object.model.get('name');    setTimeout(function() {     this.element.innerHTML = object.model.get('name');   }, 6000); };


Is Palpatine's execution of Order 66 legally justified?

Assume the Republic Senate voted for some kind of inquiry to determine if the Supreme Chancellor had acted legally and if there are grounds for impeachment (for example, bear with me here). Even if Palpatine speaks the truth to any question and made no attempt to hide anything, even his Sith identity, would his executive decision to invoke Order 66 be considered legal nonetheless?  First, does the Jedi Order have the legal power invested in them for Mace Windu to do what he did, or is it considered extralegal? Based on the legal definition of Order 66, does Mace's actions fulfil the conditions necessary to legally invoke it? And does Palpatine have the executive power to unilaterally invoke Order 66 without consulting or getting approval from any entity?  Second, would it matter to the Senate if Palpatine had come clean about his Sith identity as the reason for the attack? Does the Senate consider Sith to be enemies of the Republic by default like the Jedi do? Would the Senate have considered the Jedi's actions legally justified solely on the basis that Palpatine is a Sith? For that matter, does Palpatine have enough public popularity and political support to influence the Senate to turn a blind eye anyway and vote in his favour?  To summarise: Even if Palpatine made no attempt to cover up and just spoke the truth in any questioning, was open about his Sith identity, and did not use the Force to manipulate the Senate's minds, would the laws of the Republic, the Chancellor's legally granted executive powers, the wheels of democracy and the dirty game of politics ultimately work in his favour anyway?


I've been researching this topic a lot recently, and I've become rather confused by all the sources that exist for how to do this because they all seem to say different things. I was hoping someone could shed some light on my situation or at least point me to a correct source.  Currently I have a MSI GS 70 with an 970M. I'm running a new install of Kubuntu 14.04 LTS (with updates) and a quick run of lspci in the terminal doesn't even show that my graphics card exists. Currently its still using the Intel integrated graphics. I've tried installing the proprietary drivers from the nvidia website by disabling xorg and running the install script, but I keep getting "The preinstall script failed". I've also heard there are linux based open source drivers, but I'm confused onto how to go about trying to install them. I don't really care which one I use, so long as my computer can utilize the nvidia card. Any help one how I can get it to do this is appreciated.   00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 01:00.0 3D controller: NVIDIA Corporation Device 13d8 (rev ff)   EDIT: For future reference, the software that will show if an nvidia gpu is working on a linux system is "Nvidia X Server Settings". It can easily be downloaded from the software center.


How to define translations for text inserted by a custom command?

How would I go about having the output of a custom command depend on the language chosen (e.g. insert "Example" in English, "Exemple" in French and "Beispiel" in German)? I'm using XeTeX with polyglossia, but it would of course be even nicer to have a solution that would work with babel as well.


Python: Forward a dictionary to another function

I need to forward a dictionary to another function (that I can't change). Both my function and the target function look like this:  def myFunc(arg, **args): def targetFunc(arg, **args):   In my code, I used to call the target function directly:  a = targetFunc(123, aaa=4, bbb=5, ccc=6)   and I have to add another layer to process the extra arguments passed as a dictionary, before forwarding to the target function:  a = myFunc(123, aaa=4, bbb=5, ccc=6)   And now my function receives 123 as arg, and a dictionary:  {'bbb": 5, 'ccc': 6, 'aaa': 4}   as args. The problem is, I can't modify the target function in any way. It may be a function from a package like subprocess.run. I've tried supplying the dictionary directly but Python says  def myFunc(arg, **args):     print(args)     targetFunc(arg, args)  def targetFunc(arg, **args):     print(args)     TypeError: targetFunc() takes 1 positional argument but 2 was given   I can write myFunc in any way. How can I forward this dictionary to the target function, so it receives the same dictionary as its args?  Note: It's possible to construct a string then eval() it, but I don't want to do it that way.


passing value from windows application to another one

How to pass value from a Windows desktop application to another Windows desktop application?  I'm stuck right now. I don't want to build two different forms in one Winform application.   I need two different Winform application that communicates with each other, one of them send value to other one and the receiver processes the data. Anyone knows how to do that?  I'd be grateful if you can help.


I am seeing some strange behavior when using \pgfuseshading in xelatex: compared to pdflatex, the gradient is shifted to the right by an unspecified amount. Example: % !TEX TS-program = xelatex  \documentclass{article}  \usepackage{geometry}  \geometry{   paperwidth=8cm,   paperheight=4.5cm,   margin=0.5cm }  \usepackage{tikz}  \pgfdeclarehorizontalshading{shading}{3cm}{%   color(0pt)=(red);   color(\paperwidth)=(blue)}  \begin{document}   \noindent A \dotfill A\\   \pgfuseshading{shading} \end{document}  Produces  using xelatex but  using pdflatex. I am running TeXLive 2020 with the latest updates (as of today). Interestingly, I do not see this behavior on another computer with an older version of TeXLive (2019). Is this a bug? Can I fix it locally in my document?


I'm trying to call OnClick() on a file input field but the window for selecting the file doesn't appear. I tried the same on Chrome and Edge and it works perfectly.    var input = document.createElement('input'); input.setAttribute('id', 'InputField'); input.setAttribute('type', 'file'); input.setAttribute('accept', 'image/*');  input.style.visibility = 'hidden'; input.onclick = function() {   console.log('File loading clicked'); }; input.click()     PS: in the 'duplicated' i didn't finded any working functions, probably because the answers are from 7 years ago.


PHP 7 came out  and I would like to give it a try.  PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as  Improved performance: PHP 7 is up to twice as fast as PHP 5.6 Significantly reduced memory usage Abstract Syntax Tree Consistent 64-bit support Improved Exception hierarchy Many fatal errors converted to Exceptions Secure random number generator Removed old and unsupported SAPIs and extensions The null coalescing operator (??) Return and Scalar Type Declarations Anonymous Classes Zero cost asserts     Is that possible to install it on current Ubuntu version? Is there any current limitations or known compatibility issues?


how to add URL link in a SharePoint list?

I am using SharePoint 2007 + Windows Server 2008 with SharePoint 2007's publishing portal template. I am using List Web Part with Data Sheet view. I want to know how to make a column as a URL link (i.e. show text in the cell, and can associate a link with the text in each row for the specific column), i.e. when user clicks the text in the specific column of a specific row, the user will be directed to the link associated the text.


C++: What is the size of an object of an empty class?

I was wondering what could be the size of an object of an empty class. It surely could not be 0 bytes since it should be possible to reference and point to it like any other object. But, how big is such an object?  I used this small program:  #include <iostream> using namespace std;  class Empty {};  int main() {     Empty e;     cerr << sizeof(e) << endl;     return 0; }   The output I got on both Visual C++ and Cygwin-g++ compilers was 1 byte! This was a little surprising to me since I was expecting it to be of the size of the machine word (32 bits or 4 bytes).  Can anyone explain why the size of 1 byte? Why not 4 bytes? Is this dependent on compiler or the machine too? Also, can someone give a more cogent reason for why an empty class object will not be of size 0 bytes?


I know this has probably been asked before, but I just installed Ubuntu last night and all the replies I read I honestly couldn't understand anything :p   I need to make some changes, and all of them seem to use sudo.  When I formatted the pc and installed Ubuntu, it asked me for a password and didn't give me a chance, to have no password. So I then went on and removed the password completely, when the pc was on and the installation was complete.  I then had to use sudo as I said for a couple things, but it asked for a password. I tried to put the old one, I tried to leave it blank, I also typed NOPASSWD, and other variations of that. Nothing worked. I have rebooted the pc also in between of that so for now I have no idea what to do.   Please help, it's really frustrating :(   Edit: I am not looking to reset or restore any password. All I want is to not have a password set at all, and to not be asked for one by sudo, when there is none.


Can someone help me understand what the last 2 lines of this code does:  import arcpy arcpy.env.workspace = "c:/esripress/python/data/exercise07" arcpy.env.overwriteOutput = True  copy = arcpy.CopyFeatures_management("airports.shp","Results/airports.shp") fc = "Results/airports.shp"  cursor = arcpy.da.UpdateCursor(fc, ["STATE"], ' "STATE" <> \'AK\'') for row in cursor:     row[0] = "AK"     cursor.updateRow(row) del row del cursor   I understand that the loop function goes through each record that does not have a value of 'AK'  and gives that record a value of "AK".  But what I don't understand is what the del row and del cursor are meant to do.


How do I lerp between values that loop (such as hue or rotation)?

I'm trying to make the joint rotate smoothly around the center of the canvas, toward the angle of mouse pointer. What I have works, but I want it to animate the shortest distance possible to get to the mouse angle. The problem occurs when the value loops around at the horizontal line (3.14 and -3.14). Mouseover that area to see how the direction switches and it takes the long way back around.  Relevant Code   // ease the current angle to the target angle joint.angle += ( joint.targetAngle - joint.angle ) * 0.1;  // get angle from joint to mouse var dx = e.clientX - joint.x,     dy = e.clientY - joint.y;   joint.targetAngle = Math.atan2( dy, dx );   How can I make it rotate the shortest distance, even "across the gap"?


Algebraic extension of perfect field in which every polynomial has a root is algebraically closed

Let $F$ be a perfect field, i.e. every irreducible polynomial over $F$ has distinct roots in the algebraic closure of $F$. Suppose that $K$ is an algebraic extension of $F$ with the property that every non-constant $p(X) \in F[X]$ has a root in $K$.   I want to show that $K$ is algebraically closed, i.e. that $K = \overline{F}$, the algebraic closure of $F$.  If $K$ were a normal extension of $F$, this would follow immediately: Let $\alpha \in \overline{F}$ and $m(X)\in F[X]$ its minimal polynomial. By our assumption, $m(X)$ has at least one zero in $K$. Since $K$ is a normal extension of $F$, it thus contains all other roots of $m(X)$ including $\alpha$.  I don't have an idea as to how to show that $K$ is a normal extension.


Updating to windows 8.1 enterprise edition

I have a windows 8 enterprise edition. I want to update it to windows 8.1. As the standard procedure says to open store and in store choose windows update but I am not finding any the windows update tile. Is there any patch to apply before I check for update?  Please tell me how to upgrade.


Repairing data sources in multiple MXDs using ArcPy?

I have about 50 mxd's with all broken layers that I have been going through and manually resetting.  The data was moved from another computer and the folder structure was changed so it isn't just a simple process of changing (example):  "F:\Data\Rivers.shp" to "C:\Data\Rivers.shp"     it is more like :  "F:\Data\Rivers.shp" to C:\Data\Park\Water\Rivers.shp    and so on for all kinds of data (boundaries, veg cover, roads, etc.) each in their own sub-folder.     I want to make a script that I can run repeatedly whenever I open one of these mxd's that would at least repair some of the more common layers that are found in most of my mxd's, and then I can manually repair the rest.  That way I can at least save myself some time.    I have been using something along the lines of :  import arcpy mxd = arcpy.mapping.MapDocument("CURRENT")  for lyr in arcpy.mapping.ListLayers(mxd):     if lyr == "Rivers": #Should this be the layner name in TOC or FC name?         lyr.replaceDataSource(r"C:\Data\Park\Water", "SHAPEFILE_WORKSPACE", "Rivers")   The idea then would be to somehow add multiple "replace" scripts in the above for other common layers that are in my mxd's.    However the above script doesn't even fix the Rivers layer.    How can I get it to work, and also add in other layers to be repaired that have different file paths?


I just got a new hat! :D screaming with joy Looking at so many users looking all exquisite with their stunningly 'fitted' hats, I'm wondering if there's an option to resize or rotate a hat?  PS: Happy Winter Bash everyone! :)


Factoring a semiprime with part of one of its factors

This is part of a question I asked on  which might be better suited here.  I'm looking to implement a script in an ad-hoc scripting language with no crypto libraries, which can tell whether or not a password is valid without revealing the password.  I also need the password to be as short as possible without being crackable.  One possibility is to store a large semiprime and have the password be a factor.  But semiprimes need to have factors which are hundreds of bits long to be difficult to crack. I'd rather the password be around 64 bits.  I'm considering storing a 1024-bit semiprime along with 448 bits of one of its 512-bit factors, and have the other 64 bits be the password, but I have no idea if this is crackable.  So my question is:  If a 1024-bit semiprime is stored along with the first 448 bits of one of its 512-bit factors, can the remaining 64 bits of that factor be feasibly found?


How do I install Skype in Ubuntu 17.04 64 bit?  I am just running it from an original RPM folder, with a short cut to the  launcher.  I cannot get the .DEB or .RPM packages to install.  What line do I need to use in the repository section for it to appear in the software manager?


Why is Blender rendering only at base cpu clock speed?

I have a Lenovo Ideapad slim 3i, with Intel Core i5-10210U, 8GB DDR4 RAM, 1TB HDD, Intel UHD Graphics and Nvidia MX130. I did a blender project in this Laptop, and I set the CUDA preferences in blender to cpu because I felt the Nvidia Card was really slow at rendering. Hoping to get a faster render at turbo frequency of 4.2GHz, I started rendering. But when I went to task manager, I saw that only the base speed of 1.6Ghz was being used.... Any idea?


Transforming image from Web Mercator Projection to Simple Cylindrical (Plate Carree) projection?

I have an image that is projected using the Web Mercator projection.   Does anybody know how to transform (in ArcMap) this image from the Web Mercator projection to the Simple Cylindrical (Plate Carree) projection?


Does one's ability to use the Force depend on distance?

In all the action scenes I'm familiar with, the Force is used only on people or objects nearby within visual sight of the Force user.  However there are situations where force users can sense something outside their own physical perception limitations, such as when Vader knows that Luke is on a particular space craft, or when a million voices cried out and were silenced.  Given that Vader force chokes someone who failed him, is it possible for him to force choke someone who failed him, but isn't in the same room, or on the same planet?  Does Luke's ability to sense when his friends are in danger also suggest that he is able to help them at a distance, or communicate with leia at a distance?


I've found out that there is no "Sign Out" link on the Site. Looked at bottom and top and all over the page. Nor it is present in the user page.  Where is it? It would be useful if present besides the "username" on the top of the page.


The MathJax code in Mathematics Stack Exchange doesn't render after I updated to the new version (It used to):     App Version: 1.6.2.5 Device: iPhone 6s OS Version: Version 9.0 (Build 13A342)


Today, I tried to install the latest version of TexLive (see ) on Windows 10. However, the installation always fails. I tried twice so far and the customization means mostly, that I disable all kinds of languages which I do not need (besides English) and the text editor.  Here is the error log. The error seems always to be connected to TLUtils and TLPDB. I found that several other users had the same problem, but there does not seem to be a real solution. Some post that it worked after several attempts, others post that it only works with an ISO image of Tex Live, etc.  Loading http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb   Installing TeX Live 2017 from: http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/systems/texlive/tlnet (not verified)   Platform: win32 => 'Windows'   Distribution: net  (downloading)   Using URL: http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/systems/texlive/tlnet   Directory for temporary files: C:\Users\XYZ\AppData\Local\Temp\0Dj9402Jdj   Installer revision: 44918   Database revision: 44936   Settings:     [...]   total_size: "3819"   Installing to: C:/texlive/2017   Not an admin install; not making read-only   Not an admin install; not making read-only   Not an admin install; not making read-only   Not an admin install; not making read-only   Installing [0001/2913, time/total: ??:??/??:??]: 12many [376k]   Installing [0002/2913, time/total: 00:04/05:53:16]: 2up [66k]   Installing [0003/2913, time/total: 00:05/06:16:03]: Asana-Math [482k]   Installing [0004/2913, time/total: 00:06/03:35:31]: ESIEEcv [137k]   Installing [0005/2913, time/total: 00:07/03:39:03]: FAQ-en [4971k]    [...]    Installing [0896/2913, time/total: 23:43/01:20:15]: epspdfconversion [412k]   Installing [0897/2913, time/total: 23:53/01:20:46]: epstopdf [23k]   Installing [0898/2913, time/total: 23:54/01:20:49]: epstopdf.win32 [1k]   Installing [0899/2913, time/total: 23:54/01:20:49]: eqell [180k]   TLUtils::check_file: removing C:\Users\XYZ\AppData\Local\Temp\0Dj9402Jdj\N3oJ6a9ziv\eqell.doc.tar.xz, sizes differ:     TLUtils::check_file:   TL=127020, arg=183208   TLPDB::_install_package: downloading did not succeed   Installation failed.   Rerunning the installer will try to restart the installation.   Or you can restart by running the installer with:     install-tl-windows.bat --profile installation.profile [EXTRA-ARGS]   or   install-tl-advanced.bat --profile installation.profile [EXTRA-ARGS]   Any one knows what the issue could be? Thanks for any hints.


Determining if a file is a hard link or symbolic link?

I'm creating a shell script that would take a filename/path to a file and determine if the file is a symbolic link or a hard link.   The only thing is, I don't know how to see if they are a hard link. I created 2 files, one a hard link and one a symbolic link, to use as a test file. But how would I determine if a file is a hard link or symbolic within a shell script?   Also, how would I find the destination partition of a symbolic link? So let's say I have a file that links to a different partition, how would I find the path to that original file?


What is the difference between '/' and '//' when used for division?

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


How to show full date and time in Nautilus/Files 3.6+ list view?

The list view of Nautilus 3.6 shows the dates files were modified in a variety of ways: the hour and minute if modified on the current day, and the month and day if modified during the current year, and the year tacked on if modified during a previous year. I would like to see the entire date and time consistently on all the files (e.g.: Sat 20 Apr 2012 01:28:34 PM EDT).  I had this set up before, but I can't figure out how to do so with version 3.6. I did find this question, but the answers no longer apply to Nautilus 3.6:   How can I do so in Nautilus 3.6+?


Command `open` not working on Ubuntu Terminal

I am trying to follow . It has a line of commands as: open ~/.bash_profile. The tutorial is on Mac computers, but on the comments section it says that I can also do it on Ubuntu through VirtualBox But this command is not recognized on Ubuntu:  Is there any alternative on Ubuntu that I can use instead of open command?


Why do duplicates still earn reputation?

I was surprised to find that .   What is the motivation for this?   How should upvotes (and downvotes) on duplicates work, and influence rep?


Out of Bag Error makes CV unnecessary in Random Forests?

I am fairly new to random forests. In the past, I have always compared the accuracy of fit vs test against fit vs train to detect any overfitting. But I just read  that:     "In random forests, there is no need for cross-validation or a   separate test set to get an unbiased estimate of the test set error.   It is estimated internally , during the run..."   The small paragraph above can be found under the The out-of-bag (oob) error estimate Section.  This Out of Bag Error concept is completely new to me and what's a little confusing is how the OOB error in my model is 35% (or 65% accuracy), but yet, if I apply cross validation to my data (just a simple holdout method) and compare both fit vs test against fit vs train I get a 65% accuracy and a 96% accuracy respectively. In my experience, this is considered overfitting but the OOB holds a 35% error just like my fit vs test error. Am I overfitting? Should I even be using cross validation to check for overfitting in random forests?   In short, I am not sure whether I should trust the OOB to get an unbiased error of the test set error when my fit vs train indicates that I am overfitting!


I was very pleased to find the addition of a yellow duck to the stack overflow pages, that promised to help.  Unfortunately I told it that I would hate it not considering the impact my behaviour would have on the life of the duck: I made it cry.   Now I would like to bring it back to say sorry. But how do I do that?


Moving contacts between groups in iOS devices?

Can I move a contact from the All group to another group in an iOS device? I don't see a way to do this on my iPhone XR with iOS 14.4.1


Is there any danger of gravity being used up?

Posit a way to harness gravity for energy and widespread use of this new technology world-wide.  Could it be damaging to Earth, over a few hundred years, slowing or speeding up rotation or the orbit of our planet?


Algebraic field extension and intermediate integral domain

Let $F/K$ be an algebraic field extension. Suppose $D$ is an integral domain with $K\subset D\subset F$. Show that $D$ is a field.   \\\\\My idea was wrong, so I have to delete them. \\\\\\  Thanks!


I am making some slides for a presentation. I am copying parts of a texfile which I made earlier. The \emph{} command is not working in beamer (even though it is working in my original texfile).  For example, this code which is working in the original file is not working in beamer:  \begin{theorem} {  |\emph{Gal}(L|K)|=[F:K] } \end{theorem}   But this is working:  \begin{theorem} {  |Gal(L|K)|=[F:K] } \end{theorem}   But the 'Gal' is italic  (I want it to be straight).


What are typical situations where you should use auto-exposure lock (AE-L)?

What are the typical situations where you should use AE for locking exposure?


How to add a custom program to "Open With" list of programs in Xubuntu 13.04? How to associate a file with a program to open it with?

have downloaded Sublime Text 2. I've unpacked it in /opt/Sublime Text 2/ directory.   Now I want to open all .conf files with ST2. But I can't set this easily. Xubuntu doesn't offer ST2 in the list of Open With programs.  I do:  right-click on the fonts.conf >>  Properties... >> Open With >> Other Application.  And an Open With window appears. And it doesn't have ST2 application.  How either to add ST2 to the Open With list or how to associate a file with ST2?  UPD:  Similar questions and are not answered:       why are simple things getting hard in Ubuntu (Xubuntu)?


Upgraded to mint 17, keyboard stuck in non-english (wrong layout) language - can't login

I had Linux Mint 16 with English and Russian keyboard support. Upgraded to Mint 17, now I cannot get past the ecryptfs passphrase.  If I enter Grub loader I can pick "Ubuntu with Linux 3.11.0.12-generic" and I am able to enter passphrase (latin characters) but when I get to Login Screen it only types in Russian. I changed the language to US English, British English, but it has no effect. Characters are still in Russian. (see )  I have searched LinuxMint forums up and down...fruitless.  Recovery console also drops into Russian and I cannot login either. so basically I have no access to system whatsover.  Also: I have tried "e" grub, and set locale=en_US.UTF-8 .........NO SUCCESS I have tried LANG=en_US.UTF-8 ............ same crap I have even tried passing en_US.ASCII to kernel.... still nothing.  Is there a way to pass charset UTF-8 in Grub config to kernel?


Reflection - Getting the generic arguments from a System.Type instance

If I have the following code: MyType<int> anInstance = new MyType<int>(); Type type = anInstance.GetType();  How can I find out which type argument(s) "anInstance" was instantiated with, by looking at the type variable? Is it possible?


How to generate PDF from HTML with CSS bootstrap classes

I have a table with classes bootstrap3 css and I want to generate a PDF from this table...  What is the best way to do this?  I need that keep my style css My table:

                 Visits to the SickBay

                 Botafogo Pre-Nursery and Nursery

    Thanks for help & pointers in advance.


I'm studying abstract algebra alone as my doctor needs a doctor haha.  Ok, I'm studying about cyclic groups now. I read that:  if 2 elements $x$ and $y$ commute in a group $G$, then the order of $xy$ is a divisor of $l.c.m(o(x),o(y))$,   then I read that it's exactly equal to $l.c.m(o(x),o(y))$, so got confused.  Can anybody explain this to me? Also, can anybody advise me to read some detailed lectures about cyclic groups, as I feel like if I need much more to be strong at this lesson.


The following integral  \begin{align*} \int_{0}^{1} \frac{\arctan\sqrt{x^{2} + 2}}{\sqrt{x^{2} + 2}} \, \frac{dx}{x^{2}+1} = \frac{5\pi^{2}}{96} \tag{1} \end{align*}  is called the  and became famous since its first discovery in 2002. Fascinated by this unbelievable closed form, I have been trying to generalize this result for many years, though not successful so far.  But suddenly it came to me that some degree of generalization may be possible. My conjecture is as follows: Define the (generalized) Ahmed integral of parameter $p$, $q$ and $r$ by  \begin{align*} A(p, q, r) := \int_{0}^{1} \frac{\arctan q \sqrt{p^{2}x^{2} + 1}}{q \sqrt{p^{2}x^{2} + 1} } \, \frac{pqr \, dx}{(r^{2} + 1)p^{2} x^{2} + 1}. \end{align*}  Now suppose that $p q r = 1$, and define its complementary parameters as  \begin{align*} \tilde{p} = r \sqrt{\smash{q}^{2} + 1}, \quad \tilde{q} = p \sqrt{\smash{r}^{2} + 1}, \quad \text{and} \quad \tilde{r} = q \sqrt{\smash{p}^{2} + 1}, \tag{2} \end{align*}  Then my guess is that  \begin{align*} A(p, q, r) = \frac{\pi^{2}}{8} + \frac{1}{2} \left\{ \arctan^{2} (1 / \tilde{p} ) - \arctan^{2} ( \tilde{q} ) - \arctan^{2} ( \tilde{r} ) \right\}. \end{align*}  Plugging the values $(p, q, r) = (1/\sqrt{2}, \sqrt{2}, 1)$, the corresponding complementary parameters become $(\tilde{p}, \tilde{q}, \tilde{r}) = (\sqrt{3}, 1, \sqrt{3})$. Then for these choices, the original Ahmed's integral $\text{(1)}$ is retrieved:  \begin{align*} \int_{0}^{1} \frac{\arctan \sqrt{x^{2} + 2} }{\sqrt{x^{2} + 2} } \, \frac{dx}{x^{2} + 1}  &= \frac{\pi^{2}}{8} + \frac{1}{2} \left\{ \arctan^{2} \frac{1}{\sqrt{3}} - \arctan^{2} 1 - \arctan^{2} \sqrt{3} \right\} \\ &= \frac{5\pi^{2}}{96}. \end{align*}  In fact, I have a more generalized conjecture involving dilogarithms depending on complementary parameters. But since this specialized version is sufficiently daunting, I won't deal with it here.  Unfortunately, proving this relation is not successful so far. I just heuristically calculated and made some ansatz to reach this form. Can you help me improve the situation by proving this or providing references to some known results?    EDIT. I finally succeeded in proving a general formula: let $k = pqr$ and complementary parameters as in $\text{(2)}$. Then whenever $k \leq 1$, we have  \begin{align*} A(p, q, r)  &= 2\chi_{2}(k) - k \arctan (\tilde{p}) \arctan \left( \frac{k}{\tilde{p}} \right) \\ &\quad + \frac{k}{2} \int_{0}^{1} \frac{1}{1-k^{2}x^{2}} \log\left( \frac{1+\tilde{p}^{2}x^{2}}{1+\tilde{p}^{2}} \times \frac{1+\tilde{q}^{2}x^{2}}{1+\tilde{q}^{2}} \times \frac{1+\tilde{r}^{2}x^{2}}{1+\tilde{r}^{2}} \right) \, dx. \end{align*}  Then the proposed conjecture follows as a corollary. I'm planning to gather materials related to the Ahmed's integrals and put into a combined one. You can find an .


Can I ask a publisher for a paper that I need for reviewing

I was asked to review a technical paper for a journal at a large commercial publisher. The paper extends on another publication that is cited several times throughout the document. The cited paper was published at the same publisher but in a different journal. I work for an R&D department in a private company. We do not have a subscription with the publisher and no budget to buy articles (at least not in cases like this). I.e., I cannot access the cited paper. Would it be acceptable to ask the editor of the journal I review for to provide me with the cited paper?  Additional Information: The review process is double blind, so I do not know if the cited paper and the paper I'm reviewing are from the same authors. Given the specific topic, it seems likely to me. This is why I did not ask the authors for a copy. I was also unable to find a free version of the paper online.  Outcome: I asked the editor for the paper and received a copy within hours. Along with ads for a subscription of that journal.


My website has 3 section, header(navbar)+middle(content)+footer(sitemap etc).  My header is a fixed height, my footer contain sitemap which may update time to time, therefore the footer height may increase.   I want to apply 100vh on my middle. How do I use something like .middle{height: calc(100vh - footer.height);}?


Function to check if author has posted within the last x days

Is is possible to check whether an author has posted in the last X days?  I am currently using this function to determine whether he has posted at all.  $args = array(     'post_type'  => 'your_custom_post_type',     'author'     => get_current_user_id(), );  $wp_posts = get_posts($args);  if (count($wp_posts)) {     echo "Yes, the current user has 'your_custom_post_type' posts published!"; } else {     echo "No, the current user does not have 'your_custom_post_type' posts published."; }


how to take backup of a child table with foreign key dependency in mysql using bash

Parent table : p_id, t_id, name , salary Child table : c_id, t_id , age key : Child.t_id=Parent.t_id  While taking backup i would like to take pull only the matching records from Child table . How can i do it via bash script ?  Thanks in advance .


TikZ: What EXACTLY does the the |- notation for arrows do?

I am currently trying to work out how the perpendicular arrows  work, and I fail.  Taking:  \draw [arrow] (node1) -- node[sloped, above] {Caption} (node1 |- node2.north west);   I suspected that the notation meant: Draw an arrow from node 1, to the north-west corner of  node 2. Make the arrow perpendicular to node 1.  Further attempts to draw arrows told me: No, that's not it. I have sadly failed to figure out what exactly the notation is supposed to be doing though! Is there any "explanation for dummies" that will lead me to understand what exactly    node1 |-   Is supposed to do?  Thanks!


Writing "simple" authentication access for WebApp login using spring

Basically, I have created a webapp - which should restrict access to users who are not logged in to the system.  The system is utilising a "user" object to persist session state between the client and the server, this effectively serves as the cookie.  The urls /index, /login, /register  can be accessed by all users visiting the webapp, regardless if they are registered, or logged in.  However, anything outside of this url boundary should redirect the user to the registration page.  In order to achieve this, I've been using springs HandlerInterceptorAdapter - and implementing some basic checking in the preHandle(). However - everything I've come up with is getting caught up in a redirect loop.  Any and all suggestions on how to resolve this are most welcome and appreciated. Any advice, articles or examples on where I can expand my knowledge of this use case are most appreciated. Comments on if and why my approach is flawed, and what best practices are I am keen to hear.  Keep in mind id rather not go down the spring security route just yet - trying to keep this as simple as possible.  @Override public boolean preHandle(HttpServletRequest request,                          HttpServletResponse response,                          Object handler) throws Exception {      HttpSession session = request.getSession();     User user;      try {         user = (User) request.getAttribute("user");     } catch (Exception e) {         e.toString();         return true;     }       if (user == null && request.getPathInfo() != "/login"       || user == null && request.getPathInfo() != "/register"      || user == null && request.getPathInfo() == "/index") {          response.sendRedirect("register");         return true;     } else {         return true;     } }