When are $\mathbb Z_m$ and $\mathbb Z_n$ homomorphic?

Let $m$ and $n$ be two given positive integers such that $m<n$. Then what are the necessary and sufficient conditions for the groups $(\mathbb Z_m,+_m)$ and $(\mathbb Z_n,+_n)$ to be homomorphic under the map $\phi \colon \mathbb Z_n \to \mathbb Z_m$ such that $\phi(x)$ is the remainder when $x$ is divided by $m$, for each $x$ in $\mathbb Z_n$.   I know that if one of these integers is a divisor of the other, then the groups are homomorphic.


In how many ways can 7 girls and 3 boys sit on a bench in such a way that every boy sits next to at least one girl. I don't know how to do it

All in the question. I'm not sure how to do it because I keep running into more problems. Please explain your steps.


I was reading my math book and got confused by this  $$\ln \left(\sqrt 2 -1\right)=\ln\left( \frac{1}{\sqrt 2 +1}\right) =-\ln \left(\sqrt 2 +1\right)$$  How do they get this equality in the hyperlink above? I don't know how to find this except by plugging in both sides into a calculator. Is there an algebraic way of achieving this?


Today i deleted my home directory (in wrong action) with:  sudo rm -rf *   And when i use extundelete i get this message:  root@ubuntu:~# sudo extundelete --restore-directory /home/hamed/ /dev/sda2WARNING: Extended attributes are not restored. Loading filesystem metadata ... 746 groups loaded. Loading journal descriptors ... 29931 descriptors loaded. Searching for recoverable inodes in directory /home/hamed/ ...  498 recoverable inodes found. Looking through the directory structure for deleted files ...  498 recoverable inodes still lost. No files were undeleted.   why it can't recover?  Anyone can help me to return my Desktop, Documents and etc? I have ubuntu 14.04.


I found the electrical line with only with one receptacle for a garbage disposal. I am wondering can I add a new electrical connection for a gas range to this line?


Bluetooth firmware problem in Ubuntu 13.04

I have a [Dell Inspiron][1] 15R 5520 laptop. Bluetooth is not working at all.  rfkill list all gives   0: hci0: Bluetooth      Soft blocked: no     Hard blocked: no  1: phy0: Wireless LAN      Soft blocked: no     Hard blocked: no  2: brcmwl-0: Wireless LAN      Soft blocked: no     Hard blocked: no   dmesg|grep -i bluetooth gives  [   13.644428] Bluetooth: Core ver 2.16 [   13.644445] Bluetooth: HCI device and connection manager initialized [   13.644453] Bluetooth: HCI socket layer initialized [   13.644455] Bluetooth: L2CAP socket layer initialized [   13.644461] Bluetooth: SCO socket layer initialized [   15.861363] Bluetooth: hci0 command 0x1003 tx timeout [   15.903443] Bluetooth: can't load firmware, may not work correctly [   17.332535] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   17.332538] Bluetooth: BNEP filters: protocol multicast [   17.332544] Bluetooth: BNEP socket layer initialized [   17.393768] Bluetooth: RFCOMM TTY layer initialized [   17.393781] Bluetooth: RFCOMM socket layer initialized [   17.393783] Bluetooth: RFCOMM ver 1.11   hciconfig gives  hci0:   Type: BR/EDR  Bus: USB     BD Address: E0:06:E6:D5:DB:46  ACL MTU: 1021:8  SCO MTU: 64:1     UP RUNNING PSCAN ISCAN      RX bytes:687 acl:0 sco:0 events:56 errors:0     TX bytes:2024 acl:0 sco:0 commands:52 errors:0   I have visited the site  and according to it   lspci -vnn -d 14e4: gives  08:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365]  (rev 01)     Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]     Flags: bus master, fast devsel, latency 0, IRQ 17     Memory at c1500000 (64-bit, non-prefetchable) [size=32K]     Capabilities: <access denied>         Kernel driver in use: wl   So I got my PCI-ID as 14e4:4365 which it says is not supported. The alternative is wl.  What should I do?  My Wi-Fi is working normally without any problems, but Bluetooth is not working.  sudo dpkg -i wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb gives following error  (Reading database ... 208543 files and directories currently installed.) Unpacking wireless-bcm43142-dkms (from wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb) ... Setting up wireless-bcm43142-dkms (6.20.55.19-1) ... Loading new wireless-bcm43142-6.20.55.19 DKMS files... Building only for 3.8.0-23-generic Building initial module for 3.8.0-23-generic Traceback (most recent call last):   File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>     import apport ImportError: No module named apport Error! Bad return status for module build on kernel: 3.8.0-23-generic (x86_64) Consult /var/lib/dkms/wireless-bcm43142/6.20.55.19/build/make.log for more information.


I want to run a micro-controller from a 1S lipo through a 3V linear regulator. I need to measure the battery voltage however. The problem with using a voltage divider is that it would drain the battery over time which may or may not have protection circuitry built in. Since the AVR I'm using has a recommended input impedance of no higher than 10K I can't make the divider too large either.  Can anyone suggest a solution that would allow me to monitor this voltage without killing an unprotected battery over a couple of months? The circuit might enter deep sleep mode for an extended period meaning a voltage divider solution would consume the most power.    I ended up using both Hanno and Andy's solution. Thanks for all the input. Can only choose one answer unfortunately.


Connecting iPhone 4 to MacBook Pro via Bluetooth

I'm having issues when trying to connect my new MacBook Pro to my iPhone 4 via Bluetooth. I'm trying to connect my iPhone to my MacBook so that I can use the iPhone as a hotspot through Bluetooth and not wi-fi or a cable.   Things I've done: I start off by clicking the Bluetooth icon, then go to "Set Up Bluetooth Device..." I then select my iPhone when it appears. The pairing popup comes up on my iPhone but it never does pair... I get a popup on my phone later on stating the MacBook Pro was not compatible.  What can be done to troubleshoot tethering over bluetooth?


Where is Minecraft Bedrock Edition folder?

Having the same problem as many others seem to be having on here but I'm stuck at a point at which everyone else seems to find what they are looking for. Trying to install forge for Minecraft but as every guide says I've to make copies of all the game files which I'm trying to do but there is no Minecraft folder when I go looking. I've tried the %appdata% search and it returns nothing. I had a thought, is it becasue my kids who play minecraft don't play online, as in they don't have an Xbox live account to sign in to to create saves from? Are they effectively playing as 'guests'? If so, is the only way to fix this to get them Xbox live subscriptions? Its the Windows 10 edition we have, is it better to try and use the Java Edition?


I just started playing Overwatch (played a few games during open beta, but wasn't able to play much). I'm enjoying Mercy, but who (in a group situation) should be getting the damage buff? Additionally, when my team splits up, who should I follow to support?


Is it possible to enter the US on a one-way ticket?

Is it possible to enter US on a one way ticket without any problem ? I am coming over to help a friend sail his boat from mainland US down to Caribbean.So am not sure exactly when I will be returning to UK and from where. I have a valid ESTA and am travelling on a UK passport. What supporting documents are customs likely to ask for ?


I've tried searching for this, but then I'm not sure when how to describe it.   I have a method that formats some data from a hashmap to go into a mySQL table:  private String valuesList() {     String valuesList = "";     HashMap<String,String> data = getData();     for(Map.Entry<String, String> entry : data.entrySet()) {         String value=entry.getValue();         valuesList+="'"+value+"',";     }     valuesList = valuesList.substring(0, valuesList.length() - 1);     return valuesList; }   Most of the time that works fine, but in some cases one of the values has an apostrophe in, which leads to an output like this:  '4577314','18-02-2017','null','4566974','null','Overseas Domestic Workers' Rights Bill','1124','null'   Note the 'Overseas Domestic Workers' Rights Bill' bit at the end. I thought that would be easy to fix by changing  valuesList+="'"+entry.getValue()+"',";   to  valuesList+="'"+entry.getValue().replace("'","")+"',";   but the method now throws a null pointer exception at that line. In fact any kind of change to that string such as .trim() does the same, throwing a null.   I'm completely stumped now


Equivalence relations->Showing that a set is reflexive, symmetric and transitive

For each of the following sets A and binary relations  ~, decide whether ~ defines an equivalence relation on $A$ a) Set $A=\mathbb{R}$ Relation: $x\sim y$ if $x=ay$ for some $a \in \mathbb{Q}$


Does increasing "Screen refresh rate" damage monitors?

I work on different types of monitors (CRT, LCD) and all PCs have the same screen refresh rate as 60 Hertz. Recently I've read an article which claims that low refresh rates cause headaches. The writer states that 60 Hertz is a low refresh rate and should be increased to the maximum value that the monitor supports. If I increase this value to the maximum as the monitor can display (for example 75 Hertz), does it damage the monitor in the long term? Answers about the pros and cons of low & high refresh rates would be highly appreciated.


Error message when compiling ConTeXt document from Emacs

The command   texexec --once --texutil --engine=xetex --interface=en --nonstop tmp.tex'   gives the following error message when called from Emacs, but not when called from Terminal:       /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require': /opt/local/share/texmf-local/scripts/context/ruby/base/switch.rb:501: invalid multibyte escape: /\xFF/ (SyntaxError)     from         /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'     from /opt/local/share/texmf-local/scripts/context/ruby/texexec.rb:11:in `'   The offending piece of code is  value.gsub(/\xFF/o, ' ')   At this point, I'll be grateful for everything from what to do to make the code run from Emacs, to a patch to the code.  PATH, LANG, LC, and LC_ALL are the same in both Emacs and Terminal.


How can I get a sword with sharpness 1000?

I'd like to create a sharpness 1000 sword - I've seen my friends do it but they won't tell me how they were able to get this to work.  I have also tried many methods on YouTube but they all don't work for me.  I am playing on Xbox One.


Alternatives for deploying an app in a computer without the .Net Framework

I want to deploy an app using the .Net 4.5 version but the installed version is lower. Can I deploy without having to install the framework? Can I include the dlls I need with the execution file?


Is there a way to compile faster? e.g.: No loading figures

I am editing a book and it has quite a lot of figures....I believe this is the reason why it takes long to compile.  I have to do some editing in the text, so I do not need it to load the figures for now...is there a way to do a lean compiling?


I am trying to read a file line by line and save it to a byte array, but for some reason String.getBytes() throws a Nullpointer Exception.  What am I doing wrong?  public static void main(String[] args) {     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));     byte[][] bytes = null;     try {         String data;         int i = 0;         while((data = br.readLine()) != null) {             bytes[i] = data.getBytes(); // THROWS A NULLPOINTER EXCEPTION HERE             i++;         }         System.out.println(bytes.length);      } catch (IOException e)         e.printStackTrace();     }  }


How to substract two lists of lists from each other?

I have the following two list of lists and I want to substract every item from a from the corresponding item in b:  a = [[8.5], [9.3], [8.2]] b = [[7.4], [2.3], [3.4]]   So the output should be   c = [[1.1], [7], [4.8]]   It seems to be very simple, but I am struggling with it. Does somebody have a solution?


Is there a term for a masked / veiled question to find sensitive information?

I came across a phrase for a type of question which is designed to discover someone's religious background, particularly in the context of sectarianism and divided societies but can't for the life of me remember it.   For example, if you are in Scotland and I ask you what football team you support, that may reveal your religion. Or in N.Ireland, if I ask what school you attend, likewise that may do the same.  It's like a 'veiled question' only that's not the term I'm looking for. Any help appreciated.  I've a feeling that the second part of the phrase is (question) as in, a INSERT TERM question, but not 100% sure.


Can you be detained for not paying for your hotel in Pretoria?

If you can't pay for your hotel, can either the hotel or the police keep you from flying home until you DO pay?


I am having a really hard time wrapping my head around component notation for tensor fields. For example, I do not know exactly what the following expression means $$\partial_\mu\partial^\nu \phi, \tag{$\#$}$$ where $\phi$ is a scalar field. On the one hand $\partial^\nu=g^{\lambda\nu}\partial_\lambda$ and hence we could write explicitly $$\partial_\mu\partial^\nu \phi=\sum_{\lambda}g^{\lambda\nu}\partial_\mu \partial_{\lambda}\phi=\begin{cases}\partial_\mu\partial_\nu& \text{ if } \nu=0\\ -\partial_\mu\partial_\nu & \text{ if }\nu=1,2,3. \end{cases} \tag{$*$} $$ On the other hand, we may think of $\partial_\mu\partial^\nu=g(\partial_\mu,\partial_\nu)=\delta_\mu^\nu;$ so that $\partial_\mu\partial^\nu\phi=\phi?$ Maybe? I am actually not sure of what this would mean. I am really confused. Any help is appreciated. To give context of where this expression comes from: I was computing the Lagrangian $$\mathcal L=\frac{1}{2}(\partial_\mu\phi)(\partial^\mu \phi) $$ considering an infinitesimal spacetime translation $x^ \mu\to x^\mu-\alpha a^\mu$. The scalar field thus transforms like $\phi(x)\to \phi(x)+\alpha(\partial_\mu\phi(x))a^\mu.$ Plugging thins into the Lagrangian yields the term I am referring to. I do not have any background in using indices to talk about tensors. I am used to interpret the expressions $\partial_\mu$ as the local vector field defined in some chart (local coordinates) that to each point assigns the corresponding basis tangent vector of its tangent space. I think about vector fields $X$ as abstract secction of the Tangent bundle, which restricted to local coordinates can be expressed as $X=X^\mu\partial_\mu$. In the context of QFT, as far as I understand, the symbol $\partial_\mu$ denotes  $(\partial_t,\nabla)$ in the local coordinates $(t,x,y,z)$. So that $\partial_\mu\phi=(\partial_t \phi,\partial_x \phi,\partial_y\phi,\partial_z\phi)$. Finally I think of $g^{\mu \nu}$ as the component ($\mu\nu$) of the matrix $$g=\begin{pmatrix} 1&0&0&0\\ 0&-1&0&0\\ 0&0&-1&0\\ 0&0&0&-1\\ \end{pmatrix}$$ which represents the pseudo-Riemmanian metric, which by definition acts on tangent vectors, i.e. linear combinations of the $\partial_\mu$ applied to a point. This is where my second strange interpratation of ($\#$) comes from. My question is thus: What is the right way to interpret the component-index notation; and in particular what is the expresion $(\#)$ in explicit coordinates?


I have this script of plotting bar graph with min(-ve) and max(+ve)    \documentclass[border=5mm]{standalone}  \usepackage{pgfplots}  \pgfplotstableread{ Year    FarMin  FarMax  NearMin NearMax HereMin HereMax 1930    -20     50      -10     30      -15     40 1940    -10     60      -15     60      -20     70 1950    -15     78      -20     20      -32     42 1960    -20     30      -15     40      -20     10 1970    -5      30      -30     40      -15     20 }\datatable   \begin{document}% \begin{tikzpicture}   \begin{axis}[     x tick label style={       /pgf/number format/1000 sep=},       ylabel=Population,       ybar,       enlarge x limits=0.15,       bar width=0.8em,     after end axis/.append code={         \draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});     }   ]   \addplot +[forget plot] table {\datatable};   \addplot table [y index=2] {\datatable};    \addplot +[forget plot] table [y index=3] {\datatable};   \addplot table [y index=4] {\datatable};    \addplot +[forget plot] table [y index=5] {\datatable};   \addplot table [y index=6] {\datatable};   \legend{Far,Near,Here}   \end{axis} \end{tikzpicture}  \end{document}     But, when I want to plot a graph with positive min values , I'm getting graph which is  starting with zero instead of given positive value.  \documentclass[border=5mm]{standalone}  \usepackage{pgfplots}  \pgfplotstableread{ Year    FarMin  FarMax  NearMin NearMax HereMin HereMax 1930    20     50      10     30      15     40 1940    10     60      15     60      20     70 1950    15     78      20     20      32     42 1960    20     30      15     40      20     10 1970    5      30      30     40      15     20 }\datatable   \begin{document}% \begin{tikzpicture}   \begin{axis}[     x tick label style={       /pgf/number format/1000 sep=},       ylabel=Population,       ybar,       enlarge x limits=0.15,       bar width=0.8em,     after end axis/.append code={         \draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});     }   ]   \addplot +[forget plot] table {\datatable};   \addplot table [y index=2] {\datatable};    \addplot +[forget plot] table [y index=3] {\datatable};   \addplot table [y index=4] {\datatable};    \addplot +[forget plot] table [y index=5] {\datatable};   \addplot table [y index=6] {\datatable};   \legend{Far,Near,Here}   \end{axis} \end{tikzpicture}  \end{document}     Please help me to plot the graph with positive min values. thanks!


So, how do I prove that this trigonometric sum equals to zero?   $$\sum_{k = 0}^{n - 1} \cos \left(\frac{2\pi k}{n}\right) = 0$$


Is there a word to describe the state of believing you know something that is false?

When you do not know a fact you are ignorant.  My question is what would you call the state of   believing you know something that is false.   For instance suppose I see a black box and having opened it earlier, I know there is a rabbit in it.  Some time later unbeknownst to me someone   removes the rabbit.  I still 'know' there is a rabbit in the box.   What do you call this state?


How to install specific Ubuntu packages, with exact version?

I want to setup a new virtual machine with some specified packages (name and version), that are provided.  For example apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one should be installed.  The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.  I currently know of some possibilities that install the exact packages, but do not scale that good:   Copy all required *.deb to every virtual machine manually and enter: dpkg -i ... -> Could work, but it is very error prone. (Manual scripts etc.) Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories. Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.   My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages.


Proving that all integers are even or odd

I know that $\mathbb{Z}$ is a group under addition with a multiplication defined. I have just the definition of even and odd integers: $n$ is even if $n = 2k$ for some integer $k$ and $n$ is odd if $n = 2k+1$ for some integer $k$.  Using just this I am wondering how to prove that all integers are either even or odd. That is, how can I prove that given an integer $n$, $n$ must be even or odd?  My problem with this is that it seems so simple. I know that one can divide an integer by $2$ and the remainder will be $0$ or $1$. Using this, it is clear that the even and odd integers make up everything. But how can I prove it without using this fact about remainders and such? I guess one could also use facts about prime numbers, but I am looking for a proof that just uses the definition of odd and even.


I always hear about parity violation in high energy physics, but what about examples in classical physics?  Say we have a wire carrying current in the $+x$ direction, thus generating a magnetic field $\mathbf{B}$ in the (say) $+\phi$ direction.  Now we put a mirror in the $yz$ plane, so that the image is a current flowing in the $-x$ direction with a magnetic field $\mathbf{B}$ in the same $+\phi$ direction.  This of course makes sense because the current $Id\mathbf{x}$ transforms as a vector whereas the magnetic field $\mathbf{B}$ is a pseudovector and does not change sign upon inversion.  But the image in the mirror is not physically possible as the direction of $\mathbf{B}$ is not curling around $I$ following the right hand rule.  Isn't this an example of parity violation? That is the mirrored image could not possibly represent a real physical process and we can therefore tell it apart?


Trouble with Scanner and looping in java

I have been trying to create a program and right now I have trouble with the Scanner in java because in the program the user can input a String and press enter to input it and if the user inputs "exit" like so then the Scanner will close and The loop stops, but It just works for the first Input and gives out a black line every time and if you do enter exit it writes out exit but continues.  here is a code snippit:      public static void main(String[] args) {     int i = 0;     Scanner input = new Scanner(System.in);     while(input.hasNext() && i<1){           System.out.println(input.nextLine());         if(input.nextLine() == "exit"){             i++;         }     }     input.close(); }


How can I get available updates to show at login?

While playing around with Amazon EC2, I noticed that the Ubuntu images showed available updates at login (See pic)  How can I get my home installation to do this? I'm running 14.04.    My question is specifically in reference to packages/security updates. In the image, they are represented as "0 packages can be updated." and "0 updates are security updates." All other information showed up without the fix that I referenced as a comment to the duplication flag. I've discovered two solutions for the problem:   Running tasksel allows the selection of the Basic Ubuntu server collection An abbreviated form of tasksel appears at the end of a fresh installation, which also allows the selection of Basic Ubuntu server


Pros/cons of splash-screen with articifial loading delay

My firm has developed a small, domain-specific desktop GUI application. Being small, it loads fast (practically instantly) and initially presents a "home" screen, which in this app, is a kind of graphical menu. It has been suggested we introduce a 2-3 second delay in which we show some logo/splash-screen. The rationale is that this looks more professional.  What is the common wisdom on this?  Note: personally I hate this kind of screen; but I am just an engineer - the suggestion is that real users like them.   So I am really looking for evidence about what users do and do not like, not just what the people on this site like.  Update: Like me, most of you dislike the artificial delay.  But responses are more mixed about what users will want or accept. The story seems that, (a) people will accept a 1-2 second delay, and (b) users trust some applications better if they take their time.  But what evidence is there about this particular case of a software load-up screen?  We cannot be the first company that tried this, it must have been commonplace in the 90s.  Was there a backlash?  Were there studies to support either view?


I can't install ubuntu, no caching folder found

First of all I'm looking to install ubuntu, after I made 2 bootable USB's to make sure, I still got the same error. I'm not really is sure If it's caused by the bios or USB. This is what I get when I try to boot from usb and try it live.. I really need help, I have no functioning os left on my asus rog laptop.   Error here:


Let $f(z)$ be analytical in the unit disk $\mathbb{D}=\{z:|z|<1\}$. Suppose $|f(z)|< 1$ when $|z|<1$ and for some $r\in(0, 1)$$f(0)=f(r)=f(-r)=0 $. Prove $|f(z)|\leq |z|\left|\dfrac{z^2-r^2}{1-r^2z^2}\right|$.  I think we should apply the Schwarz lemma here,but for now I can only prove $$ |f(z)|\leq\left|\dfrac{z-r}{1-rz}\right|, |f(z)|\leq\left|\dfrac{z+r}{1+rz}\right|, $$ which seem of no use. I do not know where $|z|$ of RHS comes from (the rest part are two maps in Aut($\mathbb{D}$)). Appreciate any help or hint!


I'm building a system based on one of the old Raspberry Pi model B's (yes, first series) into a very small enclosure. I need to run an Ethernet cable from the POE splitter I have in this enclosure to the RJ-45 connector on the Pi's board, but I find I don't have enough room to do it (at least, not without creating a very small -- three inch -- cable.) I'm wondering if I can simply desolder the RJ45 jack and solder the Ethernet cable directly to the board itself, but I find that there's a lot going on in that jack:    Given all this "stuff" in there, would soldering the wires directly to the board even work?


What are some good books for classical mechanics of continuous systems?

I am trying to learn classical mechanics for continuous systems. Goldstein contains only one chapter on it. Is that chapter sufficient or is there more to the subject? If yes, what are some good books to learn the same?


If $f$ is a compact function (image of every compact set is compact) is $f$ continuous?  Attempt: I can't find a counterexample. I can't prove it. I only know how to prove the converse.


Make Specific Content Within Anchor Tag Not Redirect But clickable for Javascript

I need to make an entire div redirect to a specific URL. However, within that div I also want to add other div tags that will be clickable so it can undergo changes from javascript.  I wrapped the parent div with an anchor tag to make the whole div and its content redirect.  A simplified example:

   Edit:  onClick() does not work.  Also, I forgot to mention that I need it to work with event listeners and JQuery functions (click(), on(), ...)  The solution given works only if the number of elements remains the same.  E.g.: webpage loads with the following elements:

   Javascript duplicates it: // First Section

   // Second Section

   The solution given will not work with the second section, only the first section. The second section is created with the following JQuery / Javascript code:  let el = `

  `;  document.append(el);


I want to have a list of all packages that are installed on my server, but the command  dpkg --get-selections > ~/Package.list   doesn't do anything! When I execute it there is no file called "package.list" in the root folder.


How can I combine two arrays into one array in javascript?

with console.info(hora); I print the array:    ["NO HORA", 1, "NO HORA", 1]   and with console.info(self.aEstados.estados); I print the array:   ["SI CONTIENE", "NO CONTIENE", 2]   But I need the arrays together:   ["NO HORA", 1, "NO HORA", 1, "SI CONTIENE", "NO CONTIENE", 2]    How can I do this?


Where is the authoritative location for new Ubuntu releases?

An AWS droplet running Ubuntu is now reporting itself as Ubuntu 16.04.5 LTS but I find no reference to this version on ubuntu.com.  The latest version is showing as 16.04.4  ( )   (note cannot establish a secure connection to releases.ubuntu.com ???)  On 2018-07-20 06:57 unattended upgrades ran and upgraded: base-files  After this upgrade this box started reporting itself as: Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1062-aws x86_64)  Distributor ID: Ubuntu Description:    Ubuntu 16.04.5 LTS Release:    16.04 Codename:   xenial    Prior to this update this box reported it self as Ubuntu 16.04.4 LTS  How can I verify that this update is legit?


Is there a way to get pictures of bosses after defeating them?

I was planning to do a 100% completion run, including a full Hyrule Compendium. About halfway through the game, I realized I never took a picture of my first dungeon boss. I didn't worry too much at first, since you can buy additional pictures in Hateno, but now that I bought every single monster picture available, that boss is still missing (as well as a few others, which I assume to be the final boss and some special enemies I haven't seen yet).  Is there any way to still get a picture of dungeon bosses and complete the compendium? Obviously I don't have any save files from before I fought that boss, and even if I did, I'd have to pretty much re-do the entire game.


Let $F$ be a field and $K$ a field extension of $F$. Suppose $a,b\in K$ are algebraic over $F$ with degrees $m$ and $n$, where $m,n$ are relatively prime. Then $F(a) \cap F(b) = F$.  I see that the intersection on the LHS must contain $F$, but I don't see why $F$ contains the LHS.


Copy the Windows 7 files to Ubuntu 14.04

I was working in the Windows 7 OS previously, now i shifted to the ubuntu 14.04 version. I had important file on D && E drive of Windows 7 which i couldn't take backup. How to recover those data in Ubutnu?  (I had choose the only ubuntu option while installing the ubuntu)


Radial fall in a Newtonian gravitational field

Suppose an object of mass $m$ starts at rest at a radial distance $ r_0$ from a perfectly spherical mass $M$ (where $m << M$), $r_0 > R =$ radius of $M$.    Can we analytically determine when $m$ will hit the surface of the $M$?  In other words, can we analytically solve this initial value problem:  $$ \frac{d^2r}{dt^2} ~=~ - \frac{GM}{r^2} ,$$ $$ \dot{r}(0) ~=~ 0 ,$$ $$ r(0) ~=~ r_0? $$


I want to delete everything I've contributed to Stack Exchange sites

I'm angry, and I can't properly express myself in English as I would like to defend myself, so this is going to be a short message:  Due to a bad decision of a moderator who suspended my account in superuser and  also I THINK THAT (I'm not sure) he deleted what a friend has published in his account, I have decided to delete all the answers that I've published during my years in StackOverflow, and not only the answers, also the questions, in both StackOverflow and SuperUser, and then delete my account. Yes, like a revenge for the treatment that I've received from stackexchange staff members.  I don't want to still be a part of this site, that's what matters for me.  What I should do to delete all the answers where I helped people? and all the questions that I asked? and then my account?.  I sent a message to the support, waiting for a response.  PS: I'm not going to change my decision, I want to delete my account and everything I've contributed here,  This is an angry decission, but I thought about it and is what I want, everyone has a limit and that moderator reached my limit, all that happened in superuser these days reached my limits of comprehension, starting by the reputation problems caused by the WRONG current privilege design.   A user can't add a comment on the answers that he receives on his OWN BOUNTY, and the same user can't give the bounty reward after his account is suspended (great for that helper user who can't receive my reward... ridiculously), All this is ridiculous and I've tried to explain it in superuser meta, but also I need to fight and be ridiculed by that moderator who suspended my account?, This is the end for my account.


I think some thing went wrong with `viewed` count

Today i posted one question . After some time i got three up vote on that question . But view count was 2 only  SO how it possible .  I also try to refresh page many time . Event see same link on different system its show me same thing .     and look at screen shot below .


How can I make sure texts from friends with iPhones don't go to iMessage instead of my Android phone?

I have always used an Android phone, but text messages from certain friends get hijacked by iMessage. How do I prevent iPhones and MacOS Messages from sending me iMessages? I need all messages to be SMS or MMS. Some friends with iPhones will text me, but I don't receive the message. Today I noticed the Message app on my Mac had notifications. I never open this app since I don't use iMessage, but I looked today, and found multiple "lost" messages from several weeks ago. Please note that this is NOT the same question as . My Android phone is not, and has never been, registered with iMessage, and I have already followed those instructions. Another poster () had the same question as me----but it was closed, being deemed as the same as the Removing phone number question. It's actually fairly different. I have tried:  Leaving my Messages app closed on my Mac. But somehow messages from these people get hijacked. Deregistering my mobile number using Apple's online Deregister iMessage tool. When I attempted this, I got the message "Your phone number is not registered with iMessage." Finding a setting on my Android phone that addresses this. The problem is apparently (and logically seems to be) on the Apple end.  Things  says he tried:   Closing Messages.app. I still get macOS notifications of messages. In Messages > Preferences… > Accounts > [my email address], untick "Enable this account". Then my friends messages disappear and I never see them at all, at least until I reenable in Messages.app. Looking in System Preferences and on icloud.com and appleid.apple.com    to see if there is some setting I can disable—but I've not found    anything relevant. Using Apple's Deregister iMessage tool to unregister my mobile    number. When I attempted this it gave me the message "Your phone number is not registered with iMessage."


Styling a lstlisting caption using caption package

I'd like to style a caption in a specific way, but I can't seem to figure out the proper settings to do so.  First off, I'd like to change the label from "Listing" to "Algorithm" when I use \captionof{lstlisting}{foo}  Secondly, I'd like to make the "Algorithm 1" part be bold with the rest of the label non boldface  Thirdly, I'd like to have a line above the caption.  Here's an image of something akin to what I'd like to achieve, and following is my code.    And this is what I have:    \documentclass{article}  \usepackage{listings} \usepackage{caption} \usepackage{geometry} \usepackage{DejaVuSans} \usepackage{DejaVuSansMono} \renewcommand*\familydefault{\ttdefault}  \geometry{left=1.0in,right=1.0in,top=1.0in,bottom=1.0in }  \lstset{   frame=top,frame=bottom,   basicstyle=\small\normalfont\sffamily,    % the size of the fonts that are used for the code   stepnumber=1,                           % the step between two line-numbers. If it is 1 each line will be numbered   numbersep=10pt,                         % how far the line-numbers are from the code   tabsize=2,                              % tab size in blank spaces   extendedchars=true,                     %   breaklines=true,                        % sets automatic line breaking   captionpos=t,                           % sets the caption-position to top   mathescape=true,   stringstyle=\color{white}\ttfamily, % Farbe der String   showspaces=false,           % Leerzeichen anzeigen ?   showtabs=false,             % Tabs anzeigen ?   xleftmargin=17pt,   framexleftmargin=17pt,   framexrightmargin=17pt,   framexbottommargin=5pt,   framextopmargin=5pt,   showstringspaces=false      % Leerzeichen in Strings anzeigen ?  }  \DeclareCaptionFormat{listing}{#1#2#3} \captionsetup[lstlisting]{format=listing,singlelinecheck=false, margin=0pt, font={sf}}  \DeclareMathVersion{sans} \SetSymbolFont{operators}{sans}{OT1}{cmbr}{m}{n} \SetSymbolFont{letters}  {sans}{OML}{cmbrm}{m}{it} \SetSymbolFont{symbols}  {sans}{OMS}{cmbrs}{m}{n}  \lstnewenvironment{sflisting}[1][]   {\lstset{#1}\mathversion{sans}}{}   \begin{document}  \begin{sflisting}[caption=Spanning tree broadcast algorithm.] Initially $\langle M\rangle$ is in transit from $p_{r}$ to all its children in the spanning tree.  Code for $p_{r}$: 1:  upon receiving no message:                                          // first computation event by $p_{r}$ 2:      terminate  Code for $p_{i},\ 0\leq i\leq n-1,\ i\neq r$: 3:  upon receiving $\langle M\rangle$ from parent: 4:      send $\langle M\rangle$ to all children 5:      terminate \end{sflisting} \end{document}


I have a Intel Xeon CPU at 3.06GHz with 512KB cache size.  I was wondering if the on-chip cache for the machine is L1 or L2. Is there a way of knowing that through a Unix command?


I have a USB device and i'm trying to create it in a way that it has 2 partitions: one for a live linux disc and the other for document storage.  I created the partitions using gparted and and set a boot flag to the one I want to use as the live disc. Now, I have a usb like this:  Disk /dev/sdc: 14.6 GiB, 15623782400 bytes, 30515200 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xc3072e18  Device     Boot   Start      End  Sectors  Size Id Type /dev/sdc1       8439808 30515199 22075392 10.5G 83 Linux /dev/sdc2  *      51200  8439807  8388608    4G  b W95 FAT32   I then used dd to flash an Ubuntu iso to /dev/sdc2  sudo dd if=/dev/shm/ubuntu-17.04-desktop-amd64.iso of=/dev/sdc2 bs=4M   When the disc is flashed onto the usb drive, I try to boot from my laptop and it shows "Operating system not found". When i try to use qemu/kvm, it shows a kernel panic like this:    How would I be able to do this properly?


To show that $\mathbb R$ is the only non-empty clopen set in $\mathbb R$

Without using any notion of connected sets how can we show that $\mathbb R$ is the only non-empty clopen set in $\mathbb R$ ? ( actually I am proving that if $f: \mathbb R \to \mathbb R$ is a continuous function satisfying $|x-y| \le M |f(x)-f(y)| , \forall x,y \in \mathbb R $ , for some $M\in \mathbb R$ then $f$ is surjective by showing $f(\mathbb R)$ is clopen )


.htaccess - redirect the contents of a subdirectory of old domain to new domain (WordPress)

I have problems with the redirection of my old website to our new website under a new domain. The old website was created with Wordpress and the simple redirect 301 was successful. However, some pages have this structure:    old.example/hotel/ old.example/hotel/suites/ old.example/hotel/rooms/ old.example/hotel/studio-apartments/   I had problems redirecting this to the new website because the simple redirect 301 only worked for the /hotel redirection.  I have also tried this:   RedirectMatch 301 /hotel/(.*) https://new.example/accommodation/   But this redirects all pages to the same new one. I would like to accomplish this:   old.example/hotel/ to https://new.example/accommodation/ old.example/hotel/suites/ to https://new.example/suites/ old.example/hotel/rooms/ to https://new.example/rooms/ old.example/hotel/studio-apartments/ to https://new.example/studio-apartments/   I would really appreciate any help!


I would like to know how to rename the standard list of figures, table of contents, and references. What I saw so far relying on \renewcommand{\contentsname}{name} did not work so far.  Here's the list of preambles I use:  \documentclass[12pt]{report} \usepackage[utf8]{inputenc}  \usepackage{fourier} \pagestyle{headings} \usepackage{marvosym} \usepackage[pdftex]{graphicx} \usepackage[margin=2.5cm]{geometry} \usepackage{rotating} \usepackage{amsmath} \usepackage{booktabs} \usepackage{url} \usepackage{natbib} \usepackage{setspace} \linespread{1.5} \newenvironment{remark}{\par\mbox{}\par\noindent{\bfseries             \emph{Remark}\/}:\normalfont}{\par} \newenvironment{defin}{\par\mbox{}\par\noindent\bfseries \emph{\Pointinghand\     }\normalfont}{\par} \setcounter{toc**strong text**depth}{2}  \usepackage[colorlinks=true, a4paper=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} \pdfcompresslevel=9 \setstretch{1.0} %vertical stretch \usepackage{fontspec} \setmainfont[BoldFont       = AvenirNextRoundedPro-Bold.otf , ItalicFont     =AvenirNextRoundedPro-Italic.otf]{AvenirNextRoundedPro-Reg.otf} \defaultfontfeatures{Mapping=tex-text} \usepackage{multirow} \usepackage{array} \usepackage{booktabs} \usepackage{hyperref} \hypersetup{ hidelinks, } \usepackage{ragged2e} \usepackage{euler} \usepackage[euler-digits,euler-hat-accent]{eulervm} \usepackage[labelfont=bf]{caption} \usepackage{wrapfig} \usepackage{amsmath} \usepackage{amssymb}  \usepackage[english]{babel} \usepackage[nottoc]{tocbibind} %Adds "References" to toc \usepackage{titlesec} \titleformat{\chapter}[display]{\bfseries\huge}{\filleft\Large\chaptertitlename~\thechapter}{1ex}{\vspace{1ex}\filright}[\vspace{0.5ex}\titlerule] \usepackage{float} \usepackage{etoolbox} \makeatletter \patchcmd{\@caption}{\csname the#1\endcsname}{\csname fnum@#1\endcsname:}{}{} \renewcommand*\l@figure{\@dottedtocline{1}{2em}{6em}} \let\l@table\l@figure  \makeatother % default for 3rd arg: 2.3em - for list of figures and tables \usepackage{background} \definecolor{textcolor}{HTML}{000000}             \newcommand\Text{c\quad o\quad n\quad f\quad i\quad d\quad e\quad n\quad t\quad i\quad a\quad l} \SetBgColor{textcolor}\SetBgOpacity{0.3}\SetBgAngle{90}         \SetBgPosition{current page.center} \SetBgVshift{-0.33\textwidth} \SetBgScale{1.8}         \SetBgContents{\sffamily\Text} %for confidential   I also use TexMaker. I do not know how relevant it is, but here my document language is set to English (even if it's not the language I write in, in that document, but it isn't a problem seemingly). What I also saw is that, if I remove babel and the references, I can rename my ToC and LoF, LoT. But I need the references though. Any tip would be very welcome!  Edit: I cannot provide text data from my project, because it is confidential. Here's what I can provide from the main document. Here is what I can include more.  \begin{document} \include{02_front}  \setcounter{page}{0} \pagenumbering{roman} \tableofcontents \listoffigures \listoftables \newpage \setcounter{page}{0} \pagenumbering{arabic} \chapter{blabla} \section{test é è åøæ î} \appendix \bibliographystyle{plain}  \bibliography{80_refs}   \end{document}   Also, I actually finished writing my thesis but I need to summarize it briefly in another language, am would be extremely unwilling to test and remove packages that "might be" not very useful. I literally only have to change these names of ToC, LoF, ToF and references.


What is wrong with this proof (Subgroup of Free group is a Free group)

Let $G=\langle g_1, g_2,\dots\rangle$ be a free group, with no relations.  Let $H$ be a subgroup of $G$, with generators $h_1,h_2,\dots\in G$. Suppose the generators have a relation, say $h_{i_1}h_{i_2}\dots h_{i_m}=1$. Since each $h_i$ can be written as a product of $g_j$, then $h_{i_1}h_{i_2}\dots h_{i_m}=1$ implies that $g_{j_1}\dots g_{j_k}=1$ for some $j_1,\dots,j_k$.  This contradicts that $G$ has no relations for its generators.  Hence $H$ is a free group.  Intuitively, this is wrong (the proof is too simple). However I can't find the mistake.  Thanks a lot for any help.


How to find total kinetic energy of a body which is rotating about multiple axes at the same time? For example consider a wheel with a shaft, and that the shaft is hinged. So the wheel is rotating about the shaft and the shaft itself is simultaneously rotating about the hinge. So we can say that the wheel is rotating about two axes : one along the shaft and another about the hinge. another example would be a gyroscope.


Adjective that means "hard to pronounce" even you know how to pronounce it

I am looking for a word to describe a word or a sentence that is hard to pronounce, in a situation that even you know the pronunciation but just can't control your tongue. Tongue-twister is the closest that I have come up with so far, but I wonder if there is an adjective.   I want a word that can fit into the blanks:  The script was so _________ that I had to pause and repeat a lot.  This rap is insanely ________.(a word more specific than "hard"/"difficult")


Consider the continuous functions $f : \mathbb R \to \mathbb R, f(x) = 1 + e^x \cos(x)$ and $g : \mathbb R \to \mathbb R, g(x) = 1 + e^x \sin(x)$. Using Rolle's Theorem, prove that between any two roots of $f$ there exists at least one root of $g$.  A root of $f$ is a point $x$ in the domain of $f$ such that $f(x) = 0$  So how would you go about answering this one?  Can anyone provide a brief proof?   I have no idea and want to know before I tute tomorrow


Does Frankfurt airport offer baggage storage reservations?

Need storage at airport for 8days for excess luggage and wish to secure same in advance of arrival.


Is is possible to force IP connections over the wired ethernet if it is connected and over wireless LAN if the wired ethernet is unavailabe (e.g. cable disconnected). Both network connections would be part of the same subnet.


How to get the valid URL of a Link field from within a Twig template?

I have a Link field named field_my_link (machine name).  Within a Twig template I can get the link's URL value with this:  {{ node.field_my_link.uri }}   If inside the Link's URL there is an external URL, e.g. http://example.com it works good.  But, if inside the Link's URL there is stored an internal URL, e.g. "/node/11", I get a value like this:  "internal:/node/11"   with the "internal:" prefix.  How can I get the valid URL?  For example, if the link's URL is "http://example.com" I want "http://example.com" (this already works), if the link's URL is "/node/11" I want the relative URL "/node/11", if the link's URL is "<front>" I want the URL "/", etc.    EDIT  I can get the value I want within a PHP preprocess function, using this:  $url = $variables['node']->get('field_my_link')->first()->getUrl();   How can I access the same value within the Twig template?  I know I can do this within the preprocess function:  $variables['my_url'] = $url;   Then access the url within Twig using {{ my_url }}, but I would avoid to write a preprocess function each time I have a link field.


Prove that $\mathbb Q[\sqrt[3]2]$ is a field

We define the set:   $$\mathbb{Q}[\sqrt[3]2]=\{a_{0}+a_{1}\sqrt[3]{2}+a_{2}\sqrt[3]{2^{2}}:a_{0}, a_1,a_2\in\mathbb{Q}\}$$  It's easy to prove all the properties of fields, except for the unit elements.  So, how can we prove that $$\forall x\in\mathbb{Q^{*}}[\sqrt[3]2],\exists x^{-1} \in\mathbb{Q}[\sqrt[3]2]:xx^{-1}=1$$   And how can we prove this in general for the set $$\mathbb{Q}[\sqrt[n]2]=\{a_{0}+a_{1}\sqrt[n]{2}+a_{2}\sqrt[n]{2^{2}}+...+a_{n-1}\sqrt[n]{2^{n-1}}:a_{0}, a_1,a_2,...,a_{n-1}\in\mathbb{Q}\}$$


How to prove $\int_0^{2\pi} \ln(1+a^2+2a\cos x)\, dx=0$?

How can I prove $\int_0^{2\pi} \ln(1+a^2+2a\cos x)\, dx=0$, where $a<1$?  Thanks.


I want to create Text Videos on Ubuntu ie. I want to add some frames with just text in them into the video. But I also want to be able to add screengrab videos and music into them. Is there a tool on Ubuntu that can allow me to do so? Some basic animation effects would be wonderful. I dont really want to spend money so an opensource and free tool would be more useful.   I am on Ubuntu 16.04.  PS: I know how to make a screengrab video, I just want a software that allows making text videos and allows me to stitch multiple separate videos into one and also put music into it.


How to convert milliseconds to minutes:seconds output?

I want to convert milliseconds and have 2:00 output. It should look like duration of the song. I was trying with this code: import datetime  seconds = milliseconds/1000 b = int((seconds % 3600)//60) c = int((seconds % 3600) % 60) dt = datetime.time(b, c) print(dt)  >>> 02:30:00  Do you have another ideas? Or maybe I should change something in my code. Edit: I solved the problem with following code     ms = 194000     seconds, ms = divmod(ms, 1000)     minutes, seconds = divmod(seconds, 60)     print(f'{int(minutes):01d}:{int(seconds):02d}')


I am running Ubuntu 14.04 LTS cannot log in goes back to log in screen

Every time I log in it goes back to the log in screen. I can only get in as a guest.How do I correct this log in issue?


Would like to filter by [tag:java] OR [tag:android] - (not AND!)

I find my self jumping between those the tags Java and Android very often while looking for new questions.  I know that I can filter by tag1 AND tag2 like this:   That has the disadvantage that I do not get the  questions that have nothing to do with , but I am also very interested in those.  So I would like to do it filter by tag1 OR tag2 to also get the pure java + pure android questions!  For the case something like this is already possible, please kindly explain how it should be done. I tried to find such an OR filter but could not find it and at least for me would be very useful! Thx!


Jquery dropdown menus working locally, but not in Wordpress

So I've followed this tutorial to the T, even downloading source files and implementing locally:    I also saw another poster here get this running:   However, I am implementing this code into Wordpress and it suddenly ceases to work.  First I inserted the HTML into header.php (everything renders fine in browser).  I wp_enqueued the js properly and confirmed it's appearing in source head. Also verified JQuery is loaded.  Style sheet is loading fine. However, the dropdown doesn't work. When inspecting in Firefox, there's usually a little black icon next to active js elements.. it appears locally but not running in WP:    Seems like the javascript isn't linking to the button or something ..?


Drop caps for first paragraph in chapter in InDesign

Is there a way to format paragraph styles so that only the first paragraph in each chapter gets a drop cap?  So far I have seen this solved by saving a "first_paragraph" style and a "regular" style to be the next-style, however I am modifying an imported text, so I need it to be able to automatically change all first chapter paragraphs.  Is there a way to de this without introducing separating into two paragraph styles?


Non-abelian groups that are "closest" to being abelian

Given a finite, non-abelian group $G$ of order $n$, how close can $G$ be to being abelian? More formally, define the following density measure:  $$d(G) = \frac{\#\{(a, b) \mid a, b \in G, ab = ba\}}{n^2}$$  The question is, then, are there known upper bounds for $d(G)$? I suppose lower bounds might also be interesting. A naive lower bound for $d(G)$ would be $\frac{2n-1}{n^2}$, since the commutator is trivial whenever $a = b$ or $a = e_G$ -- is this tight (in whatever sense you see fit, e.g. asymptotically)?


Javascript: How to get a list value based on ID?

I have a list with two columns: Name and ID. I have the ID value what is a unique field. I would like to get the Name value from the same row using javascript.  Thank you for your help!


My computer is set up to boot from SSD, should I change the location of my page file?

My computer is set up to boot from a solid state drive (SSD).  Should I change where my page file is located? Specifically, should I put it on my IDE hard disk?


There's a mathematical object called an "algebra" (e.g. an ), but why does this particular object have such an "important" name (which makes it sound like the most important concept in this huge area, abstract algebra), whereas the names of other important algebraic structures such as magmas, groups, rings, lattices and modules sound less important. I know some universal algebra and category theory, so I understand that "algebras" have many kin objects. But I can't understand why somebody decided to call these particular objects "algebras", although there seem to be many other good candidates for this grand name.   Similarly, there are objects called "numbers" in number theory, "sets" in set theory, "categories" in category theory, and "topologies" in topology. However, in other areas, for example analysis, geometry and even mathematics, there is no object called an "analysis", a "geometry" or a "mathematics". Is it because there's no fundamental object in these areas which have unsurpassable importance over others? If there are any central objects in these areas which should be named by their significance, in the same way as the objects "category", "topology", and "set" in their respective areas, could you tell me them?


How do I use different replacement texts for a pattern found multiple times

sample log file:  apple AAA rose banana AAA tulip orange AAA marigold   replacement-text file:  111 222 333   Expected output:  apple 111 rose banana 222 tulip orange 333 marigold


how to stop initialized variable from being skipped in switch statement?

I'm fairly new to programming and am stuck on making a simple menu with switch statements as I keep getting an "Error C2360 Initialization of 'total' is skipped by 'case' label". I am not sure why this is happening or how to fix it! Any help/criticism is appreciated :D #include <iostream> #include <iomanip> using namespace std;       int main()     {         int choice;          double a, b;                  //MENU         cout << setw(20) << setfill('-') << "" << "MENU" << setw(20) << setfill('-') << "" << endl;          cout << "1. Addition " << endl;          cout << "2. Subtraction " << endl;         cout << "3. Multiplication " << endl;         cout << "4. Division " << endl;         cout << endl;          //USER INPUT         cout << "What would you like do do? ";          cin >> choice;          cout << endl;          //SWITCH CASE          switch (choice)         {         case 1:             cout << "Enter 2 numbers: ";             cin >> a >> b;             long double total = (a + b);              cout << "The total is: " << total;             cout << endl;         break;                  case 2:             cout << "Enter 2 numbers: ";             cin >> a >> b;             long double totalM = (a * b);              cout << "The total is: " << totalM;             cout << endl;         break;          }                        return 0;     }


Is there a RTL8723AE linux driver for 3.8.0-19-generic

I just installed Ubuntu on my MSI ge60-20c and recognized the wireless-driver not working well. After some searching I found out it's a common problem and some people managed to get a proper driver working. Though I couldn't find any driver working for 3.8.0-19-generic :(  Can you help me please?  PS: Ubuntu 13.04 - 64 bit  Greets


How to prove three properties of the moment generating function?

The moment generating function of a random variable $X$ is defined to be the function $$M_{X}(t)=E(e^{tX})=\sum_{n=0}^{\infty}\frac{E(X^n)}{n!}t^n.$$ Let $I=\{t\in\mathbb R:M_{X}(t)<\infty\}.$  I wish to show that   $I$ is possibly a degenerate interval and $0\in I$. (Degenerate means the interval includes only one real number.)   $M_{X}(t)$ is a convex function on $I$.   If $0$ is an interior point of $I$, then $E(X^k)\lt\infty$ for all $k\in \mathbb N$; i.e., $X$ has finite moments of all orders.


We all know that $$15=3 \times 5$$  And $$15 =(-3) \times(-5)$$  Since $3 \neq -3$ and $5 \neq -5$ , we have two different prime factorizations !  Is this wrong ?   If this is wrong , then there are no negative primes !


I declared an action for a single event in Wordpress which accepts an array as an argument:  $asins = array(); //I had to declare this since I'm getting a notice of undefined variable if I don't  add_action('z_purge_products_cache', array($this, 'purge_products_cache', $asins));   I also tried this one, but it doesn't perform the action either:  add_action('z_purge_products_cache', array($this, 'purge_products_cache'));   Then I schedule it:  wp_schedule_single_event(time() + 20, 'z_purge_products_cache', $asins_r);   Then here's the function that will be called once wp cron executes the action:  public function purge_products_cache($asins){   //send email here }   Any ideas?


Comparison of positive predictive value between two models

Does anybody know how to compare two positive predictive value (PPV) from two different predictive models? I found some papers reporting $\chi^2$-test or Fisher exact test but I can´t figure out how the contingency tables would look like: They cannot be the same as for sensitivity/specifity tests, can they?  To clarify:   Imagine you want to compare one method for detecting cancer with another, newer one. I know how to estimate sensitivity, specificity etc., and to compare the two sensitivities from the two different models (sensitivity_method1 vs. sensitivity_method2; using McNemar) but regarding the comparison between PPV_method1 vs. PPV_method2 you can not use McNemar, because margins differ. There are possibilities to calculate the comparison in SAS catmod but it was too difficult for me to understand. So I thought there may be an easier way.  I would be really thankful for clarifications.


How can doing row operations help us gain information about the columns?

When we perform row operations on the matrix, for instance, say we are reducing the matrix to a reduced row echelon form, how does doing this help us understand what the linearly independent columns are when we are clearly making changes to the rows?


So we know a function has set of points of discontinuity $F_{\sigma}$.  Question: Is any $F_{\sigma}$ the set of discontinuity of some $f$ ?  Tried but failed. $\text{Thank you very much}$.


The correct omission of the definite and indefinite articles

Given the following headline at Bloomberg.com:     Verizon Explores Lower Price or Even Exit From Yahoo Deal   My questions are:   Why in this case the definite article is omitted before Yahoo Deal? E.g., From Yahoo Deal vs From the Yahoo Deal. Why there is no article before Lower Price in this title? E.g., Explores Lower Price vs Explores a Lower Price.


What is valid ID for purchasing alcohol in Baltimore, MD?

I am traveling to Baltimore in July from the UK. I have been several times before, but I need to clarify some things for a few others.  I managed fine with my UK passport, however, as I have found out, MD's alcohol laws are devolved to the county level and finding info on what US IDs are valid has been a headache.  Some places seem to say military IDs are OK, others not. MD issued IDs seem OK, but not those of other states unless it's a drivers license. Then there seems to be an issue with 'vertical' IDs. Then there seems to be rules about needing two types of ID.  All a bit confusing, any help would be welcome.


This question has been posed in many different variants, but not exactly as I ask here, so please do not consider this as a duplicate.  I use biblatex with the option useprefix. I would like to have the following automatic behavior:   Name prefixes are rendered before the last name in the bibliography, but always in lower case. The name prefixes are ignored for the sake of sorting of the bibliography. In running text, the name prefix is rendered with a capital letter at the beginning of a sentence, and lower case elsewhere (possible using \Textcite vs. \textcite).   To achieve this, I can have three author fields for each concerned entry, with the following scheme:  author = { {v}an Dijk, A.} shortauthor = { van Dijk, A.} sortname = {Dijk, A. van}   Is there a simple way to automate this? Ideally, such a way could also allow for easy changing of the system.


How can my sister have dark brown eyes, while my parents have blue eyes?

Both my father and mother have blue eyes, just like me. But my sister has dark brown eyes, contrary to what I've read about the dominance of brown eye genes and recessive blue eye genes. What happened (apart from the possibility that my mother dated a brown eyed guy from which she was born, which for sure didn't happen because we both look like our father and mother; though you never know with those Italians...) that gave her those dark eyes?


Is it coherent to extend $\mathbb{R}$ with a reciprocal of $0$?

I'm sure this is an obvious question, but I'm having trouble finding the right words to type into Google.  I know that the definition of a ring allows that the additive identity not have a multiplicative inverse, but is this a requirement?  Specifically, is something like $\mathbb{R}\!\left[\frac{1}{0}\right]$ such that $\frac{1}{0} \cdot 0 = 1$ a ring, or does some contradiction arise from allowing the additive identity to have a multiplicative inverse?


Write the set $\{1, 6, 11, 16,\ldots\}$ in compact (concise) notation.

I got the answer as the set $\{5x + 1 : x \in \mathbb{N} ∪ \{0\} \}$. Can anyone confirm if this is correct? Thanks.


Which is correct: “I’m done” or “I have finished”?

Which of these alternatives is grammatically correct?     I’m done.      or        I have finished   Like I’m done sounds very American, but is it grammatically correct?


Remove the first part of a string using sed

How do I get from this:  randomcollege-nt\user90   to this:  user90   using sed?


is it possible to achieve sitelinks and featured snippets other than waiting for google to list you down?

I am trying to learn how to implement featured snippets and sitelinks but they sent me on this link  but this is pretty old and they only say how you can achieve.but i wanted to ask how could i do it quickly


$G$ is a group, with $|G| \in \mathbb N, a \in G,a^{|G|} = 1$. True for non-abelian groups?

$G$ is an abelian group, with $|G| \in \mathbb N, a \in G$, show that $a^{|G|} = 1$.  I have managed to show it using the Lagrange theorem, but I have not used the fact that $G$ is abelian. I am wondering whether the statement is true also for non-abelian groups, or I have made a mistake in my proof.  Sketch of the proof  1) Show that $\exists q \in \mathbb N, q \le |G|$ such that $a^q = 1$ and $\forall n \in \mathbb N, n<q, a^n \ne 1$.  2) Show that $G_a : = \{a^m : m \in \mathbb N\}$ is a subgroup of $G$ and $|G_a|=q$.  3) Directly applying the Lagrange theorem show that $|G|=k|G_a|=kq, k \in \mathbb N_0$.  4) Now it follows that $a^{kq}=1$.


Keyboard shortcut for switching between buttons in a dialog

I was wondering if there is a way, like using the Tab key, to switch with the keyboard between buttons on a dialog box, where a program asks for a decision? (Example below)


Why isn't this vector field conservative?

Wikipedia says a conservative vector field is a vector field that is the gradient of some function. For this vector field I think a potential function could be arctan(y/x), and thus every line integral of this vector field over a closed path is 0. As I calculated the line integrals directly, I found they were not 0. Then I checked if $\frac{\partial Q}{\partial x} = \frac{\partial P}{\partial y}$ and it turns out $\frac{\partial Q}{\partial x} \neq \frac{\partial P}{\partial y}$. Umm... why is that?


How can I display a ghost image of the last photo in Live View on a Canon camera?

I am looking for a way to make stop video - but this is really a photography question.  I am looking for a way to:   Shoot 1st photograph When I prepare second, see the 1st with alpha/transparency to correctly fit things This actually needs to work in all photos and needs to be in live view (just simple shoot 2 photos and fit them in photoshop took too much time)   Something like this:    For now I have 3 cameras: Canon 1100D, Canon 600D and Canon 60D - so I actually think that is possible at least in 60D - could be a Canon firmware or even a computer (OSX/Win) software.


Why is hybrid encryption more effective than other encryption scheme?

Currently I am learning about  but I was not able to find any good study material.   Below is my understanding:  One of the reason why we use Hybrid Encryption because public-key cryptosystems often rely on complicated mathematical computations and are thus generally much more inefficient than comparable symmetric-key cryptosystems. A hybrid cryptosystem is one which combines the convenience of a public-key cryptosystem with the efficiency of a symmetric-key cryptosystem.   Steps of Hybrid Encryption:     To encrypt a message addressed to Alice in a hybrid cryptosystem, Bob   does the following:    Obtains Alice's public key. Generates a fresh symmetric key for the data encapsulation scheme. Encrypts the message under the data encapsulation scheme, using the symmetric key just generated. Encrypt the symmetric key under the key encapsulation scheme, using Alice's public key. Send both of these encryptions to Alice.      To decrypt this hybrid ciphertext, Alice does the following:    uses her private key to decrypt the symmetric key contained in the key encapsulation segment. uses this symmetric key to decrypt the message contained in the data encapsulation segment.   I am pretty much understood how Hybrid Encryption works but I don't see how this is better than Public Key Cryptography.  Question :- Why is Hybrid Encryption superior?   It is doing an extra work for generating a symmetric key by using Alice's public key. This will also involve complex mathematical computation. Along with sending data here it also needs to key along. Alice also needs to first decrypt the symmetric key and then decrypt the message. It almost seems like a double work.   I found some answers here but still it seems incomplete  and


Configuring tkinter for python3.4.3 Problem

I'm decently new to using a Raspberry Pi and I'm trying to set up a simple GUI application to launch from my Pi. I'm using a Raspberry Pi3, with Python 3.4.3 installed.  When I type python:  ~$ python Python 3.4.3 |Continuum Analytics, Inc.| (default, Aug 21 2015, 00:53:08) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information.   When I try to import tkinter:  >>> import tkinter Traceback (most recent call last):     File "<stdin>", line 1, in <module>     File "/home/pi/miniconda3/lib/python3.4/tkinter/__init__.py", line 38, in <module>         import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named '_tkinter' >>>   So, I can see that the error is coming from miniconda3. The only reason I had it installed was to use PyQt5, but I was getting a similar error when I tried to use that, so I switched over to Tkinter because there were more examples of using it with a pi online.   I have run the following commands to try to install Tkinter:  sudo apt-get install tk-dev sudo apt-get install tk8.6-dev sudo apt-get install python-imaging-tk sudo apt-get install python-tk sudo apt-get install python3-tk   How can I fix this? I have read in some places to make python again, but no one says how to do that.   Thanks guys!


Alias (CNAME) record cannot be added to this DNS Name

In Microsoft DNS, I'm trying to setup a simple DNS Alias (CNAME) pointing from domain.com to www.domain.com. I also want to forward www.domain.com to a specific IP. In other words, I want to do something like this:  www.example.com. IN A 192.168.3.44 example.com. IN CNAME www.example.com.   When adding the CNAME I get the following Error:  "A new Record cannot be created. An alias (CNAME) record cannot be added to this DNS name. The DNS name conatins records that are incompatible with the CNAME record."  Why doesn't this work and how can I fix it?


latex file wont compile if I add bib file but will compile same file without it

My code won't compile with my jobname.bib file. It says Biber reported the following issues (biblatex)  with 'UniEconomicSocialCouncil2009': (biblatex)  - Entry 'UniEconomicSocialCouncil2009' (textest.bib): Invalid format '2009' of date field 'date' - ignoring. However it will compile file without it. I asked a question here  and answer I accepted gave me some settings to put into my VSCode LaTeX workshop setup to make it work (pdflatex + biblatex + pdfLateX x 2). It worked initially. Now it does not work. This is strange because I have not changed anything in the bib file. I singled out one for the purpose tests. Now it has issues with the date as well. \documentclass{article} \usepackage[style=authoryear-comp]{biblatex} \addbibresource{\jobname.bib}  \begin{filecontents}{\jobname.bib}    @InProceedings{UniEconomicSocialCouncil2009,    author      = {{United Nations. Economic Commission for Africa} and {United Nations. Economic and Social Council}},    title       = {The transport situaiton in {A}frica},    publisher   = {UN. ECA},    date        = {2009},    eventdate   = {2009-10-13/2009-10-15},    eventtitle  = {UN. ECA committee on Trade, Regional Cooperation and Integration (6th Session: 2009, Oct. 13-15: Addis Ababa, Ethiopia)},    location    = {Addis Ababa, Ethiopia},    shortauthor = {UNECA and UNESC},    url         = {http://hdl.handle.net/10855/3252},   } \end{filecontents}  \begin{document}  \cite{UniEconomicSocialCouncil2009}  \printbibliography \end{document}


Why would [1: : -1] return the first two items of a list but reversed rather than the 2nd item to the end of the list?

[1: :1] returns the 2nd item to the end of the list, but [1: :-1] returns the 1st and 2nd items of a list but reversed. I understand that it's reversed because the step is -1 but why is it the first two items rather than the 2nd item onwards?


Hash sum missmatch while installing ubuntu-restricted-extras

Err:1  focal/universe amd64 intel-media-va-driver amd64 20.1.1+dfsg1-1 Hash Sum mismatch Hashes of expected file:  SHA256:ef9f82cbfefb3fa3aef05a8da8bec15c508dd467facf22d41804e15a01e6a105 SHA1:7d04d04ecb836f691042fcff6de3dcbb0f0457d6 [weak] MD5Sum:6440280fa4564f7204fddc3ac5dfdd94 [weak] Filesize:1764416 [weak] Hashes of received file: SHA256:d01b4423e0b392a03a2eba570875483948f34c72584df4ce4cf464b6fa5161af SHA1:07a0cf00aaf972589c6ee7c477c72d52e8b7fa8b [weak] MD5Sum:923a904e7894a766ed1f776de4e634d9 [weak] Filesize:1764416 [weak] Last modification reported: Mon, 13 Apr 2020 11:28:18 +0000 Fetched 1,764 kB in 7s (252 kB/s) E: Failed to fetch   Hash Sum mismatch Hashes of expected file: - SHA256:ef9f82cbfefb3fa3aef05a8da8bec15c508dd467facf22d41804e15a01e6a105 - SHA1:7d04d04ecb836f691042fcff6de3dcbb0f0457d6 [weak] - MD5Sum:6440280fa4564f7204fddc3ac5dfdd94 [weak] - Filesize:1764416 [weak] Hashes of received file: - SHA256:d01b4423e0b392a03a2eba570875483948f34c72584df4ce4cf464b6fa5161af - SHA1:07a0cf00aaf972589c6ee7c477c72d52e8b7fa8b [weak] - MD5Sum:923a904e7894a766ed1f776de4e634d9 [weak] - Filesize:1764416 [weak] Last modification reported: Mon, 13 Apr 2020 11:28:18 +0000 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Hi I've been trying to solve this problem for at least 4 hours now but I can't figure it out. If anyone can help I would really appreciate it!  I am asked to prove this using the pigeonhole principle:  "If n is an odd integer, show there exists a positive integer k such that 2^k mod n = 1."  I know that n has n possible remainders (0,1,2,...,n-1) and that this may be the "pigeonholes". I also found that as you increase k in 2^k and calculate 2^k mod n, the remainders occur in a pattern... (Like for 2^k mod 5, when k=0 -> remainder is 2, k=1 -> r=4, k=2 -> r=3, k=3 -> r=1, then the pattern repeats 2,4,3,1.)  Also, I found n divides 2^k - 1, so 2^k - 1 = nb, for an integer b. Since 2^k is even and n is odd, b must be odd too...  (Thank you to both who helped me!!! I am really grateful :) )


Choose Default Program dialog does not show up after choosing Open with entry in context menu

For some time now when I click Open with from Windows Explorer's context menu I'm getting this error     This file does not have a program   associated with it to perform this   action. Create an association in the   Set Associations control panel.   instead of the standard Choose Default Program dialog. I'm getting this error no matter what the extension of the selected file is (as long as there's Open with option for given extension; some extensions do not show this option). How can I fix this?


My code is here.   \begin{table}[t]  \centering \begin{tabular}{|c|c|c|} \hline Graph $G$ & Graph $H$ & An isomorphism between $G$ and $H$\\ \hline \multirow{8}{*}{\includegraphics[height=4cm]{Graph_iso_a.eps}} & \multirow{8}{*}{\includegraphics[height=4cm]{Graph_iso_b.eps}} & $f(a)$ = 1\\&& $f(b)$ = 6\\ &&$f(c)$ = 8\\ &&$f(d)$ = 3\\ &&$f(g)$ = 5\\ &&$f(h)$ = 2\\ &&$f(i)$ = 4\\ &&$f(j)$ = 7\\ \hline \end{tabular} \caption{Graph isomorphism.} \end{table}     The problem is that that is not enough space then the line is covered by the image. How can I fix it? Thanks!


How to intercept temporary files created by a program?

TL;DR: I know a program creates and then deletes files in /tmp. How can I intercept them for examination ?  Context:  There's a particular .jar file, which I don't trust; for some reason its source code contains an ftm method and has capability to make connections, which is evident from network-related syscalls in output of strace (and when I mean connection, I don't mean unix domain sockets, it's AF_INET6). I've examined with Wireshark and saw no outgoing TCP or UDP connections during it's use.   However, I still don't quite trust it. From the output of strace I've seen that it's creating temporary files in /tmp and then deletes them. Is there a way to intercept those files to examine their contents ?


"a" or "an" for words that don't start with vowels but sound like they're starting with a vowel

Is it correct to say or write an student or an store?


AC servo position flight surface control system

So if a control transmitter is used to set the Pilot's input command signal and a control transformer is used to compare this desired position to the current position and produce an error signal. My question is how does the feedback system work for this? How does the control transformer get the current position? Does it have something to do with its shaft? Quite unsure about this


I don't know much more about Ubuntu yet, I am looking for android emulator for my Ubuntu14. If any there could you please let me know (with download and installation instructions)


Complex zeros of the polynomials $\sum_{k=0}^{n} z^k/k!$, inside balls

this is a question from a Temple prelim exam, and i'm trapped in it! We have $p_n(z)=\sum_{k=0}^n\frac{z^k}{k!}$ and we have to prove that $\forall r>0 \quad \exists N\in\mathbb{N}$ s.t. $p_n(z)$ has no zeros in $B_r(0)$ for $n>N$.  I tried to use Rouche's theorem observing that $1+\frac{z^n}{n!}$ has the nth roots of $n!$ as complex zeros, which are outside a fixed ball for n sufficiently large, but i'm having trouble proving that $|1+\frac{z^n}{n!}|>|z+\cdots+\frac{z^{n-1}}{(n-1)!}|$ in $|z|=r$ (if this is true). If anyone could help..


How high to raise water heater above floor?

I saw a water heater stand at Home Depot but it's about 15" high. That's a bit too high for my basement. Can I just make one with 2x4 and plywood that's only 4" tall, basically just enough to be able to drain water off the drain tray? Or does the code require it be higher?


Always use desktop mode for specific websites on Chrome

When I tap one of my favourite site, Chrome suggests me the link to mobile version, but I do not want it. I want to disable it only for my favourites.  I want to set the desktop mode only for some selected website, not for all  I use Chrome with Lollipop on Nexus 4. How can I disable this feature?


We are making a multipler first person shooter. The client sends it's position to the server at a fixed rate (currently at 10Hz). The server sends a single message contatining all player's positions to all players at the same rate (10Hz).  As expected, the movement is pretty choppy since the 60fps game is only recieving updates 10 times a second. What is the best way to smooth this movement? The most obvious way would be to interpolate between the last two packets, so that the interpolation finishes as we recieve a new packet. But this adds an instant 100ms delay for all players.  The other way would be to use the velocity and acceleration inferred from the last few packets to predict where the player is before the next packet arrives, however if the prediction is wrong, the player would tend to jump as soon as a new packet is recieved.  Does anyone know how AAA titles solve this problem?


What’s the rule for adding “-er” vs. “-or” when forming an agent noun from a verb?

What’s the rule to decide whether you add -er or whether you add -or when creating an agent noun from a verb?    Sometimes it’s -er:      read > reader hate > hater hit > hitter   But other times it’s -or:    meditate > meditator collect > collector


What is causing the lack of sharpness in this picture?

What is the most likely cause of the lack of sharpness in this picture? Taken with a Nikon D3000 and a 55-200 lens at 200mm, 1/320s, f/5.6, ISO 400.


In what way does this program access illegal memory?

Currently I'm learning about C and OpenMP. I wrote the following program: #include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 960  int main (int argc, char *argv[])  {     int nthreads, tid, i, j;     double a[N][N];  /* Fork a team of threads */     #pragma omp parallel shared(nthreads) private(i,tid,a)     {         tid = omp_get_thread_num();         if (tid == 0)          {             nthreads = omp_get_num_threads();             printf("Number of threads = %d\n", nthreads);                      }         printf("Thread %d starting...\n", tid);                  #pragma omp for         for (i=0; i<N; i++)         {             for (j=0; j<N; j++)             {                 a[i][j] = tid + i + j;             }                      }     } }  When I compile the code it compiles. I use in a Linux terminal: gcc name.c -o name -lm -fopenmp  When I want to excecute the program I get a segmentation error. I searched for a definition: A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed I don't really see how I try to access a memory that is not allowed. Could I please get feedback on why I get a segmentation error?


Subscribe and RSS links in tag hoverbox layout broken when the "x followers, x questions" text is too long

In the box which appears after hovering a tag, if the "x followers, x questions" text is too long, the "subscribe" and "rss" links change their position.  Example: .  I think a solution to this would be to increase width of the box. It currently is 330px, I think that 350px would be enough.


what are the limitations to execute a binary which compiled actually on x86_64 machine into i686 machine?

i tried to compile sample hello_world.c program in x86-64 machine, but i expect to execute hello_world binary into i686 machine. can somebody correct me if i was wrong, what are the subjective limitations to execute x86-64 binary into i686 Machine. from my understanding x86-64 binary will execute in 32-bit machine aswell. prashad@ubuntu:~$ uname -a Linux ubuntu 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux prashad@ubuntu:~$    root@Docsis-Gateway:/tmp# uname -a Linux Docsis-Gateway 4.9.199-yocto-standard #1 SMP PREEMPT Thu Aug 6 22:38:09 UTC 2020 i686 GNU/Linux


Book containing the phrase "My name is legion"

A guy answers a personal ad, near the beginning of the story is the phrase "My name is legion". At one point he climbs a building and auto-regulates his own lactic acid buildup so that his muscles do not seize up.  What is this book?


Remove white line after \item in enumerate and before display math

The goal is to remove the white line after the 1. in the second enumerate in the picture, so it will look like the first enumerate.   I don't like the first enumerate because it uses inline math, needs the white line in the code to make a new paragraph, and uses \displaystyle which I think is not the way to go: it feels like a 'hack'. Maybe I am mistaken, in that case say so, but I think there must be a good solution.    MWE:  \documentclass[english]{exam} \usepackage[fleqn]{amsmath}  \begin{document}      \begin{enumerate}  %result looks fine, but code ugly         \item          $\displaystyle \pi$           $\displaystyle 2\pi$     \end{enumerate}      \begin{enumerate} %code looks fine, but result ugly         \item          \[\pi\]         \[2\pi\]     \end{enumerate}  \end{document}


How to query all content type and add as checkbox for custom form?

Need help on how to create a custom form that is only available for admins that will query all content types and display the options as a checkbox.  The goal is to only add certain libraries to particular content types selectively through an admin form. How would i query all content types and display them as checkboxes?  What we tried:  mymodule.module  function mymodue_preprocess_node(&$variables) {   $node = $variables['node'];   $config = \Drupal::config('mymodule.settings');   $enabled_content_types = !empty($config->get('enabled_content_types')) ? $config->get('enabled_content_types') : FALSE;    // This is where we need help.   if(in_array($enabled_content_type, $node->bundle()) {     // perform some logic.   }   }   mymoduleForm.php  <?php  namespace Drupal\mymodule\Form;  class mymoduleForm extends ConfigFormBase {   /**    * {@inheritdoc}    */   protected function getEditableConfigNames() {     return [       'mymodule.settings',     ];   }    /**    * {@inheritdoc}    */   public function getFormId() {     return 'mymodule_settings';   }    /**    * {@inheritdoc}    */   public function buildForm(array $form, FormStateInterface $form_state) {     $types = \Drupal::entityTypeManager()       ->getStorage('node_type')       ->loadMultiple();      foreach($types as $type) {       $content_types[$type->id()] = $type->label();     }      // Need help setting this up so that the options are content types.      $form['enabled_content_types'] = [       '#type' => 'checkbox',       '#title' => 'Enabled Content Types',       '#description' => 'Run preprocess for all enabled content types only',       '#options' => $content_types,     ],   } }


Is my proof for all these statements are equivalent correct?

$(i)$ $x$ is irrational  $(ii)$ $3x + 2$ is irrational  $(iii)$ $\frac{x}{2}$ is irrational  My working :  $(i) \to (ii) \land (ii \to iii) \land (iii \to i)$  $(i) \to (ii)$:   Proof By contraposition:  x = p/q y = c/d 3x + 2 = y  3(p/q) + 2 = c/d  3p+2q/q = c / d  c = 3p + 2q  d = q  c/d = c/d   $(ii) \to (iii)$:   Proof by Contraposition:   x/2 = c/d -> 3x+2 = a/b  Now from the previous example we know that 3x+2 = a/b is true.   $(iii) \to (i) $  Proof by contraposition:   x = a/b -> x / 2 = c/d  (a/b) / 2 = c/d  a/2b = c/d  c = a   d = 2b  c / d = c / d


uhh, I'm new to Texture Paint and while experimenting paint brush, I've come across this problem...   and this is its UV Image   Please help me on how do I remove these edges on the paint's outlines and make it accurate to its UV lines.


A non cauchy-schwarz approach to the question: Prove that if $\sum{a_k^2}$ converges then $\sum{a_k/k}$ converges.

I wanted to know how to solve this question without the use of the cauchy-schwarz inequality and using more standard methods/tests (such as ratio test, comparison test etc.) for convergence/divergence if possible. Thanks in advance.


ListView with Lazy loading with downloading image

I have a listview in which images gets downloaded when I scroll so whatever I have understand till now is the element which are visible only that element's images gets downloaded. Suppose only 7 elements are visible at a time and when I Scroll previous views are recycled with the new once so what happens to the process which was downloading the image of the previous views is it also cancelled or it queues the new request of downloading images of the new Views.I am asking about the process that queueing of process happens or the process which are not completed yet are cancelled. with process I mean downloading images in background


How to use the wrapper class in HTTP getmethod

below is my code Created a wrapper class like below  public class ResponseWrapper{     public list<Account> lstaccounts;     public boolean isError ;     public string errorCode;     public integer statusCode;        public ResponseWrapper(){          lstaccounts = new list<Account>();          isError= false;     } }    @getMethod  @RestResource(urlMapping='/accounts/*')  global with sharing class AccountRestService {  @HttpGet  global static ResponseWrapper getAccounts() {      ResponseWrapper resWrap = new ResponseWrapper();      List<Account> accounts;      try {          accounts = [SELECT Id, Name FROM Account];          res.lstaccounts = accounts;      } catch (Exception e) {          RestResponse res = RestContext.response;          resWrap.isError = true;          res.responseBody = Blob.valueOf(e.getMessage()) = resWrap.errorCode;          res.statusCode = 500 = resWrap.statusCode;      }      return resWrap;    }  }   but iam getting the below Error:   Compile Error: global methods do not support return type of ResponseWrapper at line 4 column 31   Please check and suggest on this whats  the exact mistake i did.  Thanks & Regards.   Vamsi Krishna.


In my code I'm getting milliseconds using   // elaspsed time in milliseconds     public long getElapsedTime() {         if (running) {             return System.currentTimeMillis() - startTime;         }         return stopTime - startTime;     }   As long is a whole number Where as I want to get the milliseconds in 00.0000 format  However I've tried this so far  return ((System.currentTimeMillis() - startTime) / 1000f);   but I am not getting to particular format


How prove this limit $\lim\limits_{n\rightarrow \infty} \frac{f_n}{f_{n+1}}=a$ given two other limits related to $f_n$

Let $(f_n)$- real sequence such that $$ \lim_{n\rightarrow \infty} \frac{f_{n+1}f_n-f_{n-1}f_{n+2}}{f_{n+1}^2-f_nf_{n+2}}=a+b, $$ and $$ \lim_{n\rightarrow \infty} \frac{f_{n}^2-f_{n-1}f_{n+1}}{f_{n+1}^2-f_nf_{n+2}}=ab   \quad    (|a|<|b|). $$  Prove that:$$\lim_{n\rightarrow \infty} \frac{f_n}{f_{n+1}}=a $$  I think we must prove $\displaystyle\lim_{n\rightarrow \infty} \frac{f_n}{f_{n+1}} $ exists,and we prove this limit is $a$,But I can't prove this limit exists.  My idea: since $$\lim_{n\to\infty}\dfrac{\dfrac{f_{n}}{f_{n+1}}-\dfrac{f_{n-1}}{f_{n}}\dfrac{f_{n}}{f_{n+1}}\dfrac{f_{n+2}}{f_{n+1}}}{1-\dfrac{f_{n}}{f_{n+1}}\dfrac{f_{n+2}}{f_{n+1}}}=a+b$$ and  $$\lim_{n\to\infty}\dfrac{\left(\dfrac{f_{n}}{f_{n+1}}\right)^2-\dfrac{f_{n-1}}{f_{n}}\dfrac{f_{n}}{f_{n+1}}}{1-\dfrac{f_{n}}{f_{n+1}}\dfrac{f_{n+2}}{f_{n+1}}}=ab$$ But I felt this deal is not useful,  Other idea: I want to take the  Fibonacci sequence  to solve this problem, But I can't,   Thank you


I've learned it is obligatory to invert subject and verb when 'only when' is placed at the beginning of a sentence. However, I've recently found the sentence below.  "Only when the rule can have some meaningful effect it is to be applied."  Some English teacher in my country said this sentence is grammatically correct. He said inversion shouldn't happen in this case because a pronoun 'it' is used as a subject in the main clause and 'it' refers to 'the rule'. I'm not sure whether or not the sentence is correct, but I'm pretty sure that teacher doesn't know what he is talking about.  I think that sentence should be "Only when the rule can have some meaningful effect is it to be applied."  What do you think? Is it incorrect? If so, why is that?  Many thanks in advance.


Why is it that unlike other quantum properties such as momentum and velocity, which usually are given through (probabilistic) continuous values, spin has a (probabilistic) discrete spectrum?


How do I stop and start setInterval?  Suppose I have a textarea.  I want to stop setInterval on focus and restart setInterval on blur (with jQuery).


Bottom Panel shows the name of the active application and workspace indicator in Ubuntu 20.04

I've just upgraded to Ubuntu 20.04 LTS and I think there's a weird bug on the dock.    Is there any way to make that disappear? It's giving me Windows Vista vibes.


How do i access custom my domain in apex

I want to access custom my domain in apex class. For e.g  is the domain. Is there any method to access this domain in class.


I trying to fire my datagridview with records from sql server database using a store procedure with two parameters id. I have two comboboxes which takes the parameters and a button. As data is being fetched, I would like to see the progress so I assigned a progressBar to it but I am getting an Error: Invalid thread cross process : The access to the control ComboBox2 performed by a different thread than the thread for which it was created.  My c# code:   private void button2_Click(object sender, EventArgs e)  {      ProgressBar1.Visible = true;      ProgressBar1.Style = ProgressBarStyle.Marquee;      System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(loadTable));      thread.Start();   }   private void loadTable()  {      // Load Table...               string C = ConfigurationManager..["DB"].ConnectionString;      SqlConnection con = new SqlConnection(C);      SqlCommand cmd = new SqlCommand();      cmd.Connection = con;      cmd.CommandText = ("[dbo].[spInfo]");      cmd.CommandType = CommandType.StoredProcedure;      cmd.Parameters.AddWithValue("@Periode2", comboBox2.SelectedValue.ToString());      cmd.Parameters.AddWithValue("@Periode1", comboBox3.SelectedValue.ToString());       try      {          // Open connection          con.Open();           SqlDataAdapter adapter = new SqlDataAdapter(cmd);           // Save the results in the DT. Call the adapter statement and fill it in the DT          DataTable dt = new DataTable();          adapter.Fill(dt);           setDataSource(dt);       }      catch (Exception ex)      {          MessageBox.Show(ex.Message);      }      finally      {          con.Close();      }  }   internal delegate void SetDataSourceDelegate(DataTable dt);   private void setDataSource(DataTable dt)  {      // Invoke method if required:      if (this.InvokeRequired)      {          this.Invoke(new SetDataSourceDelegate(setDataSource), dt);      }      else      {          datagridview1.DataSource = dt;          ProgressBar1.Visible = false;      }  }   I would really appreciate any help it thanks.


What if we switch on a flashlight while travelling at the speed of light (we are travelling in vacuum, in a straight path)? What will happen and what will be the speed of light from the flashlight? Will it travel along with us? If it would travel with us (because we are travelling at the speed of light)  then as Einstein's time dilation theory says that the faster you travel through space,the slower you move through time (that means that our physical and biological processes slow down), the light's motion i.e., it's speed should also slow down... so that would mean that speed of light is not constant. Is that so?


In Python, what are metaclasses and what do we use them for?


Cannot SSH/SFTP to remote server without using another remote server

I can access a server A with SSH, and from there I can access server B, but I can't access B directly.  Is it possible to open a Nautilus folder in server B by clicking in Places → Connect to Server?


What i have: I've installed Qgis 2.99.0 (dev)  How do I: Install base map for this version. The openlayers plugin isn't available.


How do you run Nginx on port 8080 and Apache on port 80 on the same box?

I want to install Node.js on my box (CentOS 5) for testing and sandboxing but I can't uninstall Apache as recommend by developers using Nginx.  So what I'd like to do is have Nginx serving  nodejs.sandbox.net on IP 10.10.10.10   and Apache running (usual setup)  sandbox.net on 10.10.10.10   and then on my windows host file do something like  sandbox.net 10.10.10.10:80 nodejs.sandbox.net 10.10.10.10:8080   and by the way how do I install Nginx on CentOS 5 yum?


Humanity meeting another similar intelligent life form deep into space (or not)?

I'm looking for a plot line (it should be a short story) that depicts Earth population (or their close descendants) establishing contact with another intelligent life form deep into space.   After careful studying of DNA samples and language / communication symbols they then realize that the civilization in question is also from Earth but that they departed very long ago and travelled throughout the galaxy in the completely opposite direction so that they are now meeting practically at the point of the circle opposite to Earth. There might have been some anatomical differences as well.  As far as I can remember, the story concludes shortly after that.  This should be a work of a well-known SF author, so I'm hoping for a quick response (if time didn't corrupt my memory too much).  I don't think it was part of an anthology, but it's entirely possible it was in a magazine.  As for the timeline, I've read it about 2-3 years ago, but since I have a passion for older SF works it might not be of much use.  Edit: Not sure if this could help but for what it's worth, it might be contained in .


Is it possible to enter @nickname in comments, automatically? Or is one just supposed to write out the names letter by letter?


Sample table:    Hi, can someone pl. help how do I get the least date and corresponding name from the table above? I should get only 3 rows, with first one as Ram and second one as def and third one as def.    Thanks


Command for deleting temporary files ending with ~

Many days ago, I found this useful bash alias (contents of my ~/.bash_aliases)  # aliases  # finds temporary files ending with '~' and deletes them alias rm~='find . -name '*~' -print0 | xargs -0 /bin/rm -f'   Now I tried to use rm~ after cd to some directory containing 3 files ending in ~  I got this error in terminal, and files did not get deleted  find: paths must precede expression: 1n.in~ Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]   Also when I tried rm~ from /home/me, it seems to be doing nothing. Or it might be taking a lot of time.  Please tell me why am I getting error, and how to fix it.  Thanks!


When accessing from a computer, I got the "mobile" style view

Strangely, I only got this when accessing RPG.SE. (Nothing else, even meta.RPG.SE.)  First image:    Second image for comparison:    Any ideas?  Note: Awards, profile, and badges that have something to do with RPG.SE is in mobile view.  My clock is +7 GMT.


What is the best way to return an error from a function when I'm already returning a value?

I wrote a function in C that converts a string to an integer and returns the integer. When I call the function I also want it to let me know if the string is not a valid number. In the past I returned -1 when this error occurred, because I didn't need to convert strings to negative numbers. But now I want it to convert strings to negative numbers, so what is the best way to report the error?  In case I wasn't clear about this: I don't want this function to report the error to the user, I want it to report the error to the code that called the function. ("Report" might be the wrong word to use...)  Here's the code:  s32 intval(const char *string) {     bool negative = false;     u32 current_char = 0;      if (string[0] == '-') {         negative = true;         current_char = 1;     }      s32 num = 0;     while (string[current_char]) {         if (string[current_char] < '0' || string[current_char] > '9') {             // Return an error here.. but how?         }          num *= 10;         num += string[current_char] - '0';         current_char++;     }      if (negative) {         num = -num;     }      return num; }


In minecraft I heard creepy music while mining

A couple minutes ago, I was mining in minecraft and then there was about ten seconds of creepy music. Whats going on? I'm freaking out!


Why do login processes sleep before reporting "password incorrect" rather than limiting input?

When using sudo, su, or simply the login screen from Linux Mint Cinnamon or Debian with Cinnamon, they all hang for a second when you enter an incorrect password.  For me, the fact that it hangs tells me "it's incorrect" already, making me Ctrl+C a sudo command and then retry with uparrow -> Enter, or close a login dialog with Escape and start typing to try again. This works just fine.  It appears to be an attempt at rate limiting, but it does not work because an attacker can just setup parallel guesses. If it actually wanted to rate limit, it should limit how many queries can be inputted per time period, not how long it takes before the output is returned (and it's only delayed in the failure case, another dead giveaway).  What is the reasoning behind doing it this way?


Properties of zero-diagonal symmetric matrices

I'm interested in the properties of zero-diagonal symmetric (or hermitian) matrices, also known as hollow symmetric (or hermitian) matrices.   The only thing I can come up with is that it cannot be positive definite (if it's not the zero matrix): The Cholesky decomposition provides for positive definite matrices $A$ the existence of a lower triangular $L$ with $A=LL^*$. However the diagonal of $LL^*$ is the inner product of each of the rows of $L$ with itself. Since the diagonal of $A$ consists of zeros, so $L$ (and thus $A$) must be the zero matrix.  The sorts of questions that interest me are:   which symmetric matrices can be transformed orthogonally into a zero-diagonal matrix? what can we say about the eigen-values of a zero-diagonal symmetric matrix?. any other interesting known properties??


Do Captain America's actions at the end of Endgame contradict what we've heard before in the film?

A key plot device of avengers: Endgame is      Time travel. A central point is that they have to be very careful with time travel, as explained by some team members when Rhodes asked why can't they simply go back in time and kill baby Thanos. Someone mentions that "all the rules apply, no interaction with our past selves, no trying to change the future, etc...". When Hulk meets The Ancient One, she explains that timelines and realities can be damaged, etc.    The only thing they can really pull off without messing up history is retrieving the Infinity Stones, using them in the present, and then returning them to the proper place in history to avoid any disruptions to the time line.    But then in the final scene, we discover that Captain America      went back in time and had the life that he always wanted to have with Agent Carter.   Doesn't this contradict the above mentioned dangers      of time travel? Wouldn't his getting together with Agent Carter at the very least completely alter the history of the S.S.R and S.H.I.E.L.D (if not the entire U.S military) and hence completely mess up the time line?