I am learning the zsh in the conditional expressions part, and I found some unreasonable output. For example: $ mkdir emptyspace && cd emptyspace $ var_assigned_with_emptystring=""  $ [[ -n $var_assigned_with_emptystring ]] && echo 'var_assigned_with_emptystring is a nonzero-len string!' $ [[ -n "" ]] && echo '"" is a nonzero-len string!'  $ test -n $var_assigned_with_emptystring && echo 'var_assigned_with_emptystring is a nonzero-len string by test!' var_assigned_with_emptystring is a nonzero-len string by test! $ test -n "" && echo '"" is a nonzero-len string by test!'   ----------   $ [[ -z $var_assigned_with_emptystring ]] && echo 'var_assigned_with_emptystring is a zero-len string!' var_assigned_with_emptystring is not an empty string! $ [[ -z "" ]] && echo '"" is a zero-len string!' "" is a zero-len string!  $ test -z $var_assigned_with_emptystring && echo 'var_assigned_with_emptystring is a zero-len string by test!' var_assigned_with_emptystring is a zero-len string by test! $ test -z "" && echo '"" is a zero-len string by test!' "" is a zero-len string by test!    Why does the test with a var_assigned_with_emptystring always gives a true result no matter it is with -n or -z option? What's the difference between test command and individual conditional expression surrounded by [[]]?  What is the difference between "" and var_assigned_with_emptystring? I think the parameter should have be expended(or evaluated) to a same value as "" when it comes to process in the internal part of test function. But test -n $var_assigned_with_emptystring gives a different return status with test -n ""


Some screenshots in our help center have been outdated. For example, :    It's still using old site design. Nerds at  may love it, but most other users don't. Please replace them with screenshots taken at current sites.  However, please keep those !


Can I use Ubuntu font in my commercial software running on Windows CE?

I'm now making commercial software for Windows CE O/S, and I want to embed Ubuntu font to my software. The file format will be converted to my own format to speed up my software.  In this case, am I need to obtain some kind of license? Or do it freely with including license.txt files on my software ?


These are the signature errors that persist after I tried several fixes mentioned on the Internet  W: GPG error: http://deb.opera.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 517590D9A8492E35 W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192 W: GPG error: http://linux.dropbox.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FC918B335044912E W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991 W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991 W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 W: GPG error: https://private-ppa.launchpad.net raring Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E131728675254D99 W: GPG error: http://archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 W: GPG error: http://archive.ubuntu.com trusty-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 W: GPG error: https://private-ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E131728675254D99 W: GPG error: http://archive.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3AFF5CEDF0F40 W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32B18A1260D8DA0B   I have been beating around the bush for solutions but nothing has worked yet please suggest something that would solve these errors.  What I've already tried:    y-ppa-manager manually removing list and regenerating it.   So please don't mark duplicate for these methods and suggest something else.


What is a less vulgar way of referring to someone's posterior?

What is the least vulgar but still natural (not overly formal) of these: Bum, bottom, backside, behind, rear end... As she walked past him, he stared at her _________.


What happens if you plug more than one charger in the new MacBook Pro (2016)?

Apple's  decision to convert all the ports on their 2016 MacBook Pro lineup to USB-C ports contributes to blur the difference between ports that supply power (such as a power adapters) and ports that can power external devices (such as USB keys, mice or other gadgets).    This made me think about the following scenario: you sit at a table where your laptop is plugged in on the right, and don't notice that it is plugged in, so you decide to charge it with a second nearby charger that is laying around (i.e. belonging to someone who lives with you and who recently sat at the same spot).  What would happen then?   Would the computer charge twice as fast, would one of the chargers be dismissed by the system (which one?), or would it generate a surcharge that would destroy the computer?  I couldn't find anything about this online, but since I am always trying to force a USB in the MagSafe charger of my MacBook Air, I think that I could easily end up making this kind of mistake.  Note: My question asks what happens when two chargers are inserted into a MacBook Pro, but I am also wondering what would happend if 3, or 4 chargers were inserted. Although this scenario is unlikely to happen by mistake, it would constitute an obvious vulnerability to an exposed device, i.e. in a public space.


df -h shows 100% usage but sizes don't add up

I have a situation where my root filesystem is supposed to have plenty of free space, but Debian behaves as if it had no free space left. Non-root users even refute to write anything complaining about the lack of free space. I.e. for example:  ~$ echo "qwertyu" > test -bash: echo: write error: Spazio esaurito sul device   (Sorry about the language, I didn't install the server myself. The error reads "ran out of free space on the device"). But root writes to the same directory without complaints. Also if I do df -h as root I get this:  /# df -h File system                                             Dim. Usati Dispon. Uso% Montato su rootfs                                                   48G   46G       0 100% / udev                                                     10M     0     10M   0% /dev tmpfs                                                   397M   88M    310M  23% /run /dev/disk/by-uuid/8063903c-80ad-4f72-81b0-cd67dbd48fc7   48G   46G       0 100% / tmpfs                                                   2,0G     0    2,0G   0% /dev/shm tmpfs                                                   2,0G     0    2,0G   0% /sys/fs/cgroup tmpfs                                                   5,0M     0    5,0M   0% /run/lock tmpfs                                                   100M     0    100M   0% /run/user /dev/sdb1                                                99G  9,6G     84G  11% /disk2   But du entries don't add up:  /# du -sh /* | sort -hr du: impossibile accedere a "/proc/12905/task/12905/fd/4": File o directory non esistente du: impossibile accedere a "/proc/12905/task/12905/fdinfo/4": File o directory non esistente du: impossibile accedere a "/proc/12905/fd/4": File o directory non esistente du: impossibile accedere a "/proc/12905/fdinfo/4": File o directory non esistente 9,4G    /disk2 3,8G    /var 3,2G    /data 1,6G    /usr 277M    /opt 130M    /root 129M    /lib 88M /run 45M /home 18M /boot 7,6M    /bin 6,0M    /sbin 5,2M    /etc 28K /tmp 16K /lost+found 8,0K    /media 4,0K    /srv 4,0K    /selinux 4,0K    /mnt 4,0K    /lib64 0   /vmlinuz 0   /sys 0   /proc 0   /initrd.img 0   /dev   (Error says "Cannot access yada yada: No such file or directory"). Be aware that /disk2 is a mount for an another partition.  Checking the filesystem didn't help either:  /# e2fsck -n /dev/sda1 e2fsck 1.42.5 (29-Jul-2012) Warning!  /dev/sda1 is mounted. Attenzione: essendo un controllo a sola lettura, il journal non verrà ripristinato. /dev/sda1: clean, 86568/3145728 files, 11666588/12563712 blocks   ("Being it a read-only check, the journal will not be recovered", but I guess the "clean" just below rules out this possibility).  Any idea what might be going on here? Consider the system runs on a VM somewhere and I can only access it via SSH.


Show that: lim$_{n\rightarrow \infty}\,f(x_n)=f(\text{lim}_{n \rightarrow \infty} \, x_n)$

Let $f:X \rightarrow Y$ be a function. Prove that if $f$ is continuous, then for every convergent sequence $(x_n)$ lim$_{n\rightarrow \infty}\,f(x_n)=f(\text{lim}_{n \rightarrow \infty} \, x_n)$  My attempt: Assume $f$ is continuous. Then $\forall \epsilon >0, \exists \delta > 0$ such that $\forall p \in X$ and $q \in X: d(p,q) < \delta \implies d(f(q),f(q)) < \epsilon.$  And also assume that $(x_n)$ converges. Then $\exists L$ such that $\forall \epsilon >0, \exists N$ such that $n>N \implies d(x_n, L) < \epsilon.$  I need to use these definitions to show lim$_{n\rightarrow \infty}\,f(x_n)=f(\text{lim}_{n \rightarrow \infty} \, x_n)$ . Any hints?  Edit: lim$_{n \rightarrow \infty}(x_n) \in X$


I like the way contractions operate and I know the difference between "it's" and "its" based on contraction and possession. That is, "it's = it is" and "its" is possessive.   However, there are some sentences when I feel justified in replacing "it is" with its contraction, but for some reason it doesn't sound right nor does it read correctly to me:     The method won't be approved because of how difficult it is to implement.   compared to     The method won't be approved because of how difficult it's to implement.   Is this a correct (or uncommon) usage of the contraction "it's"? Why does it sound awkward when spoken?


We are given a Group $G$ and subgroups $X$ and $Y$. Prove that $$|XY| |X\cap Y|= |X||Y|$$  I don't know how to proceed to prove this identity. Please help. Thanks in advance.


Which is correct: "This is her" or "This is she"?

Upon answering the telephone, the person calling asks if Joan is available. If Joan is the person who answered the phone, should she say "This is her" or "This is she"?


I am teaching programming to first year students in university. This year we will transition from Java to Python, and I am looking for a suitable text editor to deploy on our in-house server. Preferably the text editor should not offer any autocomplete functionality out of the box. I know this is a controversial topic, but my institute has concluded that autocomplete should be kept out, at least for the first semester, to help students get used to typing the standard print, open, etc. sentences.  The text editor should preferably be open source and support Linux, OSX and Windows. I have good experience with Atom, but this editor autocompletes out-of-the-box, and disabling this feature server-wide has proven difficult. If anyone knows how to do this with init/config scripts, any help would be very welcome. Otherwise, suggestions of other text editors would also be great.  Thanks in advance.


What is the best way to repeatedly execute a function every x seconds?

I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?


I know and I have understood the details of RSA, elliptic curve cryptography, (EC)DH and (EC)DSA.  I keep reading everywhere that (if we don't consider non-deterministic computers) "ECC can achieve the same level of security as RSA, but with lower key sizes". While I can guess why this is true, how do we mathematically prove that?  Here's what I think:   The fastest algorithm for the ECC discrete logarithm problem is the Baby-step Giant-step, which is $O(2^{b/2})$ (). The fastest algorithm for the RSA problem/integer factorization is $O(\exp((64 b / 9)^{1/3} \cdot (\log b)^{2/3}))$ ().   Here $b$ is the bit-length of the key/of the group order.  Therefore, an ECC key of $b_1$ bits has the same strength of an RSA key of $b_2$ bits when: $2^{b_1/2} \approx \exp((64 b_2 / 9)^{1/3} \cdot (\log b_2)^{2/3})$.  Using that formula I can calculate that if I have a 2048-bit RSA key, I can achieve the same level of security with a 273-bit ECC key. But this number (273) is too high.  My question is: is my reasoning wrong? Where is the mistake?


I think this has been answered but I can't seem to find it.  I have an instance method which writes some contents to an output stream  writeTo(OutputStream){      //class specific logic }   I want it to get these contents into a StringBuilder. I can do this via a temporary file but that does not seem right. I want to do something like:  Stringbuilder sb = /* */; OutputStream os = outForStringBuilder(sb);//not sure how to do this instance.writeTo(os); //This should write the contents to Stringbuilder


19.04 - rtl8812au-dkms installed but not appearing as module

Adding additional info as suggested by chili555 in  .  I installed the rtl8812au driver via apt and installation seems to be successful. The device is a USB-wifi dongle that is recognized by lsusb  lsusb Bus 001 Device 004: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter   But not by iwconfig.   DKMS sees the driver.   $ dkms status | grep rtl    rtl8812au, 4.3.8.12175.20140902+dfsg, 5.0.0-13-generic, x86_64: installed    rtl8812au, 4.3.8.12175.20140902+dfsg, 5.0.0-15-generic, x86_64: installed   But the driver does not appear as a module :    lsmod | grep rtl   btrtl                  20480  1 btusb   bluetooth             557056  73    btrtl,hidp,btintel,btbcm,bnep,btusb,rfcomm   Adding additional info as suggested by chili555    modinfo 8812au | grep A811   alias:          usb:v7392pA811d*dc*dsc*dp*ic*isc*ip*in*   *Note that this output does not include Chilli's hoped for: *  alias:          usb:v0BDApA811d*dc*dsc*dp*ic*isc*ip*in*   But I am not sure why we should be expecting that value.   dmesg | grep l8812    returns empty  Checking journalctl    journalctl | grep 8812  TTY=pts/9 ; PWD=/hd2/projects ; USER=root ; COMMAND=/usr/sbin/modprobe rtl8812au  TTY=pts/9 ; PWD=/hd2/projects ; USER=root ; COMMAND=/usr/sbin/modprobe rtl8812au-dkms  TTY=pts/9 ; PWD=/hd2/projects ; USER=root ; COMMAND=/usr/sbin/modprobe rtl8812  TTY=pts/9 ; PWD=/hd2/projects ; USER=root ; COMMAND=/usr/sbin/modprobe -r rtl8812au


how does the temperature of a gas increase when compressed by an external agent during sound production?

Suppose a vibrating tuning fork compresses air molecules.And for this it has to do work.As compression occurs,its temperature increases.Does the energy spent by the fork go as the increased internal energy of the molecules?If so,then which energy goes as sound energy?As the process is adiabatic,does this given energy always remain inside the air particles even when it is expanded or is it used to compress another layer to make forward the disturbance-energy to our ear as sound?  In a word,the main query is what happens to the energy given out by the vibrating fork:does it become sound or the heat of the compressed layer or both?


I've looked around the internet for a while and this forum/place and still can't find an answer. So, I decided to register and ask the question.   I'm looking for the location of .SOLs when you play flash games. Usually in Windows OSs they're located in the c:\users\documents & settings\username\appdata\shared objects\macromedia\CODE\here (or similar) but I've been looking around and can't find the location of the file.  The reason being is I want to move my flash game files from a Windows PC to my Ubuntu and play them. My only [temporary] solution is to get a Windows VM, but that's laggy as it's an old PC.  Any solutions or answers are very welcome ^^  Edit: Thanks i'll try the solutions soon.


I come across this:     Numbers mod composite number does not form a field rather it forms a ring   and     every number has a multiplicative inverse under integer mod prime   Maybe these are the reasons why prime field is preferred? By the first above fact it means that construction of a composite field is not possible. But I have seen some research articles about multiplication algorithm using composite fields…  Why are elliptic curves constructed using prime fields and not composite fields?


Error while posting question on StackOverflow

Every time I try to post the question on stack overflow, I get the following error "An error occurred submitting the question"  Below is the screenshot of the error.      As mentioned in the comment, I am also getting the same error while trying to post in my comment. Below is the screen shot of the same.


How to trim figure caption in the \listoffigures

I want to trim the figure caption to show part of the caption, say the first sentence. In the same time, I do not want to cut from the actual caption in the document itself. I need the full explanation of the figure but not in the list of figures. How to achieve this?  This is the script sample:  \documentclass{book}  \begin{document}  \tableofcontents \listoffigures  \chapter{(Chapter Name)}  \section{Real Analysis} \begin{figure} \caption{A very long figure caption here. I need to display part of it because this very long caption does not look right in the list of figures. Nevertheless, I need this full description in the caption. I just do not want all of it to appear in the listoffigures} \end{figure} \section{Role of LUB Axiom}   \end{document}  This is what it appears int he list of figures.


With Star Wars Episode 7 being released this year, this obviously throws a lot of the novel plots out of the window, especially post Return of the Jedi.   Which EU novels are considered Canon?


Some of the questions appear invisible. I can still scroll down through white space and see answers.  I can see the question itself if I switch to Edit.  This does not happen to all questions and I was not able to discover any pattern.  For example, it happens with the following SO Meta post:    I'm using version 1.0.58 of the app on Samsung Galaxy SCH-I545 with Android version 4.4.2.  It looks like this:        EDIT  This very question is invisible in app as well.  Now I think it could be something with posts that include images.


Prove that $V = V_1 \oplus V_2$ in the following

Let $V$ be a vector space over $\mathbb{C}$ such that $T^2=1_V$. Define  $V_1 = \left\{v\in V |\ T(v) = v \right\}$,  $\ V_2 = \left\{v\in V |\ T(v) = -v\right\}$  prove that $V = V_1 \oplus V_2$  For start, I've shown that $V_1\ ,V2$ are subspace of $V$. However, I'm stuck trying to show that $\forall \ v\in V,\ v = v_1 + v_2$ where $v_1 \in V1, v_2 \in V_2$.  I know at some point I have to make use of  $T^2=1_V$, but cant figure out how. Any help or insight is deeply appreciated.


There are other questions similar, but none have answers for this situation.  Any time I enter my pw into the terminal, it works fine.  But gsku thinks it's wrong.  I've tried several times, and typing very slowly.  I know I'm entering it correctly.  Any ideas?    Answers to questions:    The answer linked doesn't apply because the gksu properties are set correctly. Resetting the pw didn't help. I was referring to the 10-key pad.


RPM command stuck/FREEZE when installing RPM file

I want to install the following rpm, but for some reason RPM is stuck or frozen and will not install the RPM package. I can't stop it by control-C.  Please advise what could be the problem?   root]# rpm -Uvh --repackage /var/tmp/bash-2.05b-41.8.i386.rpm   ..... no output here  OR   root]# rpm -Uvh  /var/tmp/bash-2.05b-41.8.i386.rpm   RPM verification  ( the last lines )    rpm -Uvvh /var/tmp/bash-2.05b-41.8.i386.rpm   .   .   .    D: installing binary packages   D: closed   db index       /var/lib/rpm/Pubkeys   D: closed   db index       /var/lib/rpm/Conflictname   D: closed   db index       /var/lib/rpm/Providename   D: closed   db index       /var/lib/rpm/Requirename   D: closed   db index       /var/lib/rpm/Packages   D: closed   db environment /var/lib/rpm/Packages   D: opening  db environment /var/lib/rpm/Packages joinenv   D: opening  db index       /var/lib/rpm/Packages create mode=0x42   D: mounted filesystems:   D:     i    dev bsize       bavail       iavail mount point


Configure search navigation and set to inherit from parent site with CSOM

I am working on a solution in SharePoint Online where I want to accomplish the following using CSOM:   Update rootweb search navigation (also known as search verticals) to display "Search everywhere" instead of "Search this site" in the search box Set all subsites to inherit search navigation from parent   Issue 1   I found an article explaining how the SPNavigation.SearchNav was introduced in SharePoint 2013 and gives you access to the list of navigation nodes with server-side code. However, since this is not available in the client-side object model, we need to use a slightly different approach.  Web rootWeb = clientContext.Site.RootWeb; NavigationNode searchNavRoot = rootWeb.Navigation.GetNodeById(1040); clientContext.Load(rootWeb); clientContext.Load(searchNavRoot, root => root.Children); clientContext.ExecuteQuery();  NavigationNodeCollection searchNavColl = searchNavRoot.Children;   This retrieves the navigation nodes for the vertical search well-enough, but ONLY if you have edited it before through the UI - else it returns 0 elements.  So my best bet right now is to simply add them by code, to have the default search vertical set to "Search everywhere" as shown here:  NavigationNodeCollection searchNavColl = searchNavRoot.Children; if (searchNavColl.Count == 0) // if navigation is not set, add nodes  {     NavigationNode everywhere = CreateNavigationNode(searchNavColl, true, true, "Everywhere", "/search/Sider/results.aspx", null);     NavigationNode people = CreateNavigationNode(searchNavColl, true, true, "People", "/search/Sider/peopleresults.aspx", null);     NavigationNode conversation = CreateNavigationNode(searchNavColl, true, true, "Conversations", "/search/Sider/conversationresults.aspx", null);     NavigationNode thisSite = CreateNavigationNode(searchNavColl, true, true, "This site", "/_layouts/15/osssearchresults.aspx?u={contexturl}", null); }   If you know another way of achieving this, I am all ears.  Issue 2  Looking at some examples I was able to create this little code-snippet which actually works and sets a property on a subsite web to inherit parent search navigation.   Web web = clientContext.Site.OpenWeb("/sites/ARN/test"); var allProperties = web.AllProperties; clientContext.Load(allProperties);  web.AllProperties["SRCH_VERT_SET_WEB"] = "{\"Inherit\":true}"; web.Update(); clientContext.Load(web, w => w.AllProperties); clientContext.ExecuteQuery();   However, even though the property is updated and search settings are now set to inherit parent navigation - it's not working.   I need to navigate to "Site settings > Search settings" and click OK for it actually work. So it seems like I am missing an Update of some kind...  Any help would be much appreciated.


How do I style my input label.              Is there any way to apply the "Bold" to the label in   instead of using a separate  tag ?


Consider solving the following system of equations:   \begin{cases} 2x−4y&=0, \\ 4x+4y&=−4. \end{cases}  We can use the substitution method or the elimination method, of which the latter has always been unclear to me: why does it work? I know that by eliminating one of the two variables you can solve for the variable you're left with, and consequently solve for the other one, but why do you get the point $(x,y)$ at which both lines intersect? Can anyone show me this graphically?


I am using lightning navigation to pass recordId from parent component to child component.  On button click i am navigating to child component like below url -    I need to get the recordId from URL in child component and pass to apex methods.  I tried the below, but not getting the recordId.    import { LightningElement, api, track, wire } from "lwc";     import { getRecord, generateRecordInputForUpdate } from "lightning/uiRecordApi";     import { CurrentPageReference } from "lightning/navigation";      export default class TestLWC extends LightningElement {      @track getrecordId;       @wire(CurrentPageReference)       currentPageReference;      setCurrentPageReference(currentPageReference) {     this.currentPageReference = currentPageReference;   }       getrecordId =         this.currentPageReference && this.currentPageReference.state.c__recordId      @wire(getData, { getrecordId: "$getrecordId" })      }


how to solve the following mordell equation:$ y^2 = x^3 - 3$

i just started solving mordell's equations and get a little bit stuck. For example:  $ y^2 = x^3 - 3$.  I know that $x$ must be odd, for if $x$ is even $y^2 \equiv 5 \pmod{8}$. So $x \equiv \{1,3\} \pmod{4}$. Now note the following if we add 4 at both sides:  $y^2 + 4 = (x+1)(x^2 -x +1)$. The right hand side is the same as $(x-1)^2 + x$  I now know $(x^2 -x +1)$ is divisible by a prime divisor $3 \pmod{4}$ if $x \equiv 3 \pmod {4}$ and divisible by $1 \pmod{4}$ if $x \equiv 1 \pmod{4}$.  So we get $y^2 + 4 \equiv 0\pmod{p}$, which is solvable if $\left(\frac{-2}{p}\right)$ = 1. (I don't think this step is valid). this is only true if the following occurs:  $p \equiv 1 \pmod{4}$ and $p \equiv +- 1\pmod{8}$.  or  $p \equiv 3 \pmod{4}$ and $p \equiv +- 3\pmod{8}$.  so $p \equiv \{1,3\}\pmod{8}$  but $y^2 + 4$ is either $4 \pmod{8}$ or $5 \pmod {8}$, so there are no solutions?  Am i solving this the correct way or is there a shorter path?  Kees


Conditional distribution of exponential random variable conditioned on sum of i.i.d. exponential random variables

Let X,Y be i.i.d. exponentially distributed with parameter $\lambda$. Show that for $Z:=X+Y$ and a measurable, non-negative function $h$ we have:   $\mathbb{E}(h(X)|Z)=\frac{1}{Z}\int_0^Zh(u)\mathrm{du}$.   I know that $Z$ is gamma-distributed with shape $2$ and rate $\lambda$. Then using the joint distribution of $X$ and $Y$ I calculated the joint density of $X$ and $Z$ to be $f_{X,Z}(x,z)=\chi_{z\ge x}\lambda^2\exp(-\lambda z)$. Using this, and the formula for conditional expectation, I got $\mathbb{E}(h(X)|Z=z)=\int_0^\infty h(u)\cdot f_{X,Z}(x,z)/f_Z(z) \mathrm{du}=\int_0^Zh(u)\mathrm{du}$. I can't see why I didn't get the correct result. Also, do we need the assumption that $h$ is non-negative?  Edit: Of course, right after posting this, I find that a accidentally lost the $1/z$ along the way in the last equality. The second part of the question is still not clear to me though.


Finding the integral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$

I've just learned what the integral closure is.     I would like to find what is the intergral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$.   Let $\mathcal{R}$ the integral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$. To determine $\mathcal{R}$ I started to note that $$\mathbb{Z}[i]\subset \mathcal{R}.$$ Indeed if $\alpha = x+iy\in \mathbb{Z}[i]$, $\alpha$ is a root of the monic polynomial $$f(X)=X^2-2xX+x^2+y^2\in\mathbb{Z}[X].$$  And we know that since $\mathbb{Z}$ and $\mathbb{Q}[i]$ are rings so is $\mathcal{R}$.  From there I'm not sure, is it true that there exist no ring $A$ such that $$\mathbb{Z}[i] \subsetneq A \subsetneq \mathbb{Q}[i] \text{ ?}$$ I've assumed that and show that $1/2\notin \mathcal{R}$ for example, otherwise it exists a monic polynomial $f\in \mathbb{Z}[X]$ such that  $$f\left(\frac{1}{2}\right) =\frac{1}{2^n}+a_{n-1}\frac{1}{2^{n-1}}+\cdots+a_1\frac{1}{2}+a_0 =0$$  So  $$2^n f\left(\frac{1}{2}\right) =0 \iff -1=2\underbrace{(a_{n-1}+\cdots +2^{n-2}a_1+2^{n-1}a_0)}_{\in \mathbb{Z}}$$  which is impossible.  In conclusion $\mathbb{Q}[i]\not\subset\mathcal{R}$ so $\mathcal{R}=\mathbb{Z}[i]$.     Is my proof correct ? Is there an other (easier) way to prove that ? And the most important, is there exist a general method to find the integral closure please ?   Thank you for your help.


Does URL parser work on questions posted on meta only?

On Super User, I tried pasting a URL that belongs to Unix. It didn't get parsed; it just stayed the same. A while ago I posted a URL on Meta Ask Ubuntu that belongs to Ask Ubuntu. I think the title of the question was extracted and displayed in href, rather than http...  Where on SE does the URL parser, that extract the title of the questions, work?


Shell script to create multiple accounts?

I'm looking for some help with a school project which needs a shell script to create 10 accounts (5 teaches and 5 students into different groups) along with respected passwords. I'm a true ubuntu noob and only know basic stuff like terminal commands such as cd and ls etc so basic explanations would be greatly appreciated!


What is the hyphen (‐) used for in this command tee <<-'EOF'?

I saw the following command:  sudo tee /etc/docker/daemon.json <<-'EOF' {   "registry-mirrors": ["https://xxxxxxxx.mirror.aliyuncs.com"] } EOF   What is the hyphen (‐) used for? It works fine even i remove the hyphen.


Given a number, how do I discover in what table and column it could be found within? I don't care if it's fast, it just needs to work.


Should a person be allowed to contest downvotes on question or answers?

I have been feeling lately that there are a lot of trigger happy people on SO. Everyone is eager to click on the downvote button rather than leaving comments to improve QnA or justify their downvotes. I guess some people have taken this as a habit.  I am not sure but I wonder if it would be better to make it mandatory for members to leave a comment for downvotes. In that case, if the reason for downvoting is also downvoted, the downvote by this individual should be lifted.  I am not sure how it works, but lately any question that I ask, everyone talks about providing a working example and are ready to close vote or downvote the question, though I try to provide the context and a code snippet. I don't think this should be a criteria for downvoting.   I am just getting so frustrated people bringing down other people's reputation on SO for small issues which can be requested as clarification in comments section.  For e.g. if I am asking a question about a 3rd party control in used in Delphi, it is not possible for me to provide a working example for me as I am a .Net guy and I do not have a license for the TPA.   I might even get a downvote for asking this question. I am hesitant to ask questions now on SO.  Anyways, please explain your downvotes.


Why can't i compare command line arguments like other string arrays?

There seems to be a difference between main(String[] args) and other string arrays that i can not figure out, my example.  public class TestArgs  { public static void main(String[] args) {     String[] x = {"1","2","3"};     System.out.print( x[2] == "3" );     System.out.print( args[2] == "3" ); }}   I run this program as:  java TestArgs 1 2 3   I would expect the output to be "truetrue" but instead I get "truefalse"  Could someone please tell me what the difference is, or am I just doing something really stupid...


"BAD ARCHIVE MIRROR" error while installing ubuntu server 12.04

I downloaded the server version of Ubuntu from Ubuntu's official site. Created a Bootable USB from the ISO file I downloaded. I connected through Internet using DHCP in the installation process. While I was installing it on my Desktop Computer (pentium D 1 GB RAM) I have this error "Bad Archive Mirror".   I also found 2-3 questions with same problem on forum but I didn't get solution of my problem from them.


I am new to the Stack Exchange application for Android. It seems more convenient than having to go to Google and search for the site that I want to go to.  However, I can't seem to find Stack Overflow Jobs in the app. If I see an ad for the site, it opens Chrome.   Any suggestions?


OpenSCAD has unreadably tiny interface text on UHD display

I am using Ubuntu 18.10 with Gnome Desktop on a UHD laptop display. My system's fonts have generally been tweaked using the font scaling in Gnome Tweak Tools, but this has had no effect on OpenSCAD which has an unreadably small interface font.  How can I change the font size without effectively lowering the screen resolution (e.g., without using Settings>Devices>Display>Scale>200%).


What is the justification for Rayleigh's method of dimensional analysis?

It seems to me that although dimensional analysis is useful for demonstrating when a physics equation is wrong (when the dimensions are inconsistent), there is little justification for how it is often used to show that a given equation is correct. I'll motivate this claim with an example I went over in a class I'm TAing. Generally speaking, my question is: How (and under what conditions/assumptions) can we know that a functional relationship predicted by dimensional analysis, specifically by Rayleigh's method (), is the unique functional relationship that can hold between a given set of quantities?  Consider a column of stationary fluid in Earth's gravitational field. We'd like to find a formula for $\Delta P$, the increase in pressure that is measured when moving from the surface of the fluid to a point at depth $h$. Assume that we know that $\Delta P$ depends on only three variables: The depth $h$, the mass density $\rho$ of the fluid, and the acceleration of gravity $g$. These quantities have dimensions of:  $$\Delta P : [M][L]^{-1}[T]^{-2}$$ $$\rho : [M] [L]^{-3}$$ $$g : [L][T]^{-2}$$ $$h : [L]$$  Here, $[M]$ is mass, $[L]$ is length, and $[T]$ is time. Now, the standard argument in dimensional analysis goes as follows (this is basically Rayleigh's method of dimensional analysis). We suppose the equation for $\Delta P$ has the form  $$\Delta P = k \rho^a g^b h^c,$$  where $k$, $a$, $b$, and $c$ are all dimensionless constants. Now, for this equation to be meaningful, the dimensions on the left and right sides must be the same. To ensure this, we can replace each quantity in $\Delta P = k \rho^a g^b h^c$ with its corresponding dimensions, yielding:  $$[M][L]^{-1}[T]^{-2} = ([M] [L]^{-3})^a ([L][T]^{-2})^b ([L])^c = [M]^a [L]^{-3a+1+c} [T]^{-2b}$$  For the dimensions to be the same on both sides, we have to have $a=b=c=1$, and thus $\Delta P = k \rho g h$ for some dimensionless $k$.  At this point, we've certainly shown that $\Delta P = k \rho g h$ is a possible, dimensionally consistent formula for the pressure change. But I don't see how this formula is at all unique. For me, the biggest unjustified assumption enters when we assume that $k$ must be dimensionless. Even if we know that the only variable dimensionful quantities that $\Delta P$ depends on are $\rho$, $g$, and $h$, I don't understand how it follows that $\Delta P$ can't depend on one or more dimensionful constant. But the values we get for $a$, $b$, and $c$ will depend on what dimension we suppose that $k$ has. So if we can't pin down the dimension (or lack thereof) of $k$, then we can't fix $a$, $b$, and $c$, and so we've made no progress beyond the initial assumption $\Delta P = k \rho^a g^b h^c$.  When considering Newton's law of gravitation from the perspective of dimensional analysis, this ambiguity manifests itself in the opposite way. In order to derive the proportionality $F = G m_1 m_2 / r^2$ in the same way as we did $\Delta P = k \rho g h$ (by assuming that $F = G m_1^a m_2^b r^c$), we must assume that our constant $G$ has dimensions $[L]^3 [M]^{-1} [T]^{-2}$. Why is a dimensionful constant reasonable in this case, but not when deriving $\Delta P = k \rho g h$? I think this is the sticky point that this one asker was getting at in their question:   In that question, the answerer provides a method to determine the dimensions of $G$ to make Newton's law dimensionally consistent, but this is only after having shown that $F \propto m_1 m_2 / r^2$, without dimensional arguments. But this is a far more modest result than what is often claimed to be a consequence of dimensional considerations - namely results like $\Delta P = k \rho g h$, or $T \propto \sqrt{l/g}$ for the period of a pendulum as a function of $g$ and its length $l$.  So is there an insight missing in my analysis, which would clear up these ambiguities and ensure that dimensional analysis produces a unique functional form for the relationship between a set of quantities? Or is dimensional analysis just often used in ways that aren't always justified?


Trello is wonderful for keeping and organizing tasks and users, but there are times when a task isn't assigned to someone on my team, or even someone who's heard of Trello.  Is there a way (short of creating an entire fake email address/account) to have some kind of "external user"?  That way, it can be seen at a glance that a card is assigned (maybe to some kind of DevOps ticket waiting on tech support from your vendor) without that person needing to be part of your Trello board/team.


I have tried to run below code, but it throws an exception.can anyone help me?

Server program package socket_programming;  import java.io.BufferedReader;  import java.io.InputStreamReader;  import java.net.ServerSocket;  import java.net.Socket;  public class SocServer {          public static void main(String args[]) throws Exception         {             System.out.println("Server is started");             ServerSocket ss = new ServerSocket(9911);                          System.out.println("Server is waiting for client request");             Socket s = ss.accept();                          System.out.println("Client connected");                          BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));             String str = br.readLine();                          System.out.println("Client data : "+str);                      } }  Client program package socket_programming;  import java.io.OutputStreamWriter;  import java.io.PrintWriter;  import java.net.Socket;  public class SocClient {          public static void main(String args[]) throws Exception         {             String ip = "localhost";             int port = 9911;             Socket s = new Socket(ip, port);                          String str = "Sohil Shaikh";                          OutputStreamWriter os = new OutputStreamWriter(s.getOutputStream());             PrintWriter out = new PrintWriter(os);             os.write(str);             os.flush();         } }  Output Server is started  Server is waiting for client request  Client connected      Exception in thread "main" java.net.SocketException: Connection reset          at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)      at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)      at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)      at java.base/java.net.Socket$SocketInputStream.read(Socket.java:981)      at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297)      at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)      at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)      at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)      at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)      at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326)      at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392)      at socket_programming.SocServer.main(SocServer.java:21)


If I really need a card on my start hand, how many mulligans make sense?

There is a funny modern deck where you play , but you really need to have it on the starting hand. How many mulligans should I take, if my deck contains 60 cards and contains 4 copies of Treasure Hunt?


Showing a Linear Transformation is invertible

I have the following question:     Suppose A is a linear transformation. Show that if $A^2 - A + I = O$, then A is invertible.   To show $A$ is invertible, I can show if $Ax = 0$ then $x = 0$.  But, if $Ax = 0$, then $(Ax)^2 + (Ax) + 1 = 0 + 0 + 1 \neq 0$ so the equation in the question is not satisfied. What gives?


Why is the center of mass the pivot of rotation?

Suppose a ball moves horizontally to the right and hits a vertical stick at a position closer to its upper end. I understand intuitively, the stick will have linear and angular momentum, and that it will spin around its center of mass.   But why must the mass rotate around its center of mass? Why couldn't the stick simply move horizontally to the right (along with the ball) and not spin at all since the stick's center of mass isn't pinned to anything? It seems like there exists an imaginary pin at the center of mass causing it to rotate around that point regardless of where the ball hit.  And my second question is can the point of reference be chosen at a point other than the center of mass (but still be on the stick), and calculate the torque about that point and still be able to calculate the stick's motion after collision? I've thought about picking the point the ball collides with the stick as the point of reference. Then by the definition of torque, the torque will be $0$, which implies there will be no rotation at all? Why is this reasoning incorrect?


Unable to connect to authserver.mojang.com

I recently got Minecraft to join a server with my friends, however, I kept getting the failed to login the authentication are currently down for maintenance error. I later realised this to be to due to my computer being unable to connect and ping authserver.mojang.com, as I was getting a refused to connect error. I thought this might be due to my router blocking the website, but I tried accessing the website from a different device on my network, and it worked fine. I've disabled my AV and Firewall, as well as changing my local IP address. I believe it is something to do with my computer, but I have no clue what. Could anybody give me any ideas as to why this is happening?


I am importing a certain range of data from a master sheet and would like to maintain the formatting for those cells.   It seems as though this only works within a sheet: . This would be the perfect option, except I am unsure how I can reference the master sheet's key.


Suppose $f$ is continuously differentiable on $[0,1]$, $|f'(x)|$ is bounded, show that $|\int_0^1 f(x) - \sum^n_{i=1}f(i/n)\cdot 1/n| \le M/n$.

Problem statement: Suppose $f$ is continuously differentiable on $[0,1]$, and that $\sup_{x \in [0,1]}|f'(x)|\le M< \infty$. Show that $$\big|\int_0^1 f(x) - \sum^n_{i=1}f(i/n)\cdot 1/n\big| \le M/n.$$  My attempt at a solution: To start with, I was trying to get the derivative involved, somewhere, so I wrote $$f(i/n) = f(0) + \int^{i/n}_0 f'(x)$$ which gives  $$\big|\int_0^1 f(x) - \sum^n_{i=1}f(i/n)\cdot 1/n\big|  = \big|\int_0^1 f(x) - \sum^n_{i=1}\int_0^{i/n}f'(x)\cdot 1/n\big|.$$ I was hoping then to bound the integral using the bound on $f'$. But, there's that pesky minus sign in front of the sum that I'm working with, and even if there weren't, the bound doesn't seem to result in anything useful there, since we end up with $$1/n \cdot \sum^n_{i=1}\int_0^{i/n}f'(x) \le f(0) + M/n \sum^n_{i=1}i,$$ which doesn't seem useful to me. I would really appreciate some hints as to the right way to attack this problem!


Fantasy Book involving a Child getting taught by different Wizards

I am looking for a book I read that involved a Child who met a few different wizards who teach the child something. I remember one took him to the Faerie realm and he was taken through a Market where a vendor accused him of stealing an item but was found out the vendor was lying so the boy was able to pick something out of the vendors items and the child picked an egg that turned out to contain a universe inside that he traded with I believe to be the queen of the faeries because he ate something while there.


Why is my reputation on meta-so only 1? (at the time of this writing)  I participate, albeit in a small and quiet way, on 4 other SO sites (stack, super, server, area51). I've not had any significant down-votes that I'm aware of. My reps on the other sites is small but slowly growing (now that I've learned that marking a post community wiki means forsaking all points). I don't mind being small potatoes, it is a reflection of my level of involvement after all. It does suck not even being able to say "hey this question is pretty good or that comment is insightful" by giving an up vote though, and I don't want to game the system by thinking up questions just so I can garner enough points to participate meaningfully.


trying to copy one char pointer to another but getting segmentation fault, cant really see whats   going on. I also tried doing q = my_strcpy(q, p) but doesnt work. Any help is appreciated.     #include <stdio.h>   char *my_strcpy(char *destination, const char *source);   int main()    {          char *p = "Avani";         char *q = "";         my_strcpy(q, p);         printf("%s", q);         return 0;    }    char *my_strcpy(char *destination, const char *source)      {        char temp = *source;           while (temp != '\0')             {                 *destination = temp;                 // Increment the pointers, so that they point to the next indexes                 source++;                 destination++;                 // Reassign value of temp to the next value                 temp = *source;             }             // Copy the null terminator             *destination = '\0';              // Return pointer to the destination             return destination;         }


Hello I am trying to understand how Python's pass by reference works.  I have an example:  >>>a = 1 >>>b = 1 >>>id(a);id(b) 140522779858088 140522779858088   This makes perfect sense since a and b are both referencing the same value that they would have the identity. What I dont quite understand is how this example:  >>>a = 4.4 >>>b = 1.0+3.4 >>>id(a);id(b) 140522778796184 140522778796136   Is different from this example:  >>>a = 2 >>>b = 2 + 0 >>>id(a);id(b) 140522779858064 140522779858064   Is it because in the 3rd example the 0 int object is being viewed as "None" by the interpreter and is not being recognized as needing a different identity from the object which variable "a" is referencing(2)? Whereas in the 2nd example "b" is adding two different int objects and the interpreter is allocating memory for both of those objects to be added, which gives variable "a", a different identity from variable "b"?


Need help to include a column and centred header in this table

Please I need help to include  a column (MSFE ratio ) and centred headers( A. h=1) in this table desired Table :  my suggesstion :          \documentclass{article}          \usepackage{geometry}          \usepackage{rotating}           \usepackage{booktabs, makecell}          \usepackage[referable]{threeparttablex}          \usepackage{siunitx}          \usepackage[skip=1ex]{caption}          \usepackage{xcolor}          \usepackage{multirow}          \newcommand\tc[1]{\textcolor{blue}{#1}}         \NewExpandableDocumentCommand\mcc{O{1}m}          {\multicolumn{#1}{>{\itshape }c}{#2}}         \renewcommand{\theadfont}{\normalsize} %<------ added         \begin{document}         \begin{table}[h!]         \centering        \begin{threeparttable}         \caption{Forecasting and encompassing test results for the bagging model and combining      methods, 1995:04–2005:03 out-of-sample period}      \label{tab1}       \begin{tabular}{@{} >{\itshape}l                *{7}{S[table-format=1.2]}                 }        \toprule          \multirow{5}{*}{Combining method}         & \mcc[3]{$\thead{H_{0}$: BA encompasses CB}}         & \mcc[3]{$\thead{H_{0}$: CB encompasses BA}}   \\           \cmidrule(r){2-4} \cmidrule(l){5-7}        &\mcc{\hat{\lambda}_{CB}} & \mcc{MHLN_{h}} & \mcc{p-value}          & \mcc{\hat{\lambda}_{BA}} & \mcc{MHLN_{h}} & \mcc{p-value}\\        \midrule         BA model        &     &             &             &       &             &     \\         Mean            &0.35 & 2.42\tc{**} & 0.01        & 0.65  & 3.54\tc{**} &0.00 \\          Median          & 0.32& 2.38\tc{**} & 0.01        & 0.68  & 3.77\tc{**} & 0.00\\          Trimmed mean    & 0.34& 2.39\tc{**} & 0.01        & 0.66  & 3.67\tc{**} & 0.00\\         DMSE,$\Psi=1.00$& 0.35& 2.42\tc{**} & 1.00        & 1.10  & 3.54\tc{**} & 0.00\\         DMSE,$\Psi=0.90$& 0.35& 2.41\tc{**} & 1.00        & 1.10  & 3.55\tc{**} & 0.00\\         C(2, PB)        & 0.34& 2.34\tc{**} & 0.01        & 0.66  & 3.59\tc{**} & 0.00\\         C(2, PB)        & 0.36& 2.33\tc{**} & 0.01        & 0.64  & 3.43\tc{**} & 0.00\\         PC              & 0.59& 2.79\tc{**} & 0.00        & 0.41  & 2.14\tc{**} & 1.00\\                  \bottomrule      \end{tabular}     \end{threeparttable}      \end{table}     \end{document}  MY OUTPUT :


Can I still publish a paper in an IEEE transaction journal after uploading it to the arXiv?

I read often that preprint servers such as arXiv are changing how we publish. However, no one in my area of medical imaging uses them and they are regarded in my lab with suspicion.  I currently have a finished manuscript that I am about to send to an IEEE transaction journal. I would like a preprint of this manuscript to be publicly available for several reasons. However, my supervisors are worried this might invalidate my ability to publish this manuscript. They don't want to take the risk that I do this wrong and can't publish.  So here is the simple question I never seem to see a simple answer to. Here is a finished manuscript, fully formatted for the journal I am going to submit it to, in PDF. Can I submit this  PDF as a pre-print to arXiv right now, or not? Will the publisher still consider publishing it? To play devil's advocate, why wouldn't IEEE say, this has already been published in the arXiv, it is no longer new work?  Edit: Here is what IEEE says: "Does IEEE consider an author posting her paper on preprint servers or on her company's web sites to be a form of prior publication, which may then disqualify the paper from further editorial consideration? No. IEEE policy allows an author to submit previously posted papers to IEEE publications for consideration as long as she is able to transfer copyright to IEEE, i.e., she had not transferred copyright to another party prior to submission."


Exercise 1.1.6. (b) For positive real numbers $a_1, a_2, ... , a_n$ prove that  $$(a_1+a_2+ \ldots +a_n)\Big(\frac{1}{a_1}+\frac{1}{a_2}+ \ldots +\frac{1}{a_n}\Big) \geq n^2.$$    From $AM \geq GM$:  $$a_1+a_2+\ldots+a_n \geq n\sqrt[n]{a_1a_2 \ldots a_n}$$ $$a_2a_3 \ldots a_n + a_1a_3 \ldots a_n + \ldots + a_1a_2 \ldots a_{n-1} \geq n\sqrt[n]{(a_1a_2 \ldots a_n)^{n-1}}$$  Multiply, $$(a_1+a_2+\ldots+a_n)(a_2a_3 \ldots a_n + a_1a_3 \ldots a_n + \ldots + a_1a_2 \ldots a_{n-1}) \geq n^2 \cdot a_1a_2 \ldots a_n$$  $$(a_1+a_2+ \ldots +a_n)\Big(\frac{1}{a_1}+\frac{1}{a_2}+ \ldots +\frac{1}{a_n}\Big) \geq n^2.$$    I'm not satisfied with this. I'm looking for a better way to prove it...or at least a better way to write it (notation).


I've been using dd for a couple of years now, most of the time successfully. I usually use it to dd Linux images to USB drives. My workflow doing so is as such:   convert .iso image to a .img format using hdiutil convert -format UDRW output.img input.iso unmount the drive using diskutil unmountDisk /dev/diskX dd the image to the drive using dd if=./image.img of=/dev/rdiskX bs=1m   Lately, and namely since I upgraded to Yosemite, dd has been showing some weird behavior. When I specify the block-size flag (bs=1m), it quits after about a minute, showing the default successful write message with the numbers of records in/out and bytes transferred and all that. What you would expect on a successful write. The problem is, it writes just a very small part of the image, then quits.  When I do not specify the block-size flag dd behaves as expected, writing the image to the disk in the ordinary fashion. Does anyone have any idea why this is happening?


How far is the stronghold from your stronghold?

The stronghold seems to be really far away from my spawn point, and I end up losing all the 'eye of enders' I have. Any idea on how far a stronghold can be from a spawn point?(Since there can be just 3 in a world, I assume they can be really far away!)


How to change brace position in IntelliJ IDE?

I am using the IntelliJ IDEA ide for java coding. By default it produces curly braces on the same line as the function name, like so:  function bla() { .. }   Can i change it somewhere there so that i will do this instead?:  function bla()  { .. }   Thanks!


Bottle 'o enchanting recipe using commands?

I'm trying to make a crafting recipe for xp bottles in Minecraft 1.13. I've made the recipe, and I've got a command block that removes xp when you craft it:  /experience add @a[scores={xp=1}] -7 points    The xp objective is simply minecraft.crafted:minecraft.experience_bottle Another command block removes the score afterwards I'm removing 7 points because 1 bottle gives between 3 and 11 points so I took the rough average as a compromise   Now I'm trying to figure out how to stop people from doing it when they have no xp. I was thinking a system that removes the xp bottle from your inventory after crafting if you don't have any xp, but I don't know how to go about it. Any suggestions?


1.Why kinetic  doesn't depend on speed of object?   Also explain why static friction > kinetic friction > rolling friction?   2.when we keep a book on a table , the table is said to exert a force on the book called "normal reaction" . In a book it was given that this force is due to electromagnetic forces between the two surfaces of contact. Is this true ?


What is $a $ if   $$\sum _{n=1} ^{\infty} \arcsin \left(\frac {\sqrt {n}-\sqrt {n-1}}{\sqrt {n (n+1)}}\right) =\frac {\pi }{a} \,?$$  Attempt: What I tried is to convert the series to $\arctan$ and then convert it telescoping series. So in terms of $\arctan $ it becomes   $$\arctan \left(\frac {\sqrt {n}-\sqrt {n-1}}{\sqrt {n}+\sqrt {n-1}}\right) $$  but now if I divide by $n$ it simplifies as $n\frac {\pi}4-\sum _1^{\infty} \arctan \left(\frac {\sqrt {n-1}}{\sqrt {n}}\right) $ but as $n$ is tending towards infinity it will lead to infinity which seems wrong. Also note that $a$ is an integer . Thanks!


Overriding malloc in shared libraries in a C application

I am writing a server application in C that links to three shared libraries. One of the libraries returns NULL from functions that involve one or more malloc(3)'s that fail and the two other libraries call abort(3) from within a function if malloc fails. My application wraps malloc(3) in a function e.g. amalloc that checks for malloc(3) fails (returning NULL) and shuts down the server as gracefully as possible.  Am I able to override calls to malloc(3) in all of the shared libraries so that they use my wrapper function? I would like to be able to handle malloc(3) fails that occur in the shared libraries as well as my application. I would prefer to not have to recompile them but if that's necessary then I can do.  I am using gcc version 4.9.2 (Debian 4.9.2-10) and writing the server to run exclusively on Linux. The shared libraries are linked using -lx, -ly, -lz


So we know from Infinity War that Thanos was collecting all the Infinity Stones to basically solve the problems brought about by overpopulation on many planets.  But does it make any sense? He could've just easily increased the resources or changed the area or taken appropriate measure to handle that situation. As far as I know, collecting all the Infinity Stones gives the user limitless power and control over the universe in the MCU.  Is Thanos just a mass murderer or is there something I'm missing?


Should we MAC-then-encrypt or encrypt-then-MAC?

Most of the time, when some data must be encrypted, it must also be protected with a , because encryption protects only against passive attackers. There are some nifty encryption modes which include a MAC (, ...) but let's assume that we are doing old-style crypto, so we have a standalone encryption method (e.g. AES with CBC chaining and PKCS#5 padding) and a standalone MAC (e.g.  with SHA-256). How should we assemble the encryption and the MAC?   MAC-then-Encrypt: Compute the MAC on the cleartext, append it to the data, and then encrypt the whole? (That's what  does) Encrypt-and-MAC: Compute the MAC on the cleartext, encrypt the cleartext, and then append the MAC at the end of the ciphertext? (That's what SSH does) Encrypt-then-MAC: Encrypt the cleartext, then compute the MAC on the ciphertext, and append it to the ciphertext? (In that case, we do not forget to include the initialization vector (IV) and the encryption method identifier into the MACed data.)   The first two options are often called "MAC-then-encrypt" while the third is "encrypt-then-MAC". What are the arguments for or against either?


How to I stop a launchd script from running on wake

I have a simple launchd script that plays a sound every 30 minutes and it runs out of the user library ~/Library . It doesn't run if my machine is asleep, but does run the last event missed when the machine wakes. I think this is the expected behavior. My question is, how do I stop this happening. If I missed the half-hour event, I don't want it to be run at 20 minutes past the hour.  Here's the core of my script. It calls a Python script. I tried to put a block in the python script to check that I am within a few minutes of each 30 minutes, but that doesn't seem to work on wake. (Is it missing the system clock somehow?)  <key>ProgramArguments</key> <array>     <string>/usr/local/bin/python3</string>     <string>/Users/pheon/Documents/playsound.py</string> </array>  <key>StartCalendarInterval</key> <array>     <dict>         <key>Minute</key>         <integer>0</integer>     <dict>         <key>Minute</key>         <integer>30</integer>     </dict> </array>   Here is a snippet from the python code which checks the time before playing the sound.  time0 = datetime.datetime.now() if (time0.minute % 30) < 2:     subprocess.run(["/Users/pheon/bin/afplay-vol.sh", "1", bell],check=True)


My bike is a Giant Reign, and I ride in the UK. I like going to local gravity parks and trail centres and my local tracks are mainly downhill orientated but I also like to get out on longer rides. I'm currently running some cheap pedals off an old XC bike and am using skate shoes. When the terrain gets even remotely rough, my feet are all over the place and it's doing my head in.  Obviously I need to invest in some better pedals and shoes, however I'm not sure whether to take the hit and go clipless straight away or to get some decent flats n proper shoes then revisit the clipless question further down the line. Any recommendations?


What is the black thing on the below circuit?   Is it used to hide the IC (or other components) that is used on the circuit?   What material is it?


Why Windows needs reboot a lot more than Linux?

I use both Ubuntu and Windows XP. One thing that catches my attention for a long time is the high need for reboots in Windows. Most of the time when I install a program, Windows requests to reboot system. This happens considerably more frequently than Linux.  Why is it so?  Thanks!


I downloaded some files with youtube-dl. The name is always like this  foo - baar -PSUHDUWHDAIHDWU.ogg/mp3/...   How can I remove this random letters (cut the last '-*') at the end from all files of a folder so that the name is:  foo - baar.mp3/ogg/...   I tried something with "rename" but I have no idead, what pattern to use. I think it should be something like this: "#-*"


Sprite cut in half after placed on Scene

I have noticed a very odd behaviour in Unity 5.2.1. When I drag and drop a Sprite into the Scene, it's cut in half like this:    I tried with PNG and PSD formats but it didn't help. Although when I flipped an image horizontaly in PS and then imported it, it worked. Is this a Unity bug?  Edit: It happens only when I set Max Size to 512 or more, but still - why?


Hard wired link between webcam and led indicator?

In light of stories about stories about secret monitoring over laptop webcams (such as  or ), I wonder about the reliability of the green LED next to the camera that indicates that it's in use.  Is there a known hard-wired link between the camera on a MacBook Pro and the indicator that is impossible to circumvent in software?  Would such a thing be possible given the hardware of the camera?


Is the Ubuntu Sans font free for commercial use?

For example, use as a font for a book, logo, etc.


Mixing rounded corners and square corners

The question of the usability of rounded corners versus square corners has already be answered here.  My question revolves more about the consequence of having them intermingled.  I've heard some people espouse the idea that once you go down a rounded corners path, your design should really stick to that approach rather then, for example, having a square box inside a rounded one.  Is this simply aesthetic or is there some usability concern to back it up (e.g. cognitive switch from a softer less threatening to something more jarring)?  I would be very interested in any research that attempts to answer this question.


Why is ondemand not available as a governor for cpu frequency scaling?

Consider the following:  $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors  performance powersave $ cat /proc/config.gz | gunzip | grep -i ondemand CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m   I do not understand why ondemand is not an available governor. Where else do I need to look and what do I need to do to enable ondemand?


Need to restrict user to just a single directory enable him to have ssh also to that directory?

I am trying to create a new user and restrict his access to only a single folder in /usr/local/. So I did some google and followed the following steps.  groupadd controlgroup1 cd /usr/local mkdir controlfolder1 chmod g+rw controlfolder1/ chgrp -R controlgroup1 controlfolder1/ useradd control1 passwd control1 gpasswd -a control1 controlgroup1   I went into /etc/sshd_config and toward the end of the file I added this   Match Group controlgroup1 # Force the connection to use SFTP and chroot to the required directory. ForceCommand internal-sftp ChrootDirectory /usr/local/controlfolder1/ # Disable tunneling, authentication agent, TCP and X11 forwarding. PermitTunnel no AllowAgentForwarding no AllowTcpForwarding no X11Forwarding no   I restarted ssh: systemctl restart sshd.  So when I tried to login the control1 user I saw this in the log file ?  Code: Accepted password for control1 from 192.168.1.8 port 52912 ssh2 May  5 14:12:47 localhost sshd[2639]: pam_unix(sshd:session): session opened for user control1 by (uid=0) May  5 14:12:47 localhost sshd[2639]: fatal: bad ownership or modes for chroot directory component "/usr/local/controlfolder1/" [postauth] May  5 14:12:47 localhost sshd[2639]: pam_unix(sshd:session): session closed for user control1   I have ensure control1 one is the owner of it .  ls -ld controlfolder1/ drwxrwxr-x. 2 control1 controlgroup1 6 May 5 13:58 controlfolder1/   I have followed the step but I have a new issue on the  "chown -R control1:controlgroup1 /usr/local/controlfolder1/control1" . So this is different. I also want to give ssh access not just sftp ? I hope this will clear the duplication error.


Are there requirements for crafting magic items?

Are there any class, proficiency, or skill requirements to craft a magic item in D&D 5th edition other than to possess the minimum character levels?   I.e. 3rd level for Common and Uncommon Magic Items, 17th level for Legendary Items.


Find all ordered pairs $(a,b)$ such that $1/a + 1/b = 3/2018$ and $a,b$ are positive integers

I gave this problem my best attempt and am now trying to understand the solution for it. This is problem #1 to the 79th William Lowell Putnam Math Competition. This is the given solution by Kiran Kedlaya and Lenny Ng:  By clearing denominators and regrouping, we see that the given equation is equivalent to $(3a−2018)(3b−2018) = 2018^2$. Each of the factors is congruent to $1 \text{ (mod } 3)$. There are $6$ positive factors of $2018^2 = 2^2 · 1009^2$ that are congruent to $1\text{ (mod } 3)$: $1$, $2^2$ , $1009$, $2^2 · 1009$, $1009^2$, $2^2 · 1009^2$. These lead to the 6 possible pairs: $(a,b)$ $= (673,1358114)$, $(674,340033)$, $(1009,2018)$, $(2018,1009)$, $(340033,674)$, and $(1358114,673)$. As for negative factors, the ones that are congruent to $1\text{ (mod }3)$ are $−2$, $−2 · 1009$,$−2 · 1009^2$. However, all of these lead to pairs where $a ≤ 0$ or $b ≤ 0$.  I don't fully understand these things:   Each of the factors is congruent to $1\text{ (mod }3)$: I think congruence means the ability to translate into something else using some rules, so it seems like they are saying that $(3a-2018) = 1$ and $(3b-2018) = 1$. I'm also not sure why they wrote $1\text{ (mod }3)$ because 1 % 3 = 1, so why not just say $1$? There are $6$ positive factors of $2018^2 = 2^2·1009^2$ that are congruent to $1\text{ (mod }3)$: $1$, $2^2$, $1009$, $2^2·1009$, $1009^2$, $2^2·1009^2$: Here it seems like they are listing all of the ways to make $2018^2$, but if they are saying that $1$ is a possible factor then wouldn't $2018^2$ be its pair and therefore must be in this list? Why wouldn't they put it into this list? These lead to the 6 possible pairs:$(a,b) = (673,1358114)$, $(674,340033)$, $(1009,2018)$,$(2018,1009)$, $(340033,674)$, and $(1358114,673)$: How did they get these pairs?


How can I assign spatial information in ArcGIS Pro?

I am very new to ArcGIS and I hope I have over-looked something obvious with this!  I have a set of polygons that have been loaded into ArcGIS Pro 10.3 without coordinate information. Unfortunately, it is not possible for me to get the co-ordinate information however I have been able to move the polygons to the correct position on a world map (it was quite easy because they line up with roads). However, I am unable now to 'share' this data online because I get the error: '20028 Data source has no spatial reference'.  Please does anybody know a way around this? Is there another way of sharing it or, ideally, can I get ArcGIS to work out the spatial references given the positions of the polygons on the map?


Throw warning based on distance from the bottom

Is there a way to specify a warning in LaTeX which is thrown if and only if a specified text is not at the bottom (or near the bottom) of the page?  Use-case: manual column-breaking is needed due to some package shortcoming, the warning is there to warn the user if the column break has moved upwards or downwards on the page.  related:


I am searching for a package of openjdk but i can't find it, every time gives me this response " sudo apt-get install openjdk-7-jdk Reading package lists... Done Building dependency tree Reading state information... Done Package openjdk-7-jdk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'openjdk-7-jdk' has no installation candidate" how to solve this ?


Improving how suggested edits are displayed in your activity history

Issue 1: I find it a bit irritating that when I click the Improve button and further edit it, even if I mark it as helpful, only Community takes the credit for the approval. I know the topic itself will contain the link to the suggested edit, but my activity history only says that I made an edit, and not approved a suggested edit. The same holds true for marking one as unhelpful. The activity history should say I rejected an edit, and then made an additional edit. I know it's not often, but sometimes I do try to go back to a suggested edit I've rejected, but when I improved and rejected, it's not traceable for me as it doesn't show in my history or in the question's revision history. So if I don't remember what user suggested it, it's lost to me.  This issue also plagues the  which are awarded for approving and rejecting suggested edits, which essentially you have done, you're just not receiving credit for it. I suggest that when I mark an edit as helpful or not helpful, both me and Community be listed as the approvers or rejecters, unless another user is already listed in the appropriate place.  Update: Here is  of the confusion this causes.  Update 2: Also, when improving a post and marking it as "not helpful", it would be nice to be able to  along with it.    Issue 2: Expanding off the idea that users need more notice for suggested edits that get rejected, the activity history page is much too useless when it comes to listing the suggested edits a user has made. Literally all it does is list them. A user still has to click through to each one in order to find out if it was approved or rejected, or even if it's still pending. Take, for example, this screen shot of the suggested edit history:    Is it really necessary to say I suggested a suggested edit? Really? Of course I suggested it, it's a suggested edit. This isn't !  A good way to fix this would be to change the second "suggested" word into one of: pending, approved, or rejected. This would be a quick way to tell which edits have been approved or rejected and which ones are still pending. Users would be able to target out rejected edits and review them for the reasons. Something like this:


Embedding a back and forward arrows, home button, and download manager in a quickly application

I have downloaded a set of icons to use for my web browser that I'm creating and would like to use. I know how to add the icons, but I only know the code for the refresh button. My question is what is the code for the back and forward arrows? It would also be so helpful if I would know the code for the home button and how to make the web browser manage downloads.  I'm using WebkitGtk as the web browser view.  The images are found


Sharing Thunderbird profiles Windows and Ubuntu

I want to have TB use the same set of messages, folders, calendar from both ubuntu 14.04 and W7.  thread seems to answer my question, but it pertains to ubuntu 11.10. My reputation isn't sufficient to add to that discussion.  I don't like to assume that what worked for 11 (or 10 or older) will work with a new version of ubuntu -- is that overly cautious?  I have everything backed up, but what risks are there editing the profiles.ini?


NullPointerException in Java my java program

I'm working on a program using eclipse that generates objects for runners in a 100 m race.  each runner has a lane, name and three separate times for completing the race. However, when I try to generate the times for each object, I get java.lang.NullpointerException.  Here is the method for generating the times.   public double[] getTimes() {      for (int i = 0; i <= (times.length - 1); i++) {          rolled = 1.0 + roll.nextDouble() * 100.0;         // set rolled to a new random number between 1 and 100         times[i] = rolled;         // set index i of the array times to be the nearest         // double to roll's value.      }     return times; }   and then the code in which the method is called.   public void testGetTimes() {     double[] times = performance.getTimes();     assertEquals(2, times.length);     assertEquals(9.2, times[0], 0.01);     assertEquals(9.4, times[1], 0.01); }   I'd try to fix it through debugger, but every time i try to step-into the for loop, i get InvocationTargetException,(Throwable line: not available  initialization of times, roll and rolled:      public class Performance { private int lane; private String name; double[] times = new double[3];   int rolling;  Random roll = new Random();  double rolled;  double average;  double best;   and of performance:      public class PerformanceTest { Performance performance;  @Before public void setup() {     performance = new Performance(1, "", new double[]{9.2, 9.4}); }


18V from printer USB port. Is that normal?

I have HP 1514 printer. I noticed that the usb type A plug coming from printer has as buzzing feeling when touching skin. I connected one multimeter probe to the USB plug and the other one to ground pin in my power outlet as shown in the sketch below. The multimeter shows 18V. Shows 0 when measuring current with same setup.    I believe that this is not okay? What could be the cause? Could I damage my Macbook by using this printer (I have used it for a year with no problems, though)


What does the 'static' keyword do in a class?

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


I'm trying to solve the induction:  $ 1 + \frac{1}{\sqrt2} + ...+ \frac{1}{\sqrt{n}} > 2\sqrt{n+1} -2 $  My thought for solving this was:  $f(k) = 1 + \frac{1}{\sqrt2} + ...+ \frac{1}{\sqrt{k}}$  $f(k) + \frac{1}{\sqrt{k+1}} > 2\sqrt{k+2} -2$ - Need to proof  and I know that :  $f(k) + \frac{1}{\sqrt{k+1}} > 2\sqrt{k+1} -2 + \frac{1}{\sqrt{k+1}} $  So if I will try to show that :  $2\sqrt{k+1} -2 + \frac{1}{\sqrt{k+1}} > 2\sqrt{k+2} -2$  I manged to show that if I do square power to both sides of the equation (which keeps the inequality )the left side is bigger. I wanted to know if this way of thinking is good and valid, and if there are other ways to solve it, because I'm new to this concept.  Thanks


Acidentally used gzip -r and now individual files in many sublevels are zipped

I tried to use the gzip command on my public_html folder, and I've landed in a pretty big mess.  Exact command I used: gzip -r /home/account/www/  Now, in many sub-levels I have individually compressed .gz files. Is there an easy way to undo my actions?


Photon pair production in electron-positron annihilation is necessary to conserve the linear momentum. In such discussions the electron-positron pair collide with equal and opposite momentum, if they collide without the above condition then only a single photon can conserve the momentum (or two or more photons with different energies). Another question is why more than two photons are not produced in the symmetric collision of electron-positron.


I have a couple questions for those more familiar.  Most of my instances have been running Antelope despite having support for Barracuda.  I was looking to play around with some compresses innodb tables.  My understanding is this is only available under the Barracuda format.   I see innodb_file_format is dynamic so I can just switch over with out a bounce.  Are there any implications of doing this I should be aware of.  All I can tell is that means new tables or subsequently altered will be created with that format.  Is this all correct? I was hoping to have to not go through and convert all my tables.  Is is kosher to have antelope and barracude tables coexisting in the same tablespace? Even if it works are there any gotcha's to look out for?   From what I've read and gathered from my tests the answers are: Yes. Yes. I'm not sure.  Update  I've been running w/ some Dynamic and some Compressed tables in various instances since this post with out issue.  Further I neglected to read   at the time.       After you enable a given innodb_file_format, this change applies only   to newly created tables rather than existing ones. If you do create a   new table, the tablespace containing the table is tagged with the   “earliest” or “simplest” file format that is required for the table's   features. For example, if you enable file format Barracuda, and create   a new table that is not compressed and does not use   ROW_FORMAT=DYNAMIC, the new tablespace that contains the table is   tagged as using file format Antelope.   So tables will be created as Antelope even if you allow Barracuda.  The mixing is unavoidable unless you specify every table as row_format dynamic or a compressed table.    There is no indication you should do a complete dump and reload when introducing your first Barracuda table (such as is recommended when )


How do I fix "for loop initial declaration used outside C99 mode" GCC error?

I'm trying to solve  and I have a for loop that looks like this:   for(int i = low; i <= high; ++i)         {                 res = runalg(i);                 if (res > highestres)                 {                         highestres = res;                 }          }   Unfortunately I'm getting this error when I try to compile with GCC:     3np1.c:15: error: 'for' loop initial   declaration used outside C99 mode   I don't know what C99 mode is. Any ideas?


How do i play on a minecraft server with my friends without playing on an internet server or a LAN server

I want to play on a minecraft server with my friends without playing on an internet server and i can't get them to play on LAN server because they're not on the same network is there a way to do this? If not thanks for answering anyway.


Does juggling balls reduce the total weight of the juggler and balls?

A friend offered me a brain teaser to which the solution involves a $195$ pound man juggling two $3$-pound balls to traverse a bridge having a maximum capacity of only $200$ pounds. He explained that since the man only ever holds one $3$-pound object at a time, the maximum combined weight at any given moment is only $195 + 3=198$ pounds, and the bridge would hold.  I corrected him by explaining that the acts of throwing up and catching the ball temporarily make you 'heavier' (an additional force is exerted by the ball to me and by me onto the bridge due to the change in momentum when throwing up or catching the ball), but admitted that gentle tosses/catches (less acceleration) might offer a situation in which the force on the bridge never reaches the combined weight of the man and both balls.  Can the bridge withstand the man and his balls?


How should we install deb packages from the Internet and keep them updated?

Packages like discord or vivaldi provide a .deb file which can be installed using apt install. Let's say in case of an update, how should one go about updating this package? I don't think these packages will be updated by a apt update && apt upgrade. Do we have to then manually download the new version, uninstall the previous version, and then install the new version? Sounds like a lot of work.


Binding the Copy/Paste button to the clipboard

I have 3 buttons (in WinForm) Cut/Copy/Paste.  I need to bind the enabled and disabled state for each of them in dependence if the Clipboard contains or not "MyObject"s list.  How can I automatize that?


I've made a Connect Four game. The first move is made by the player and the second by the computer. Currently, the computer moves randomly; its moves are generated by C++'s random number generator rand(). I'd like to build a basic AI that tries to win or prevent the player from winning.  How can I go about doing this?


Some of the application have Double Confirmation for DELETE action. Also, some of the application behavior is "Type DELETE" and continue to delete.   Is this correct way?  My opinion is, we can have this option when there is no "Undo" feature. Otherwise we can have one time alert.   Please share your thoughts here.


When I run the app, the build is successful but the app is crashing. Please help me with that. Below is the error I'm receiving in the run tab

D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.hello, PID: 26685     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hello/com.example.hello.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView.setLayoutManager(androidx.recyclerview.widget.RecyclerView$LayoutManager)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:193)         at android.app.ActivityThread.main(ActivityThread.java:6669)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView.setLayoutManager(androidx.recyclerview.widget.RecyclerView$LayoutManager)' on a null object reference         at com.example.hello.MainActivity.loadRecyclerViewData(MainActivity.java:93)         at com.example.hello.MainActivity.onCreate(MainActivity.java:42)         at android.app.Activity.performCreate(Activity.java:7136)         at android.app.Activity.performCreate(Activity.java:7127)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:193)          at android.app.ActivityThread.main(ActivityThread.java:6669)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)  E/Volley: [1025] NetworkDispatcher.processRequest: Unhandled exception java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection     java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection         at com.android.volley.toolbox.HurlStack.createConnection(HurlStack.java:189)         at com.android.volley.toolbox.HurlStack.openConnection(HurlStack.java:207)         at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:88)         at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:123)         at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)         at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)         at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) I/Process: Sending signal. PID: 26685 SIG: 9


How do I get from Charles de Gaulle Airport (CDG) to Gare Montparnasse

When I look at the map (linked below) it seems that I can go directly from CDG to Gare Montparnasse on the RER B3 line, but when reading posts it seems that many transfers would be needed.      Is it possible to go directly from CDG to Gare Montparnasse with out transferring trains? If not what path would I need to follow?


Chat SE site thinks I have got higher rep than I actually have

I know that on the  on your user profile that it will round up your rep points to the nearest hundred. But I have just noticed that it is now rounding my rep up to 2.7k when I actually only have 2,483 on the site that it is meant to be getting my rep from. Here is a screenshot of what I mean by where it rounds it:  I have also noticed that in the chat (and I think that this is the reason for why it is rounding it up to 2.7k) it thinks that my rep is:  But on no site do I have this much rep, so why is it showing up as this?


"Some index files failed to download. They have been ignored, or old ones used instead."

I have Ubuntu 13.10 installed as a dual boot system with Windows 7.  Ubuntu loads normally, but when I try to update with Synaptic Package Manager, I get the following error message and the system stops there....  Failed to fetch http://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu/dists/saucy/InRelease   Failed to fetch http://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu/dists/saucy-updates/InRelease  (and other links listed too!)  Some index files failed to download. They have been ignored, or old ones used instead.   What is wrong please?


I am stuck with converting textbox string value to byte array. For ex;  Textbox1.text="ABC"; converting to byte array as byte[] array1; array1[0]=65; array1[1]=66; array1[2]=67;   Then I want to write all array1 to Textbox2 as  Textbox2=656667   Shortly, Input is "ABC" Ouput is "656667". I am working with below codes it gives error at  int value = Int32.Parse(arrText[i], System.Globalization.NumberStyles.Number);   sample code  string text = textBox1.Text + " ";// .Text + " "; text.Trim(); string[] arrText = text.Split(' '); byte[] data = new byte[arrText.Length]; for (int i = 0; i < arrText.Length; i++) {     if (arrText[i] != "")     {         int value = Int32.Parse(arrText[i],             System.Globalization.NumberStyles.Number);  //gives error         data[i] = (byte)Convert.ToByte(value);     } }  for (int i = 0; i < arrText.Length; i++) {     textBox2.Text += data[i].ToString(); }


blink code(escape code) has been removed?

According to  I attemped to active blink code in my program, But may be blink code has been eliminated. Is it true?  If is not true, Please help me to use blink code.


I know the basic matrix syntax in LaTeX but I am having problems with the type I have shown in the image . If anyone can help me with the encircled items it would be great:    So far I have this:  $$(3)(2)(1)\ \begin{vmatrix} {x}+{y}+ & {z}=33\\ 3{x}-8{y} & +7{z}=26\\ 5{y} & -3{z}=19 \end{vmatrix}$$   and it gives this result:


Can I use my familiar to cast Warding Bond on myself?

Find Familiar lets you cast touch spells through your familiar. Warding Bond is a Touch spell, that creates a connection between "you and the target". I can't find anything against it, but would it be possible to have my Wizard make his familiar cast Warding Bond on the Wizard himself, so that the Wizard gets the +1 to AC and saving throws and resistance to damage?  I realized after I wrote this much that Wizards don't get Warding Bond, but I think the question is still valid for multiclassers.


If I were to use the sentence "There are lots of John Smiths" in the world, would that be the correct use for saying that there are a lot of people named John Smith in the world?  I don't think there should be an apostrophe as that would imply ownership of something.  If my first example is correct, then what would you do if the name referenced already ended with an 's'?


What causes the light spectrum to appear on oil surface?

I have observed that when petrol or oil leaks, the light spectrum appear on it. What causes light to split into its constituent colours?


Is AES still secure considering all this NSA/Snowden scandal?

Im trying to understand if nowadays using AES is secure or not, after reading some arguments on Schneier’s blog (to be more exact, ) it seems like it is not secure:  Now as the NSA GCHQ et al know very well the more efficient you make the implementation of crypto code the more side channels it has unless extreme caution is observed. One thing we do know is that optimized for speed and minimized number of gates is an almost certain guarantee of side channels no matter how clever you are. Also the NSA knew that developers would not write their own code they would simply download and use the competition candidate code. As was pointed out and demonstration code exploited implementations of AES were subject to timing attacks that could fully leak the key across a network connection due to "cache hits" on the Intel x86 platform from base level pentiums upwards within weeks of the winning candidate being announced. Even today there are very side channel suseptable AES implementations in use in fact the majority of those implementations on the likes of routers and switches are timing channel cursed as are most application level software implementations that are more than a year or so old...  …at least not if the computer used is connected to external network. Is this true or just based on assumptions?


I encountered a question at the end of a unit about how to use “think about” and “think of”. It’s stated that we use “think about” when we consider an idea or concentrate on it, and we use “think of” when an idea comes into our mind. The question is a fill-in question:  “I don't really want to go out with Tom tonight. I'll have to … an excuse.”  I think we have to put “think about”, because we have to consider or concentrate on an excuse. But in the answer section, “think of” is stated as the answer. Which one is grammatically correct? Isn’t “think of” wrong? Why?


How could I notify Stack Overflow's expert users about my new question?

Possible Duplicates:             When I use Stack Overflow to ask a question, is there any way that I can I notify an expert user to inform him about this question?  Why do I want to do this? Because when I ask a question, I often get a perfect answer. I love this part of the site so much.  After that, I have another question which relates to my first question, and I hope that somewhere in the world he can see the question and try to help me again.  I don't know how to explain exactly my ideas. It's just same as a social network system.


How do I unlock Shampoodle in Animal Crossing New Leaf?

How do you unlock Shampoodle in Animal Crossing New Leaf?


Hi I wanted to know what the effect of applying display:none to an element is. Does it remove it from the DOM or just from the document flow? What does removing an element from the document flow implies? I know that visibility: hidden just hides the element, but it still affects the document flow and that you can remove an element from the DOM using the remove() js method.


How to validate valid datetime in c# before submitting to server

Hi I am getting this error:  Writing record number:      60479System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must   be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.   I have tried this :  try {      DateTime dt = Convert.ToDateTime(fireBirdReader["DUEDATE"]);      cmd.Parameters.AddWithValue("@DUEDATE", fireBirdReader["DUEDATE"]); } catch {      cmd.Parameters.AddWithValue("@DUEDATE", DateTime.Now); }   Also I have tries this:  DateTime temp; if(DateTime.TryParse(startDateTextBox.Text, out temp)) { cmd.Parameters.AddWithValue("@DUEDATE", temp); } else { cmd.Parameters.AddWithValue("@DUEDATE", DateTime.Now); }   But none of them working. I am using c# and console application.  Why you are marking as duplicate that answer is not working in my case. Can you please test it yourself. Do not try to over smart before try. I can also search google and stackoverflow.


Simplifying Expression involving cross product and curl.

I have the following expression that i would like to simplify further. $\mathbf{e}$ is a unit vector. I have used the BAC-CAB Rule to obtain: $$ \begin{aligned} (\phi \mathbf{e}) \times (\nabla \times \psi \mathbf{e}) & = \phi \mathbf{e} \times (\nabla \psi \times \mathbf{e} + \psi\nabla \times \mathbf{e}) \\  & = (\phi \mathbf{e} \times \nabla \psi \times \mathbf{e}) + (\phi \mathbf{e} \times \psi \nabla \times \mathbf{e}) \\ & = \nabla \psi(\phi \mathbf{e}.\mathbf{e}) - \mathbf{e}(\phi \mathbf{e}. \nabla \psi) +  (\phi \psi \mathbf{e} \times \nabla \times \mathbf{e}) \\ & = \phi \nabla \psi - \mathbf{e}(\phi \mathbf{e}. \nabla \psi) +  (\phi \psi \mathbf{e} \times \nabla \times \mathbf{e}) \end{aligned} $$ I feel $\mathbf{e} \times \nabla \times \mathbf{e}$ should be further reducible. Ideally I would like to have a scalar expression multiplied into one vector that is perhaps a composite expression of $\mathbf{e}$ and/or unit normals to $\mathbf{e}$. I am not interested in higher order tensors.


I've been a fan of the Star Wars movies since I was a kid, but I've never read any of the books. Every time I've thought about reading them, I change my mind because there is so many books, I don't know where to start.      I don't live anywhere near a public library, and I don't have a lot of money to spend on 200+ books. I'm going to be buying the books for my e-reader with Christmas gift cards.   I've heard about The Thrawn Trilogy by Timothy Zahn, and The Darth Bane Trilogy by Drew Karpyshyn. The Thrawn Trilogy sounds really good, but since Bane isn't in the movies, is it worth it reading about characters I don't know? Is that one of those books I would have to read more in the universe before reading? Is it any good?  I'm interested in learning more about the characters in the original trilogy and the prequels. So, my question is, how do I read them? Do I read them in chronological order? Will I be completely lost if I read them out of order?


The wall was built "from bricks" or "of bricks"?

The wall was built from bricks.  The wall was built of bricks.  Which sentence is more correct and is there any difference?


Maximum delay for effective active noise cancelling?

reduces unwanted sound by sending the inverted phase of the original phase:   (Source:   Theoretically, this seems logical to me. However, in real life, the anti-noise must be created by some hardware or software system (like active noise cancelling headphones), which takes time. So I assume that the anti-noise is always delayed to the original sound:    My questions:   How much (in milliseconds or whatever) is the maximum delay which is "allowed" for active noise cancelling so that the hearer of the noise+antinoise still notices the effect? Does the "allowed" delay depend on which noise has to be cancelled (e.g. a car driving, people speaking, music)?


$f: [a,b] \to \mathbb{R}$, $f(a) = f(b)$. Show $\exists c \in [a, \frac{a+b}{2} ]$ with $f(c)=f(c+\frac{b-a}{2})$

Let $f$ be a real valued and continuous function over $[a,b]$ with $a <b$ such that $f(a)=f(b)$ , My question here is :     Question (claim): How to show that : there  exists  $c \in [a, \frac{a+b}{2} ]$ such that : $f(c)=f(c+\frac{b-a}{2})$.   Note: I have tried intermediate values but I didn't succeed.


Hi I am now trying to write bubble sort implementation. Then I find that if I reinitialize the array then sort this array again, the time to sort is much smaller than the first time. Here is my code:       import java.util.Random;  public class test {  public static void main(String[] args) {     // TODO Auto-generated method stub      long start;     long end;     int [] array = new int [1000];       initializeArray(array);     start = System.currentTimeMillis();     bubble_srt(array);     end = System.currentTimeMillis();     System.out.println("To sort the array using bubble sort, we need " + (end - start) + " ms");      initializeArray(array);     start = System.currentTimeMillis();     bubble_srt(array);     end = System.currentTimeMillis();      System.out.println("To sort the array using bubble sort, we need " + (end - start) + " ms"); }     public static void bubble_srt(int array[]) {     int n = array.length;     int k;     for (int m = n; m >= 0; m--) {  //starts from the rightmost position in arrayy         for (int i = 0; i < n - 1; i++) { //starts from the leftmost position in array             k = i + 1;              if (array[i] > array[k]) {                 swapNumbers(i, k, array); //choose a bigger one to the i+1 position             }         }     } }  private static void swapNumbers(int i, int j, int[] array) {      int temp;     temp = array[i];     array[i] = array[j];     array[j] = temp; }  public static void initializeArray(int array[]){      Random ran = new Random();      for(int i = 0; i < array.length; i++){          array[i] = -ran.nextInt(10001) + 5000; // create a random number rangre from -5000 - 5000      }   }  }   The time to sort the first array is 13ms,  while to sort the second array is 5ms. But in fact we should get the similar result... But my result detour and every time the time to sort the second array is much smaller than the first array. I am quite confused about it...