Is there any way to remove a program and all of its executable files and docs that have installed from a .tar.gz file (for example on an Arch Linux)  by :  ./configure make make install   Answer : I thought always there is a short way to uninstall all the programs that were installed from a source, no matter who wrote them (and how), but apparently, sometimes there is no way (except manually )and this may be the reason to build a package manager.

I used source code to build one package such as below:  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static make make install   But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:  # pkg-config --list-all | grep Myplugin myplugin-.... $ ls /usr/lib/myplugin/libXYZ.so exist....   How do you remove this now?


As far as I know, every Android phone has a stock recovery. Where is this recovery usually stored? On a separate partition in internal storage(usually an eMMC memory chip)?

On Android's root (/), what is the purpose of each folder? I want to learn the folder hierarchy structure. I would like to know the differences between Android 2.3 and 4.x, if they have different folders in "/".


The camera on my Android tablet doesn't let me take any pictures. It says Insert an SD card before using the camera.  I didnt need an SD card before. I put an SD card in and it still says the same thing!  Is there a solution to my problem that would help? I already tried the solution proposed in , but it didn't solve my problem.

My Sophix tablet was working without the SD card, but now the camera will not work. I get the following error message:     Insert a SD card before using.


I want to do an MCMC algorithm and need to sample a proposed value from a proposed distribution. In the Metropolis algorithm, people usually use a normal distribution as proposal. But if the prior distribution is a beta distribution. a realised value of a normal random variable may fall outside [0,1]. In such circumstances, how should we sample a value?

Suppose I have parameters $\theta_0$ and $\theta_1$ with prior  $$ p(\theta_0,\theta_1)=p(\theta_0|\theta_0<\theta_1)p(\theta_1),$$  that is, $\theta_0$ is less than $\theta_1$. The distributions are assumed to be continuous on their support. Apart from the likelihood, there are no other terms involving $\theta_0$ and $\theta_1$. I'm trying to consider potential sampling procedures for these parameters.   My current MCMC procedure is:   Propose a value for $\theta_1$ using a random walk update. Use the independence sampler to sample a value of $\theta_0$ that is restricted to be less than the proposed value of $\theta_1$ using the appropriate truncated density (with the correction). Evaluate Metropolis-Hastings accept/reject.   Does anyone have ideas for other proposals here? The trick is that the support of $\theta_0$ changes, so a random-walk Metropolis step from the previous value of $\theta_0$ isn't guaranteed to fall in the support of $\theta_0$ given an updated value of $\theta_1$, so this set of draws would be rejected in a random-walk Metropolis scheme. This results in very few accepted proposals and increases the number of iterations needed.  My question is similar to a question posited  that was never answered.


I have a ten year old internal hard disk from a now useless laptop. I want to find a case/converter to use it like an external USB drive. There are loads of these for desktop (2.5in) drives, but I can't seem to find any that appear to be compatible with my hard disk, which has an unusual connector:      It looks nothing .  So the question is: What is this connector called, and is it even possible to find a USB case for it?

How can I connect this laptop SATA HDD to regular desktop SATA cable? Please look at the picture for reference. I can't find any adaptors and not sure if any SATA dock has similar connector.    EDIT: An image of the drive with the interposer/bridge successfully removed.


Does a function exist so that  f(x) = 0    x <= 0 f(1) = 1   under the additional constraint that all derivatives of f shall be continuously differentiable in [0;1]?  I strongly suspect that this is impossible, but I can't come up with a proof.  Constructing an f(x) which is continuous up to its nth derivative (for arbitrary finite n) is obvious, but not what I'm looking for.

It is easily shown that the function $$\begin{cases} \exp \left(\frac{1}{x^2-1} \right) & |x| < 1 \\ 0 & \text{otherwise} \\ \end{cases}$$ is smooth and has compact support in $\mathbb R$. I tried playing with it to find a function with the following properties:  a. $f(x)=0$ for $x \le 0$  b. $f(x)=1$ for $x \ge 1$  c. $f$ is monotonically increasing.  d. $f$ is smooth.  Is it possible to find an explicit formula for such $f$?


I need some opinion here. What is the best method to give apache permission to create folder inside my /usr/local/ ?  Currently i'm doing apps that need the apache to create folder for each user inside it. But i dont think it possible, unless we create new group and change ownership and access to it. Is it right?  I need to know how it can be done.  Thanks

This is a  about File Permissions on a Linux web server.   I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in /var/www/.  /var/www/contoso.com/ /var/www/contoso.net/ /var/www/fabrikam.com/   The base directory /var/www/ is owned by root:root. Apache is running as www-data:www-data. The Fabrikam website is maintained by two developers, Alice and Bob. Both Contoso websites are maintained by one developer, Eve. All websites allow users to upload images. If a website is compromised, the impact should be as limited as possible.  I want to know the best way to set up permissions so that Apache can serve the content, the website is secure from attacks, and the developers can still make changes. One of the websites is structured like this:  /var/www/fabrikam.com     /cache     /modules     /styles     /uploads     /index.php   How should the permissions be set on these directories and files? I read somewhere that you should never use 777 permissions on a website, but I don't understand what problems that could cause. During busy periods, the website automatically caches some pages and stores the results in the cache folder. All of the content submitted by website visitors is saved to the uploads folder.


I want to install wine and my pc is giving me the response  E: Unable to locate package wine-devel

Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package winehq-stable


How to integrate $$∫\frac{\sec^2x}{(\sec x+\tan x)^{9/2}} dx$$   In my book it is done like   $$\begin{align} \sec x+\tan x &=t \\ \sec x−\tan x &= \frac 1t \\ (\sec x \tan x+\sec^2x)dx &=dt \\ \sec x(\sec x+\tan x)dx &=dt \\ \sec xdx &=\frac 1t dt \\ t+\frac 1t &=2\sec x  \end{align}$$  and then it is substituted in the original expression and integrated.  The substitutions seem pretty unintuitive to me. Please share the approach you would follow :-)!

How do I evaluate $$\int \frac{\sec^2 x}{(\sec x + \tan x )^{{9}/{2}}}\,\mathrm dx$$  I've started doing this problem by taking $u=\tan x$.


I need software to create and read PDF files in my Ubuntu 14.04 like  in Windows 7?

I typically have two needs:  Scenario A. Change a single PDF page.  In this case I have a PDF but not the original source file used to create the PDF. I don't want to try to recreate the document from scratch. I'd like to open the PDF and change a few things. A good example of this scenario: I was responsible for planning a big event at a campground site, I had a PDF of the site. I wanted to start with that document, highlight some parts, add some labels, remove some parts that weren't relevant.   or   Scenario B. Combine PDFs or extract page(s) from a PDF  This scenario usually arises because I want a single PDF deliverable that is made up of parts that are best created in different programs. In this case I have the source files for all the documents but they don't play well enough together to easily create a single PDF deliverable. For part of it, I may want to use Libre Office Writer. For another page I may want to use Gimp. Still another page I may use Libre Office Calc. I could use Writer as the master document and embed images or the Calc object into that, but for ultimate control, you can't beat separate PDF documents that are then combined.  What are the best tools / processes for editing PDFs in Ubuntu?


I am trying to make a table like structure but the object i.e. a line segment which will connect both top and bottom pieces is not snapping perfectly.What can i do to resolve this issue ?

I am working in Illustrator (15.0.2 (CS5) or 16.0.0 (CS6)) and when I try to move objects small distances, they snap to the nearest two pixels on some invisible grid. I can't find anything in the preferences. Here are some screen shots:


I have a new vps and I need to setup some cron jobs on it to notify me of what's happening on the server. I've tested with sendmail and emails are indeed leaving the server, but on my email they are arriving as spam. What are the steps I need to do to configure the box propperly? Its a fresh VPS with Scientific Linux installed. Can someone point me in the right direction? Thanks.  I might add that from other vps I have the mail goes to the inbox directly. Also This is from a subdomain I own that is pointing to another server on a A Record.  Edit: Here are the SPF Records already created:  Delivered-To: mypersonalEmail@gmail.com Received: by 10.114.184.100 with SMTP id et4csp1203226ldc;         Sun, 24 May 2015 14:44:42 -0700 (PDT) X-Received: by 10.180.101.3 with SMTP id fc3mr25461787wib.47.1432503882045;         Sun, 24 May 2015 14:44:42 -0700 (PDT) Return-Path: <root@server.rjmarques.com> Received: from server.rjmarques.com ([1.123.123.1])         by mx.google.com with ESMTP id dx2si9334561wib.2.2015.05.24.14.44.41         for <mypersonalEmail@gmail.com>;         Sun, 24 May 2015 14:44:41 -0700 (PDT) Received-SPF: pass (google.com: domain of root@server.rjmarques.com designates 1.123.123.1 as permitted sender) client-ip=1.123.123.1; Authentication-Results: mx.google.com;        spf=pass (google.com: domain of root@server.rjmarques.com designates 1.123.123.1 as permitted sender) smtp.mail=root@server.rjmarques.com Received: by server.rjmarques.com (Postfix, from userid 0)     id 2A498528D; Sun, 24 May 2015 21:44:41 +0000 (UTC) Date: Sun, 24 May 2015 21:44:41 +0000 To: mypersonalEmail@gmail.com, to@server.rjmarques.com Subject: Test User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20150524214441.2A498528D@server.rjmarques.com> From: root@server.rjmarques.com (root)  This is a test   And the spf record:  v=spf1 mx a ptr ip4:1.123.123.1 ~all

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I'm trying to install Ubuntu on an old HP Pavilion zd7000. It has a Pentium 4 | 2.8GHz | only 512 of RAM. The installation appeared to work fine, I can boot to a login screen but after entering my credentials it goes to a black screen with the mouse and completely unresponsive.  The video card is an old nVidia with 64MB of memory.  I suspect that it might be a driver issue but I'm relatively new to Ubuntu, so I'm asking the questions.  Thank you all for your time and attention with this matter it is appreciated.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Let p(n) be the mathematical statement: $2^n \leq 2^{n+1} - 2^{n-1} - 1$.  Base Case: When n = 1 we have $2^1 \leq 2^{1+1} - 2^{1-1} - 1$ which simplifies to $2 \leq 4$. So P(1) is correct.  Induction hypothesis: Assume that P(k) is correct for some integer k.  Induction step: We will now show that P(k + 1) is correct.  \begin{align} 2^{k+1} &= 2\cdot 2^{k}\tag{by definition}\\[0.5em] &\leq 2\cdot(2^{k+1}-2^{k-1}-1)\tag{by inductive hypothesis}\\[0.5em] &= 2^{k+2}-2^k-2\tag{expand}\\[0.5em] &\leq 2^{k+2}-2^k-1. \end{align}  Is this proof sufficient?

I'm not sure if this proof is valid or not and could use some feedback.  Let P be the supposition that $2^n \le 2^{n+1}-2^{n-1} - 1$ for all positive integers n.   Base Case: Let n=1  $2^1 \le 2^2-2^0-1$  $2\le2$   Suppose that P holds true for some positive integer n=k  $$2^{k+1}=2*2^k$$  By inductive hypothesis:  $$2*2^k \le 2(2^{k+1}-2^{k-1}-1)$$  $$2^{k+1} \le 2^{k+2}-2^{k}-2$$   Since we know $2^{k+1} \le 2^{k+2}-2^{k}-2$, we also know $2^{k+1} \le 2^{k+2}-2^{k}-1$ because the former is always smaller.  This proves that: $$2^k \le 2^{k+1}-2^{k-1} - 1\Rightarrow 2^{k+1} \le2^{k+2}-2^{k}-1 $$


I'm having quite the trouble of installing drivers for my wireless usb adapter. I have tried different drivers, but none of them work. Someone in the same situtation?  uname -v  #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018   uname -r  4.13.0-43-generic   lsusb | grep Edimax  Bus 003 Device 007: ID 7392:a812 Edimax Technology Co., Ltd

I installed the following driver for an external wireless usb adapter from this page:    But the adapter is still unrecognized. How do I get it to be recognized?  The driver is rt2800usb  lsusb Bus 002 Device 010: ID 7392:a812 Edimax Technology Co., Ltd  uname -r 4.13.0-37-generic


I have a project with a structure as follows.  . ├ main.cpp ├── include │   └── stack.h └── src     └── stack.cpp   Main.cpp:  #include <iostream> #include "include/stack.h"  using namespace std; int main() {      Stack<int> intStack = Stack<int>();  // stack of ints     Stack<string> stringStack = Stack<string>();    // stack of strings      ... }   stack.h  #include ...  template <class T> class Stack { ... };    stack.cpp  #include "../include/stack.h"  template <class T> void Stack<T>::push (T const& elem) { ... }   My cmake file is as follows  cmake_minimum_required(VERSION 2.8.4) project(libbunch)  include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(LIBRARY_NAME bunch)  file(     GLOB_RECURSE     SRC_FILES     src/* )  add_library(     ${LIBRARY_NAME}     SHARED     ${SRC_FILES})  set(SOURCE_FILES main.cpp) set(EXECUTABLE_NAME libbunch) add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES})  target_link_libraries (     ${EXECUTABLE_NAME}     ${LIBRARY_NAME} )   It is more of a generic cmake rather than using the names exactly. The problem with this cmake file is that when i run it,  the following error occurs.  [ 50%] Built target bunch Linking CXX executable libbunch CMakeFiles/libbunch.dir/main.cpp.o: In function `main': main.cpp:13: undefined reference to `Stack<int>::push(int const&)' main.cpp:14: undefined reference to `Stack<int>::top() const' main.cpp:17: undefined reference to `Stack<std::string>::push(std::string const&)' main.cpp:18: undefined reference to `Stack<std::string>::top() const' main.cpp:19: undefined reference to `Stack<std::string>::pop()' main.cpp:20: undefined reference to `Stack<std::string>::pop()' collect2: error: ld returned 1 exit status make[3]: *** [libbunch] Error 1 make[2]: *** [CMakeFiles/libbunch.dir/all] Error 2 make[1]: *** [CMakeFiles/libbunch.dir/rule] Error 2 make: *** [libbunch] Error 2   This clearly means that there is an error in linking but I am actually linking the file in cmakeLists file using target_link_libraries.  Update  Trying to follow this , I modified the files by adding #include "../src/stack.cpp"in the end of .h file and then removed the #include in the src file. This resulted in more errors namely   stack.cpp:2:11: error: expected initializer before ‘<’ token  void Stack<T>::push (T const& elem)            ^ ....

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


As a developer, how do I uninstall a click package for Ubuntu Touch / Ubuntu Phone?

I have installed some click packages on my Ubuntu Touch device. How do I remove them?


For example, for $n = 6$ we could have $4, 3, 6, 1, 2, 5$.  I found this question in "How to Think Like a Mathematician" by Kevin Houston.  I know that $(x_1-1)(x_2-2)\dots(x_n-n)$ is even only if one of the factors is even. However, I do not know how to formally prove this whatsoever.

An exercise from Chapter 20 of "How to Think Like a Mathematician" by Kevin Houston:     Let $n$ be an odd positive integer. Let $(a_1,a_2,\dots,a_n)$ be an arbitrary arrangement (i.e., permutation) of $(1,2,\dots,n)$. Prove that the product $(a_1-1)(a_2-2)\cdots(a_n-n)$ is even.   For example, for $n = 3$, we can have $(a_1, a_2, \dots, a_n) = (3, 1, 2)$, so this yields that $(3-1)(2-1)(1-2)$ is even.  Would the following be considered a full solution?  Each even an has to be paired with a ($a_n$ -odd) in order for each even an to become odd. However after pairing them we have one -odd left as there is one more odd than even in the set $(1,2,\dots,n)$ where $n$ is odd. This must be paired with a odd number in a bracket. As odd-odd is even (the proof of this is trivial), then one of the bracket must be even so the product is even.  Would THIS solution be considered full?


I have been baffled for a while now because no antiderivative has been found for what seems to be a simple enough Integral on the surface.   $$\text{Si}(x)= \int \frac{\sin(x)}{x} dx $$  Is this due to the fact that we do not know what its sum approximates? Namely :   $$\sum_{k=0}^{\infty} \frac {(-1)^k x^{2k+1}}{(2k+1)(2k+1)!} = \text{Si}(x) $$  I have noticed that Si(x) , Ci(x) , Ei(x) all contain sums in their definitions which follow the pattern.  $$ \sum_{k=t }^{\infty}\frac{\text{something}}{a \cdot a!}$$  Do we simply not know what these sums approach  or do not know how to tackle the integral form, or is it impossible to give the antiderivative in terms of elementary functions??   Thank you very much for your time and help.

In the past, I've come across statements  along the lines of "function $f(x)$ has no closed form integral", which I assume means that there is no combination of the operations:  addition/subtraction multiplication/division raising to powers and roots trigonometric functions exponential functions logarithmic functions  which when differentiated gives the function $f(x)$. I've heard this said about the function $f(x) = x^x$, for example. What sort of techniques are used to prove statements like this? What is this branch of mathematics called?  Merged with "" by : Sometimes we are told that some functions like $\dfrac{\sin(x)}{x}$ don't have an indefinite integral, or that it can't be expressed in term of other simple functions. I wonder how we can prove that kind of assertion?


I've been trying to find the way to solve this problem.  Now based on what I've read so far that if $(k A)^{-1} = 1/k A^{-1}$  Since we already have the inverse of $(2A)^{-1}$ do I need to create an I?

I am looking for a derivation for the inverse of a 2x2 matrix. I am also wondering why the determinant is involved in the expression. I am familiar with high school maths and linear algebra. If there is an intuitive reason for expression i would also be interested in that.


The Stack Exchange website is a annoying to view at anything but the Stack Exchange Official Window Width. (Which is .) Use a narrow window, and you get truncated text. Use a wide window and you get a lot of blank space. (Except for a few moderator tools which are exclusively available from the otherwise blank left margin and are not visible at all unless you make your window wider than the SEOWW!)  Please let us get a comfortable experience at our choice of window width, chosen to suit our monitor setup, eyesight and window placement habits. Browser window size affects every site you use, so "fixing" it for SE can just break something else.  The window width is a user choice, not a site choice.   was declined, apparently on the basis that if you have a wider window than the SEOWW, it's not too bad. But for those of us who have a preferred window width narrower than the SEOWW, it's much worse: there's some stuff we have to keep scrolling horizontally for, and even stuff that we cannot access at all.  A lot has changed since that request was made in 2009 and declined in 2013, and it's time to revisit this issue.

When will SO stop wasting real estate of my screen by having static width layout?  EDIT  It would be very interesting to hear how does Joel, being UI specialist, feel about this. JoelOnSoftware site has fluid layout...


I have a multiplayer server with my friends and I want to create a command block that when a player dies to show in the chat or on the screen a message for example: "Press F to pay respects".

I need a way for a command block to say things in chat when it is powered, or more preferably whenever someone spawns into the world.


This is a review-type homework question that I'm very much stuck on.  Basically, these are the assumptions:   $\theta|\lambda = N(\mu,\frac{\sigma^2}{\lambda})$ $\lambda = \rm{Gamma}(\nu/2,\nu/2)$ $\theta=t_{\nu}(\mu,\sigma^2)$   Giving us:   $p(\theta|\lambda) = \frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \rm{exp}\{-\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} $ $p(\lambda) = \frac{1}{\Gamma(\nu/2)} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\}(\nu/2)^{\nu/2}$   Then comes the part I can't seem to prove: obtaining the marginal distribution of $\theta$. Here's what I get so far:   $p(\theta)=\int_0^\infty p(\theta|\lambda)p(\lambda) \hspace1ex d\lambda$ $p(\theta)=\int_0^\infty p(\theta,\lambda) \hspace1ex d\lambda$ $p(\theta,\lambda)=p(\theta|\lambda)p(\lambda)$ $p(\theta|\lambda)p(\lambda)=\frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \rm{exp}\{-\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} \frac{1}{\Gamma(\nu/2)} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\}(\nu/2)^{\nu/2}$ $p(\theta)=\frac{1}{\Gamma(\nu/2)}(\nu/2)^{\nu/2} \int_0^\infty \frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\ -\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} \hspace1ex d\lambda$   And now I'm stuck... The notes say I should be able to obtain the following "after some algebra" but I'm totally clueless:   $p(\theta) = \frac{\Gamma(\frac{\nu+1}{2})}{\Gamma(\nu/2)} \frac{1}{(\pi\nu\sigma^2)^{1/2}} \frac{1}{[1+\frac{1}{\nu}(\frac{\sigma-\mu}{\sigma})^2]^\frac{\nu+1}{2}}$   Any help/clues in the right direction would be much appreciated!

Using the student t-distribution with $k > 0$ degrees of freedom, location parameter $l$ and scale parameter $s$ having density  $$\frac{\Gamma \left(\frac{k+1}{2}\right)}{\Gamma\left(\frac{k}{2}\sqrt{k \pi s^2}\right)} \left\{ 1 + k^{-1}\left( \frac{x-l}{s}\right)\right\}^{-(k+1)/2},$$  how to show that the Student $t$-distribution can be written as a mixture of Gaussian distributions by letting $X\sim N(\mu,\sigma^2)$, $\tau = 1/\sigma^2\sim\Gamma(\alpha,\beta)$, and integrating the joint density $f(x,\tau|\mu)$ to get the marginal density $f(x|\mu)$? What are the parameters of the resulting $t$-distribution, as functions of $\mu,\alpha,\beta$?  I got lost in calculus by integrating the joint conditional density with the Gamma distribution.


Can somebody help to prove that:     $$\frac{\cos a - \sin a + 1}{\cos a + \sin a - 1 } = \frac{\sin a}{1-\cos a}$$

We need to prove that $$\dfrac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$$  I have tried and it gets confusing.


I get the following error message when trying to restore the database from backup using RMAN.  rman target /  RMAN> set dbid=130474031 RMAN> configure device type 'sbt_tape' clear; RMAN> startup nomount; RMAN> restore controlfile from autobackup; RMAN> sql 'alter database mount'; RMAN> restore database;  Starting restore at 22-DEC-15 using channel ORA_DISK_1  creating datafile fno=1 name=/opt/oracle/oradata/prod/system01.dbf RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 12/22/2015 12:47:01 ORA-01180: can not create datafile 1 ORA-01110: data file 1: '/opt/oracle/oradata/prod/system01.dbf' RMAN>   EDIT  RMAN> restore database;  Starting restore at 22-DEC-15 using channel ORA_DISK_1  creating datafile fno=1 name=/opt/oracle/oradata/prod/system01.dbf RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 12/22/2015 14:22:01 ORA-01180: can not create datafile 1 ORA-01110: data file 1: '/opt/oracle/oradata/prod/system01.dbf'  RMAN> exit   Recovery Manager complete. [oracle@DR-Corebank ~]$ id uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) [oracle@DR-Corebank ~]$ cd /opt/oracle/oradata/prod/ [oracle@DR-Corebank prod]$ touch aaa [oracle@DR-Corebank prod]$ ls -ltr total 875772 -rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control03.ctl -rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control02.ctl -rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control01.ctl -rw-r--r-- 1 oracle oinstall         0 Dec 22 14:22 aaa [oracle@DR-Corebank prod]$ pwd /opt/oracle/oradata/prod [oracle@DR-Corebank prod]$ df -h Filesystem            Size  Used Avail Use% Mounted on /dev/cciss/c0d0p3     1.1T  163G  850G  17% / /dev/cciss/c0d0p1     244M   18M  213M   8% /boot tmpfs                 7.9G     0  7.9G   0% /dev/shm /dev/mapper/mpath0    493G  248M  467G   1% /opt/oracle2/u002


I have written a code like this,and they are all works for me,but what is the difference? which is better?   class Demo1(object):     def __init__(self):         self.attr = self._make_attr()     def _make_attr(self):         #skip...         return attr  class Demo2(object):     def __init__(self):         self.attr = self._make_attr()     @staticmethod     def _make_attr():         #skip...         return attr

What is the difference between a function decorated with  and one decorated with ?


I have created connected app that would like to be rendered over Canvas mode.  In Canvas configuration I have selected OAuth 2.0 as an authentication mode. I have created action linked to following APEX code :  <apex:page standardController="CustomObj__c" showHeader="true" >   <apex:canvasApp developerName="TestApp" parameters="{test:'param'}"/> </apex:page>   When I press on the link, OAuth finishes it's job properly, what I can not find are parameters that I expect to be send to my/connected app.   Parameters should be sent at the first call (when OAuth is initated) or at the end, when access_token and refresh_tone are sent or in some other moment ? I am expected it as and HTTP parameter.  What I am doing wrong ?

I'm experimenting with the  feature, and embedding it in a Visualforce page, from where I hoped I would have some control over the canvas.  Now, the apex:canvasApp has a property called  and it's description says that they're parameters passed to the canvas app.    When I don't use the parameters attribute the canvas page draws normally, and using firebug I can see the call to the ip address of the canvas app. But for it to be useful to me I need to pass some parameters to the canvas page and when I do use the parameters attribute the canvas simply does not show, and in firebug it does not show any call to the ip of the canvas.  How are these parameters passed or how can one catch them? Using firebug, in the call to the ip of the canvas app, I can't see any of the parameters that I'm trying to pass.  Here's the simple code I'm experimenting with:  <apex:page > <apex:canvasApp applicationName="Test Canvas" height="400px" width="750px" parameters="{vst_cli: '1293'}" /> </apex:page>   Inside the parameters attribute I've tried some different things: "{vst_cli: '1293'}" "{vst_cli: 1293}" "{'vst_cli': '1293'}" All of which had the same effect.  Any help or pointers will be welcome.  Thanks in advance.


My husband  and I together with our 9 month old son wish to visit Portugal  when we visit the UK  in 4 months  time , however we are resident in St Helena island , a British oversees territory . Our biggest challenge is that  there is no consulate of any country on the island . Can anyone have information on how  we can apply these visas . Thank you.

I'm a citizen of country A who would like to apply for a Schengen visa at a consulate in country B. When is this possible?


I'm trying to backup fairly sensitive data.  Which of the three has the longest shelf life?   Hard Drives(Regular) Thumbdrives Dvds/Blurays   There are obvious cost and size differences.  Related

This question was inspired by . There have been other similar questions, but none with the same criteria.  This is two questions in one.   How do you store financial/critical records that should survive anything but a fire and should be available for decades? Lets say I want to store family photos/videos and want people do be able to find them in storage 100 years from now and still be able to use them. How would this be done?   Criteria   Long term means 30+ years guaranteed. 100+ years average. [If this is not practical, use the closest solution] High volume means a couple terabytes. Answers can be 'no-compromise/industrial' solutions or practical solutions for the home office/small business user. Media will not be active during the timespan. (i.e., if you suggest hard drives, they will not be spinning).  Further, there is no expectation of needing to read these archives. They are there for emergency or "for future generations" purposes. Should not require maintenance (if at all possible).    My thoughts:   CD-R/DVD-Rs have proven to me, even in the short term, to be a terrible medium for backups. They seem to be very fragile and seem to lose their data a very short time even when in pristine condition. I can't help but think that storing data on a couple of 1TB hdd's and then expecting them to spin up correctly a decade or two later to be a terrible idea. Am I wrong? Industrial tape drives seem like a viable option?


I want to make a web GIS system. I will be graduating in 3 months and have time on my hands before going for interviews. if i can build something then i can show it off in the interviews and hopefully make me stand out.  However how do i go about this with zero budget but i have lots of public data from university?

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


Let's assume we have an unfair coin and a machine that toss it continuously. We counted the number of tandem heads. Whenever it's head we count 1, if it's head again, counter goes to two and so on. When we get our first tail, it reset to zero.  Here's the result of tossing: [H,H,T,H,H,H,T,H,T,T]  Collected data: [1,2,0,1,2,3,0,1,0,0]  The thing I'm interested in is to read the past x readings and predict the next tossing result.  For example, assuming this data, the maximum number or continuous heads in the past 5 readings was 3, how can we translate it to a probability of the next tossing.

I would like to run an A/B test using a Bayesian beta-binomial model whereby I would state probabilities such as $P(p_B>p_A)$ in place of using a traditional T-test. I've read that the prior should be constructed as $f(a,b) \sim (a+b)^{-\frac{5}{2}}$.  How exactly is this done?  I'm looking for an actual example of this step of the modeling process.  Here is my A/B test data by day formatted as: date, A enrollments, A conversions, B enrollments, B conversions.  10/1/2015,150,16,148,17 10/2/2015,163,17,165,19 10/3/2015,155,14,157,18 10/4/2015,161,15,153,19 10/5/2015,148,14,150,16


Let $k$ be an infinite field and $f(X,Y) \in k[X,Y]$ be a polynomial with two variables. If $f(X,Y)$ vanishes on all points $(x,y) \in k^2$, i.e.,  $$f(x,y) = 0, \forall (x,y) \in k^2$$ can we conclude that $f(X,Y) = 0$?  Put another way, let $k$ be an infinite field, and let $$k[X,Y]^* := \{f : k^2 \longrightarrow k, (x,y) \mapsto f(x,y) \mid f(X,Y) \in k[X,Y]\}$$ denote the ring of polynomial functions. Then do we have $k[X,Y] \cong k[X,Y]^*$?

I'd like some help making this argument complete and rigorous (if it's correct - if not, help with that would be nice).  Here $k$ is a field.     Let $A_1,\ldots,A_n \subseteq k$ be infinite subsets. Then any polynomial in $k[x_1,\ldots,x_n]$ that vanishes on $A_1\times\cdots\times A_n\subseteq k^n$ must be $0$ (as a polynomial).   This is what I have ...  For the case $n=1$, a non-constant polynomial can only have as many roots as its degree, and in particular, it must have a finite number of roots. The only polynomial in one variable that has an infinite number of roots is $0$, so if a polynomial in $k[x_1,\ldots,x_n]$ vanishes on an infinite subset then it must be $0$.  For the inductive step, suppose the proposition is true for less than $n$ subsets and variables. Let $p\in k[x_1,\ldots,x_n]$ vanish on $A_1\times\cdots\times A_n$. Fix $x_n$ as some $a\in A_n$, and we have a polynomial in $n-1$ variables that vanishes on the set $A_1\times\cdots\times A_{n-1}$, so by the inductive hypothesis it must be identically $0$.  (Now it gets sketchy). Since this is true for any of the infinite values in $A_n$, and , $p$ must be $0$.


I have an Excel book that is a template.  In worksheet Data, cell A1 has the following formula:  =getTemplateVersion()   This function retrieves a custom document property with the version number of the template.  I am trying to update the template version and then update the contents of cell A1.  I am using the following function:  Sub setVersion(version As String)  'class for setting and retrieving template version property Dim vm As New VersionManager  Dim currentVersion As Variant Dim sht As Worksheet  'retrieves template version property value currentVersion = vm.getVersion  'sets template version property value vm.setVersion version  For Each sht In ThisWorkbook.Sheets     sht.calculate Next  End Sub   When this function concludes, the value of A1 has not changed.  But when I click on A1, then click on the formula, then press Enter, the value of A1 updates.  So the version property is being updated, but it's just not updating on the sheet when sht.calculate is called.  Is there a way to update the value of this UDF-calling formula programmatically?  I'd prefer not to have to click into this cell every time I run the version update function.

How can I get a user-defined function to re-evaluate itself based on changed data in the spreadsheet?  I tried F9 and Shift+F9.  The only thing that seems to work is editing the cell with the function call and then pressing Enter.


n=10;     for(i=1;i<n;i++){         random = 1 + rand() % 3;           printf("\n\nIzdari savu izveli ==>");         scanf("%c", &zime);         if( zime=='a' )             printf("\nTu uzliki AKMENI");         else if( zime=='s' )             printf("\nTu uzliki SKERES");          else if( zime=='p' )             printf("\nTu uzliki PAPIRU");          if( random==1 )             printf("\nDators uzlika AKMENI");         else if( random==2 )             printf("\nDators uzlika SKERES");         else if( random==3 )             printf("\nDators uzlika PAPIRU");          if( random==1&&zime=='a' || random==2 && zime=='s' || random==3 && zime=='p')         printf("\n\nNeizskirts!!!");     else if( random==1&&zime=='p' || random==2&&zime=='a' || random==3&&zime=='s' )         printf("\n\nTu Uzvareji!!!");     else if( random==1&&zime=='s' || random==2&&zime=='p' || random==3&&zime=='a' )         printf("\n\nTu Zaudeji!!!");     getch();     }   Why when loop starts 2nd time it just skips scanf, and jumps to if( random==1 ),  and then jumps back to scanf and let u scanf a char?  Output looks like    It is just rock paper scizors game, but in other language.

I've been having a lot of problems trying to figure out how to use scanf().  It seems to work fine with integers, being fairly straight forward scanf("%d", &i).  Where I am running into issues is using scanf() in loops trying to read input.  For example:  do {   printf("counter: %d: ", counter);   scanf("%c %c%d", &command, &prefix, &input); } while (command != 'q');    When I enter in a validly structured input like c P101, it seems to loop again before prompting me.  This seems to happen even with a single:  scanf("%c", &c)    in a while loop.  It'll do the loop twice before prompting me again.  What is making it loop twice, and how do I stop it? When I enter in less amount of input that programmatically wouldn't have another character or number such as q, pressing enter seems to prompt me to enter more.  How do I get scanf() to process both single and double character entries?


Guys I'm working on android , and i have a static variable , lets say "var" , if it's null then if statement is executed or else is executed , the thing is , even after i "var" is not null , if i restart tab it works as expected , someone enlighten me .  **protected static String ipath="" , ipath1;**    protected OnClickListener selimg = new OnClickListener() // for first image {      @Override     public void onClick(View vw)      {         // TODO Auto-generated method stub         Intent i = new Intent(                 Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);                  startActivityForResult(i, RESULT_LOAD_IMAGE);      }    };  protected void onActivityResult(int requestCode, int resultCode, Intent data) {     super.onActivityResult(requestCode, resultCode, data);      if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {         Uri selectedImage = data.getData();         String[] filePathColumn = { MediaStore.Images.Media.DATA };          Cursor cursor = getContentResolver().query(selectedImage,                 filePathColumn, null, null, null);         cursor.moveToFirst();          int columnIndex = cursor.getColumnIndex(filePathColumn[0]);         String picturePath = cursor.getString(columnIndex);         cursor.close();         ImageView imageView = (ImageView) findViewById(R.id.imageView1);         ImageView imageView1 = (ImageView) findViewById(R.id.imageView2);         **if(ipath == "")         {         ipath=picturePath;          imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));         }         else         {             ipath1=picturePath;             imageView1.setImageBitmap(BitmapFactory.decodeFile(picturePath));          }**      } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I want to do some performance tests concerning what the ISO setting "really does", whether ETTR makes sense, measure the noise, etc. on my camera.  Rather than look at the pixels after it's been Bayer decoded, mapped, reconstructed, etc. I'd like to look at the real raw data; that is, the sensor sample values.  Ideally it would be three matrices for R, G, and B components (with G being twice the size in both dimensions).

What is the simplest way to access the data in a raw file before demosaicing and write it to a more widely supported file format (e.g. 16 bit TIFF)?  I'm looking to obtain a single channel image where each pixel corresponds to a single pixel on the sensor (regardless of what colour filter it had in front).  The not so simple way would be digging into some open source RAW processing libraries and using code from there.  Is there a simpler way (e.g. a command line tool)?


I have Polish National Visa valid for one year. D type, multi entry. But I haven't gone to Poland yet, because I had to go to one project, which got rejected its financial part, so I didn't go there yet.  But I have a project in Italy for one week in April.  I can't apply for italian visa, because they can't give me any, if I have already valid visa for Poland. So my question is can I have my first entry to Italy with Polish National Visa. Can you please give me information regarding this?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


Today, all of a sudden, I noticed my rep climbing:    Now I figured this was going to be reversed soon but then I noticed I got the Mortarboard badge for having hit the rep cap. I figured that the user must have been clever with the serial voting and got around the auto-detection script.  After a couple of hours when I went to check, I got the "Voting corrected" item in the list, but I still have Mortarboard.  After reading , I understand why I still have the badge. I would suggest that this badge (and any badge that requires votes that can be gained from serial voting) shouldn't get awarded until after the serial voting check has been done. This way, getting the badge feels more rewarding because you know that people have honestly up-voted your useful posts.

user has serial up-voting reversed, but he still have badge Mortarboard.   Is it correct behavior of badges? I suppose it should be reversed too.  And will this 200 daily reputation (2012-03-20) score for the Epic, and Legendary badges?


I'm a new Ubuntu (Linux) user.  Ubuntu creates each time a copy when I'm setting up a picture as a desktop wallpaper using the file manager. But if I'm using the settings it doesn't. But the problem is that you can just link one file at once to the selection which is when you have many pictures a big problem.  So my question is: exist a way to link all wallpapers at once or something like that?  The previews in the settings

I know there is a way to do this, but I just dumped a bunch of my favorite wallpaper files in /usr/share/backgrouds/.  In order for my Ubutnu 17.10 to use them, I need to edit the artful-wallpapers.xml file and add each file name to a statement looking like this:  <wallpaper>  <name>calm</name>  <filename>/usr/share/backgrounds/02488_calm_1440x900.jpg</filename>  <options>zoom</options>  <pcolor>#000000</pcolor>  <scolor>#000000</scolor>  <shade_type>solid</shade_type> </wallpaper>   This is long and tedious to do one at a time, and I am sure I have merged data before, but for the life of me I cannot remember how.  A script would be very helpful, or at least directions to a tutorial.  Thanks in advance.  Rod


I would like to ask for a feature if it is possible to add Flowchart facility in the question and answer block. this would be very useful because flowchart can help explain the algorithm better. most of the code samples are not compile able but are given for the demonstration purpose. a flowchart will do a better job at that I believe. Of course a diagram can be copy pasted but editing it will be difficult. moreover if there is flowchart facility and if there is an error in the flowchart not only the author can edit it but also others can edit it in-place. editing this flowchart also will be as quick as the code edit.  thanks.

I think it would be a very useful and quality-improving feature.  As for me, when I speak on something, I often have a visual representation of how it works, or something. It's obvious there are many things (in algorithms, or, say, UI) which are much easier understood with pictures and diagrams, than from scarce text.  So I'd really like here to be a special answer form, where you can attach some visual things to better explain your ideas.  I imagine this form as just a canvas with few painting tools and some basic blocks and patterns.


Which/is there a Stack Exchange site where it would be appropriate for me to ask for opinions or thoughts on colleges I am thinking about attending?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


Is a comment "What have you tried" considered an appropriate comment for questions   without doing any research by the OP without having tried anything by the OP with the I-am-too-lazy-to-resolve-this-my-own attitude with do-my-homework attitude   ?

Some questions boil down to "how can/do I do X?" Here's an .  Sometimes, people leave comments under such questions that ask "what have you tried?" Is it OK to leave comments like that? Should all questions contain snippets of non-working code?


Let $p\in\mathbb{N}$ be a prime. Let $F=\mathbb{F}_{p^n}$, $n\geq1$, be a finite field of $p^n$ elements containing $M=\mathbb{Z}/(p)$. I would like to show that $\mathrm{Gal}(F/M)\cong\mathbb{Z}/(n)$.  Here's my work so far. It is easy to show that $F/M$ is a simple field extension (i.e. there exists an element $\alpha\in F$ such that $F=M(\alpha)$) because of the existence of a generator of the multiplicative group of the field. Then the Galois group of $F/M$ contains the automorphisms of $F$ sending such generator to roots contained in $F$ of the minimal polynomial of the generator over $M$. I don't know how to proceed from here.

My book says all extensions of finite fields are cyclic, but I could not find a proof (maybe I haven't looked hard enough).  If it's straightforward, can you tell me why it's true?  Thanks :)


iPhones have a dedicated Voice Memos app. iPads don't, despite running the same OS and also featuring a built-in microphone.  Since the answer to 1 is probably "no", what current alternatives do people use?  (ideally free simple app that works the same way like Voice Memos on the iPhone)

I'm looking to do some light recording of voice conversations and field recordings on my iPad using the built in microphone.    seems to be the obvious Apple solution, but is too heavy for my needs. By the time I set up a new project, turn off the metronome, etc..., I find myself wishing I just had  running on my iPad.   I don't mind paying for the app, but wondered what people are using for both light voice recording as well as longer and more numerous recording / light editing where some tagging and filing might be possible.


the following code does not work as I would expect:  using System; using System.Data;  namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             MyClass cl = new MyClass();             cl.doSomething();         }     }      public class MyClass : BaseClass     {         protected override void doSelect(DataTable dt)         {             dt = null;         }          public void doSomething()         {             base.Fill();         }     }      public class BaseClass     {         private DataTable dtMain = null;          protected virtual void doSelect(DataTable dt)         {         }          protected void Fill()         {             dtMain = new DataTable();             this.doSelect(dtMain);             if (dtMain == null)                 Console.WriteLine("as I would expect");             else                 Console.WriteLine("why not changed???");         }     } }      I tested it with other reference types, but same behavior. Is this a framework bug? When I use the ref keyword it works as I expect:  protected virtual void doSelect(ref DataTable dt) { } and so on   Would be nice I anyone could help me with this!

If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?  For example:  class Program {     static void Main(string[] args)     {         TestRef t = new TestRef();         t.Something = "Foo";          DoSomething(t);         Console.WriteLine(t.Something);     }      static public void DoSomething(TestRef t)     {         t.Something = "Bar";     } }   public class TestRef {     public string Something { get; set; } }   The output is "Bar" which means that the object was passed as a reference.


below test method is failing at      system.assert "Expecting 10, actual 0"   But system.debug on "total" in the finish of batch class has value 10.  Batch class          public class CountRecords implements Database.Batchable<sObject>, Database.Stateful {             public Integer total = 0;              public Database.QueryLocator start(Database.BatchableContext BC){                 return Database.getQueryLocator('select id from contact');             }              public void execute(Database.BatchableContext BC, List<sObject> scope){                 total += scope.size();             }              public void finish(Database.BatchableContext BC){                  system.debug('hello'+total);             }         }   Test Class:  @isTest static void testBatch(){     Integer count = 10;     List<Contact> conList = createConList(count); //creates 10 contacts     test.starttest();     CountRecords cR = new CountRecords();     Database.executeBatch(cR);     test.stoptest();     system.assertEquals(count, cR.total); }

I have a Batch class that sends an Email from its finish method and want to test that. a But....I cannot test it. The the above test fails as there was no email invocation at all. BUT: I see it in the Limits view of my Dev Console that indeed one email invocation happens. Why?!  The batch class:  public MyBatch implements Database.Batchable<SObject> {      ...      public void finish(Database.BatchableContext context) {         sendEmail();     } }   The test method:  @isTest private static void sendsEmailOnFinish() {      Test.startTest();        MyBatch b = new MyBatch();     Database.executeBatch(b);     Test.stopTest();       // Verify     System.assertEquals(1, Limits.getEmailInvocations()); }   I thought this might be connected to using Test.startTest() and stopTest() but even moving the assertEquals before the Test.stopTest() doesn't make my test run.


Relearning C++ for the sake of using OpenCL. I have created a Helper Class called CheckDevice which has a bunch of boiler plate code for getting device stats.   CheckDevice.h      class Utils     {     public:         Utils(){};         ~Utils(){};           template<class T>         static bool IsNull(T Object, char* name);      private:      };   CheckDevice.cpp      cl_command_queue Utils::CreateCommandQueue(cl_context context, cl_device_id *device)     {         cl_int err;         cl_device_id *devices;         cl_command_queue queue  = NULL;         size_t deviceBufferSize = -1;         cl_kernel kernel = 0;           Utils::IsNull<cl_command_queue>(queue, "Utils::CreateCommandQueue::queue");            return queue;     }   main.cpp      void main()     {          cl_kernel kernel            = 0;           Utils::IsNull<cl_kernel>(kernel, "clCreateKernel");      }   The question is when calling the function Utils::IsNull from within CheckDevice.cpp it works fine but when calling from main.cpp than I get the following in Visual Studios 2012     error LNK2019: unresolved external symbol "public: static bool __cdecl Utils::IsNull(struct _cl_kernel *,char *)" (??$IsNull@PAU_cl_kernel@@@Utils@@SA_NPAU_cl_kernel@@PAD@Z) referenced in function _main   1>C:\Users\Suri\Documents\Visual Studio 2012\Projects\HelloWorld\Debug\HelloWorld.exe : fatal error LNK1120: 1 unresolved externals   Any Help would be apperciated

When I write C++ code for a class using templates and split the code between a source (CPP) file and a header (H) file, I get a whole lot of "unresolved external symbol" errors when it comes to linking the final executible, despite the object file being correctly built and included in the linking.  What's happening here, and how can I fix it?


Ubuntu 12.04 LTS, 64 bit, kernel 3.2.0-58  I used to be able to report a bug to Ubuntu by simply double clicking on the .crash files in directory /var/crash. Last week I changed internet service providers. Since then, when I double click a .crash file, the upload proceeds until the progress bar is almost to the right edge, the network traffic shows the size of the .crash file has been uploaded, and then a dialog appears with title "Network problem" and message:  "Cannot connect to crash database, please check your Internet connection.   HTTP Error 502: Bad Gateway"  I am using my new internet service provider for all other purposes without problem. From what I have read, this particular error indicates a problem that is not in my control.   I would like to continue to report bugs to Ubuntu. Is there a way to do so with out using apport so as to circumvent the 502 network error? For example, can I copy the .crash file to DropBox, and submit it to Ubuntu?

As of today I only knew about ubuntu-bug which I could use to report bugs about a specific program. But now I learned about apport-collect and apport-bug which basically are:  apport-bug - Reports problems to launchpad using Apport to collect a lot of information about your system to help the developers fix the problem and avoid unnecessary questions and answers.  apport-collect - Works as apport-bug but it send the information to an already existing bug report. In my case it was apport-collect 1060268 Thanks to Brad Figg in Launchpad.  Are there any other tools to report bugs?


this is simple question. i want to redirect to another page after success in ajax. my code is   if (page != 'Theatres') {     $('.hexagon').removeClass('active');     $(this).addClass('active');     $.ajax({         url: '{{ url("dashboard/user/set-home-page-preference") }}',         data: {             'page': page         },         type: 'GET',         success: function(data) {             alert(data);         }     }); }   i want to redirect to a page after the alert data.

How can I redirect the user from one page to another using jQuery or pure JavaScript?


There are billions of words given to you. You have to find the top K frequent words.  For above problem, I have some solutions, but I think there is definitely better approach present. First please have a look on my approach.  Solutions :-  Approach 1   Make a chunks of above file. For every chunk, make  pair, where key = word, and value = 1. Then sort  pairs in each chunks on the basis of key. Then, make one entry for commmon key. Now value become frequency of key. Till this point every chunk have words with their frequency. Now concatenate the whole  pairs of each chunk. Then sort. Then update the frequency. Throw top K frequency words.   Approach 2.(This approach is not complete)   Make a double link list, in which  front is mostly occurring word, and rear one least occurring word. Whenever new word comes, update the doubly linked list.   But approach 2 is not correct.  Please suggest if you have any algorithm that is better than Approach 1. And please check approach 2, improve this.

Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text.  My thinking is like this.    use a Hash table to record all words' frequency while traverse the whole word sequence. In this phase, the key is "word" and the value is "word-frequency". This takes O(n) time.  sort the (word, word-frequency) pair; and the key is "word-frequency". This takes O(n*lg(n)) time with normal sorting algorithm.  After sorting, we just take the first K words. This takes O(K) time.    To summarize, the total time is O(n+nlg(n)+K)， Since K is surely smaller than N, so it is actually O(nlg(n)).  We can improve this. Actually, we just want top K words. Other words' frequency is not concern for us. So, we can use "partial Heap sorting". For step 2) and 3), we don't just do sorting. Instead, we change it to be  2') build a heap of (word, word-frequency) pair with "word-frequency" as key. It takes O(n) time to build a heap;  3') extract top K words from the heap. Each extraction is O(lg(n)). So, total time is O(k*lg(n)).  To summarize, this solution cost time O(n+k*lg(n)).  This is just my thought. I haven't find out way to improve step 1). I Hope some Information Retrieval experts can shed more light on this question.


As far as I've learnt, a non-nested loop upto N number of input takes O(N) times,  basic steps like assignment, basic mathematical operations takes O(1) times.   I am confused with the part that, Factorial is a NP problem which takes exponential time complexity(came to know through reading an old thread () but the below code have nothing but N times loop and 2 basic operation. So isn't this code O(N)+O(1) ~~ O(N) ?   Long factorial = 1L ;  for (int c = 1; c<=20; c++){       factorial =(Long) factorial *c ;        }   print(factorial);

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


I am wondering about package or a simple way to draw Venn diagrams. I need to draw the following examples:  and as you can see my hand drawing skills are not up to the task :) I have found the package named venndiagram and it seem to be able to help me with 4 and 5 but not the rest. I mean sometimes I want to only show one of the circles, sometimes none of the circles, sometimes overlapping, sometimes not and so on. I also found a package named just venn but it seems to have a not so satisfactory documentation so I don't know if it could help me or not. To me this seems like something people would do from time to time so I was hoping someone could suggest something else?

How can I add a centered caption to the venn-diagram below the rectangle?   \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \draw (-2,-1.5) rectangle (3.5,1.5) node[below left]{$U$}; \fill[gray] (0,0) circle (1cm); \fill[gray] (1.5,0) circle (1cm); \draw (0,0) circle (1cm) node {$A$}; \draw (1.5,0) circle (1cm) node {$B$}; \end{tikzpicture} \end{center} \end{document}


Why does the following code give the error below?  require 'open3'  module Hosts   def read     include Open3     popen3("cat /etc/hosts") do |i,o,e,w|       puts o.read     end   end end  Hosts.read #=> undefined method `popen3' for Hosts:Class (NoMethodError)   It works if I call popen3 using full path ie Open3::popen3.  But I've include-ed it, so thought I wouldn't need the Open3:: bit?  Thanks

Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me.    include: mixes in specified module methods as instance methods in the target class extend: mixes in specified module methods as class methods in the target class   So is the major difference just this or is a bigger dragon lurking? e.g.  module ReusableModule   def module_method     puts "Module Method: Hi there!"   end end  class ClassThatIncludes   include ReusableModule end class ClassThatExtends   extend ReusableModule end  puts "Include" ClassThatIncludes.new.module_method       # "Module Method: Hi there!" puts "Extend" ClassThatExtends.module_method            # "Module Method: Hi there!"


Since PCA is sensitive to scaling, I am thinking of standardizing each explanatory variable to have mean 0 and standard deviation 1. What are the drawbacks of such a standardization? Thank you.

What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results?


Saying a matrix is "singular" means that it cannot be inverted. Separately "singular value decomposition" factors a matrix into three matrices, one that contains "left-singular" vectors as columns, one that contains "singular values" on the diagonal, and another that has "right-singular" vectors as columns. And ironically, SVD works on a matrix regardless of whether or not it is singular.  Is there some underlying sense in which singular describes something common to all of these? If I accept that "singular values" was an arbitrary choice, then I can accept that SVD has singular in the name because it uses them, and that left and right singular vectors are just so called because they appear on either side of the matrix that contains singular values, but then I'll still left wondering how we get from there to singular matrices.

The SVD stands for Singular Value Decomposition. After decomposing a data matrix $\mathbf X$ using SVD, it results in three matrices, two matrices with the singular vectors $\mathbf U$ and $\mathbf V$, and one singular value matrix whose diagonal elements are the singular values. But I want to know why those values are named as singular values. Is there any connection between a singular matrix and these singular values?


While reading , it came to me that Obi-Wan waited far too long to tell Luke to go find Yoda. Obi-Wan Kenobi could have appeared to Luke minutes after Luke blasted the first Death Star to pieces. He could have told him right then and there that another Jedi Master still lived and could train him.     BEN: You must go to the Dagobah System ... There you will learn from   one who taught me: Yoda, the Jedi Master.   Instead he waited 3 years. Luke could have been killed during those 3 years by some wampa beast, frozen during an ice storm on Hoth, shot by Boba Fett, or hunted down by Darth Vader. Very risky to wait because Vader would known the best time to hunt down Luke was before Luke completed another day of training!  Waiting also meant a 3 year gap in his training.  Luke was safe right after he destroyed the Death Star. You'd think a wise old Jedi would have told him to seek out Yoda immediately. You'd also think Obi-Wan would have known Darth Vader survived the Battle of Yavin and would have immediately landed his TIE fighter on the moon and tracked down on rebel base to find whomever destroyed the technological terror.  Why did Obi-Wan wait 3 years to tell Luke?  (I am looking for an in-universe explanation. Not an out-of-universe explanation.)  Edit: This is not identical to the question I linked to. That question is more about why Obi-Wan chose to contact Luke during a snowstorm on Hoth right after Luke stumbled out of the wampa cave. This is about why wait 3 years at all. Nothing in the answers to that question address the 3 year time wait.  The answers there all don't make sense when compared to the simple fact that Kenobi successfully contacted Luke during the first movie. Here are the answers from that question and why they don't hold up.   Obi-Wan needed time to learn to be a Force-Ghost to contact Luke. We know he could speak to Luke during the Battle of Yavin, so he should have been able to contact Luke immediately. Luke was vulnerable and therefore more receptive. Luke was certainly receptive to hearing Kenobi's advice during the Battle of Yavin. Luke was collapsing from extreme cold and therefore willing to listen to a ghost. Same answer to this one as #2. Luke needed to learn how to use the Force first or to meditate to receive the message. We know that's not true, because Luke heard Kenobi's message during the Battle of Yavin and he wasn't meditating or using the Force during the battle when Kenobi spoke to him. The planet Hoth was a Force nexus. Was the planet Yavin also some Force nexus that allowed Kenobi to speak to Luke then?

In The Empire Strikes Back, Luke Skywalker violently escapes from the lair of a wampa ice creature, finds himself in the middle of a life-threatening snowstorm on an inhospitable planet, collapses from cold and fatigue, and will likely be dead in a few minutes. As :     Luke lies face down in the snow, nearly unconscious. Slowly he looks   up and sees Ben Kenobi, barely visible through the blowing snow. It is   hard to tell if Kenobi is real or a hallucination.     Why did Obi-Wan Kenobi choose this moment to appear to Luke and deliver rather important instructions concerning next steps in his Jedi training?  It seems lucky that Luke remembered anything of the encounter at all. He probably thought he was hallucinating.


Prove that $\int_{0}^{\pi/2} \frac{\sin x}{x} dx$ converges.  Shall I compare it with 1/x?

I have this integral:  $$ \int_0^1{\frac{\sin x}{x}dx} $$ And I should prove that it is convergent. I have understand that if the resulting area is finite, then this integral is convergent, right?  So, I do this:  $$ \int_0^1{\frac{\sin x}{x}dx} = \int_0^1{\sin x\cdot \frac{1}{x}dx} =\\= \begin{bmatrix} -\cos x\cdot \ln x\end{bmatrix}_0^1 = (-\cos1\cdot \ln1)-(\cos0\cdot \ln0) = 0-(-\infty) = \infty $$  But, I get an infinit value, which I think is wrong. What am I doing wrong?  Ok, so apparently I messed some things up. If I do this again and use the integration by parts method I get this:  $$ \int_0^1{\frac{\sin x}{x}dx} = \int_0^1{\sin x\cdot \frac{1}{x}dx} = \sin x \ln x- \int_0^1{(\cos x\ln x) dx} = \sin x \ln x -\begin{bmatrix} \sin\frac{1}{x} \end{bmatrix}_0^1 \Rightarrow \lim_{t \rightarrow 0} {\int_t^1\frac{\sin x}{x} dx} = \lim_{t \rightarrow 0}{(\sin x \ln x-\frac{sin1}{1}-\frac{\sin t}{t})} $$  Is that more correct? And how do I proceed?


I recently had my computer infected by a virus on an administrator account that installed a bunch of scamming programs and changed my shortcuts to open on a scam browser page called snap.do. I was wondering if this virus would have affected other users shortcuts and infected their files.  edit: I am on Windows 10. It came about as a result of me installing a file without checking the list of optional additional programs it would install with it. After noticing the changes to my browser and random popups, I checked my installed programs and found a list of 7 or so programs that had been installed without me being aware. They all had sketchy names, something like PCCleaner and GetGreatDeals.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I understand that when you are creating your character in Adventurers League (AL) that you may only use options from the Player's Handbook and one other book (PHB+1).  If I use Xanathar's Guide to Everything (XGtE) as my +1, is there any way for me to learn a cantrip from the Sword Coast Adventurer Guide (SCAG)?  Do any of these options (or something I missed) work in AL?   Leveling up and being allowed to choose a new cantrip Taking a feat, such as Magic Initiate (PHB p 168) or Spell Sniper (PHB p 170) Being a Pact of the Tome Warlock (PHB 108) where you can choose cantrips from other classes   While I think I am out of luck (the rule below seems to deny the options above), I am hoping that maybe there is some rule or FAQ answer that I have overlooked along the lines of this (for wizard spells or rituals):     Which Spells Can I Learn?      Spells are a class option; any new spells learned by advancing in a class or by feats are subject to PHB+1.   Characters that prepare spells from a spellbook may copy spells even if those spells aren’t normally found in your character’s PHB+1.   I don't think the answer will depend on what class we are talking about (since cantrips aren't prepared from a spellbook), but I was specifically thinking about my warlock.  However, I am still very interested to learn whether any class can manage this.

I’m thinking of trying out a Hexblade Warlock in Adventurers League, which limits players to PHB+1 for character-building.  The problem I have with this is that the Hexblade is from Xanathar's Guide to Everything, but I really want the booming blade cantrip as well from the Sword Coast Adventurer's Guide. Is this legal in Adventurers League play?


My J1 visa states that it expires on 1st of Aug. But my return flight is on 7th of Aug. Do I need to get a new VISA? What should I do?

I have just received my J-1 visa (short-term scholar). On the visa it says "Expiry date: 14 November". My flight back is on the 20th of November. Do I understand correctly that even though the visa expires on the 14th, I get additional 30 days to leave the country? Thanks in advance for your answers.


What would be the right thing to use if I want the base of a transistor to be high for 12 hours and low for 12 hours?  I ask because I would like to make a circuit that regulates temperature in a room. To do this I am using a ntc thermistor and a ptc thermistor that I have set to trigger a fan or a heater depending on the temperature of the room, but my question is not about the thermistors. I want the room to be hotter for 12 hours and cooler for 12 hours a day and I don't know what to use to switch between two temperature control circuits.  I am building this for a garden. I want the plants to have a "daytime" and a "nighttime" (quotes because the plants are indoors and receive their light from lights that this circuit will help control).  I am pretty sure I can do this with a microcontroller like an arduino, but I am curious if there is another way to do this without a microcontroller. I was thinking of a 555 timer, but I don't think resistors and capacitors exist that are big enough.  Thank you for any response you might provide.

So, i want to make a timer that will turn on/off a circuit. I want to turn on the connected device at 08:00 and stop it at 20:00, so the interval is 12 hours. Correct me if i'm wrong but i can't use IC 555(or another IC), i'll need some huge resistors/capacitors. Is there another way to build that other than using a microcontroller?


My favorite editor is Vim, so I decided to change the default editor of my ubuntu installation with the following command:  sudo update-alternatives --config editor   A prompt (with listed options) came up asking for an editor, but I noticed that it listed two flavors of Vim:   /usr/bin/vim.basic /usr/bin/vim.tiny   What is the difference between the basic and tiny options?

So, the cut down vim-tiny is installed by default in Ubuntu. I don't mind using it, but I can't find documentation and most of the commands I'm used to from normal Vim don't work. So far I've discovered that :n and :N go between buffers and :split splits the screen (but Ctrl-W+S does not), :close closes a split, and Ctrl-W+W hops between splits.  What other commands am I missing?


I have a script for creating backups and deleting old backups. It has this line:  find . -type d -mtime +29 -user admin -name "20*" -exec rm -rf {} \;  This way, directories with backups older than 29 days are deleted. This works, directories are deleted, but this message is displayed every time: find: `./2020-06-16-23-30': No such file or directory  (the date changes in the message) Please tell me why this message appears and how to correct the script. Using output redirection (>/dev/null 2>&1) is not suitable for me, because I would like to see messages about some real errors. This is a directory listing with backups: $ cd /volume1/Backup && ls -l drwxr-xr-x  2 admin users       4096 Jun 19 23:30 2020-06-19-23-30 drwxr-xr-x  2 admin users       4096 Jun 20 23:30 2020-06-20-23-30 drwxr-xr-x  2 admin users       4096 Jun 21 23:30 2020-06-21-23-30 drwxr-xr-x  2 admin users       4096 Jun 22 23:30 2020-06-22-23-30 drwxr-xr-x  2 admin users       4096 Jun 23 23:30 2020-06-23-23-30 drwxr-xr-x  2 admin users       4096 Jun 24 23:30 2020-06-24-23-30 drwxr-xr-x  2 admin users       4096 Jun 25 23:30 2020-06-25-23-30 drwxr-xr-x  2 admin users       4096 Jun 26 23:30 2020-06-26-23-30 drwxr-xr-x  2 admin users       4096 Jun 27 23:30 2020-06-27-23-30 drwxr-xr-x  2 admin users       4096 Jun 28 23:30 2020-06-28-23-30 drwxr-xr-x  2 admin users       4096 Jun 29 23:30 2020-06-29-23-30 drwxr-xr-x  2 admin users       4096 Jun 30 23:30 2020-06-30-23-30 drwxr-xr-x  2 admin users       4096 Jul  1 23:30 2020-07-01-23-30 drwxr-xr-x  2 admin users       4096 Jul  2 23:30 2020-07-02-23-30 drwxr-xr-x  2 admin users       4096 Jul  3 23:30 2020-07-03-23-30 drwxr-xr-x  2 admin users       4096 Jul  4 23:30 2020-07-04-23-30 drwxr-xr-x  2 admin users       4096 Jul  5 23:30 2020-07-05-23-30 drwxr-xr-x  2 admin users       4096 Jul  6 23:30 2020-07-06-23-30 drwxr-xr-x  2 admin users       4096 Jul  7 23:30 2020-07-07-23-30 drwxr-xr-x  2 admin users       4096 Jul  8 23:30 2020-07-08-23-30 drwxr-xr-x  2 admin users       4096 Jul  9 23:30 2020-07-09-23-30 drwxr-xr-x  2 admin users       4096 Jul 10 23:30 2020-07-10-23-30 drwxr-xr-x  2 admin users       4096 Jul 11 23:30 2020-07-11-23-30 drwxr-xr-x  2 admin users       4096 Jul 12 23:30 2020-07-12-23-30 drwxr-xr-x  2 admin users       4096 Jul 13 23:30 2020-07-13-23-30 drwxr-xr-x  2 admin users       4096 Jul 14 23:30 2020-07-14-23-30 drwxr-xr-x  2 admin users       4096 Jul 15 23:30 2020-07-15-23-30 drwxr-xr-x  2 admin users       4096 Jul 16 23:30 2020-07-16-23-30

I need to delete all compiled data:   directories called build, directories called obj, *.so files.   I wrote a command   find \( -name build -o -name obj -o -name *.so \) -exec rm -rf {} \;   that goes through all the directories recursively and deletes all I need.  Why do I have such an output at the end? Maybe I should write a different command.  find: `./3/obj': No such file or directory find: `./3/build': No such file or directory find: `./1/obj': No such file or directory find: `./1/build': No such file or directory find: `./2/obj': No such file or directory find: `./2/build': No such file or directory


I am having difficulty seeing if it is the case that if all subgroups of a group are cyclic, that the group itself is cyclic.

Prove or disprove?   I'm leaning towards it being true but not sure. Any hint would be greatly appreciated.  In case of it being false, i.e a non-cyclic p-group can have all cyclic proper subgroups, is there any way to count them?


I am often coming across this syntax in a Java code-base that I am going through: className.class.method() What does that mean? Is it any different from className.method()?

What is reflection, and why is it useful?  I'm particularly interested in Java, but I assume the principles are the same in any language.


How do I calculate $\lim\limits_{n \to \infty} nx^{n+1}$ where $x\in(-1,1)$?  Intuitive I think it's 0. I tried L'Hôpital's but it seems too complicated and I'm sure there's a simpler solution.

If $-1<x<1$ show that $\lim\limits_{n \to \infty}{n\,x^n} = 0$. I don't have idea. I only prove that $n\,x^n$ is decreasing.


A stock has a bid of 100.00 for 500 shares. I issued a sell order for 1000 shares of the same stock for 100.00.  What will happen? Will the sell order wait until there's 500 shares available at 100.00 or will it sell to the next available bid?

What will happen if my order exceeds the bid or ask size? For example, if the bid or ask is 100 shares, but I want to buy 100,000 shares, is it possible to do so?


For $c>0$, consider the quadratic equation ${x^2-x-c=0, x>0}$. Define the sequence $\{x_n\}$ recursively by fixing $x_1>0$ and then, if n is an index for which $x_n$ has been defined, defining ${x_{n+1}=\sqrt{(c+x_n)}}$. Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  So, I know that a sequence must be bounded and monotone in order for for it to converge monotonically. I also have the solution to the quadratic equation, $x'=\frac{1+\sqrt{1+4c}}{2}$. My professor says that there will be two cases, which I understand as we have to consider it increasing or decreasing. But, the other hint he gives which is to use algebra to establish that $x_1\leq x_2 = \sqrt{c+x_1}$ is confusing to me. He also says to state case 1 as $x_1 \leq x'$, and I am just very confused about everything.   Wouldn't I be able to just prove it is monotonically increasing as $x,c\geq 0$ and then somehow show it is bounded? (Not that I would know how to do that either)  Thanks for any help

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


If the batsman hits the ball and the ball spins and goes to the wicket, if he stops the ball with the bat, is he out or not out?

If the batsman hit the ball and hits the ball while going to the wicket if he stops the ball by the bat he is out or not out?


I am very new to linux. I tried to install sopcast on it but it failed and then I installed it on wine. But now every time i run the sudo apt-get update it is taking very long trying to install(?) the sopcast package and fails every time. How can i completely stop ubuntu from trying to install this package?  Here is whats going on in the terminal when i run sudo apt-get update. A lot of Ign: lines, like   Ign:24 http://ppa.launchpad.net/ferramroberto/sopcast/ubuntu xenial/main i386 Packages   and it ends with  W: The repository 'http//ppa.launchpad.net/ferramroberto/sopcast/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: http//ppa.launchpad.net/lyc256/sopcast-player/ubuntu/dists/vivid/Release.gpg: Signature by key 732241F9E505AA9CBC15CC719A2E47237733638E uses weak digest algorithm (SHA1) E: Failed to fetch http//ppa.launchpad.net/ferramroberto/sopcast/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   I am not having any big issues with this, its just that every time i run the update command i need to wait for 4-5 minutes. Is there any file I need to edit to stop it from trying to install the sopcast package? I tried sudo apt-get --purge remove sopcast* but this did not change anything

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


In this string:  <@edi:outOperatorVoyageNbr>V4</@edi:outOperatorVoyageNbr>   I would like to match:  <@edi:   But this gets matchedinstead :  <@edi:outOperatorVoyageNbr>V4</@edi:   This is the regex I have tried already:  <@.*(:+?)   But it isnt working :(

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Today i noticed the very strange thing. Running sudo apt update tells me such terrible words: $ sudo apt update Ign:1 http://archive.ubuntu.com/ubuntu eoan InRelease Ign:2 http://archive.ubuntu.com/ubuntu eoan-updates InRelease                   Err:3 http://archive.ubuntu.com/ubuntu eoan Release                               404  Not Found [IP: 91.189.88.152 80]  Ign:4 http://security.ubuntu.com/ubuntu eoan-security InRelease                 Err:5 http://archive.ubuntu.com/ubuntu eoan-updates Release                       404  Not Found [IP: 91.189.88.152 80] Err:6 http://security.ubuntu.com/ubuntu eoan-security Release   404  Not Found [IP: 91.189.91.39 80] Reading package lists... Done          E: The repository «http://archive.ubuntu.com/ubuntu eoan Release» does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details E: The repository «http://archive.ubuntu.com/ubuntu eoan-updates Release» does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details E: The repository «http://security.ubuntu.com/ubuntu eoan-security Release» does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details  Does it mean that official repository for Ubuntu eoan aren't supported more?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I was watching this youtube video on predicting the future if you can know the exact position and momentum of every particle in the whole universe. But you can't ever know that says Heisenberg. But what about the past? If you could theoretically take a moment in the past and look at an event, say a chemical reaction, atom by atom, would you be able to know the exact position and momentum for every particle that was in that reaction because you knew the outcome?

My layman understanding of the Uncertainty Principle is that you can't determine the both the position and momentum of a particle at the same point in time, because measuring one variable changes the other, and both cannot be measured at once.  But what happens if I measure a charged particle with any number of detectors over a period of time? Can I use a multitude of measurements to infer these properties for some point in the past? If not, how close can we get? That is, how precise can our estimate be?


I'm trying to check files within a folder to identify the file names that match my regex. My regex matches to incorrectly named files.   So, for example, I have these files in a folder:  -95F Front Anger BW.jpg     -95F.Front.Anger.C.Micro.jpg     -95F.Front.Fear.C.Micro.jpg     -95F.Front.Frown.BW.jpg   The regex should match the first one because correctly named filenames need to have dots instead of whitespaces.   public static void main(String[] args) {    Pattern patternList = Pattern.compile("^(?!(?:((\\d{1,3}([FM])\\."              + "(Front|Profile|Right)\\.(Anger|Fear|Frown|Smile)\\."              + "(BW\\.Micro|BW|C\\.Micro|C)))|(\\d{1,3}(F|M)\\."              + "(Front|Profile|Right)\\.(Neutral|Smile)\\.(C\\.Micro|C|BW\\"              + ".Micro|BW|HighLight|LowLight|MedLight)\\.(BW\\.Micro|BW|C\\"              + ".Micro|C))|(\\d{1,3}(F|M)\\.(Selfie1|Selfie2|StudentID)\\."              + "(C\\.Micro|C|BW\\.Micro|BW)))).*$");      Scanner in = new Scanner(System.in);   System.out.print("Enter base directory: ");   String dir = in.nextLine();    checkFolder(new File(dir), patternList); //EXCEPTION HERE  }  private static void checkFolder(File root, Pattern patternList) {   for(File file : root.listFiles()) //EXCEPTION here         if(file.isFile()){             if(!patternList.matcher(file.getName()).matches())                checkFolder(file, patternList); //EXCEPTION here             else                 System.out.println(file);         }         }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have to create a function that checks if number is in array. So I've tried this:  function getNumber(x, array) { for (let i = 0; i < array.length; i++) {     if (!x == array[i]) {         console.log(false);     } else if (x == array[i]) {         console.log(true);     } }  getNumber(4, [5, 10, 2, 3, 5]);    It works just if x is in array but if it's not console doesn't show anything  I want to know if there is easier(faster) way to check it

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


Does anyone know a material or even proof of the theorem that says every polynomial of degree n has no more than n REAL roots(real roots, no complex roots)?

Let $p(x)$ be a non-zero polynomial in $F[x]$, $F$ a field, of degree $d$. Then $p(x)$ has at most $d$ distinct roots in $F$.   Is it possible to prove this without using induction on degree? If so, how can I do this?


Is there any way to enable inverse scrolling like on Mac OSX?

Two-fingered scrolling is working fine, but is there a way that I can reverse the direction (natural scrolling)? It seems backwards opposed to the way OSX does it.


Do we assume that the population distributions are normal, or that the sample distributions are normal, or that the sampling distribution is normal? If the latter, what do we mean by sampling distribution in this context?  Why do we need to assume this?  Does the normality of these things entail or suggest the normality of others?

What are the usual assumptions for linear regression?   Do they include:   a linear relationship between the independent and dependent variable independent errors normal distribution of errors homoscedasticity   Are there any others?


My question is related to the first page of  and refers to this specific sentence:     Armed with the best physics of the 20th century, Albert Einstein came to very similar conclusions with his theory of relativity. Just consider the effect of mass on time. A planet's hefty mass warps time -- making time run a tiny bit slower for a human on Earth's surface than a satellite in orbit. The difference is too small to notice, but time even runs more slowly for someone standing next to a large boulder than it does for a person standing alone in a field. The pre-big bang singularity possessed all the mass in the universe, effectively bringing time to a standstill.   Considering that, here is my question: Does time actually run slower for a human standing next to a boulder? How does that work and how/where can I find out more?

If I were to stand by a pyramid, which weighs about 20 million tons, I would slow down by a trillion million million million of second. Don't know if that's exactly right, but you get the point. Also, if you went into a black hole, time would stop at the event horizon (as measured by a clock of a distant outside observer). Why is this?


I have a directory with several duplicate files, created by a program. The duplicates have the same name (except for a number), but not all files with the same name are duplicates.  What's a simple command to delete the duplicates (ideally a single line limited to GNU coreutils, unlike )?  Example filename:  parra1998.pdf parra1998(1).pdf parra1998(2).pdf

I want to find duplicate files, within a directory, and then delete all but one, to reclaim space. How do I achieve this using a shell script?  For example:  pwd folder   Files in it are:  log.bkp log extract.bkp extract   I need to compare log.bkp with all the other files and if a duplicate file is found (by it's content), I need to delete it. Similarly, file 'log' has to be checked with all other files, that follow, and so on.  So far, I have  written this, But it's not giving desired result.  #!/usr/bin/env ksh count=`ls -ltrh /folder | grep '^-'|wc -l` for i in `/folder/*` do    for (( j=i+1; j<=count; j++ ))    do       echo "Current two files are $i and $j"       sdiff -s $i  $j       if [ `echo $?` -eq  0 ]       then          echo "Contents of $i and $j are same"        fi     done  done


I know little about group theory, and the concept of a field characteristic is new to me. Although there are some posts on this website that explain it very well.  "In layman's terms, it's the amount of times we can keep adding 1 to itself without looping back to 0. The characteristic being $p$ means that $\underbrace{1+1+\dots+1}_p=0$."  I think I can get my head around the idea, but there is still something I don't understand.    "We can see quickly using a zero divisor argument that the characteristic of any field with positive characteristic must be prime."  Why is it that it has to be prime? Why can't it be something else?

I'm trying to prove that the characteristic of any field $F$ is either $0$ or a prime number, but I have no idea what to do.  Help?


This newly appeared in Ubuntu 18.04 and was not seen in previous versions.  First when we save a pdf from a browser (firefox and chromium), a dialogue box pops up asking us to enter the file name and/or choose a location.   Secondly In previous versions of Ubuntu, this dialogue box could be dragged around to any location on the screen, in 18.04 this does not happen and what is worse the popup dialogue box freezes the entire browser so that one can not scroll down the background page.   This becomes especially irritating as while saving a file I generally give a file name similar to the title of the article, but with this new feature, the dialogue box blocks the title and forces me to do extra work.   Is there a workaround? Can this be changed in upcoming updates?

I have Ubuntu 17.10 with GNOME 3.  What happens: I have (for example) LibreOffice Calc open, with some data columns in it.  I highlight the columns I want to chart, then I select INSERT > CHART.  The chart child window dialog pops up on top of my data, so I want to move it to the side.  When I grab the top bar and move it, the parent (spreadsheet) window minimizes (I think it actually disappears).  Continuing the above example, if I click FINISH on the chart window, I can then see the minimized spreadsheet application, which is the window title bar plus the menu bar just below it.  This seems like really odd behaviour and certainly falls under the category of "not being useful to the user", since the whole idea of moving the child window in the first place was just to be able to better see the spreadsheet!  In other applications, for example the PDF viewer, a slightly different problem occurs.  When I try to move the child window (for example the print dialog) the parent does not minimize but instead follows the child window around.  This is less surprising than having the parent disappear entirely but equally useless in terms of allowing the user to see the information present in the parent window.  Update 2017/11/06  Pomsky's answer below fixes the problem, but leaves me wondering why the window manager is making the decision that all child windows have modal behaviour (or don't), and not the applications themselves; and further, why modal behaviour prevents moving the child screen around when it obscures useful info on the parent screen.  Neither of these seem like good design to me...


How come a person with blood group O can donate to a person with blood group AB? Since there are A and B antibodies in the O blood group blood surely this would cause agglutination in the blood of the recipient?  My first hypothesis was that the antibodies and red blood cells were separated through use of a centrifuge or something but blood transfusion has been used for hundreds of years before this machine was even invented? What is going on here? Or was it just that before blood types were discovered only people with identical blood groups could donate/recieve from one another?

The blood of persons of blood group O contains antibodies against antigens A and B. The red blood cells of persons of blood group A have A antigen on their surface. If someone with blood group A receives blood from a donor of group O, then anti-A antibodies in the donor blood should attack the A antigens on the recipient's red cells. Shouldn’t this be a problem?


If a sequence $\{X_n\}_{n\in\Bbb N}$ satisfies $X_{n+1} - X_n \to 0$, must $\{X_n\}_{n\in\Bbb N}$ be a Cauchy sequence, thus convergent?   Intuitively, if a sequence is convergent (Cauchy), then as $n$ gets larger, the difference between two terms will shrink to $0$. But I feel that $\{X_n\}_{n\in\Bbb N}$ needn't to be Cauchy if $X_{n+1} - X_n \to 0$. I have no idea how to approach it.

Since the definition of Cauchy sequence is: , I noticed we need an absolute value for $a_m-a_n$ in the definition so the statement would be false. But I can't find such a couterexample. Maybe it is true?


It is probably very unlikely for anybody to encounter this bug, but just for completeness’ sake:  If you try to access the edit link to a post on a per-site-meta, e.g.,   without being logged in (e.g., in a private browser window), you get the following error message:     There is a pending suggested edit in the queue, try again in a few minutes.   This happens always – even if there is no suggested edit.

Visiting  produces "404 error" but visting  produces "There is a pending suggested edit in the queue, try again in a few minutes." Is it a bug?  When attempting to visit the page (not in edit mode):    When attempting to visit the page (in edit mode):