It is possible to have Python code in a PostgreSQL stored procedure. For example:  CREATE FUNCTION someProc() RETURNS void AS $$     # Some Python3 code... $$ LANGUAGE plpython3u;   But how can I include a python file from this code?  The current directory of Python running in PostgreSQL is this:  >>> os.getcwd() ... /var/lib/postgresql/9.3/main   I tryied the following, which worked:  CREATE FUNCTION someProc() RETURNS void AS $$     import sys     sys.path.append("/dir/to/file")     from python_file import pythonFunction     # More Python code $$ LANGUAGE plpython3u;   This doesn't seem very good for many obvious reasons. Is there a better way to import a python file, or just calling a python function from a python file?  Edit: There isn't any specific PostgreSQL method to import a file. But  the best way is in the correct answer bellow, which resembles my original solution but it is better.

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


I have installed Ubuntu 12.04 alongside windows 8 in my DELL 3521 laptop and everything is working fine except the wi-fi in Ubuntu. In win 8 wifi is working well but when I start Ubuntu it does not show any wifi options.  I have tried installing all the drivers required but it's still not working.  Atheros Communication Inc. Device [168c:0036] (rev 01) subsystem: dell device [1028:020c]

I have installed Ubuntu 12.04 alongside Windows 8 on my Dell Inspiron 3521 15R. Wifi is working perfectly fine on windows 8 but its not working on Ubuntu 12.04, rather its not even getting detected.  I have tried installing backports by   sudo apt-get linux-backports-modules-cw-3.6-precise-generic   This didn't work. I have tried installing almost everything, but still not working.  Result of : lspci  00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Ivy Bridge PCI Express Root Port (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4) 00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04) 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Device 6601 07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) 08:00.0 Network controller: Atheros Communications Inc. Device 0036 (rev 01)   Result of: lsusb  Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0cf3:0036 Atheros Communications, Inc.  Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp.  Bus 001 Device 005: ID 0c45:64ad Microdia    Result of : rfkill list  0: hci0: Bluetooth Soft blocked: no Hard blocked: no


Fifty miles is a long way to ride a motorbike.   Why use is with miles which looks like a plural noun? Can you explain me what the rule is?

Should I use is or are in this sentence?     100 apples are/is considered as a large number of apples.


Firstly, I should mention that the above question hits my mind when I am solving a problem in Abstract Algebra which is- Find the number of elements in $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$. I have solved the problem in a following manner. I know that $K[x]$ be a polynomial ring over field $K$. Let, $f(x)$ be a non-zero polynomial in $K[x]$ with deg$(f)=n>0$. Then the quotient ring $\frac{K[x]}{<f(x)>}$ contains polynomials of form $g(x)+<f(x)>$ where $g(x)$ is a polynomial in $K[x]$ with degree at most $n-1$. So, cardinality of $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$ is same as of $P_2[\Bbb{Z}_3]$, set of all polynomials with degree less or equal to 2 and having coefficients from $\Bbb{Z}_3$. Again $P_2[\Bbb{Z}_3]$ has same cardinality as of the set of all 3-tuples(since the polynomials should have degree at most 2) with entries from $\Bbb{Z}_3$. I have listed all 3-tuples with entries from $\Bbb{Z}_3$- $(0,0,0), (1,0,0), (2,0,0), (0,1,0),(0,2,0), (0,0,1), (0,0,2), (1,1,0), (0,1,1), (1,0,1), (2,2,0), (0,2,2), (2,0,2), (1,2,0), (0,1,2), (1,0,2), (2,1,0), (0,2,1), (2,0,1), (1,1,2), (1,2,1), (2,1,1), (2,2,1), (2,1,2), (1,2,2), (1,1,1), (2,2,2).$ So, number of elements in $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$ is $27$. But still the method is too laborious if the degree of polynomials increases of cardinality of field increases. So, I need to establish a easy way out or a formula. Now, I try to find a general formula to find number of polynomials in $P_n(F)$ (set of all polynomials with degree at most n and having coefficients from F) where F is a finite field with cardinality $m$.($n,m\in \Bbb{N}$) To do that I just need to find cardinality of the set $\{(a_0, a_1,...,a_n):a_i\in F\quad\forall i=\{0, 1,...,n\}\}$. How can I find that? Can anybody help me do this? Thanks for your help advance.

Given an arbitrary finite field $K$ (not necessarily $\mathbb{F}_p$ with $p \in \mathbb{P}$) with $|K| = q$ and an irreducible polynomial $f$ with $\alpha$ as root and degree of $n$. Is $|K(\alpha)| = q^n$ and why? Its clear to me for $K$ isomorphic to $\mathbb{Z}_p$ with $p$ is a prime number.


For prime $p$, show whether $$\prod_{p \geq 1} p^{\lfloor \frac{x}{p-1} \rfloor} \sim x!$$ as $x$ approaches infinity, and   explain.   I don’t know that it’s true, but I thought that it followed, if perhaps somewhat indirectly, from the fact that an arbitrarily large positive integer has, on average, 1 factor of 2, $1/2$ factors of 3, $1/4$ factors of 5, et cetera, so the product of the integers should approach the product of the approximations.

How does one find the highest power of a prime $p$ that divides $N!$ and other related products?  Related question: How many zeros are there at the end of $N!$?    This is being done to reduce abstract duplicates. See   and  for more details.


Good Morning ,  Why can I still authenticate with a public key via ssh while my account is disabled on active directory?  My infrastructure is CentOS and authentication by active directory with winbind and pam.  Is it a hole of security of winbind and pam ? Do you know a solution for this problem ?   Thank's a lot for your answers.

on one of the boxes I don't control at work I use ssh keys to log in. Our passwords are set to expire after a few months. What happens if I don't reset my password and it expires? will I still be able to login? Does what happens depend on some sshd setting? or some pam setting?


In Loring Tu's Introduction to Manifolds, the author states:      "The tangent space of $S_n$ [the space of symmetric $n\times n$   matrices] at any point is canonically isomorphic to $S_n$ itself,   because $S_n$ is a vector space."   There are several questions on Math stackexchange, but in all of those that I've seen, the answers are either incomplete, leaving aside details that shouldn't - specially for someone who is learning this by themselves - or they are too terse and confusing. Also, they usually assume that we can differentiate the determinant. When Tu writes the sentence above, he still hasn't talked about what's the differential of a determinant.  So, I'm looking for a complete proof, with an effort from the author to be as clear as possible, and without using the differential of the determinant. This last condition is not binding.   Thanks.

I'm self-studying Guillemin and Pollack, but I'm stuck on Problem 3 of section 2. It says that if $V$ is a vector subspace of $\mathbb{R}^N$, then $T_x(V)=V$ if $x\in V$.  If $x\in V$, then since $V$ is a manifold, there is a local parametrization $\phi: U\to V$ where $U$ is open in $\mathbb{R}^k$. Without loss of generality, we can require $\phi(0)=x$. Then $T_x(V)$ is defined to be the image of $d\phi_0$ on $\mathbb{R}^k$.   An arbitrary element of $T_x(V)$ looks like $$ d\phi_0(v)=\lim_{t\to 0}\frac{\phi(0+tv)-\phi(0)}{t}=\lim_{t\to 0}\frac{\phi(tv)-x}{t} $$  but this doesn't seem very useful to show $T_x(V)=V$. What is the right approach?


Theorem: Let F be a finite field of characteristic p. Then p is a prime and $\left | F \right |=p^{n},\left [ \exists n>0 \right ] \in \mathbb{N}$  Note that the characteristic of F denoted Char\left ( F \right )=p \neq 0 $\mathbf{For\space each \space \lambda \in \mathbb{Z}_{p} \space and \space a\in F}$ then $\lambda\cdot a=a+\cdot \cdot \cdot +a$ and $\lambda \cdot a \in F$ by definition of ring. The ring axiom implies that F is a vector space over $\mathbb{Z}_{p}$. Since F is finite, F has finite dimension and so have a finite basis $b=\left \{ \vec{e}_{1},\cdot \cdot \cdot \vec{e}_{n} \right \}$ In a vector space, every vector element \alpha is a unique linear-combination of basis vector so $\forall \alpha \in F$, $\alpha =p_{1}\vec{e}_{1}+\cdot \cdot \cdot +p_{n}\vec{e}_{n} \forall \left \{ p_{i} \right \}^{n}_{i=1}$ so, $\mathbf{the \space size \space of \space F \space is\space p^{n}}$. Two questions: What is the motivation behind the first highlighted bold? Secondly, is $\left | F \right |=p^{n}$ to be interpreted as $\left | F \right |=n\cdot p$ ?

Let $F$ be a finite field. How do I prove that the order of $F$ is always of order $p^n$ where $p$ is prime?


I recently upgraded to Ubuntu 20.04. After this, my system is not detecting my Wi-Fi. My wireless adapter is an Intel 7265. I watched some YouTube videos about this issue, which all suggested that I should update my drivers using Software & Updates. But just like others, I did not get this option Installable from CD-ROM/DVD.  As you can see I didn't get any options.   After I tried to update, GNOME Software shows: The repository 'cdrom:/Ubuntu 18.04.4LTS _Bionic Beaver_ - Release amd64 (20200203.1) bionic Release' does not have a Release file.  the above title message. What should I do?

Every time I try update (using sudo apt-get update) my Ubuntu I get this problem:  W: The repository 'cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) 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: The repository 'ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/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. E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   How can I fix it? I use Ubuntu 16.04 LTS


The problem reads as follows:   Find a map $f: [0,1] →ℝ$ such that $f$ is differentiable everywhere but $f'$ is unbounded.   Obviously $f$ is continuous, and $f'$ is unbounded if   $∀M \geq 0 \ ∃x$ such that $|f'(x)|>M$  How would you go about finding this function?

I'm searching for a derivable function defined on an interval $ [a,b]$ whose derivative is not bounded on $[a,b]$.


I'm reading trough a proof that the number of (group) homomorphisms $\mathbb{Z}_n\rightarrow \mathbb{Z}_m$ is $$\text{gcd}(n, m),$$ and this is the only step that I'm not understanding, namely, that the number of solutions to the equation $na\equiv _m0$ for $0\leq a <m$ is $\text{gcd}(n,m)$.  I would appreciate any help.

I want to ask a question about modular arithmetic. I know, that modular multiplicative inverse exists only if modulo and integer are relatively prime. I want to know, are there any ways of division in modular arithmetic, if modulo and integer aren't relatively prime? I tried to find info about that, but failed.


I have a password secured mariadb server on an Ubuntu 18.04 server.  I can log in at the command line using  mysql -u root -p with my password.  But when I go to ` I can not log in as root.  This is the error I see:  #1698 - Access denied for user 'root'@'localhost'    mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'   I am definitely using the same password I use on the command line.  I can log in as user phpmyadmin with the password I entered during dpkg-reconfigure phpmyadmin.

I'm using Ubuntu desktop 16.04 (upgraded from 15.10).  I had installed phpmyadmin from by apt-get install phpmyadmin. It works if I go to localhost/phpmyadmin but I cannot log into it as root.  I have searched a lot for it. I have found many sources in which they suggest to alter /etc/phpmyadmin/config.inc.php and replace the user and password with 'root' and '' (empty for password). But my config.inc.php is different from theirs. For example in my file, there is no line for user and password and it seems it gets it automatically from another file which is /etc/phpmyadmin/config-db.php. Despite this, I have changed the user and password in that file, but now I get this error:  #1698 - Access denied for user 'root'@'localhost'   What I should do?    Phpmyadmin Version: 4.5.4.1deb2ubuntu1 mysql  Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using  EditLine wrapper


Salutations,  I have what seems to be a simple problem but is very much not. I want to take a string and split it into command line arguments. I have been Googling this question for weeks and can't find anything that suits my needs.   For example, the line: --foo=bar -foo="bar test" --foo "bar \"test\"" --foo bar  Would split into: (in this order)   --foo=bar -foo=bar test --foo bar "test" --foo bar   EDIT  Yes I realize --foo is use more that once. This is splitting/tokenizing. Not parsing, that's the next step. I don't care if that would error when i go to parse. What i want to do RIGHT NOW is get the string into an array state that i can then feed into Mono.Options  EDIT 2  Read the example. That is what I am trying to accomplish. JUST that.

When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as .


This question is not a duplicate of the other, the other is general, this is very specific.  my question is similar to -  but slightly different.  I have Centos 6.3, Apache/2.2.15, PHP 5.6.24 running Moodle, Passenger 4.0.41 and Postfix 2.6.6-6.el6_7.1 hosted at rackspace.   I dont believe my rails server sends mail through postfix, but moodle does for sure send password resets etc through postfix.  Bad guys are somehow sending spam from my server.  Here is what the postfix log looks like:  Aug 26 18:37:32 myserver postfix/error[18958]: CEF352EDAA:     to=<someemailvictim@yahoo.com.br>, relay=none, delay=7714,  delays=7714/0.03/0/0, dsn=4.4.2, status=deferred (delivery temporarily  suspended: lost connection with mta5.am0.yahoodns.net[98.136.216.26] while  sending RCPT TO)   Here is what the email looks like (from postfixq)  *** ENVELOPE RECORDS deferred/C/CEF352EDAA *** message_size:           13583             190               1               0           13583 message_arrival_time: Fri Aug 26 16:28:58 2016 create_time: Fri Aug 26 18:37:31 2016 named_attribute: rewrite_context=local sender_fullname: Apache sender: apache@myserver.localdomain *** MESSAGE CONTENTS deferred/C/CEF352EDAA *** regular_text: Received: by myserver.localdomain (Postfix, from userid 48) regular_text:   id CEF352EDAA; Fri, 26 Aug 2016 16:28:58 +0000 (UTC) regular_text: content-type: text/html regular_text: Subject: Parabens, agora você pode desfrutar do melhor do cinema - Anote seu voucher: NETFLIX440140 regular_text: From: voucher@myserver.localdomain   I added & bounced apache  mail.add_x_header = On mail.log = /var/log/phpmail.log   I get no log files from php....so I think it is not php...  The other interesting thing is I had postfix off at the time the message says it "arrived", notice the 2 hour delta between create and arrived.  The other interesting thing is my root mailbox is huge (/var/mail/root).  The last interesting thing is the bad guys put 200k spam in my queue last Thursday/Friday, I found and cleaned the queue by Sunday. Only ran postfix during the day all week, and nothing...then all of a sudden today turned it on, and bamm, slammed again.  I don't see anything nefarious in any apache log files.  I ran maldat and it found nothing.  My server is fairly well locked down at this point (but may not have been before), certificate login only, nothing scary in last...only running open ports on 80,443 and 22.  Any ideas? Any suggestions of where to look next, yes I am going to nuke this vm eventually.....but I hate the idea of not understanding where the bad guys got in and how they are doing it...

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


What is the difference between ∀x∈U : ~p(x) and ~∀x∈U : p(x) ?? Could anybody give any English sentences explaining both of them?

Could you explain what is the difference  between $\forall x \neg P(x)$ and $\neg \forall xP(x)$  or $\exists x\neg P(x)$ and $\neg \exists x P(x)$ ?


I have an UI which contains a button and a list which contains some data. When the user clicks on the button before the list is loaded, it gives a NPE. I added a null check like this which prevents the crash.  //here cardData is the List  which needs load.  if (cardData != null) {     for (CardDisplayData display : cardData) {                // do something             }    }   I was doing this at the end of onCreate        new FetchData().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR).get();   I removed the null check and replaced the executor. Now, the list data loads before opening the UI and there is no crash anymore. But this has slowed down the performance as the UI loads first and then implements the button listener.   My Async task,   private class FetchData extends AsyncTask<Void, Void, Void> {          @Override         protected Void doInBackground(Void... voids) {             displayData(); // here is the data that needs to be displayed             return null;         }          @Override         protected void onPostExecute(Void aVoid) {             super.onPostExecute(aVoid);             try {                 Collections.sort(cardData);             } catch (IllegalStateException ise) {                 LOG.warn("Illegal state exception, ignoring it {}", ise);             }             PrintStockAdapter adapter = new PrintStockAdapter(getApplicationContext(), cardData);             details.setAdapter(adapter); //details is a listView             adapter.notifyDataSetChanged();         }     }

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 would like to enumerate All the $1$-factors, or perfect matchings, of the complete directed graph $K_{2n}$. Is there an algorithm or method to enumerate all the perfect matchings?

In wikipedia FKT algorithm is given for planar graphs. Not anything for complete graphs. I need to find the number of perfect matchings in complete graph of six vertices.


I want to install Ubuntu and learn Linux.  I've been using Raspbian a bit and really would like to get away from Windows as much as possible.  The only problem is some of the games I use requires Windows for now.  Also, I'm taking classes through Coursera and using online tutorials to learn Linux from and would like an operating system installed besides the Raspbian I have on my Pi.  I have a desktop computer with Windows 10 installed on a SSD (M.2 if it matters) and another HDD used to store files. I have a new 1 TB HDD I'd like to install Ubuntu on. My plan is to install it and place the GRUB bootloader on the new drive.  I can then point the UEFI to that drive as the primary boot drive and GRUB should allow me to choose Linux or Windows. My thought is if I do this, I can change the boot order in UEFI back to C:\ drive and have the machine boot directly to Windows as it does now. Then I have the option of having a dual boot system or a Windows only system. Is this viable?  Should I use the whole drive for Linux?    Also, I'm reading a couple different opinions on disabling Secure Boot and Fast Boot from the UEFI.  Any reason not to disable these in my plan above?  Any other advice is welcome. I appreciate the help!

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I have a combinatorics problem, and I don't know my answer is correct or not.   The problem is the following :   Assume that X people line up to get into Y different clubs. How many ways are there to do it? (The people are distinguishable and the order people are in line matters.)  My attempt : we have Y different kinds of clubs. So, we have ${X+Y-1 \choose X}$. But, $X$ people are distinguishable, we have to permute them, $X!$. Thus, the final answer is $X!{X+Y-1 \choose X}$. Is that right answer?

Assume that there are $n$ people line up to get into $m$ different clubs. How many ways to do it if each people is different and order of people in the line matters.  Sol. Clearly, each people has $m$ different choices for clubs. So there are $m^n$ ways of choosing clubs. Now we count number of different lines. Let $x_i$ be the number of people lining to get to the club $i$, $1 \leq i \leq m$, $x_i \geq 0$.  Then $$x_1 + x_2 + ... + x_m = n$$ with $x_i$ non-negative integers. So there are ${m+n-1}\choose{n-1}$ ways, ignore order in each line. So there are ${m+n-1}\choose{n-1}$$ x_1!x_2!...x_n!$ possible lines.  The answer is weird since it is in $x_1, ...,x_n$ terms, and I think it is wrong. However, I am not sure how to fix it.  Any help please ?


Hello, I wanted to introduce a line break in some of my titles for aesthetic reasons (to avoid a line with one word)... But now this has seeped into the contents page. Is it possible to have a line break in the title, but not in the contents page?   (this is what I typed in for the chapter heading: \chapter{The Birth of Stellar \Black Holes})

my chapter title is too long and I have the necessity to cut it in two different lines. well which could be the best way to cut it?I tried using \newline but unfortunately this modification affects also title page in every page.


Shell script runs two functions as child processes (via &). Both of them went to sleep (via sleep command).  Is it possible to wake them?  I have their pids.  P.s.  I don't want to run sleep with & and wait

In the bash terminal I can hit Control+Z to suspend any running process... then I can type fg to resume the process.  Is it possible to suspend a process if I only have it's PID? And if so, what command should I use?  I'm looking for something like:  suspend-process $PID_OF_PROCESS   and then to resume it with  resume-process $PID_OF_PROCESS


My question refers to a statement in Laures' and Szymik's "Grundkurs Topologie" (page 233). Sorry, there exist only a German version. Here the relevant excerpt:    My question is why a category having a initial (or a final) object has a contractible classifying space?  Previously the author just shows that equivalent categories induce homotopy equivalent classifying spaces via   $$BC\times \Delta^1 \to BD$$.  Does this observation provide an answer of my question? Why?  Here the construction of classifying space with which the author works:, namely as a nerve of the functor $B:Cat \to \Delta^{op}-Sets, C \mapsto Mor(-,C)$:

Given a pointed category $X$, is $|N(X)|$ contractible ($N(X)$ is the nerve of $X$)? Or are there counter-examples?


I am attempting to modify a /summon command to add an enchantment. My command looks like this:  summon item 8 62 -13 {Item:{id:minecraft:bow,Count:1}}   I have tried modifying the command like this:  summon item 8 62 -13 {Item:{id:minecraft:bow,Count:1,ench:[{id:19,lvl:1}]}}   But it does not apply any enchantments.

I am making a Minecraft Mini Game adventure map, and one of the levels has a /setblock command, I am using the command in a way to spawn an item in a chest (Wooden Button) I need the wooden button to have CanPlaceOn tag so it can be placed on a log. I have tried this command: setblock 294 5 -1251 minecraft:chest 0 replace {Items:[{Count:1,Slot:0,id:minecraft:wooden_button,CanPlaceOn:[log]}]}`


In The Last Jedi would Holdo's plan have worked if not for Poe's folly?      Holdo planned to discreetly evacuate the remaining Resistance members using small transports.  It seemed to me that the reason many of them got blown out of space was because when Finn and Rose got caught that guy DJ told the enemy about the escape transports.  Somehow the bad guys didn't see them until DJ told them to look.  So the transports could have evaded the bad guys had Poe not hatched that sabotage plan.   What I'm asking is, did everyone else see it that way?  The First Order would not have seen the small transports if DJ didn't alert them about it?  Or did I miss something?  If, so, really?  Poe could disobey orders, mutiny, fail, get more than half his comrades killed and that's OK because he meant well.

(Last Jedi spoilers ahead, if you haven't seen the movie, please don't read on.)  So, fridge logic moment for me:      If Vice Admiral Holdo had told Poe Dameron about the plan to just hold on long enough to make a covert run to Krait, then Poe wouldn't have felt the need to send Finn and Rose on their little side-trip, and the code-breaker wouldn't have overheard anything nor sold them out, and the First Order would've had no reason to notice the cloaked ships.   I do understand that there's a lesson in there about following orders, even if said orders come from a pretty face in a pretty dress, but that's kind of an out-of-universe reason. What was Holdo's reasoning? Surely she knew enough about Poe to realize that treating him like a mushroom1 would not result in anything good.  1 "kept in the dark and fed shit"


I was a newbie while installing linux mint 17.2 in my laptop. So I allocated more than 20GB for my swap memory and 30Gb for ext4 partition. Now only I realized that swap memory is using instead of RAM while running memory overwhelming applications.I have 4GB of DDR3 RAM so no need of this much of swap memory.So I want to add some memory space from swap to Ext4. Is there any idea for deleting or decreasing the swap memory and add that memory to EXT4 partition? The details of my hard disk given bellow .I'm using Linux mint 17.2 64 bit and windows 8 pro with media center 64 bit in dual boot.   $parted GNU Parted 2.3 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print                                                             Model: ATA Hitachi HTS54757 (scsi) Disk /dev/sda: 750GB Sector size (logical/physical): 512B/4096B Partition Table: msdos  Number  Start   End    Size    Type      File system     Flags 1      1049kB  106MB  105MB   primary   ntfs            boot 2      106MB   210GB  210GB   primary   ntfs 3      210GB   421GB  211GB   primary   ntfs 4      421GB   750GB  329GB   extended                  lba 7      421GB   451GB  30.0GB  logical   ext4 8      451GB   473GB  22.4GB  logical   linux-swap(v1) 5      473GB   579GB  106GB   logical   ntfs 6      579GB   750GB  171GB   logical   ntfs  (parted)     If the solution will not effect my windows files then let me know the solution. Actually I found some solutions but most of them are suggesting 'GParted ISO '.

I have a dual boot setup with Ubuntu and Windows 7. I need to shrink my root Ubuntu volume in order to get some free space to create a new partition. Are there any Windows based tools that will do this for me? I tried booting up in gparted to do this but I cannot tell which partition is which since I cannot find the size (it displays everything in blocks).


$\text{Use the PMI to prove the following for all natural numbers n.}$     $ \frac{1}{2!} + \frac{2}{3!} + \cdot \cdot \cdot + \frac{n}{(n+1)!} = 1 - \frac{1}{(n+1)!} $   So for this question I get stuck because I cannot seem to make the left side and right side be equivalent.    $\color{Green}{Proof} :$   $\mathbf (I) \; Basis \; Step :$  Show $p(1).$ For $n=1$  $\frac{1}{(1+1)!} = 1- \frac{1}{(1+1)!} \Rightarrow \frac12 = \frac12$  $\mathbf (II) \; Inductive \; Step : $   Assume $p(k)$ for a PAC $k \in ℕ ,\; \; \;\; n=k$  $ \frac{1}{2!} + \frac{2}{3!} +\cdot\cdot\cdot + \frac{k}{(k+1)!} = 1-\frac{1}{(k+1)!} \; \;  \text{Induction Hypothesis}$  Left Hand Side : We need to show : $p(k+1)$ i.e. $n = k+1$  $\frac{k}{(k+1)!} + \frac{k+1}{(k+1+1)!} \Rightarrow \ $  $\frac{(k+1)}{(k+1+1)!} +1 - \frac{1}{(k+1)!} $  Right Hand Side: $ n =k+1$   $\left(  1- \frac{1}{(k+1+1)!}\right) = 1- \frac{1}{(k+2)!}$  This is where I have made my mistake because I think I have made an arithmetic mistake on the left side because I cannot get them to be verifiable. Any hints on how to correct the  error would be appreciated. Have a good one.

Prove if $n \in \mathbb N$, then $\frac{1}{2!}+\frac{2}{3!}+\frac{3}{4!}+\cdots+\frac{n}{\left(n+1\right)!} = 1-\frac{1}{\left(n+1\right)!}$   So I proved the base case where $n=1$ and got $\frac{1}{2}$  Then since $n=k$ implies $n=k+1$ I setup the problem like so:  $\frac{k}{(k+1)!}+\frac{(k+1)}{(k+2)!}=1-\frac{1}{(k+2)!}$  After trying to simplify it I got the following:  $\frac{k(k+2)!+(k+1)(k+1)!}{(k+1)!(k+2)!}=1-\frac{1}{(k+2)!}$  However, I'm having trouble simplifying it to match the RHS.  Hints?


I'm making a small game in C++, it's working but I'm having trouble clearing allocated memory when removing objects. The game consists of 'shapes' which in turn are made up several 'blocks' (think tetris). Here's a minimal  version of my setup for storing game objects: #include <vector> #include <set> #include <algorithm> using namespace std;  struct Block{     int x; };  struct Shape{     set<Block*> blocks; };  vector<Block*> all_blocks; //Pointers to all blocks in the game vector<Shape*> all_shapes; //        -       shapes     -      int main() {      //At start of level, create blocks and shapes objects on heap and     //store pointers to them in the two vectors above     Block* b1 = new Block{2};     Block* b2 = new Block{3};     Block* b3 = new Block{5};      Shape* s1 = new Shape{ set<Block*>{b1,b2} };     Shape* s2 = new Shape{ set<Block*>{b3} };      all_blocks.push_back(b1);     all_blocks.push_back(b2);     all_blocks.push_back(b3);      all_shapes.push_back(s1);     all_shapes.push_back(s2);      //...working game...//      //Clearing memory     for(Block* b : all_blocks){         delete b;     }     for(Shape* s : all_shapes){         delete s;     }     all_blocks.clear();     all_shapes.clear(); }  Everything seems to be working so far. However now I want to be able to delete individual blocks during runtime. I came up with the following complicated  function void delete_block(Block* b){     for (Shape* s: all_shapes) { //Delete the block from every shape that contains it         (s->blocks).erase(b);     }     //Now some shape(s) may contain no blocks, remove all empty shapes,     auto it = begin(all_shapes);     while (it != end(all_shapes)){         if ((**it).blocks.size() == 0) {             it = all_shapes.erase(it);  //Remove shape from all_shapes vector             delete (*it);               //Delete the shape object from heap         }else{             it++;         }     }     //Finally delete block from vector ´all_blocks´ and delete it from heap     all_blocks.erase(remove(all_blocks.begin(), all_blocks.end(), b), all_blocks.end());     delete b;     }  This works some of the time, but after several delete_block(all_blocks[0]) it always crashed with a memory error, so something is wrong with this function, or possibly my whole setup, but I can't seem to find the problem. My console says it returned 0xC0000374. I will probably redo it with smart pointers later, but for now I would like to understand what's wrong first. How can I remove a single block/shape from the game without memory leaks and errors? What did I do wrong?

What is a smart pointer and when should I use one?


I am writing my FYP report and in this report, I need to add chapters but I am facing this error marks as "cross", the Chapter number is not showing in the document as well as section numbering is not correct as logically all sections must have numbering according to their respective chapter. Help me with this. Thanks {     \chapter{Introduction} \section{Motivation} \section{Objective} \section{Methodology} \section{Organization of Report} \chapter{Literature Review} \\ \chapter{Requirement Specification} \section{Product Requirement} \section{Organizational Requirement} \section{External Requirement} \chapter{Project Design} \section{Methodology} \section{Architecture Review} \subsection{Stator} \subsection{Rotor} \subsection{Switching Circuit} \subsection{Electric Vehicle} \section{Design Description} \subsection{Stator} \subsection{Rotor} \subsection{Switching Circuit} \subsection{Electric Vehicle} \chapter{Implementation} \section{Development Stages} \subsection{Hardware} \subsection{Simulations} \chapter{Evaluation} \section{Results} \subsection{Theoretically} \subsection{MATLAB-Graphically} \chapter{Conclusion and Future Work} \section{Conclusions} \section{Future Work} }

I’m getting an “undefined control sequence” error with the following code, using TeXstudio:  \documentclass[11pt]{article} \begin{document} \begin{center} \chapter{CHAPTER 6} \end{center} \end{document}


I have a Xenial (upgraded from Trusty) 64 bit Desktop install. I've installed the tasksel package in order to install a LAMP server (required for ZoneMinder). When runing "sudo tasksel", it displays the various package groups, some (e.g. Ubuntu Desktop) being marked with a * to show that they are already installed. LAMP server is not marked with a *. So I move the red marker to the [ ] position opposite LAMP server. However, pressing the Enter or Return keys just exits tasksel. I've tried the * and x keys with no success: they do nothing. Am I missing some packages that tasksel requires?

I found a video on YouTube that shows someone using the command tasksel from the server's boot menu after a fresh install of Ubuntu Server. Simple enough it looked like, but when I go to the options I want to choose for installation it has no information on how to select them, and when I click Enter on one of them it takes me back to the command prompt.  So how do I make a selection of the items listed under tasksel?  I have tried Shift++ to add, but no luck. Anyone know?  I want to install Ubuntu Desktop, as Ubuntu GNOME GUI is not an option in the listing for Ubuntu 17.10 Server.


I installed Ubuntu alongside Windows10. Everything went fine, At the Computer starts it lets me select Ubuntu or Windows10 to boot in BUT When i choose Windows10 once the Operating systems selecting menu is gone, Windows10 is boots automatically by default. and i don't see Ubuntu anymore Even if it's still there on my HDD partition.

I installed Ubuntu on a Dell XPS 13 laptop that had Windows 10 preinstalled on it. I installed it from a USB flash drive on a partition. When I boot my computer I can only boot into Windows 10 and Ubuntu is nowhere to be seen.  If I boot into my USB then I can see that Ubuntu is installed, but I can't get to it from the BIOS boot menu.


for example,sometimes I see function like this:  public void changeColor(Color aColor){ }   what is the function or meaning of "a" in parameter "aColor"?

I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn't I put it right there where it's available?  See also:


I have an ADSL line with 20Mbit/s downstream and 1Mbit/s upstream.  Is it possible to make voice phone calls in Linux/Windows 7 using my own land line?   I don't want a VOIP software (like skype), nor an external service which requires an account. Just make a call as I make using a phone device, but using a computer connected to landline through a router.   Linux solution is preferred over Windows 7, if it's possible.   I've been searching how to do it, but I just found VOIP solutions (which requires an external service) or using a 56Kbps modem, but nothing about ADSL line.   I've seen this one: , but I'm not sure if we both ask same question. For instance, I don't need, simultaneously, data and voice. I could disconnect internet connection, if needed. And this other: , seems to much complicated. I don't need multiple lines.   Thanks.     EDIT :  I think my question is not duplicated, because is not answered in that post.   If I'm not wrong (correct me if I am), all answers, like asterisk, need a SIP provider, and that's not what I want. I don't want to pay for another provider. I already have a company who provides my land line (and internet).   In other words: I don't want to make calls through internet, I want to make calls from computer using my land line provider. Is that possible?

I live in France and the ISP I've subscribed to provides a regular phone line along with my Internet connection. Here's a simple schema of my setup:    Since I don't use this phone line I would like to switch the regular phone with a computer (preferably running Linux) where I could receive/handle calls programatically. For example, execute a shell script if I press 2, that kind of thing.  How can I receive phone calls on a Linux server and script stuff depending on the numbers pressed?


In RL I noticed that power supply cables with possibility to charge one mobile through USB compatible socket actually exist:   I actually started to wonder, whether for purpose of world building such idea could be move much more further. I mean both electronics and LED light has to convert electricity to low voltage DC, so the voltage would be already converted earlier.  OK, so the question is following: Would additional low voltage DC sockets be practical on mass scale for purpose of connecting small electronics and light? (Safety gains? More efficient conversion at socket instead of dozens of tiny converters? Only less cable clutter? Extra: Roughly which voltage would be reasonable?)  Clarification: I'm trying to make a setting, which is technically modern-like, but quite a few technologies and standards evolved in different direction. Instead of too improbable ideas like steampunk, I mostly try to use ideas that are technically feasible and reasonable enough, just in RL turned out not to be specially popular. I really doubt, that's a good question for EE because, they can can reasonably answer, that right now in RL trying to implement such standard would be not worth the effort.  It's like question concerning airships, ammo, etc... just not so cool.

Many of us have lots of devices that uses AC mains (110V/220V) to DC (typically 12VDC, 9VDC and sometimes 15VDC) adapters. There's my Wi-Fi router, my powered speakers, printer, scanner, etc.  So I would like to combine all these into a single device; do the AC/DC conversion once and have everyone tap the DC line, instead of each doing the conversion themselves.  Regarding to this, I have two questions:   is there any commercial solution out there to do this? (bench power supply for example)? suppose I have one of these beauties powering my stuff and this power supply can deliver 100W of power. Will the device always be consuming 100W of power or will the consume increase as I hang more devices?    thanks.


Hello guys i am here with this problem when i try to add facebook audience network to my application it crashes right away getting this error can anyone please help me with that ?   2020-11-11 09:01:22.946 28765-28765/com.amongushowtoplay.com E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.amongushowtoplay.com, PID: 28765     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amongushowtoplay.com/com.amongushowtoplay.com.PTPlayer}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.addView(android.view.View)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3334)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3473)         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067)         at android.os.Handler.dispatchMessage(Handler.java:107)         at android.os.Looper.loop(Looper.java:224)         at android.app.ActivityThread.main(ActivityThread.java:7519)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.addView(android.view.View)' on a null object reference         at com.amongushowtoplay.com.PTPlayer.onCreate(PTPlayer.java:91)         at android.app.Activity.performCreate(Activity.java:7893)         at android.app.Activity.performCreate(Activity.java:7880)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3309)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3473)          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067)          at android.os.Handler.dispatchMessage(Handler.java:107)          at android.os.Looper.loop(Looper.java:224)          at android.app.ActivityThread.main(ActivityThread.java:7519)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

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’m getting a windows 10 PC so I’m wondering if I can play java on windows 10 fresh from the store.

I've been using the original Java Edition on my old Windows 7 PC for years and my family just gave me a new Windows 10 PC for Christmas. Can I keep using my old Java Edition on the new machine or do I have to switch to the Windows 10 Edition of Minecraft? I really don't want to switch...


I have an image of a fiber optics network map:    I want to turn this map image (without any actual GIS data) into a vector map where each point is defined by lat, long.  To do this, I'm trying to import it in QGIS. I'm using the OpenLayers plugin to have Google maps as a basemap layer. I have an empty vector layer with projection set to EPSG:3857 where I want to draw the points.  I can't import the image and position it correctly over the Google Maps basemap.  As suggested, I tried , placing 5 points (4 at the edges and 1 at the center).  I import the map guessing the coordinate system to be `Any idea what projection was used to create that map?  I tried both pasting coordinates in this format 48.767479, -97.551781 (found on Bing Maps searching the name of the cities) and in this format 48 46 02.92, -097 33 06.41 found using .  In both cases, I end up with a super small, distorted map off the coast of Gabon.  I also tried picking coordinates from  instead, which gives me projected coordinates in EPSG:3857, and feeding them to the Georeferencer plugin worked. However, my image is now very distorted when shown on top of the Google Maps (or Bing Maps) layer.  I guess the projection is not Mercator. Any idea on how I can work on this map without the distortion?

My background: experienced programmer, amateur historian, complete beginner to GIS (so I'm using QGIS). I did learn to use the QGIS georeferencer tool though.  The input: suppose I have an image like this . Assume that it's a "naked" JPG file without any geographic metadata and the author cannot provide any such information. The input image is licensed under GNU FDL, which I'm happy to release my derivative works under.  The goal: import the path shown in the Wikipedia map into QGIS so I can change the projection, superimpose elevation, add labels for physical geography, etc.  The caveat: one workaround might just be to enter the lat/long of the locations in the map into a new GIS project. I don't want to go this route because I'd like to have a record of that particular author's estimate of the geographic information.  What I've tried: I have applied the QGIS Georeferencer to the raster JPG file with a bunch of points around the continents' edges. The alignment of points in the interior of the continent are so-so.  What I'd like to know: the distortions of this particular map are pretty noticeable around the northern edge of Eurasia, and it seems like it's a pretty standard projection. It seems to me that there ought to be an algorithmic way to identify the projection and projection parameters that generated this map, and recover an accurate non-interpolation conversion between image pixels and lat/long?   I see two questions on this:       These seem to talk about a brute-force method involving GDAL or QGIS, and to a GIS-beginner, seem somewhat labor-intensive (basically georeference and fit them to known projections) but I'm willing to try them and see if I can automate them.   The instructions on both these GIS.SE are a bit higher than my experience allows, and any hints on how exactly to do this brute-force method would be very appreciated. E.g., question 2 above shows how to use gdaltransform to convert a list of coordinates into lat/long. Are the input coordinates x-y pixel locations?


This is partly in reference to   Sometimes when posting answer on Stackoveflow I find my self posting same answer as someone else at almost exactly same time. Previously when I would notice that '1 New Answer' appeared I would check the answer first and than discard my answer if i found it to be duplicate. If that answer was different from mine I would finish writing my answer.     My own solution: After reading responses to this question and answers on some of the links that were submitted I have decided to follow advice from @kate-gregory to finish writing my answer without paying attention to new answer that might pop up. Once I post my answer if I find it to be very similar I try to improve or reword it to be a better answer.   PS. Therefore I'm no longer asking for a reason to stop me from answering.

It has been happening to me frequently that while I am writing an answer, I get notification that some answers have been posted already, or sometimes I don't even get notifications because of my slower internet and when I finally submit the answer and the page refreshes I see several other answers have already been posted.   What I do more often is that, I read the question (mostly on jQuery tag) go to jsfiddle and try setting up a working fiddle first. Then when I come back with a working fiddle I see some answers have already been posted. What should I do in these cases,   1) Just throw away the working fiddle and move to a new question  2) Post the answer anyway, which may trigger comments like, why are you copying answers or Is there an echo here? etc which I don't like to hear.  3) Check the already posted best answer and in comments suggest the answerer to use the fiddle in the answer if he hasn't added one already.  I also see a trend like people throws in a very short answer asap and continuously edit the answer to add more information and add working fiddle later. Is that something I should be doing too?   I have been active in SO recently, I am just trying to know best practices that the community follow.  Or when I make a working fiddle (which takes some time), and post the answer anyway, and hear things like why did you copy answers, or your are 5mins late with the same answer what should I do in those cases, delete the answer?  I would like someone to clear up these confusions I have.


I am not very used to linux but when my sister told me her computer was working slow I thought giving ubuntu a shot might be worth it since she doesn't do a lot with her laptop. I downloaded ubuntu 20.04 for her but one feature she used a lot in windows was missing, manual double sided printing. Our printer can not do dublex printing itself but Windows had a feature where it printed the odd numbered page first then wait until the printed pages are put to printer again then clicking on a button to continue. She's a student so she uses this daily. Is there any way of implementing this feature to ubuntu with a gui(since she doesn't understand how to use the terminal) or should I go back to windows? Model of the printer - Brother HL-1111 please inform me if you need more information about the subject or I wrote something wrong.

I am printing (Basically saving to file) a pdf. I want to print only the odd/even pages from a PDF. In the printing dialogue box which appears I see only 3 options in the range   All Pages Current Page Pages: (Specify a range)   Is there a way (without manually typing individual odd/even numbers comma separated) to accomplish this?  Is there any plugin sort of thing or alternative method to accomplish this?  I am using Ubuntu 17.04. I am attaching the screenshot of dialogue box below.


looking to download the Eclipse CDT (IDE for C/C++) but seems its currently unavailable for Ubuntu 20.04 in the apt package manager looked for snaps and flatpaks , could not find any solutions there (they have only the Java IDE) thinking about downloading the 'tar.gz' file but afraid that there would be dependencies issues, and the uninstallion would be hard any help on how to go about this?

To clean install Eclipse for C/C++ on Ubuntu 18.04 I tried sudo apt install eclipse eclipse-cdt. It's showing an error, see the log file....  log file..... !SESSION Fri Aug 16 14:39:20 IST 2019 ------------------------------------------ !ENTRY org.eclipse.equinox.launcher 4 0 2019-08-16 14:39:20.065 !MESSAGE Exception launching the Eclipse Platform: !STACK java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter     at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)     at org.eclipse.equinox.launcher.Main.run(Main.java:1438)     at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


Assume $A,B,C$ are subsets of the universal set, $U$. Prove that $$(A\cap B)\cup C=A\cap(B\cup C)$$ iff $C$ is a subset of $A$.    How would you go about proving this? Can I do something with De Morgans law and distribute the terms? Or should I do this by choosing an arbitrary element $x$ that exists in the subsets?

I have a set identity: $(A \cap B) \cup C = A \cap (B \cup C)$ if and only if $C \subset A$.  I started with Venn diagrams and here is the result:   It is evident that set identity is correct. So I started to prove it algebraic:  1) According to distributive law: $(A \cap B) \cup C = (A \cup C) \cap (B \cup C)$  2) ...  I stuck a little. Because $C$ is a subset of $A$. I thought of pulling out: $(B \cup C)$ but it seems wrong step to me.  How to prove this identity having in mind that $C \subset A$?  Updated  Venn diagram for $C ⊈ A$


I use MacBook pro with macOS High Sierra (10.13.6). The version of Xcode am using is 10.1 and I see the updated Xcode in AppStore is 10.3 which is not compatible with my environment since it expects macOS Mojave 10.14.6.  How can I get Xcode 10.2.1 which got released after Xcode 10.1 release. Also will  MacBook pro with macOS High Sierra (10.13.6) get macOS Mojave 10.14.6 update ? Thanks

I am trying to download Xcode from the App Store, but it says that I have to have a newer version of macOS. But I don't have enough space on my computer to upgrade. Its like 8 gigs or something like that and if I only could download Xcode that was compatible with macOS Sierra that would be nice.


Is there any software for speech to text ? I want to make random notes.  From searching i can only find the opposite, text to speech.  Thanks.  EDIT:  The question which has been linked to mark this as a duplicate suggests  as the solution. However,  has not had a release in more than one year and is quite buggy and unusable in newer releases of Ubuntu. Therefore, alternatives must be sought, requiring newer answers to this question.

Anyone have a simple tutorial for running speech recognition under linux? I see that pocketsphinx is available as a binary download in the software centre, but running it from terminal fails reporting that it needs parameters, but I do not know what to put there. I tried installing all the voice models listed, but I don't know where they get saved or how to make them work. I also wasn't sure what to do to make Sphinx3 work either. The Sphinx3 manpages seem broken and the pocketsphinx one doesn't have an example usage that makes sense to me.  I'm looking for something that gets 60% correct recognition from microphone input with a limited vocabulary and words, and can then write that to a text file - this stuff existed in the late 1980s. So, I know it exists and should work somehow.  Thanks.  (P.S. Internet connection is a no go)


I have a Nikon D610 and often setup the shutter and aperture for studio photos and then for some reason one of the wheels gets knocked and I end up taking a bunch of photos with the wrong exposure.  It's quite annoying as I go through the effort of making sure they're correctly exposed in order to save time later and find myself adjusting a lot of them anyway.

Is it possible to lock Shutter speed and Aperture settings so dials can't accidently change them?  Last time I was shooting with flashes I accidently moved shutter speed dial from 1/200 to 1/250. Small black stripe appeared unnoticed on all following pictures due to lag in wireless flash trigger (a piece of curtain). I want to avoid this in the future by locking SS and A.  If it is not possible, how do you personally prevent these changes from happening?  I am using Nikon D600.  (I know about AE-lock, but it controls automatic metering in [semi-]auto modes.)


I am using this macro for over 1000 entries. The code itself works the way I want it to.   Option Explicit Sub DoTheThing()  Dim keepValueCol As String  keepValueCol = "H"   Dim row As Integer  row = 2   Dim keepValueRow As Integer  keepValueRow = 1   Do While (Range("E" & row).Value <> "")      Do While (Range(keepValueCol & keepValueRow).Value <> "")      Range("E" & row).Value = Replace(Range("E" & row).Value, Range(keepValueCol & keepValueRow).Value, "")     Range("E" & row).Value = Trim(Replace(Range("E" & row).Value, "  ", " "))      keepValueRow = keepValueRow + 1     Loop    keepValueRow = 1  row = row + 1  Loop  End Sub   The problem I am having is that the Macro takes forever to run; to give you an idea, this macro is being running for 4 hours on +1000 entries and I don't know when its going to end.   Is there a way this code can be optimized to run quicker and not compromise the integrity of the code itself?  Any and all help will be appreciated.

I have a massive list of email addresses; but just to make things simple i am dealing with 3 - 10 email addresses that are typed up in 1 cell and i cant seem to MASS delete specific ones. Is there any way I can delete a specific email address from the cell, GIVEN that I have a list of specific email addresses that i want to delete. Is it a matter of finding duplicates and deleting or is there more to this?  To elaborate::  in cell A2 I have abc@abc.com aaa@abc.com bbb@abc.com ccc@abc.com  in cell A3 I have xyz@xyz.com xxx@xyz.com yyy@xyz.com zzz@xyz.com  In cell H1 to H5 I have abc@abc.com xxx@xyz.com bbb@abc.com ccc@abc.com yyy@xyz.com (each email address is in individual cells)  Is there any way that I can delete a specific email address from A2 and A3 so that I am only left with aaa@abc.com, xyz@xyz.com and zzz@xyz.com?  Additional Info: I am using Excel for Mac 2011  Any help will be highly appreciated.   Thank you!


I use Amazon Cloud and would prefer not to have One Drive active on my computer. Also, from a cleanliness standpoint I would like to remove the icon, etc. as well. However (and not surprisingly) it doesn't appear MSFT has made this an easy task. Does anyone know how to do this? Registry maybe?

First, I've tried  which is using gpedit.msc Second, I've tried  which is using SysWOW64\OneDriveSetup.exe to uninstall, and deleting of some left over registry keys.  I've rebooted.  And still every time I open explorer, I've got this big p.o.s. banner that makes me absolutely hate even using windows.    How do I get rid of this and OneDrive completely?


Does anybody know what this symbol presents?

Could someone please tell me what the symbol ringed in red represents?     I know it has ON Switch pointing to it, but the symbol has other lables in different parts of the document.


I read an  on the BBC which said that corticosteroids where used to treat Covid-19 patients in India. Later they changed the word corticosteroids into steroids and they added that they were used to reduce lung inflammation. I didn't know what corticosteroids were so I checked on Wikipedia, where I also found this , which repeats from another source that corticosteroids where used to treat Covid-19 patients. As far as I understood corticosteroids are immunosuppressors, therefore I cannot understand why they are used to threat a viral infection. Isn't there a more appropriated treatment to reduce lung inflammation in such cases? There is another question about corticosteroids and covid-19, but it asks something different:

states that steroids could do more harm than good in treating coronavirus (COVID-19), referring to .      Understanding the evidence for harm or benefit from corticosteroids in   2019-nCoV is of immediate clinical importance.   It's unclear to me how exactly the use of corticosteroids (which is a common treatments for Asthma patients) can do harm other than the vague explanation of "steroids also impair the immune system's ability to fight viruses".   How exactly does the use of steroids harm the body in case of fighting a virus such as SARS-CoV-2 (2019-nCoV) that causes COVID-19?


In my college there's a WiFi network using 802.1x PEAP. In Ubuntu 12.10 and older, I can sucessfully connect to it, but in Ubuntu 13.04, 13.10 and 14.04, it keeps asking for password and never connect.   At first I thought it was a problem with my Ralink RT5390 WiFi card as it doesn't have good open-source support and other friend were having trouble connecting to the same network with Ralink cards. So I got an Atheros AR5B22 and it solved a lot of small isues I was getting (including connecting to this netowrk), but I'm stuck in Ubuntu 12.10 because of this. Is there something I can do to get that network working in current versions, like 14.04 or it's a know bug?  I'm not sure what kind of technical info you guys need, so, just ask me if necessary...

I would like to know if my  is in anyway compatible with Ubuntu.  Dual booting Ubuntu 15.04 with windows 8.1 on an HP Pavilion G6 1d98dx.  I've tried so many different distros but the problem is the same on all of them "wireless disabled by hardware switch" I've tried rfkill unblock all but that did not fix the problem.  Bus 002 Device 002: ID 04f2:b293 Chicony Electronics Co., Ltd  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 05dc:a20b Lexar Media, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Complex 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] BeaverCreek [Radeon HD 6520G] 00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Port 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [IDE mode] 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 13) 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11) 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40) 00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 0) 00:15.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 1) 00:15.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 2) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 0 (rev 43) 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 6 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 5 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 7 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) 07:00.0 Network controller: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe 08:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)


error message Failed to create folder (/usr/local/MATLAB/MATLAB_Production_Server/R2015a/).  and also when i creat these folders this msg appear  Unable to create the destination folder /usr/local/MATLAB/MATLAB_Production_Server/R2015a/.  Please choose another destination folder.

How to install MATLAB in Ubuntu 14.04? I searched in USC, but it only has some extension for MATLAB.


I'm very confused at how this math problem is being set up... I just came across a page on my study on congruences. I've studied the theorems on it but I seem to be lagging behind in this direction.  Can I get help with these two questions and I would love to know more about the answer with steps to how the question was solved. Thanks in advance. (1) Find $2^{501} \pmod {17}$ (2) Solve for $41x \equiv 5\pmod {51}$

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


I have made a genoise sponge cake three times now. Every time when I take the cake out of the oven, it always sinks a lot. Like, as soon as I flip it onto the wire rack, the bottom falls about halfway. I know it won't really affect the taste or anything, but is there a method for preventing this? I know some bakers let their cakes cool in the oven, but won't that dry out the cake?

Recipe used:   75g flour 1/2 tsp baking powder 80g sugar + 15g sugar (for the meringue) 2 eggs (60g each) 35g oil 60g water   Instructions:   Place all ingredients except egg whites and 15g sugar in a bowl.  Beat egg whites until soft peaks. Slowly add the sugar while continuing beating to firm peaks.  Using the same beaters, mix the egg yolk mixture until just combined.  Fold the meringue into the egg yolk mixture in 3 batches. Pour into the prepared cake pans then bake in a preheated 160°C oven for 55-60 minutes.      I've noticed that the cake sets up on the sides very early into the bake. It then continues to rise in the middle to create a dome. Around the 40 minute mark the dome flattens. It further flattens once cooled and un-molded. When I flip the deflated cake upside down it looks like the cake sunk in the middle.   Does anyone know what I did wrong? Could it possibly the recipe that is failing me?


I'm trying to write a query using a variable passed through a URL, the problem is that a lot of the item names contain characters like ' or +, they weren't being passed properly through the URL, and those special character were being ignored(although I checked and couldn't see that they were reserved) Anyways, to get around this I used PHP function rawurlencode(), and rawurldecode() to pass the value as an encoded string, and on the receiving end I use the function to the decoded string. This works, and gives me the value I need to search for in the database, however when writing me query like so:  $name = rawurldecode($_GET["name"]);  $sql = "SELECT name, address, phone_number, hours_weekday, hours_weekend, description, email, food, pool, tv, dancing, late         FROM pubs WHERE name LIKE '" . $name . "'";   If the name was something like Darby's, the ' after the why acts as the end of the string in the statement, so what I am looking to do, is IF the string contains character ' then replace it with \' to escape it. Does anyone know how to do this or if it's possible?  Thank you!

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I would normally work with [greek,russian,frenchb,english]{babel} which requires [utf]{inputenc} and am getting problems with some of the tkz-base macros. The error messages are incoherent so I hope the MWE below will do the talking by uncommenting either one or the other of the babel invocations. Examples 3. and 4. are straight out of Alain Matthes' tkz-base Manual:  \documentclass{article} % RN. 3 Oct 2017 %======================= \usepackage{comment} % %\usepackage[utf8]{inputenc} %\usepackage[greek,russian,frenchb,english]{babel} %     OR even only: %\usepackage[frenchb,english]{babel} % \usepackage{tkz-base} \begin{document} 1.\\ \begin{tikzpicture} \tkzDrawSegment[color=red,thick]({0,0},{2,1}) \end{tikzpicture}  2.\\ \begin{tikzpicture} \tkzDrawSegments({0,0},{2,1} {0,1},{2,0}) \end{tikzpicture}  3.\\ \begin{tikzpicture}[scale=1] \tkzInit[xmax=6,ymax=6] \tkzGrid \tkzSetUpPoint[shape = circle,color = red,size = 8,fill = red!30] \tkzDefPoint(-1+1,-1+4){O} \tkzDefPoint({3*ln(exp(1))},{exp(1)}){A} \tkzDefPoint({4*sin(FPpi/6)},{4*cos(FPpi/6)}){B} \tkzDefPoint({4*sin(FPpi/3)},{4*cos(FPpi/3)}){B’} \tkzDefPoint(30:5){C} \tkzDefPoint[shift={(1,3)}](45:4){A’} \begin{scope}[shift=(A)] \tkzDefPoint(30:3){C’} \end{scope} \tkzDrawPoints[color=blue](O,B,C) \tkzDrawPoints[color=red,shape=cross out](B’,A,A’,C’) \tkzLabelPoints(A,O,B,B’,A’,C,C’) \end{tikzpicture}  4.\\ \begin{tikzpicture}[scale=1] \begin{scope}[rotate=30] \tkzDefPoint(2,3){A} \begin{scope}[shift=(A)] \tkzDefPoint(90:5){B} \tkzDefPoint(30:5){C} \end{scope} \end{scope} \tkzDrawSegments[color=blue](A,B B,C C,A) \tkzDrawPoints(A,B,C) \tkzLabelPoints[above](B,C) \tkzLabelPoints[below](A) \end{tikzpicture} \end{document}

In my preamble, you'll find:  \renewcommand{\baselinestretch}{1} \renewcommand{\familydefault}{\sfdefault} \usepackage[sfmath]{kpfonts} \usepackage[mathrmOrig]{sfmath} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{animate} \usepackage{anysize} \usepackage{arcs} \usepackage{array} \usepackage[scale=0]{background} \usepackage{blindtext} \usepackage{calc} \usepackage{cancel} \usepackage{chngcntr} \usepackage{CJK} \usepackage{CJKspace} \usepackage{CJKpunct} \usepackage{colortbl} \usepackage{enumitem} \usepackage{epstopdf} \usepackage{etoolbox} \usepackage{fancybox} \usepackage{fancyhdr} \usepackage{float} \usepackage{framed} \usepackage{graphicx} \usepackage{hyphenat} \usepackage{ifthen} \usepackage{latexsym} \usepackage{lmodern} \usepackage{multicol} \usepackage{multirow} \usepackage{mwe} \usepackage{pgffor} \usepackage{rotating} \usepackage{tabularx} \usepackage{textcomp} \usepackage{tgheros,tgtermes,tgcursor} \usepackage{tikz} \usepackage{times} \usepackage{tipa} \usepackage{varwidth} \usepackage{wasysym} \usepackage{wboiboites} \usepackage[abs]{overpic} \usepackage[breaklinks,colorlinks=true,linkcolor=red,citecolor=red, urlcolor=blue]{hyperref} \usepackage[framemethod=TikZ]{mdframed} \usepackage[breakable, theorems, skins]{tcolorbox,empheq} \usepackage[default]{gillius} \usepackage[document]{ragged2e} \usepackage[latin1]{inputenc} \usepackage[spanish]{babel} \usepackage[T1]{fontenc} \usepackage[total={18.59cm,26.5cm},left=1.5cm,top=2.5cm]{geometry} \usetikzlibrary{matrix,arrows, positioning,shadows,shadings,backgrounds,calc, shapes, tikzmark} \usetikzlibrary{shadows.blur} \usetikzlibrary{shapes.symbols} \usetikzlibrary{patterns,fadings} \tcbuselibrary{skins,breakable,listings,theorems}    I'm trying to draw an arrow for X axis and Y axis.   \begin{tikzpicture} \draw[yellow!10, fill=blue!5](-1, -1) rectangle (7, 5); \draw[dotted] (-0.75,-0.75) grid (6.75,4.75); \node[below] at (-0.25,0){$O$}; \draw[->,black, thick] (-0.75,0)--(6.75,0); \end{tikzpicture}   But I get this error:    Additionally, if I remove -> from the options of \draw the tikz picture compiles normally.


While testing mpi4py's comm.reduce() and comm.Reduce() methods in python 2.7.3 I encountered the following behaviour:   sometimes subtracting two complex numbers (type 'numpy.complex128', which are the output of some parallel calculation) that appear identical when printed on the screen produces a non-zero result comparing them with == occasionally yields False.   Example:  print z1, z2, z1-z2 (0.268870295763-0.268490433604j) (0.268870295763-0.268490433604j) 0j print z1 == z2 True   but then  print z1, z2, z1-z2 (0.226804302192-0.242683516175j) (0.226804302192-0.242683516175j) (-2.77555756156e-17+5.55111512313e-17j) print z1 == z2 False   I figured this had something to do with the finite precision of floats, so I resorted to just checking whether the difference abs(z1-z2) is bigger than 1e-16 (it never was - which is what one would expect if reduce() and Reduce() are equivalent). (EDIT: this is actually not a good way to check for equality. See here: )  I was wondering if there's a more straightforward way to compare complex numbers in python.  Also, why does this behaviour arise? After all, a float (and as far as I know a complex is basically a tuple of two floats) is stored on the machine in binary, as a sequence of bits. Isn't it true that if the two numbers are represented by the same sequence in binary, the difference should be zero and the comparison with == should yield True?  EDIT: OK, I found this , which basically boils down to the same thing.  But then the last part of the question remains: Why do floats work like that if in binary they are all basically represented by integers?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


How does one determine whether or not the infinite series $$\sum_{n=1}^\infty \sin^n(n)$$ converges? I suspect that it doesn't converge absolutely, but I have no idea how to prove/disprove convergence or prove/disprove absolute convergence. Help?

Does the sequence $\{\sin^n(n)\}$ converge?   Does the series $\sum\limits_{n=1}^\infty \sin^n(n)$ converge?


I am stupid.  I installed Xubuntu on my PC and used it's dual boot.  Then, I changed my mind and decided I didn't want it.  So, being stupid, I deleted the linux partitions using windows, figuring that if I deleted them and merged them with the windows partition, it's bootloader would go away and Windows would boot.  Obviously I don't know much about this kind of stuff, and when I restarted my computer to test what I did, the linux bootloader tried to boot, and couldn't find the partition.  So, now it goes straight to grub rescue:  error: no such partition. Entering rescue mode... grub rescue >    I have tried youtube solutions, but please note I do not have a recovery disk for windows and I cannot make an xubuntu usb, but I do have access to my BIOS.  I am considering just getting a new hard drive and installing windows on it, but I don't want to.  I would also appreciate it if anyone has a way I can access the hard drive, though my happy ending would be a way to just get it to boot windows again.  If you have any strategy at all to do this, no matter how complex it is, I would like to at least hear it.  Thanks!  Here's where I'm at from youtube:  error: no such partition. Entering rescue mode... grub rescue> set cmdpath=(hd0) prefix=(hd0,msdos5)/boot/grub root=hd0,msdos5 grub rescue> set boot=(hd0,msdos5) grub rescue> set prefix=(hd0,msdos5)/boot/grub grub rescue> insmod normal error: no such partition. grub rescue> normal unknown command: 'normal'. grub rescue>

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Given the follow code:  public class Musician {      public void play() {         // do something     } }   .  public class Drummer extends Musician {      public void turnsDrumStick() {         // do something     } }   .  public class Guitarist extends Musician {      public void strummingStrings() {        // do something     } }   I can use polymorphism to do the following:      Musician m1 = new Guitarist();     Musician m2 = new Drummer();      m1 = m2;   However, I can't see the methods of the subclass:      m1.strummingStrings(); //COMPILATION ERROR!   If I use:  Guitarist m1 = new Guitarist();   Would not it be better? What is the advantage of using Musico type to reference an object of a subclass? Just a possibility I would be able to attribute m1 = m2;, for example?  Or are there other advantages?  I saw this post, but I'm still puzzled:

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I'd like a hint to show that:  $$\lim \frac{1}{n} \sqrt[n]{(n+1)(n+2) \cdots 2n} = \frac{4}{e} .$$  Thanks.


If I have two independent discrete random variables, say, $$ X \in \{1,3,10,20\} $$ and $$ Y \in \{2,3,5,9,11,15\} $$ and let $$Z = X + Y $$ be the sum of two variables. Also, each value taken by either random variable is not equally likely. How do I calculate the distribution of $Z$? More importantly, what does it mean to sum two random variables?

In my probability class the terms "sums of random variables" is constantly used. However, I'm stuck on what exactly that means?  Are we talking about the sum of a bunch of realizations from a random variable? If so, doesn't that add up to a single number? How does a sum of random variable realizations lead us to a distribution, or a cdf / pdf / function of any kind? And if it isn't random variable realizations, then what exactly is being added?


I want to implement a rotation handle/manipulator mechanism that would enable user to rotate a 3D model exactly like  does.  Unfortunately I don't fully understand how does the rotation gizmo work. In particular I don't understand how to make the model rotate only around the Z axis. Open Meshlab and try rotating only the blue circle to see what I mean. Rotations around the X and Y axis are easy to understand for me though.  How does one recreate the rotation mechanism of Meshlab, i.e. how exactly does horizontal and vertical panning translate to changes in angles?

I'm drawing a scene where the camera freely moves about the universe.  The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector.  These vectors/points are then passed into gluLookAt.    Pan and zoom are nearly trivial to implement.  However, I'm finding rotation about the look at point to be much more of an issue.  I want to write a function Camera.rotate that takes 2 angles, one that rotates up/down and one that rotates left/right along an imaginary sphere that is centered about the look at point.  Is there an easy way to do this?  I've (briefly) read about quaternions, but I wanted to see if there was an easier solution given the relatively simple construction of my scene.


I have a lan network where a wireless printer is connected.    Ubuntu sees the printer but windows xp does not.   How can I use Ubuntu to share the printer with the xp computers?  Publishing "shared printers connected to to this system" via the right click and share causes the xp machines give me a permission error.   However, if I connect the printer was connected via usb it would work but since it is wirelessly it gives the error.  The steps I have already done are:   Share printer through the Printer Server Options and the Sharing option inside the Printing options. Went to the CUPS Website:  and tried configuring through there. Configured Samba to share the Printer via the smb.cfg.   After doing all the above steps, the XP clients can see the printer but can not connect to it giving me a permission error.

The title tells you all, except that it's about sharing printers.   How do I connect to a shared printer on the network through CUPS or terminal?


This question is a hot question. As a result, there's a link to it in the "hot questions" sidebar. This...is a bit silly. Why is a question linking to itself? I think it would make more sense to remove self-links and instead list whatever hot question is just below the cutoff.

The hot questions algorithm . I like the effects, since I see lots of new interesting stuff every day rather than waiting 6-8 weeks varying amounts of time for the list to update.  However, the new algorithm also has the interesting side effect of recursing the same question:    Of course, this is a world-shattering workflow-breaking unicorn-hating waffle-despising ERROR tremendously minor matter. But, if the SE devs have opportunity during their amazingly large amounts of free time, it might be nice to add a check for the current page before populating the hot questions list.


The typical way that I've seen Einstein's gravity expressed is by taking some spherical object, placing it into some sort of low-resistance space (like a very relaxed trampoline), and noting how it creates a funnel-like shape. Then, one proceeds to take an additional ball and spin it around the central object, thus explaining the concept of a planet's orbit. In the trampoline example, the central object cannot completely collapse through the material. In space, however, I'm not sure that there would be any reason that the sun shouldn't continually "fall." There's nothing holding it up. I'm sure that there is a scientific explanation for it (perhaps the black hole at the center of our galaxy is creating a funnel in space that the Sun is riding), but since I'm uneducated, I do not know it. So, is the Sun continually falling or is it static? What processes explain it?

Whenever I read about the curvature of spacetime as an explanation for gravity, I see pictures of a sheet (spacetime) with various masses indenting the sheet to form "gravity wells." Objects which are gravitationally attracted are said to roll down the curved sheet of spacetime into the gravity well. This is troubling to me, because, in order for objects on the locally slanted spacetime sheet to accelerate, gravity must be assumed. Therefore I ask; does the explanation of gravity as the curvature of spacetime assume gravity? If yes, what is the point of the theory? If No, what am I missing?


I'm one of those guys. I want to play with some foreign players (GURPS, WOD) via the web. Sorry for a bit opinions based question, but I need it in this way.   What are the potential problems?  Where are the best chances for finding these games?  More particularly, where non-native speakers not something too unaccustomed and where the game can't be easily ruined by a bad Skype-link(etc.) plus far from native listen comprehensive?

I'm thinking of running a Pathfinder campaign for Skype (text only) and I don't have a group of players. How can I go about recruiting people for play-by-chat games instead of in-person? Are there any online sites in which you can look for people that are looking to play in an online play-by-chat RPG Campaign?


i want to apply parent with autumatic weight but its error and said that Error bone heat Weighting  and i read over the internet and nothing works, anyone can suggest a solution? note.. i tried single bone to make feet bone to head bone and its work but when i make the hand bone the error comes out

Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work.


I know (but am quite confused) that static friction is greater than kinetic friction, but is this only true when the object is at rest/stationary? Please explain about this in detail while referring to the measure/amount of static friction and the kinetic friction with an example too if possible

When dragging an object, there is a greater start-up force than the force it takes to keep it moving. Why is this? Why are there two different values for friction?


I just installed MAAS in a test environment, i.e., I set up two VMs in VirtualBox.  VM 1 runs the MAAS server and has two "virtual NICs". The first one is NATed to the outside network and the second one has a VBox host-only network without VBox's own DHCP server.  VM 2 only has one virtual NIC connected to the host-only network.  When I PXE-boot VM 2, it enlists correctly, and I can commission it. The commissioning completes and shows no error. When the node is ready as of the web interface, I start it from VBox, but then it says:  "FATAL: No bootable medium found! System halted."   What might I be missing?

I have recently been trying to install VirtualBox, when this message came up:  No bootable medium found!   Can somebody please tell me what went wrong?


My question might be a bit poorly articulated as I am not sure what I'm asking is actually called.   I am faced with an Exclusion/Inclusion problem that goes like this:   You have $25$ identical cakes that are distrubuted to $10$ children, every child must have atleast $1$ cake but no more than $4$.   After a bit of calculating you wind up with something like this:   $x_1 + x_2 +x_3 + x_4... + x_{10} = 15$ (removing the first argument of 1 cake each).  You wind up with your first number which in this case would be $(24,15)$. After that it seems that you remove 4 from this number $((20,11), (16,7)$ and finally $(12,3))$.   What I don't get is how you determine the number of which do exclude from here. My thought process would be that if each child gets 1 cake each, we then exclude the posibilites of children getting 3 more cakes, which would correspond with the argument of a lower bound of 1 and a highest bound of 4 cakes.   I hope this question makes sense and that someone out there can help me.   Thanks!

Find the number of integer solutions to $x_1 + x_2 + x_3 + x_4 = 25$ with $ 1 \leq x_1 \leq  6, 2 \leq x_2 \leq 8, 0 \leq x_3 \leq 8, 5 \leq x_4 \leq 9.$  Firstly, I defined $y_i = x_i - lower bound$ so for example $y_1 = x_1 - 1$ This gives $y_1 + y_2 + y_3 + y_4 = 17$ with $$0 \leq y_1 \leq 5, 0 \leq y_2 \leq 6, 0 \leq y_3 \leq 8, 0 \leq y_4 \leq 4$$ Next I applied Inclusion-Exclusion Principle;  Total number of ways = $17+3 \choose 3$  Number of ways with just $y_i$ breaking upper bound;  $y_1;$$11+3 \choose 3$  $y_2;$ $10+3 \choose 3$  $y_3;$ $8+3 \choose 3$  $y_4;$ $12+3 \choose 3$  Similarly I calculated the number of ways with $y_i$ and $y_j$ breaking upper bound at the same time. And since there is no way in which 3 of them break their upper bounds simultaneously I was left with ;  $${20 \choose 3} - {14 \choose 3} - {13 \choose 3} - {11 \choose 3} - {15 \choose 3} + {7\choose 3} + {5 \choose 3} + { 9 \choose 3} + {4 \choose 3} + {8 \choose 3} + {6 \choose 3} $$  as my final answer.  Is this solution correct and is there a nicer way of solving it/ any insights about this type of problem?  Note, this problem is from 'An Introduction to Combinatorics and Graph Theory'


Suppose that $f:A\rightarrow B$ and $g:B \rightarrow C$ are both one-to-one and onto. Prove that $gf$ is one-to-one and onto. Prove further that $(gf)^{-1} = f^{-1}g^{-1}$.   I have already proven the first part, but the second part has always puzzled me. I have tried assuming $x \in (gf)^{-1}$ but that doesn't lead to nowhere. Nor does $x \in (gf)^{-1}(t)$ and showing $x = t$. How to prove?

I'm doing exercise on discrete mathematics and I'm stuck with question:     If $f:Y\to Z$ is an invertible function, and $g:X\to Y$ is an invertible function, then the inverse of the composition $(f \circ\ g)$ is given by $(f \circ\ g) ^{-1} = g^{-1} \circ\ f^{-1}$.   I've no idea how to prove this, please help me by give me some reference or hint to its solution.


Hei, Can somebody help me with making those lines from the picture?

I know how to make a rectangle and fill it.   But what shoud be done to hatch this rectangle with thin 45 degree inclined line with 2mm gap.  \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture} %\draw (0,0) rectangle (2,4); \fill[blue] (0,0) rectangle (2,4);  \end{tikzpicture}  \end{document}     Thank you Altermundus,   I want to hatch area under the curve. But I am unable to use your code as i did with      [pattern=north west lines, pattern color=blue]   Please give little explanation for your code so that i can use it.  \documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns}  \begin{document} \begin{tikzpicture} \draw[pattern=north west lines, pattern color=blue] (0,0) rectangle (2,4); \end{tikzpicture}  \begin{tikzpicture} \draw [thick,pattern=north west lines, pattern color=red] (1,0)--(1,1) to [bend left] (4,4) -- (4,0) --cycle; \end{tikzpicture}  \end{document}


If I upgrade from Win7 to Win10, can I transfer that key to Win7 at a later or is it locked into Windows 10 forever?  Background (Optional read): Outlook was crashing constantly the other day, ended up system restoring, fixed outlook but the PC is performing painfully slow now. I could upgrade it to Windows 10 (if it works it is software problem), or transfer the image to a new laptop (if it works it is a hardware problem). I'd like to know the answer to the question in case the PC is still slow after the 7->10 upgrade and I need to image the computer to the laptop.  Any answers or suggestions are much appreciated!

Microsoft is offering "Microsoft Windows 8 Professional Upgrade" at a discounted price compared to the OEM version. However it states:     If you currently have a personal computer running Windows 7, Windows XP or Windows Vista then you can upgrade to Windows 8 Pro (Professional).   My question is what happens to the Windows 7 key that I use to upgrade? Will it become the Windows 8 key or will it generate a new Windows 8 key?  Basically if I upgrade using my Windows 7 key from my laptop for my desktop will I be able to continue using the laptop on Windows 7 while concurrently using Windows 8 upgrade on my Desktop?


Wands are a huge part of the magic system in Harry Potter. A wand is required to perform most magic (from what I've seen so far). This definitely isn't the first instance of wands being used to assist or perform magic. I remember watching Disney's The Sword in the Stone when I was a kid and seeing Merlin use his wand to perform magic. While this movie is from 1963, I'm sure there are much earlier examples of wands in use, but which is the first?  I'm specifically looking for wands not staffs. This is not limited to Disney movies. Any example is acceptable.

Magic Wand is a , made ever-so-more popular by Harry Potter.  What was the earliest published SFF work where the trope was used?  Criteria:   Wands are listed as a nearly-universal requirement for magic users to channel/focus their magic (e.g. doing magic without a wand may be possible but nobody or very few people are able to do so well). Specifically, this is about casting SPELLS (e.g. not potions, magic mushrooms or any other magical items/material that emit magic independently of the caster's effort at the time). There's more than a small handful of magic users to use them. (E.g. most Merlin-lore wouldn't usually count since Merlin is typically the only human mage there, even if he does have a wand). Let's say 6+ or 10+, although I'd strongly prefer hundreds or more. Ideally, this rule is explicitly specified in the work, by stating as an explicit rule, OR simply showing example of non-wanded mage not being able to cast spells which is explained as "because of a lack of a wand". A wand is a small stick-like object, possibly but not exclusively made of wood Clarke-esqie "Advanced technology is magic" is outside of scope - e.g., phasers or tricoders or sonic screwdrivers don't count.


When I define a command that defines commands  \def\makefoobar{   \def\foo{foo}   \def\bar{bar} }   and prefix it with \global  { \global\makefoobar }   it is treated like  {   \global\def\foo{foo}   \def\bar{bar} }   keeping the \global effect only to the first definition, or more precise, the first token of \makefoobar, may this be a definition or not.  Is there a way to define \makefoobar so that modifiers like \global or \long would affect all macros defined within, or can I only define a global alternative command \gmakefoobar?

Is there a way to detect whether or not the next assignment is going to be \global, \long, \outer, or \protected?  That is, is it possible to write a command \detectmodifiers such that code like  \def\otherdef{%   \detectmodifiers   preprocessing   \ifglobal\expandafter\global\fi   \iflong\expandafter\long\fi   \ifouter\expandafter\outer\fi   \ifprotected\expandafter\protected\fi   \def }   does the right thing (defines an \otherdef command that acts the same way as \def, but does some preprocessing first)?