What happens if a Muggle born wizard/witch can't afford Hogwarts supplies?
Where did Hogwarts get money for salaries, food and other purchases?
Question about a bijection between $\mathbb R$ and $\mathbb R \cup \{\infty\}$ About a bijection between $\mathbb R$ and $\mathbb R \cup \{\infty\}$  If we'll take a line $f(x)=\begin{cases} ax &amp;, x\in\mathbb R\\ 0 &amp;, x=\infty  \end{cases}$ then we'll have a bijection.   But about this function: $g(x)=\begin{cases} x &amp;, x\in\mathbb R\setminus \{0\}\\ 0 &amp;, x=\infty  \end{cases}$ ? it appears to be a bijection and it's even simpler. Pretty self descriptive, without being able to view the source of the noise how can we tell the difference between a sound in front of us and a sound behind us if pitch, volume and distance are all the same.   Also assume that it is not biased to one side more than the other, e.g its not to your left or right but directly in front or behind.   I'm interested in knowing if it is a part of the ear that makes this distinction, or a function of the brain. I've changed the meta description tag in many of my site pages. Should I select Fetch as Google->Fetch->Add to Index->URL and all linked pages in GWT?  Will Google recrawl the whole site faster than it'd normally?  This option can be used maximum of 10 times in a month. Can there be any side affects when doing this way in case only a few of site pages have changed? Design Review: 3.3V Logic to 12V Logic (Uni-directional and Bi-directional) I'm looking for feedback and improvements on my design below. Specific questions are at the end. I created this as an attempt to answer my own, . From my feedback there, it seems like I needed to be more clear in my requirements. These are screenshots from Eagle. If there's a better way to share, please let me know so I can correct it. Entire board  The overall purpose of this board is to translate between 12V logic, and 3.3V logic. The top portion of the board represents the 12V side. The LEDs are placeholders to indicate whether the 12V signal is HIGH or LOW. In practice, these would be replaced with more , requiring up to 3A. The switches are also placeholders, allowing one to manually turn the 12V signal on and off. They are only for test purposes, the &quot;real&quot; 12V signal would be coming as the output from other relays. The bottom half is the 3.3V side. This will be connected to a  (BBB). The board will connect to 2 output GPIO pins and 2 input GPIO pins of the BBB. Overall, I want to translate the 3.3V I/O from the BBB to the 12V signals on the other side (to control more relays and read their signals). I have designed 3 modules to control both directions individually, and together. 3V3_TO_12V Module  This module converts the 3.3V GPIO output from the BBB to a 12V signal on the other side. When the 3.3V signal is low, the 12V signal is low. When the 3.3V signal is high, the 12V signal is high. To do this, the 3.3V GPIO output is connect to a , which turns a  relay on and off. This switches the 12V power as output of the module to be used elsewhere. 12V_TO_3V3 Module  This module converts a 12V signal to 3.3V signal, to be read by a GPIO input from the BBB on the other side. When the 12V signal is low, the 3.3V signal is low. When the 12V signal is high, the 3.3V signal is high. To do this, the 12V signal simply turns a  relay on and off. This switches the 3.3V power to be read as input by the BBB. DUAL_12V↔3V3 Module  This module combines the previous two modules to create a bidirectional translation. If the 12V side is high, the 3.3V input to the BBB GPIO should be high. If the 3.3V output from the BBB GPIO is high, then the 12V side should be high too. It's similar to a logical OR, if either side is high, the corresponding signal on the other side should be high too. A single 12V signal has to be split into individual input and output signals on the 3.3V side for the BBB. Questions  Is the  and  relay combination overkill for having the BBB GPIO output control the 12V power line? I like the isolation and safety it provides, but it seems too much (in terms of cost and board space) Is there a better solution for the 12V to 3.3V conversion. I like the simplicity of the  relay switching a 3.3V signal, but it takes up lots of room. Does the DUAL_12V↔3V3 Module (which combines each translation direction) even make sense? This seems wasteful to use 2 relays and a high side driver, but I haven't found simpler solution that achieves the same result. Should I add pulldown resistors for the BBB GPIO inputs, or are the internal pulldown resistors good enough?  Any other feedback is welcome. I'm new to electronic design. Ubuntu 18.04 error on waking up from sleep : Read-error on swap device After the laptop has been in sleep mode for a couple of hours,when I try and resume my session I get the following error:     Read-error on swap device    It takes about 30 seconds for the login screen to load post this happening. Once I log in, the screen blanks out once or twice for a second, and none of my programs are open anymore. I get a "System problem detected" prompt. When I click on "Send Report", another notification pops up saying:     Sorry the program "Xorg" closed unexpectedly. Your computeer does not have enough free memory to automatically analyze the problem and send a report to the developers.   What I have tried so far is to increase the swap space available. It was around 2 GB initially and I created another swap file of 9 GB. This hasn't helped. The occupied swap space ( as per the swapon command ) after the crash is always around 170MB.  The DMESG for when I resume my session, up to the read error on swap device is as follows:       [64046.474054] ACPI: Low-level resume complete [64046.474162] ACPI: EC: EC started [64046.474162] PM: Restoring platform NVS memory [64046.475139] Enabling non-boot CPUs ... [64046.475196] x86: Booting SMP configuration: [64046.475196] smpboot: Booting Node 0 Processor 1 APIC 0x2 [64046.475663]  cache: parent cpu1 should not be sleeping [64046.475859] CPU1 is up [64046.475910] smpboot: Booting Node 0 Processor 2 APIC 0x4 [64046.476330]  cache: parent cpu2 should not be sleeping [64046.476506] CPU2 is up [64046.476539] smpboot: Booting Node 0 Processor 3 APIC 0x6 [64046.477071]  cache: parent cpu3 should not be sleeping [64046.477255] CPU3 is up [64046.477274] smpboot: Booting Node 0 Processor 4 APIC 0x1 [64046.477721]  cache: parent cpu4 should not be sleeping [64046.477922] CPU4 is up [64046.477947] smpboot: Booting Node 0 Processor 5 APIC 0x3 [64046.478371]  cache: parent cpu5 should not be sleeping [64046.478571] CPU5 is up [64046.478591] smpboot: Booting Node 0 Processor 6 APIC 0x5 [64046.479018]  cache: parent cpu6 should not be sleeping [64046.479229] CPU6 is up [64046.479247] smpboot: Booting Node 0 Processor 7 APIC 0x7 [64046.479675]  cache: parent cpu7 should not be sleeping [64046.479899] CPU7 is up [64046.485913] ACPI: Waking up from system sleep state S3 [64046.639206] ACPI: EC: event unblocked [64046.639711] sd 2:0:0:0: [sda] Starting disk [64046.873289] usb 1-11: reset full-speed USB device number 2 using xhci_hcd [64046.976869] ata4: SATA link down (SStatus 4 SControl 300) [64046.976892] ata2: SATA link down (SStatus 4 SControl 300) [64047.149289] usb 1-6: reset high-speed USB device number 40 using xhci_hcd [64047.437370] psmouse serio1: synaptics: queried max coordinates: x [..5660], y [..4570] [64047.476302] psmouse serio1: synaptics: queried min coordinates: x [1364..], y [1284..] [64047.922603] OOM killer enabled. [64047.922605] Restarting tasks ... done. [64047.928727] thermal thermal_zone1: failed to read out thermal zone (-61) [64047.930036] Bluetooth: hci0: Bootloader revision 0.0 build 2 week 52 2014 [64047.935036] Bluetooth: hci0: Device revision is 5 [64047.935037] Bluetooth: hci0: Secure boot is enabled [64047.935038] Bluetooth: hci0: OTP lock is enabled [64047.935038] Bluetooth: hci0: API lock is enabled [64047.935039] Bluetooth: hci0: Debug lock is disabled [64047.935040] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [64047.935042] Bluetooth: hci0: Found device firmware: intel/ibt-11-5.sfi [64047.944372] PM: suspend exit [64048.050329] Read-error on swap-device (8:0:1543400288) [64048.460888] [drm] RC6 on   Please let me know if any other information is needed. JavaScript: getting ImageData without canvas Incompatible Software for next OSX? I understand the move past Snow Leopard meant losing Rosetta, and compatibility with any PPC apps.   Since there are some apps that can't be replaced (for example, old years of TurboTax that I might need to reference) I have a drive to boot Snow Leopard, and one for Yosemite. I was considering the jump to El Capitan, when I saw the question  which got me wondering the question -     Before installing a next generation OS, is there any way to find, in   advance, which apps I have that would be orphaned by the move?   Edit, the answer below from Jean Valjean was what I needed. One app concerning me appeared as follows:    It might be tedious to search many apps, but at least this gives me a chance to view the top ones that will cause me grief. I am wondering if there exists any formula for the following power series :  $$S = r + r^2 + r^4 + r^8 + r^{16} + r^{32} + ...... + r^{2^k}$$  Is there any way to calculate the sum of above series (if $k$ is given) ? I haven't used regular expressions at all, so I'm having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the two examples below it is matching a string that contains all numbers plus an equals sign like "1234=4321". I'm sure there's a way to change this behavior, but as I said, I've never really done much with regular expressions.  string compare = "1234=4321"; Regex regex = new Regex(@"[\d]");  if (regex.IsMatch(compare)) {      //true }  regex = new Regex("[0-9]");  if (regex.IsMatch(compare)) {      //true }   In case it matters, I'm using C# and .NET2.0. How to kill a player when they touch a block? I am making a multiplayer parkour map on bedrock edition, and I have it set up where when a player steps on a grass block they die. But when a player steps on a grass block it just kills anyone who touches it.  First: A repeat command block (set to always active and unconditional)   execute @e [type=player] ~ ~ ~ testforblock ~ ~-1 ~ grass   And then I have a chain command block (set to conditional and always active)  kill @e [type=player]   And it does work..... IF in singleplayer only. (which is not at all what I want)  Thank y'all in advance. The adjective ones I have heard recently are    forward straightforward forthcoming frank   I was wondering if each of them has positive, negative or neutral meaning?  What are other similar terms that are used for positive, neutral and negative intention? Biber 2.11: Data file ... cannot be read in encoding UTF-8 ... ill-formed UTF-8 octet sequence ... at ... Slurper.pm line 63 I have just changed computers, and running Biber 2.11 now produces this error:  Utils.pm:209&gt; ERROR - Data file ... cannot be read in encoding 'UTF-8':  Can't decode ill-formed UTF-8 octet sequence &lt;96&gt; at C:\ ... Slurper.pm line 63   My .bib file is huge, having accumulated over years.  Thus, I suspect that there's something malformed in it.  Is there any rapid way to trouble-shoot it?  The new machine runs Win 10, Biber 2.11, XeLaTeX 2018.10.31, LaTeX2e 2018-04-01 and TeXLive 2018.  The old machine ran Win 7 and slightly earlier versions of all of the above.  A MWE of the driver .tex file:  \documentclass{article} % also with beamer  \usepackage[utf8]{inputenc} % problem arises whether or not include this \usepackage[backend=biber,bibencoding=utf8]{biblatex} %  problem arises whether or not include this \addbibresource{bib-mwe.bib}  \begin{document}  cite reference \cite{mal-rwws}  \printbibliography  \end{document}    Thanks! How can I convert the binary string $x_bin="0001001100101" to its numeric value $x_num=613 in Perl? Scoring matrices (BLOSUM & PAM) in BLAST and other sequence-comparison programs The  states that:      The scores are created by comparing the word in the list in step 2* with all the 3-letter words. By using the scoring matrix (substitution matrix) to score the comparison of each residue pair, there are 203 possible match scores for a 3-letter word. For example, the score obtained by comparing PQG with PEG and PQA is 15 and 12, respectively with the BLOSUM62 weighting scheme.   I do not understand how they got a score of 15 for PQG v. PEG. What is a scoring matrix, how is it computed, and how is it used?      Step 2 on that page is Make a k-letter word list of the query sequence: “Take k=3 for example, we list the words of length 3 in the query protein sequence (k is usually 11 for a DNA sequence) sequentially, until the last letter of the query sequence is included”. TeX Live 2016: minted doesn't work with LuaLaTeX (bug fixed in June 2016) I've installed TeX Live 2016 as it was released today (thanks to the developers for that).  Now I have the following MWE:  \documentclass{article} \usepackage{minted} \begin{document}  \begin{minted}{ruby} class Foo   def init     pi = Math::PI     @var = "Pi is approx. #{pi}"   end end \end{minted}  \end{document}   When running pdflatex --shell-escape test.tex it runs through the file and produces the PDF as expected. Doing the same with lualatex --shell-escape test.tex fails with  This is LuaTeX, Version 0.95.0 (TeX Live 2016)   system commands enabled. (./test.tex LaTeX2e &lt;2016/03/31&gt; Babel &lt;3.9r&gt; and hyphenation patterns for 1 language(s) loaded. (/opt/texlive/2016/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/opt/texlive/2016/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2016/texmf-dist/tex/latex/minted/minted.sty (/opt/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty) (/opt/texlive/2016/texmf-dist/tex/latex/oberdiek/kvoptions.sty (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty) (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty) (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/etexcmds.sty (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))) (/opt/texlive/2016/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix  &lt;2008/02/07&gt; (tvz)) (/opt/texlive/2016/texmf-dist/tex/latex/float/float.sty) (/opt/texlive/2016/texmf-dist/tex/latex/base/ifthen.sty) (/opt/texlive/2016/texmf-dist/tex/latex/tools/calc.sty) (/opt/texlive/2016/texmf-dist/tex/latex/ifplatform/ifplatform.sty (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/luatex-loader.sty (/opt/texlive/2016/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua))) (/opt/texlive/2016/texmf-dist/tex/generic/oberdiek/catchfile.sty) uname -s &gt; "test.w18"  ! Package catchfile Error: File `test.w18' not found.  See the catchfile package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.93     \CatchFileDef\@tempa{\ip@file}{}  ?    As mentioned, it's a freshly installed TeX Live 2016; I've also checked the installed Pygmentize version, which is 2.1.3 (installed via pip). Testing with TeX Live 2015, the above code, however, works without problems with both pdflatex and lualatex.  Does anybody have a hint for me on how to fix this, or is it a bug in lualatex or minted (or whatever other package) that should be reported?  Update: With minted version 2.2 (2016-06-08), the package loads the shellesc package automatically, as mentioned by @David Carlisle and @egreg in the comments; therefore, the problem should not occur any more, if you have this version installed. For only my index pages, I am receiving this warning in Google Search Console:     Duplicate, submitted URL not selected as canonical   I know that this occurs because Google is attempting to track both the default landing "page" (i.e. www.domain.example/) and the page to which to which DirectoryIndex points (i.e. www.domain.example/index.html). They are, in fact, the same page, and so the warning is the result of a false positive.  Two questions for our community:   Why does Google not conflate these and count them as a single page? Alternately, is there something wrong with my set up if this has happened? I can easily force both pages to point to a single canonical URL. But which is preferable, "/" or "index.html"? Show that $\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) = \sum_{i=1}^n (x_i - \bar{x})(y_i)$. Show that $\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) = \sum_{i=1}^{n} (x_i - \bar{x})(y_i)$. I fell into this hole where I keep finding that $$\sum_{i=1}^n (x_i - \bar{x}) = \sum_{i=1}^n x_i - \sum_{i=1}^n \bar{x} = n\bar{x} - n\bar{x} = 0$$ This seems true, but I know that I am missing something, since this implies that covariance is always zero, which is obviously not true. I'm using wordpress multiste 3.3.1 I'm not gonna update it in the future. So I disabled all upgrade functions.  I want to remove the wordpress admin bar from both frontend as well as dashboard.  I can remove it from frontend using this code.  add_action( 'init', 'disable_admin_bar', 1 ); function disable_admin_bar() {     add_filter( 'show_admin_bar', '__return_false' ); }   But i couldn't find any solution to remove it from dashboard.   I don't want to use css solution to hide admin bar and I'm ready to edit the core files to remove it  Can anyone help me to remove it completely?. Thanks Find all entire functions such that $|f(z)|\leq |\sin(z)|$ for all $z\in\mathbb C$. What's the best way to build a string of delimited items in Java?