How to run a script command inside a executable process?

I don't know if i can't formulate the right question, but i couldn't find the answer to what looks like a simples thing. Basically i'm trying to make a bash script to automate some work that i need to do with an executable program. What happens is that i can't get the script to pass the value when i'm within the executable "frame".I've tried to make the simplest thing to see if it would work and it didin't. Looks something like this: #!/bin/bash  ./run1  sleep 1  echo '0.2'   In this case i was just trying to pass the value 0.2 as input for the running process 'run1', but it didn't happen. Looking to structure of the bash script i thought that maybe the echo would just work when the running process ends. So here lays my question: How can i give an input to an process when it's running? It doesn't necessarily  needs to be by means of an bash script i just want to automate this.


Wireless communication over long distances

Would like to communicate between an Arduino and a PC but over a  distance of 2500+ feet outside in the open, wirelessly. What would be  the best way of doing this? The communcation devices I have found  (xbee,...) dont go the distance.


Is there a way to change or transfer my Pokemon Go to a different Google account?

I've been playing the game a while now and have ranked up considerably. I'm wondering if there is any way to change to a different Google account and still keep all of my Pokemon/items etc, as I stupidly used my university gmail account when I first downloaded the app (which will be automatically deleted in September).   Is there any way to transfer my trainer/Pokemon/items etc to a different Google account?


What's the next step if I request an account deletion and after a reasonable amount of time, nothing happens?

I recently requested deletion of my Stack Exchange account on just one specific Stack Exchange site.  I followed the instructions here:   I made the request nine calendar days ago.  Then I waited.  Then I waited some more.  Then after a week, I used the contact form to try to request an update.  There's been no update, no communication, nothing except the "scheduled for deletion" banner on my account on that site.  I get that people are busy and such.  All I'm looking for is some quick indicator that something is happening, or at least is genuinely going to happen in the future.  What's the procedure for getting such an update if it's not coming from the individual site itself?


Remove unwanted newline at start of section

In the code below there are two line breaks between "test" and the the text below it. How do you make there be just one?  \documentclass[7pt]{article} \usepackage{multicol} \usepackage{lipsum}  \begin{document} test \begin{multicols}{2}\lipsum[2]\end{multicols} \end{document}


Webdriver : How to perform scroll down an element (example div) using selenium?

The Scroll element in the page is actually a div with scroll bound to it. Here is the HTML snippet.  <div class="slimScrollBar" style="background: none repeat scroll 0% 0%  rgb(137, 137, 137); width: 12px; position: absolute; border-radius: 0px; z-index: 99; right: 1px; top: -13px; opacity: 0.6; height: 224.835px; display: block;"/>    I have tried with the following code, but it didn't  work out  WebElement scrollArea = driver.findElement(By.cssSelector("div.slimScrollBar")); JavascriptExecutor js = (JavascriptExecutor) driver;  js.executeScript("arguments[0].scrollTop = arguments[1];",scrollArea, 250);  Thread.sleep(1000);    Help is appreciated!


Reset profile settings while keeping history, bookmarks, cookies, etc

After updating Firefox to 40.0, the default profile fails to render any windows (including the menu bar and the rest of the GUI). However, I can navigate to any page, and copy page contents via the keyboard.  I've tried using firefox --safe-mode, but I get the same results: the window is blank as though nothing is rendering.  If I create and use a new profile via firefox --ProfileManager, the new profile works perfectly fine. I suspect something in default profile was corrupted.  How can I reset an existing profile, and retain my history, bookmarks, cookies, and ideally extension settings?


What happens to our characters when 2.1.0 (Diablo 3) goes live?

I just learned today that we can copy our characters from the official release to use on the 2.1.0 PTR.  Then I wondered:  if I play my characters on the PTR instead of the current official release (2.0.6), when 2.1.0 is released officially, which version of my character will it use?  Will it use my 2.0.6 character or my PTR 2.1.0 character (or will I have a choice)?


trying to parametrize my queries, heres a supposedly simple one          $query = $this->handle->prepare('USE :db_name');         $query->bindParam(':db_name', $db_name, PDO::PARAM_STR);         $query->execute();   however, it throws an invalid syntax error. I checked the query log, it comes out as  USE 'test'   which doesn't work, however, if I manually write  USE test   then that does work. This leaves me with 2 questions   Shouldn't the one with single quotes work? AFAIK, quotes just mark the beginning and ending of a string in SQL, why is it breaking it? How can I get the prepared query to not automatically put quotation marks around the parameters?


I want to use madrid theme and I want to achieve the horizontal shading effect in the frametitle with the colors like the following picture    I try as follows by using the following two answers (, ):  \documentclass[xcolor=dvipsnames]{beamer} \usecolortheme[named=blue]{structure}  %------------------------\AtBeginSubsection[]---------------------- \AtBeginSubsection[]{        \begin{frame}<beamer>[noframenumbering,plain]{Outline}         \transsplitverticalout         \tableofcontents[currentsection,currentsubsection]     \end{frame} }  \usetheme{Madrid}  %-----------------------------footline----------------------------- \setbeamertemplate{footline}{     \leavevmode%     \hbox{%         \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%             \usebeamerfont{author in head/foot}\insertshortauthor         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%             \usebeamerfont{title in head/foot}\insertshorttitle %            \hspace*{3em} %            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}% %            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}             \insertframenumber{} / \inserttotalframenumber         \end{beamercolorbox}%             }%     \vskip0pt% }  \setbeamercolor{author in head/foot}{bg=black} \setbeamercolor{title in head/foot}{bg=blue} \setbeamercolor{page number in head/foot}{bg=black}  \title[The essential numerical range and the Olsen problem]{The  essential numerical range and the Olsen problem} \author[{Student} (University of ....)]{Student}     \useoutertheme{shadow}       \usepackage{tikz}      \usetikzlibrary{shadings}      \colorlet{titleleft}{red!70!black}      \colorlet{titleright}{white}       \setbeamercolor*{frametitle}{fg=white}     \makeatletter    \pgfdeclarehorizontalshading[titleleft,titleright]      {beamer@frametitleshade}      {\paperheight}{%      color(0pt)=(titleleft);    color(\paperwidth)=(titleright)}   \makeatother \begin{document}  \begin{frame}{linear relation}  \end{frame}  \end{document}     However I remark that I loss my previous botom


What is a good book for learning quantum mechanics with mathematical derivations?

I know calculus (ODEs, PDEs, integration over 3 dimensions, limits, W, Zeta functions, series etc) and am working on linear algebra. What it the best book to learn quantum mechanics from with mathematical derviations?


Show that $\operatorname{Spec}k[x_1,x_2,...,x_n]/(x_1^2+\cdots+x_m^2)$ is normal for $\operatorname{char}k\neq 2, n\ge m \ge 3$

I want to show that if $F(T) \in B[T]$, where $B:=k[x_1,x_2,...,x_n]/(x_1^2+\cdots+x_m^2)$, is monic and has a root $\alpha \in\mathcal K(B)$ then $\alpha$ actually lives in $B$. This will imply that $B$ is an integrally closed domain and hence that $\operatorname{Spec} B$ is normal. But I am stuck at this point.  On the other hand, I know that the geometric interpration is that a quadric of $\operatorname{rk} \ge 3$ doesn't have "bad" singularities. Well, I know that such quadrics are irreducible, but that only helps me to show that $B$ is at least an integral domain.


Question Limit exceeded but I haven't asked any!

I've literally just signed up to Stack Overflow and I tried asking my first question, unfortunately I keep getting this error message      You can only ask 50 questions in a 30-day period.   Having just signed up, I haven't asked any questions yet, and definitely not 50!  I am currently living in the halls at my university, could this be causing the problem? And if so, is there anyway I can get around this as I really need some help :(


How to delete duplicate (repetitive) records, rows from table without id

I have studied on it and the most practical way I found was to create a procedure. The procedure adds an id, delete duplicate rows, and finally adds an id column to newly formed table. I wonder, there must be an easier way. Here's the code, it works...  --my table  create table dublicateTable ( name varchar(30) )   --duplicatedly inserted rows  insert into dublicateTable values('Kerem') insert into dublicateTable values('Taner') insert into dublicateTable values('Mehmet') insert into dublicateTable values('Serhat')   --first situation  select * from dublicateTable   name ----- Kerem Kerem Kerem Taner Taner Mehmet Mehmet Mehmet Mehmet Serhat Serhat Serhat   --dynamicaly formed sql code procedure  USE [myDataBase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create procedure [dbo].[usp_delete_duplicate] as declare  @add_id_text nvarchar(50), @delete_id_text nvarchar(50), @command_text nvarchar(100) begin set @add_id_text='alter table dbo.dublicateTable add id int identity(1,1)' set @command_text='delete from dbo.dublicateTable where id not in(select min(id) from dbo.dublicateTable group by name)' set @delete_id_text='alter table dbo.dublicateTable drop column id' exec sp_executesql @add_id_text exec sp_executesql @command_text exec sp_executesql @delete_id_text exec sp_executesql @add_id_text end   --final situation.it works..  exec usp_delete_duplicate   select id,name from dublicateTable   id      name ---     ----  1      Kerem  2      Taner  3      Mehmet  4      Serhat


Include SVG aligns/centers different when used with "newcommand"?

this is my first post in this forum, but i have been here a thousand times, enjoying the high-quality answers to often also good quality questions. So i try my best to also provide all needed information, and a MWE. I am using Pdflatex in the TeXnicCenter on a Windows 7 machine.  In my thesis i am using a lot of SVG graphics, which i include in a nice workflow. I've set this up along some lines that are common concerning the question "how to include SVG?". It uses a \newcommand{\includesvg} and exports, if necessary, the SVG via Inkscape to pdf_tex, which is then inputted via \input{...pdf_tex}.  Now i've always felt that these images don't center correctly, and now i've broken it down to this MWE. In the result it is obvious, that the centering goes slightly wrong, when the pdf_tex is included when used through the \includesvg command. Which, from my little understanding of Tex, doesn't make much sense. So the question arieses: Does \newcommand add any margin/border/alignment to it's content?  Unfortunately, to run the MWE, you'd need a SVG file called "blackbox.svg". In the example it is just a wide solid rectangle, that's all.  In the MWE, on the first output-page i include the SVG graphic "blackbox" using the minimalistic \includesvg command. For the captions, i use the caption package. This is for illustrating how the graphic is in this case not centered. The rectangle in the output has moved slightly to the left, like 6pt or so. On the second page, everything is fine. But there is nothing much differently done, except that the two lines   \def\svgwidth{\figurewidth} \input{#1.pdf_tex}   are not "called" through the command definition. Does it make a difference? And how would i solve the difference? Because i really need that command.  Here is the MWE:  \documentclass{article}  \usepackage{blindtext} \usepackage{caption} \usepackage[pdftex]{graphicx} \usepackage{calc}  \newlength{\figuremargin} \setlength{\figuremargin}{40pt} \newlength{\figurewidth} \setlength{\figurewidth}{\columnwidth-\figuremargin}  %%% SETUP OF CAPTIONS     \DeclareCaptionFormat{myformat}{#1#2#3\hrulefill}     \captionsetup{         margin={\figuremargin/2,\figuremargin/2},         font={footnotesize,sf},         justification=justified,         format=myformat     } %%%%%%%%%%%%%%%%%%%%%%  \newcommand{\includesvg}[1]{     \def\svgwidth{\figurewidth}     \input{#1.pdf_tex} }  \begin{document}     \blindtext[1]     \begin{figure}[!htb]         \caption{\blindtext[1]}         \centering         \includesvg{blackbox}     \end{figure}     \blindtext[1]     \newpage     \blindtext[1]     \begin{figure}[!htb]         \caption{\blindtext[1]}         \centering         \def\svgwidth{\figurewidth}         \input{blackbox.pdf_tex}     \end{figure}     \blindtext[1] \end{document}   In this image you can see the shift to the left of the graphic.   I hope there is something i can do with that \newcommand. Do you guys have any hints for me?  Thanks! Janos


Can I Print to email by adding a email printer device?

Sorry for the vague title, I didn't know the best way to word it.   The company I work at, has Fax Machines setup as printing devices. The user will fax documents that were created in an accounting software to various remote locations. We want to change this from Fax Machines to email, and we are trying to figure out the easiest way to do this. We brought up Printing to PDF and then going into Outlook and attaching it to an email, but apparently that is too complicated.  So, is there a way we can add a device to the Printer Selections that would email the document, instead of printing it? The accounting software we use, doesn't have the option to email, only the ability to print.


How do I find the seed of my Minecraft World in Windows 10?

I have found a cool world and I'm trying to get the seed for it. Is there a command or setting for it?


macOS partition startup Volume and Recovery Disk type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF plus part of the disk corrupted?

I have a situation very similar to the ones depicted in two previous questions I found ( and ), but still different (I address why my situation is different later on in the question).  The problem  I am really panicking, my computer has been in unbootable status for two days now and because of coronavirus lockdown, in Italy there is no any opened tech shop, at this point I do not know what to do and any help is very much appreciated.  I had a ~50 GB linux partition on the SSD (total ~250 GB) of my 15” Macbook Pro mid-2015. I created this partition to boot ubuntu back in 2016 and I used it regularly alongside macOS. About one year ago I updated to Mojave 10.14, and this is the macOS version my computer is running now (I am mentioning it because I suppose that the update changed the file system of my macOS partition to APFS, keeping unmodified the ubuntu partition, I guess).  Today I decided to remove the ubuntu partition, I started the computer on macOS, opened Disk Utility, find the ~50 GB partition assigned to ubuntu on the pie chart, I clicked on the “-“ sign to remove the partition and then “Apply”. Disk Utility returned to me instantly with an error (not remember exactly the text, but I remember that no error code was given) saying it could not perform the operation, so I googled a bit some solutions (MY COMPUTER WAS PERFECTLY WORKING) and I found a post suggesting to perform some operations from ubuntu, so I decided to restart my computer in order to open ubuntu - I repeat, it was perfectly working, many apps opened and fully working, etc. - and...  It booted into “GNU GRUB version 2.02”  I tried to restart my mac keeping “option” pressed, but it could only find the “EFI Boot” disk (picture attached) which is the one I usually select to boot Ubuntu. Also, Ubuntu now doesn’t even work anymore, because if I select “EFI Boot” it starts “GNU GRUB version 2.02”.  Now I really started panicking, I don’t care about data of the ~50 GB ubuntu partition, but so foolishly I haven’t backed up the ~200 GB macOS data, and I am just so affectionate to them, I would really like to recover them.  Data Recap   15” Macbook Pro mid-2015 Right now I am booting from the network. 256 GB SSD partitioned in: ~200 GB APFS macOS partition - FileVault encrypted - running Mojave 10.14 ~50 GB ubuntu partition - don’t remember the file system (data here doesm’t matter to me)   Photos Attached   diskutil list gpt -r show /dev/disk1 disk1 information from Disk Utility Disk Utility overview of the physical disk booting situation with only the “EFI Boot” partition   Why my situation is different  My situation is different from other questions because of 3 reasons:   The ~50 GB ubuntu partition is disappeared, maybe corrupted, indeed if you add up all the disk's size in diskutil list, you still miss ~50 GB. I have 2 disks at the same time (index 2 and index 3) that are in the FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF status When I call gpt -r show /dev/disk1 I don't get any "Suspicious MBR at sector 0" message unlike others users that wrote other questions.   Update 1  I just wanted to confirm that I am booting the mac from Network Recovery and also my Disk Utility version. Disk Utility Version is: "Version 13 (606)" - "Copyright 2002-2014 Apple Inc.". Is seems, indeed, pretty old.


How to place a .png texture with transparency over a material

I am trying to create a low poly face with a face from a .png file. The issue is I already have material placed for hair and skin, as shown in the picture below.   I have created a .png file with a face which I would like to overlay over the skin material on the front of the head.    All examples I searched so far assume I also want the color of the material from the .png texture.  Update:  I added UVMapping, changed view to texture, made sure one face is on the eye but nothing is displayed..... see image... I don't know what is going on.


I'm trying to update Drupal from 9.1.8 to 9.1.9. However, running a composer update jumps to 9.2-beta2. I'm not sure how to fix it so that it sticks to the recommended version. My composer.json has this... "drupal/core-composer-scaffold": "^9.1.0", "drupal/core-project-message": "^9.1.0", "drupal/core-recommended": "^9.1.0",   How can I prevent my sites from updating past 9.1.x? It used to be a bit simpler with drupal/core but I know that's not the recommended package to use anymore.


How to edit a file in vi editor (arrow keys prints letters)?

I am open a file in vi:  vi index.php   Here the problem is: when I press the down arrow and it prints 'B'. Why it prints 'B'?


Does flying to Panama from the US reset the ESTA time counter?

I am travelling from Panama to Los Angeles and around the States for approx 80 days then flying back to Panama and making my way up Central America for approx 3 months before flying back to LA to fly home to Australia.    Will this be OK with an ESTA?    Does it count as spending too long in the States?    I have been told that Panama is not far enough away.


Proving the Beltrami-Laplacian of $S^2$.

I am trying to show that for $S^2$ with the standard metric, $$\Delta_{S^2}x^1 = -2x^1$$ where $\Delta_{S^2}x^1$ is the Beltrami-Laplacian of $S^2$ and $x^1$ is the restriction of the coordinate function $x^1$ from $\mathbb{R}^3$ to $S^2$. So, I also know that if I have a function $f$, then $\Delta f = \text{div}(\nabla f)$. Though, I am not really sure how to make the connection between this Beltrami-Laplacian of $S^2$ and the $-2x^1$. Any help would be appreciated.


When responding to potential answers I sometimes like to include a code block to clarify what I'm talking about. Is it possible to have clean code-formatting in comments or only in questions and answers?


Uninstall libc6 (from Debian testing) from Debian stable

I wanted to install the text editor Atom on Debian stable (but I don't want to anymore), and I had to install libc6 from Debian testing. Bad idea, I know. So I changed the sources.list, etc... Used this command to install:  apt-get install -t testing libc6   Then removed that line from sources.list. Now the System Settings won't run.  *** glibc detected *** gnome-control-center: free(): invalid poin   ... and a very big list (of files?). The libc6 from this version (stable) is still on synaptic as installed.  How do I solve this? Is there a way to uninstall that libc6? Usually uninstalling packages with a lot of dependencies is not a good idea, right?


How to Have an Imported Rectangular Image be Displayed as a Parallelogram with LaTeX

I would like to be able to call in a rectangular image into Latex and have it appear as a parallelogram instead of a rectangle. For instance, \documentclass{article} \usepackage{graphicx} \begin{document} \begin{minipage}[]{\textwidth}   \centering   \includegraphics[width=0.45\textwidth]{example-image}     \end{minipage} \end{document}  produces the rectangular image  QUESTION: How may I have it appear as a parallelogram inclined slightly to the right (say, base angles 85 degrees and 95 degrees, respectively) with the lengths of the corresponding sides the same as that of the rectangle? Something like this:  Thank you.


My teacher asked me this question. But I  think this is wrong. Anyone found this, before me? I do not know. Anyway, Is my solution correct?  ${x^{x^{x^{x^x}}}}^{...}=2$  $x^2=2$  $x=\sqrt 2$  ${\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^\sqrt2}}}}^{...}=2$  Now,  Let, ${x^{x^{x^{x^x}}}}^{...}=4$  $x^4=4$  $x=\sqrt2$  ${\sqrt2^{\sqrt2^{\sqrt2^{\sqrt2^\sqrt2}}}}^{...}=4$  Contradiction!


I have the following specs for a build with Ubuntu, can you suggest which version of Ubuntu would support ? Here is the specs given bellow ; Here is the complete list of components for the build with detail description CPU- AMD R9-5950X 16c / 32 threads MB- ASUS PROWS X570-ACE - RAM- T-FORCE 128GB 3200Mhz RGB DDR4 (32x4)- M.2 SSD CORSAIR 2TB MP600 M.2 NVME - VGA- MSI RTX3090 SUPREME X 24GB GDDR6X - PSU Corsair RM850W MODULAR 80 PLUS GOld - CASE Corsair 680X 4 FANS RGB Black - LIQUID COOLER Corsair H115i Platinum  RGB LIQUID COOLER please the above mentioned is the build , confirm me if this will support Ubuntu and which version ! Thank you !


Spivak's Calculus on Manifolds asks the reader to prove this (problem 1-8, pp.4-5):     If there is a basis $x_1, x_2, ..., x_n$ of $\mathbb{R}^n$ and numbers $\lambda_1, \lambda_2, ..., \lambda_n$ such that $T(x_i) = \lambda_i x_i$, $1 \leq i \leq n$, prove that $T$ is angle-preserving iff $\left| \lambda_i \right| = c, 1 \leq i \leq n$.   Here "angle-preserving" means that the linear map $T$ satisfies $$\frac{ \langle x, y \rangle}{\|x\| \|y\|} = \frac{ \langle T(x), T(y) \rangle}{\|T(x)\| \|T(y)\|},$$ and that $T$ is injective.  My first problem with this question is that the claim is false. Taking $n = 2$, $x_1 = (1, 0)$, $x_2 = (1,1)$, $T(x_1) = -x_1$, $T(x_2) = x_2$, and setting $x = x_1$, $y = x_1 + x_2$, the expression in the RHS above evaluates to $0$, while the expression in the LHS evaluates to $\frac{1}{\sqrt{2}}$.  My second, bigger problem is that I'm not really understanding what's going on. An earlier part of the problem had me show that norm-preserving matrices are angle-preserving; this I'm not sure I get. Thus, I'm not sure what true "version" of this statement the author had in mind (was he trying to get a converse?) and I don't know what to do.    Here's my guess:  Looking at some transformations in $\mathbb{R}^2$ (just drawing them), it looks like some of them could be "flip the sign of a basis vector" IF it's an orthogonal basis. However, I can't seem to recover the usual "rotation through an angle $\theta$" transformation this way, so I'm not sure that requiring the basis be orthogonal makes the statement true.   Also, I'm not sure how to take the inner product of vectors which aren't in standard coordinates. Or am I missing something here?


Blender 2.9 scripting, how to get the name of the driven property

I'm trying to get the name of the property that's been affected by a driver for a certain object, what I did so far:  for d in bpy.context.object.animation_data.drivers:     print(d.driver.id_data.name)  However, that's returning the name of the object, not the driven property. My question is, let's say there's a drive controlling the Z Scale, how do I get that information "Z Scale" or a similar equivalent, in scripting?


Question  Quite a few plant species can be used for medicinal purposes . As an example, Filipendula ulmaria is rich in acetylsalicylic acid (aspirin).  An allele that produces a substance which is beneficial for a predator should not get fixed in the population! Why are there so many drug-like plants?    Thoughts  Here are some (intuitive, unclear or far-fetched, non-exhaustive and non-exclusive) hypotheses I can think of:   Because plants want their seeds to get ingested in order to propagate Is it because there are so many substances that affect our homeostasy that many plants are toxic and many are healthy just by chance. Containing healthy substances are not adaptations but by-product of evolution. The substances that are beneficial for us actually evolved to repulse predators. These substances are toxic at high dosage and therefore are efficient against predators that are small or eat a lot of plants (herbivorous). These substances at low dosage might actually have a benefical effect. For example a substance that make blood thicker is very toxic except if you eat just a bit of it while bleeding. We (primate or whatever taxon you want to consider) evolved in order to get advantage of the surrounding envirronment. Sbstances that were neutral became beneficial. The advantage of being sensitive to various products cause that, by chosing our food source, we can heal. Therefore, by evolving sentivity to various substances, our behaviour can act as a reinforcement to immunity (and other anti-illness system). If this is true, we might expect that the frequency of presence of a plant species affect the probability that out homeostasy get affected when eating it. Lineage selection. Lineages that produce substances that are active in predators body in a way or another are undergoing many various selection forces because of these substances. Therefore they get a higher speciation rate than other lineages. Keeping some non-herbivorous species in large population size (by helping them) is the best way to keep herbivorous species in small population (because of territory competition, predators relationships, etc... )


Strange consequences of Axiom of Choice in Zermelo set theory

Recently I read the following quote (for the umpteenth time):     The Axiom of Choice is obviously true, the well-ordering principle obviously false, and who can tell about Zorn's lemma? — Jerry Bona   Normally, the equivalence of these three over ZF is given as a justification for Zorn's lemma, since AC is 'intuitively' true. However, I have always found it lacking because the equivalence crucially depends on transfinite induction via the axiom schema of replacement, which I find unintuitive, unlike the axioms of  (which lacks both Replacement and Regularity). So my question is:     What are 'counter-intuitive' consequences of AC in ZC (Zermelo set theory)?   I understand that this is not a precise question, but I am looking for examples of the same sort as mentioned  and . I consider these examples as 'near misses', because while many people consider them counter-intuitive, I do not since they all rely on being able to handle arbitrary real numbers or even sets of real numbers, which is not possible in the first place. Specifically, there is no issue with a conceptual choice function that picks one representative from every equivalence class even if it is not implementable, just as there is no issue with a conceptual oracle machine to solving the halting problem even though it is not implementable.  As for the Banach-Tarski paradox, I do not find it counter-intuitive because we cut up the ball not into nice pieces at all, but instead sets of point dust that can be rearranged. It is not much different from taking the countable set $S = \{ \exp(i{\large \frac{k}{2^m}}) : k,m \in \mathbb{N} \land m2^m \le k < (m+1)2^m \}$ as points in the complex plane and rotating it by $\exp(i)$, which is a rigid transformation of a bounded point set that has just made countably many points vanish (in fact, ordered around the unit circle, every other point has vanished), completely constructively.  Related to this question, based on the iterative conception of sets, we get roughly Replacement for countable sequences as stated by Boolos in the quote . Thus I am also interested to know any 'counter-intuitive' consequences of AC in ZC plus Replacement for countable sequences.


How did Ollivander know about Voldemort's wand?

There's evidence that Ollivander knew that Voldemort and Tom Riddle were the same person. When he gave Harry his wand, he remarked that a similar wand was given to Voldemort, who did 'terrible, but great things'.   However, Voldemort underwent a whole transformation. How did he know that? Only very few people made the connection between the young Tom Riddle and Voldemort, according to Dumbledore.   We do know that Ollivander had a perfect memory regarding wandlore.  Ollivander knew he gave an identical one to eleven-year-old Tom Riddle. Somehow, Ollivander also knew about Voldemort's wand.  It is likely that Ollivander recognized that this wasn't a facsimile wand with the same properties, but actually the same wand. I speculate that this is the way that he deduced that Voldemort and Tom Riddle should also be the same person.  Only, how could Ollivander know about Voldemort's wand in the first place? On what occasion could he have seen that wand?


I've been using windows 7 on my HP Pavilion G6 for quite a while now, I've always wanted to install Ubuntu and have all the files on my USB Flash Drive after using Universal USB installer. My USB is a Cruzer Edge 4gb, and I just want to know the chances of it breaking (there is also no boot from usb option)  EDIT: Not sure if this is a problem, but I've installed it on virtualbox and it's really, really, really laggy.


Any maximal subgroups of a finite group are conjugate then G is cyclic.

Given a finite group G, if G satisfies the property that any two maximal subgroups are conjugate, G is cyclic. I was thinking about Sylow theorem which states that for finite group and prime factor p, any Sylow p-subgroups are conjugate. I wish to somehow use that result to show G has order a prime number, thus cyclic. However, I am, at the moment, clueless. Any help or guide is greatly appreciated =).


Recently, I have worked out a solution manual for a book.   I have not found on the Internet any existing complete solution manual for this book.  Since the solution manual of mine contains every exercise given in the book, my question is: In order to publish or distribute publicly this manual, do I have to first request the consent of the publisher of the book?  [Editors note: A solution manual is an accompaniment to a textbook that provides the answers and/or techniques to solve the exercises given in said textbook. Other names for these include: answers keys and teacher's handbook.]


Second book on QFT before understanding Conformal Field Theory

I'm a newcomer to Quatum Field Theory, recently I started to work with the very basic book of . My final destination is to learn Conformal Field Theory applied to Quantum Phase Transitions and Condesed matter.  What would be a second book in QFT towards this aim? I ask this because many of them are oriented towards high energy and particles, which I'm not sure I will need all of those topics.  Finally, I would like to say that I have  book, but it's not well suitable for self-studying since it has a lot of typos.


I was waiting on a red light the other day and was wondering.    If I'm in my car, not moving and I see a car that's going to hit me from behind. Would I (my body) be safer if I put on the break or if I put the car in neutral?  I assume there's no car in front of me and there's no posibility to be hit by an other car. Also, the car crashing into me is going at a good speed.


In which case we should pickup Manhattan distance and when we should use euclidian distance measure.   To my understanding both are used for continues numeric data(not like cosine or others who works on different similarities).   So to which data, which method works well?  I have seen applying KNN with Manhattan working well with data containing lot of 0/1 classes(though not survey data) and some other continues fields.   Any guidelines on when which works better and why?


Non-EU spouse of an EU citizen - is visiting EU without needing a visa possible?

I have a relative who has an EU passport. They emigrated out of the EU many years ago and have married (in Australia) an Australian citizen. They are planning on travelling around EU/Europe later this year (just a regular holiday, not working or anything)  I know the EU relative will have no problem getting into the EU (since they are an EU citizen), and that it will (probably) be very easy for an Australian citizen to get a tourist visa for many countries.  But I have a vague idea that the spouse of an EU citizen is (legally) allowed live and work in the EU for as long as they want, right? So in theory, the spouse could never be denied a visa, or have to pay for one, right?  How would the non-EU spouse enter the EU as 'spouse-of-EU-citizen' rather than 'general-tourist'? Is this possible? Is this beneficial?


How to get the current user in ASP.NET MVC

In a forms model, I used to get the current logged-in user by:  Page.CurrentUser   How do I get the current user inside a controller class in ASP.NET MVC?


How do I export an object from blender to Unreal Engine 4 correctly?

Now even though I have an object imported in Blender and one that made myself but I can't seem to export them correctly. And how do I make scales match with those of Unreal Engine 4?


What is the difference between squaring a negative number inside and outside of parentheses?

What is the difference between: $ -3^2 $ and $ (-3)^2 $ ? I know $-3^2 = -9$ and $(-3)^2 = 9$ but I don't know why.


How to maintain widgets aspect ratio in Qt?

How is it possible to maintain widgets aspect ratio in Qt and what about centering the widget?


Proposal to encourage but not require comments when downvoting by change point values

It is pretty well common consensus on Stack Exchange that down-voting without commenting is not ideal, but shouldn't be stopped either.  This  for example, talks about the policy.  I would like to suggest a middle ground - a means of encouraging good commentary on why a down vote is being cast, but not hard-enforcing it either.  Whereas others have pointed to  or , I would suggest a simple incentive approach.  Currently, it costs a user 1 reputation to cast a downvote.  I would like to incentivize people with what they really care about - points.  The proposal is this:     Casting a downvote would cost 2 points, or only 1 point, if you leave a comment as to why.   Nothing changes for the would-be anonymous downvoter, except they get a little more expensive. The constructive comment leaver, however, is penalized less.


How can I build my own wireless charger for my cellphone?

I am designing a wireless charger for my cellphone, Where my Primary coil is energised with 1.5V and 0.3A, Where I have used a transistor to turn it on and off at a frequency of 1Mhz. In the secondary coil I got a peak to peak voltage of 32V and Vavg of 0.8V, Which I later rectified using a resistor and capacitor in parallel and I achieved a Vavg of 5.8V and the current in Microamps.  Since the current was insufficient to charge my cellphone,How can i improve the current in secondary Coil. Note: My primary coil had 40 turns Secondary coil had 20 turns.  The distance between primary and secondary coil is less than 1cm        – Schematic created using


VB equivalent code to C#; List of Strings

What is the equivalent of the following code in C#?  Dim intValidChars As New List(Of Integer)(New Integer() { Asc("0"), Asc("1"), Asc("2"), Asc("3"), Asc("4"), Asc("5"), Asc("6"), Asc("7"), Asc("8"), Asc("9"), _                                                               Asc("A"), Asc("B"), Asc("C"), Asc("D"), Asc("E"), Asc("F"), Asc("G"), Asc("H"), Asc("I"), Asc("J")})       Thanks in advance.


I am trying to make a table that is similar to this:  ...and failing. Here is my code:  \documentclass[a4paper]{article}  \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lipsum} \usepackage{multirow}  \begin{document} \begin{table}[h] \caption{This is a caption} \centering % centering table \begin{tabular}{|l| p{5cm} | p{5cm} | c|}  \hline  Domain & Sub-domain & Use case &Suitable \\ \hline % inserts single-line Metering & Water, Electricity or Gas distribution & Collect daily or bi-             hourly water, electricity and gas usage data. & Yes \\ \hline \multirow{9}{2cm}{Infrastructure networks} & Water \& Gas transportation &      Water and Gas infrastructure network surveillance (alarm, metering parameters) & Yes\\   & Power Grid & Electricity transport status monitoring and command/control & Yes \\  & Power Grid & Command and control & Yes \\  & Traffic monitoring & Traffic light functionality monitoring, traffic level      monitoring, & Yes \\ & Traffic shaping & emergency gate status control, traffic lights control &     Potentially \\ \hline  \multirow{7}{3cm}{Environmental \& Smart City} & Pipelines & Collect data on     Metrics (temperature, pressure), alarms, leakage, vibration & yes \\ & Waste and Drains management               & Collect data on levels                                            & yes \\ & Atmospheric Noise-Pollution monitoring    & Collect data on humidity,     noise, temperature,$CO_2$,CO, etc. & yes \\ & Public Lighting Monitoring & Bulb monitoring & yes \\ & Parking management & Availability monitoring & yes \\ \hline  \end{tabular} \end{table} \end{document}   Which creates this:  It's fairly close to what I want, but I can't find a way to make the horizontall lines appear wher they should. \hline creates lines that span the first row too.  Any help would be much appreciated.


How to split larger zip file into smaller chunks using linux command

I have a zip file which is size of 1gb. I have to split this zip file into smaller chunks with the zip format of size 600mb. Tried below command: split -n 600m source.zip  But output file is not in zip format. I want output file in same zip format. How i can achive this?


If it evolved, how is a feature selected through a long time span with useless function before the feature becomes complete?  For example, an eye is a very complex organ consisting of countless small features. According to evolutionism, every such small feature should be formed by evolution over long time. But most intermediate features would be useless until the small incremental features are accumulated to provide any useful function good enough to be selected by nature. How do evolutionists explain this intermediate useless features and natural selection? I would appreciate if someone doesn't direct me to another long article but provide an essential succinct explanation. (think of all the organs' intermediate state.. would they survive?)


Votes + Accepted answer not matching increase in reputation

My answer to this  got 11 up votes and answer was accepted.  So change in reputation should be ((11 * 10) + 15) = 125. But in notification it shows 115.    Is this a bug?


What to do with a question with nine downvotes?

Recently I got nine downvotes for one of my questions which I think is OK to be asked in Stack Overflow:    The question is on hold, and it got downvoted even after being on hold.  Is there a way that I can delete that question or should it be removed from Stack Overflow?  Note:   It's quite embarrassing for ones` profile to have a question with 9 downvotes. :( I learnt the lesson. I'll improve my future questions. :/   Update:  One of the  of a similar question states:     Once you get eight downvotes, you pretty much disappear (edits won't bounce you to the front page).   I'm not sure how true this statement is. But if it is true, even if I edit my question, it won't show up to the front page so no one will see the edit and no one will upvote and the question will always have downvotes.


After I have let store bought frozen roll dough rise can I refrigerate to cook later! Thanks


HTML allow only number without dot (.) in

HTML <input type="number" required="" pattern="\d*" id="mobile">  jQuery var letters = /^[0-9]+$/; var mobile_backup=""; $(document).ready(function(){     $("#mobile").on("input", function(){         var mobile_value=$(this).val();         if(mobile_value==="")         {             mobile_backup=mobile_value;         }         else if(mobile_value.match(letters)===null){             $(this).val(mobile_backup);         }         else{             mobile_backup=mobile_value;         }     }); });  Current solution works in all devices (desktop, mobile, tablet). Is there any efficient approach available such that it works in all devices? I know I can use a pattern for number. But I don't want an alert. I just want to allow the numbers without a dot.


Why using fewer terms of Taylor series doesn't give $0/0$ but gives a wrong answer?

I was reading a Calculus book and I saw this problem which looks easy: $$\lim _{x \rightarrow 0} \frac{2 x \cos x- \sin 2x}{x^3} = ?$$ It's a 0/0 limit and it's using some of the Taylor series of $\sin$ and $\cos$ expressions to solve the problem. I know that the First and Second way should be correct because it's using more expressions of the Taylor series around 0. What I can't figure out is WHY using fewer expressions of the Taylor series in the Third way doesn't give 0/0 but gives a wrong answer? First way: $$\lim _{x \rightarrow 0} \frac{2 x \cos x-2 \sin x \cos x}{x^3}=\lim _{x \rightarrow 0} \frac{2 \cos x(x-\sin x)}{x^3}=\lim _{x \rightarrow 0} \frac{2 \cos x\left(x-x+\frac{x^3}{6}\right)}{x^3}=\lim _{x \rightarrow 0} \frac{2 \cos x\left(\frac{x^3}{6}\right)}{x^3}=\frac{1}{3}$$ Second way: $$\lim _{x \rightarrow 0} \frac{2x(1-\frac{x^2}{2})-(2x-\frac{8x^3}{6})}{x^3}=\lim _{x \rightarrow 0} \frac{2x-x^3-2x+\frac{8x^3}{6}}{x^3}=\lim _{x \rightarrow 0} \frac{\frac{x^3}{3}}{x^3}=\frac{1}{3}$$ Third way: $$\lim _{x \rightarrow 0} \frac{2 x \cos x- \sin 2x}{x^3} =\lim _{x \rightarrow 0} \frac{2 x \cos x-2x}{x^3}=\lim _{x \rightarrow 0} \frac{2x(\cos x -1)}{x^3}=\lim _{x \rightarrow 0} \frac{2x(-\frac{x^2}{2})}{x^3}=-1$$


What is a good way to transform Cyclic Ordinal attributes?

I am having 'hour' field as my attribute, but it takes a cyclic values. How could I transform the feature to preserve the information like '23' and '0' hour are close not far.   One way I could think is to do transformation: min(h, 23-h)  Input: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]  Output: [0 1 2 3 4 5 6 7 8 9 10 11 11 10 9 8 7 6 5 4 3 2 1]   Is there any standard to handle such attributes?  Update: I will be using superviseed learning, to train random forest classifier!


Expected value of a function of a random variable

Let X be a random variable whose PDF is $f(x)$, and $g$ a function of random variable X. I want to prove that $$E[g(X)] = \int{g(x)f(x)dx} $$ I've perfectly understood it in discrete case and I managed to prove also for continous case when $g$ is an increasing function. What is a formal proof for this formula? And what is a good intuition for it?


Does using thorn whip to pull an enemy who is grappling an ally break their grapple on that ally?

Assuming two medium humanoid types with 5ft reach are the grappler/grappled and the thorn whip pulls the grappler 10ft against their will towards the caster. Does this satisfy the conditions to end a grapple per the final point of the grappled condition, quoted below:     The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell.


How do I change the default wifi network that Ubuntu connects to on startup? There is an unsecured public wifi network in my range, as well as my own home WPA secured wifi that I want to use by default. However, on startup Ubuntu always connects to the unsecured one. Sometimes I forget to reconnect to the other one, which is very dangerous.   I am running a default setup of Ubuntu Destkop 11.10 with Gnome 3. I have looked under network settings but I can't find a 'default' option.


Today I installed elementary OS over lubuntu on my laptop While asking fo the partion to choose I chose remove all data of all os by accident and after Installation I had only one partition of 156gb(that is the size of hdd). Out of that 146.7 gb was free.  All my data on that disk is lost. Is there any way of recovering that data . I only want to recover the photos that resided on my disk (may be around 3-4 gb) as I don't have any backup. Please anyone help me in recoveing my data . Thanks in advance.


Dismiss inbox item when I've already seen it another way

It looks obvious that if I've already seen an item in inbox without opening the inbox proper, the notification should be dismissed since it's of no use anymore. (if it's not obvious to you, please specify)  The main question is: what reliable technical ways to determine that I have read the corresponding item you can think of?  As of this writing, I've come with these:   Clicked on the link "load N more comments" if the item is among them Clicked on "the post has been edited" for an edit notification


I was reviewing Low Quality Posts today and saw this message. Is this something new?     This post doesn't cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.


I've created a design in Photoshop CS6, and used a large number of smarts object which made the workflow more easy (at least for me). Now I've finished working on the design, and I want to "unsmart" all the objects due to the large file size of the PSD. I do not want to do Rasterize Layer because I want to keep every layer which was originally on the Smart Object. I want to convert each smart object (some of them have Layer Styles applied) to a group (folder) which will have all the layers inside + the FX applied originally to the Smart Object and it will be in the exact location of where the smart object was before. I couldn't find anything about this in the internet. Also, some of the smart objects has inner smart objects inside of them. I don't mind doing this manually, but to copy & paste every layer in smart object is very annoying way, because I must scale and transform the layers pasted.


Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How can I find out who is accessing particular file??


Why does HashMap seem to use reference variables instead of true values?

I have a snippet of code (below) that when run, will (ideally) fill an app array to look something like this:  Header 1:  App 1  App 2  Header 2:  App 3  App 4  etc.  However, when I run it in my emulator, it produces this:  Header 1:  App 1  App 2  App 3  App 4  ...  Header 2:  App 1  ...  I'm not sure why this happens, as I have looked up the defaults and everywhere I look, people say that Java defaults to passing by value, not by reference. If this is true, how come it adds every app to every category?  Preconditions:  Store is defined as a list of class "App", each element containing a header and title, among other things.  ListDataChild is an empty hashmap, with types > to be filled by the loop and then outputted via an expandable list view. I would post the code for the view, but it is very bulky and long so I'll just add a simple testing algorithm at the end.  EmptyList is just that, a list of type  that has nothing inside (at least to begin with? Could it be changing?)  Code:      listDataChild = new HashMap<String, List<App>>();      List<App> emptylist = new ArrayList<>();     List<App> Store = synced.getAppStore();      Boolean juststarted = true;      for (App el : Store)     {         if (juststarted)         {             juststarted = false;             listDataChild.put(el.getHeader(), emptylist);             listDataChild.get(el.getHeader()).add(el);         } else {             if (listDataChild.containsKey(el.getHeader())) {                 listDataChild.get(el.getHeader()).add(el);             } else {                 listDataChild.put(el.getHeader(), emptylist);                 listDataChild.get(el.getHeader()).add(el);             }         }     }     //TESTING     for (String header : listDataChild.keySet())     {         for (int j = 0; j < listDataChild.get(header).size(); j++)         {             System.out.println("HashMap at " + header + ", " + j + ": " + listDataChild.get(header).get(j).getTitle());         }     }   App.Java:  public class App {     public String header,title,link,url,redirect,icon;     public Double order;     public Boolean selected;      public App() {         header = "";         title = "";         link = "";         url = "";         redirect = "";         icon = "";         order = 0.0;         selected = false;     }      public int compareTo(App another) {         if (this.getOrder()<another.getOrder()){             return -1;         }else{             return 1;         }     }      public void setHeader(String h) {         header = h;         return;     }      public void setTitle(String t) {         title = t;         return;     }      public void setLink(String l) {         link = l;         return;     }      public void setUrl(String u) {         url = u;         return;     }      public void setRedirect(String r) {         redirect = r;         return;     }      public void setIcon(String i) {         icon = i;         return;     }      public void setOrder(Double o) {         order = o;         return;     }      public void setSelected(Boolean s) {         selected = s;         return;     }             public String getTitle()     {         return title;     }      public String getHeader()     {         return header;     }      public Double getOrder()     {         return order;     }   }   Thanks in advance!


What are the minimum hardware specifications for Android?

As per the title, what hardware do I need to be able to run various versions of Android?


I put a frozen beef roast (about 2 lbs) in the crockpot with some sherry and onions, but forgot to turn the crock pot on.  The lid was on, and when I got home about 6 hours later the roast was still mostly frozen (I could only get a fork into about ¼ to ½ an inch) and the outside of it still felt very cold.  I immediately put the whole crock pot in the fridge and I'm wondering if I can cook the roast today, or if I need to toss it.    Thanks!


Print a specific Views Block in twig template

So, I created a block using Views and I´m trying to call it from a template.  mytheme.theme file has:  function mytheme_preprocess_node(&$variables) { $variables['block1'] = entity_load('block', $id)->getPlugin()->build();  }   template-of-my-page.html.twig file has:  {{ block1 }}   But I don't see any results....  I bet I'm doing something wrong, I'm not a programmer, should I add the machine name? Am I calling it wrong on Twig?  If anybody could give me a guide on how to call a block made with Views I would really appreciate it.  Please consider I'm not a programmer but I can follow instructions very well :)


How to install Chrome for just the current user?

How can i install Chrome for just myself?  Background  By default, the Chrome installer will attempt to elevate, and install two system-wide services, as well as scheduled tasks. i need to run Chrome on a server that is not my own.   i don't want any Chrome footprint to exist outside of my user profile; and definitely not install any global services.  How can i have Chrome only for the local user?    Google does provide a      If you're downloading Chrome for your own user account only, use this installer:  »   But this "standalone" installer also installs two services.  This is complicated by the fact that this is a Windows Server 2008 R2 machine, with UAC disabled. If UAC were enabled, and Google's installed tried to elevate, i would deny it.  Although, i know from experience, that if the current user could elevate, it will refuse to install. If the current user is a standard user (i.e. is already running at the highestAvailable) it will install just for that user.  But this is not my server; i cannot change the global UAC settings. Even if decided i should change it, it server needs a restart before the new UAC setting takes effect. And the hundreds of users of the web-server would not appreciate it.  How can i install Chrome for just me?


I want to install Ubuntu 14.04 on a USB Hard Drive from my USB stick. So I went through a few similar questions on the website. However, I have a few special requirements.   I don't want any changes to be done to my C or D drive. I want to set aside 50-100 GB on my External HDD completely dedicated to Ubuntu and all of its needs, including storage. The rest 900-950 GB (on a 1TB drive) need to be used for different purposes, along with Windows. So the two "sections" should not interfere with each other in any way.   So in short, I don't want to change my C and D drive. I want Ubuntu to stay confined to the dedicated 50-100 GB on the External USB HDD, and not mess with the rest of the space.  Also, I know nothing, absolutely nothing about Ubuntu. It is an OS I want to try out. So step by step instructions would really be appreciated.   Is this even possible? Can my computer boot from a USB device with an OS as well as other stuff not related at all to the OS? I'm really confused.  Oh and BTW I don't want Windows to be harmed in any way. It should be such that I can boot either from Windows or from Ubuntu depending on my choice.


British Olympiad; Combinatorics Recursion

Isaac is planning a nine-day holiday. Every day he will go surfing,   or water skiing, or he will rest. On any given day he does just one of   these three things. He never does different water-sports on consecutive   days. How many schedules are possible for the holiday?   $A$ is surfing, $B$ is water-skiing and $C$ is resting.  Three cases, case 1, week begins with $A$, case 2, week begins with $B$ and case 3, week begins with $C$. Then the total possible weeks by $x(n)$ is:  $$x(n) = a(n) + b(n) + c(n)$$  Where $a(n)$ is the sequence with beginning $A$ etc...  Lets look at case 1 first.  Because it is $A$ _ _ _ _ _ _ _ _,  $$a(n) = c(n-1) + a(n-1)$$  But I cant get rid of $a$, which is the goal. What should I do?


Could I play forever with this loop combination?

Let it be my main phase: I got  on the field and one  in my graveyard and another one in my hand.  Could I then play forever? Because I would never run out of cards, so these  would never apply, right?   MTG Arena: If I continue to do this combo over and over again, would at some point my timer start to run out?


Attention: some of your recent flags have been declined - please review them before flagging this post!

I just got this warning when trying to flag a post:     Attention: some of your recent flags have been declined - please    them before flagging this post!   but I dont get this. When I click on the link, I see all my recent flags as helpful or pending. Also in total I have 5 declined flags of 252 total flags.  I've read this question before of course:    and the answer is:      The warning is triggered when at least 10% of the flags you've raised,   processed in the past 7 days, have been declined.   Al though I have no declined flags in the past 7 days.  My last declined flag was on March 23rd. That's longer than 7 days ago and it's also not 10% of my flags.  What am I doing wrong?


My teacher recently gave me this question - she said when I got bored you can do this, and then she literally took a piece of paper and wrote this. " Prove that 'an an-1 an-2... a3 a2 a1' is divisible by 3, if and only if 'an an-1 an-2... a2 a1' is.  E.g. -  123 is divisible by 3 only because 1+2+3 = 6 and 6 is divisible by 3."  Someone please help me solve this.


Solve $\cos^{n}x-\sin^{n}x=1$ with $n\in \mathbb{N}$.

Solve $\cos^{n}x-\sin^{n}x=1$ with $n\in \mathbb{N}$  I have no idea how to deal with this crazy question. One idea came into my mine is factorization, but I can't go on... Can anyone help me please? Thank you.


Proof via induction $1\cdot3 + 2\cdot4 + 3\cdot5 + \cdots + n(n+2) = \frac{n(n+1)(2n+7)}{6}$

(b) Prove that for every integer $n \ge 1$, $$1\cdot3 + 2\cdot4 + 3\cdot5 + \cdots + n(n+2) = \frac{n(n+1)(2n+7)}{6}$$  This is the second part of a two part question.  Part (a) was the following:  Write the sum: $1\cdot3 + 2\cdot4 + 3\cdot5 + \cdots + n(n+2)$ using summation notation.   It was simple enough :  $\sum  k(k+2)$.  For this question, the base case $(n=1)$ holds, as $1\cdot(1+2) = 3 = (1\cdot2\cdot9)/6$.  Induction step: Assume the above holds for all $n = k$, prove that it holds for all $n = k+1$  I'm a bit lost from here, help?


New install - no network devices available - Realtek Device b822

I just purchased a Lenovo Yoga 730 15" laptop, and installed Ubuntu 16.04 in place of Windows 10. Install seemingly worked fine, but now I have no wifi device available.  Tried a reinstall just to be sure, and the same issue is happening. I don't believe it to be a hardware issue, as wifi was working without issue on Windows before I wiped it out.  When I run rfkill list I see:  0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: no   But when I run lspci I only see one item in the list claiming to be a network device:  3a:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b822 (rev ff)   I have a USB wifi adapter and that gets me connected without issue, but obviously that is not the desired solution.  Does anyone have any insight on what might be causing the issue?  Output from modinfo -p rtl8822be:  fix_rate: (int) debug_level: (int) swenc:Set to 1 for software crypto (default 0) (bool) ips:Set to 0 to not use link power save (default 1) (bool) swlps:Set to 1 to use SW control power save (default 0) (bool) fwlps:Set to 1 to use FW control power save (default 1) (bool) msi:Set to 1 to use MSI interrupts mode (default 1) (bool) dma64:Set to 1 to use DMA 64 (default 0) (bool) aspm:Set to 1 to enable ASPM (default 1) (int) debug:Set debug level (0-5) (default 0) debug_mask:Set debug mask (default 0) (ullong) disable_watchdog:Set to 1 to disable the watchdog (default 0) (bool)


Question about probability? World Population - (Question Revised)

The world population is ~7 billion  Social Classes:   x: Top .001% is ~70,000 y: Second .01% is ~700,000 z: Next .1% is ~7 million r: Rest 99.9% is ~6,993,000,000 (billion) p: population ~7,000,000,000   The odds of 1 person in the Rest grp meeting 1 person from the Top  grp is it approx: 1 in 100,000 meets?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp? is it: 1 in 100,000^2 or 1 in 10,000,000,000?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp on the same year?   (Assuming in a lifetime of 100 years.)


Rep changes from Meta don't appear in iOS app?

Comments on my Meta SO posts are showing up in the iOS app:    But this comment was on a post I recently made which has (as of writing) 5 upvotes. I wasn't notified of those votes:    Shouldn't the votes / rep changes appear here?


High CPU usage when idle - System and System interrupts

I've been trying to find a solution for a while and decided to ask here for more help. I've noticed that my CPU usage is pretty high when idle, even after a cold reboot of the computer:  Task Manager View showing "System" and "System interrupts" causing a high CPU load:   I've tried to dig deeper and used Processor Explorer to get more information, which, strangely enough, shows that "System interrupts" uses up more % of the CPU than the "System" process:  Process Explorer showing that "Interrupts" is taking up 20% of the CPU load:   Next I've tried to narrow down the causes of the interrupts by using the Windows Performance Recorder and analyze the graph using the Windows Performance Analyzer (can't post the screenshot due to not having enough rep, but it looks like hal.dll is causing the most interrupts, but less than the 20% seen with Process Explorer)  Any suggestions how to proceed?  Information about my computer:   Windows 10 Intel Core i5-4790k AMD R390 GPU 8 GB Ram   I've updated the GPU and sound drivers and Windows is up to date.


How to take screenshots without using buttons?

My android phone has weak buttons, so I don't use them frequently. I even change my volume from the settings!  But to take a screenshot, I need to press the volume down button and the power button. I have a Motorola Moto E4 Plus running Android 7.1.1.  Is there any other way to take screenshots? I don't want to root my phone.  NOTE: This question is not a duplicate as this is asking specifically without buttons and so helps those who can not use their physical buttons.


Close Queue Etiquette: Accepted Answers and "Too Broad" and "Unclear what you're asking" Questions

Recently, during our whole push to burn down the close queue, I came around a good load of questions that were flagged for "Too broad" or "Unclear what you're asking" - but also already answered and had accepted an answer.  While I could generally still see that the question was either too broad for our format or not really clear, I wonder what the general consensus is here? It might be a bit too broad for our minds, but somebody else could and has answered it successfully?   Sorry if this is a well establish thing - but I couldn't find any info on it.


What is Realms and why can't I connect to it?

What does "Play On Realms" mean? Does it need an Internet connection?  How can we play Realms? It asked me to sign up but when I did it said "Unable To Connect World."


How to prove that $q+1$ divides $q^k - 1$ for $k \in 2 \mathbb N$

I have to prove that if $k \in 2 \mathbb N $ every $q+1$ divides $q^k-1$ and I really have trouble understanding how to do this.


Cannot sort on numeric field with SOQL in Custom Metadata

Cannot sort on a soql-request in a custom meta data type. When i perform SELECT .. FROM x__mdt WHERE ... ORDER BY x. Then field x cannot be numeric to get a correct order. Change it to a string-field ordering works ok. Playing with ASC/DESC makes no difference!


Automatically open ICS files in Google Calendar

Lots of web sites have an option to export events as an ICS file that can then be imported into a desktop or web-based calendar (for example if you're invited to a Facebook event there will be an export button that gives you an ICS file).  By default in Firefox 3.5 on Vista I'm only offered three options here "Open with Windows Calendar", "Open with Other" or "Save File", so what I'd do is save the file onto my PC, and then log into Google Calendar and import that ICS file.  What I'd like is to have an "Open with Google Calendar" or "Import to Google Calendar" type option when I click the Export link.   I know that you can , and I've got the  extension installed that will detect hCalendar microformat entries embedded in the text and offer to import them to Google Calendar, but I can't work out how to configure either of these to do what I need.  Preferably I'd do this without installing any additional software, and in a way that will work with a Google Apps account (but if someone can point toward a solution for normal Google Calendar's that would be a good start).


Do Maxwell's Equations overdetermine the electric and magnetic fields?

specify two vector and two scalar (differential) equations. That implies 8 components in the equations. But between vector fields $\vec{E}=(E_x,E_y,E_z)$ and $\vec{B}=(B_x,B_y,B_z)$, there are only 6 unknowns. So we have 8 equations for 6 unknowns. Why isn't this a problem?  As far as I know, the answer is basically because the equations aren't actually independent but I've never found a clear explanation. Perhaps the right direction is in  on arXiv.  Apologies if this is a repost. I found some discussions on PhysicsForums but no similar question here.


I recently installed Ubuntu 20.04 and am having a problem. In my ~/.profile, I have export BASE='$HOME/git'. When I run cd $BASE, I get an error saying bash: cd: $HOME/git: No such file or directory. However, the directory does exist and whenever I run cd $HOME/git, it works. Why can't I cd $BASE?


list=[endpoint.av.GrisoftAV.activescan,endpoint.as.KasperskyAS.activescan, endpoint.fw.ATTFW.description, endpoint.av["360SafeAV"].activescan, endpoint.av["H+BEDV"].description]   I need to build a regex to extract the values in third octet  The output needs to be:  GrisoftAV KasperskyAS ATTFW 360SafeAV H+BEDV


In all electronic devices with the possibility of saving there are tiny magnets that can store your data by the state they are in. In general, there has to be something changed to store information and independent observer should be (theoretically) able to read all the stored information just from one state of brain.  I think keeping some signal in circuit would be really nutrition expensive (through the ion pumps that create the electro-chemical gradients).  So how does a brain store the information?


Reccurence sequence, compute $\lim_{n\to \infty}\frac{2^n}{x_n}$

Let the sequence $(x_n)$ with $x_1=1$, $x_{n+1}=x_n+\sqrt{x_n^2+1}$, for all $n\ge 1$. Compute $$\lim_{n\to \infty}\frac{2^n}{x_n}.$$ My idea: It is easy to check that the sequence $(x_n)$ satisfies $x_n>0, \forall n\ge 1$, then $x_{n+1}>2x_n$. Thus $\frac{2^n}{x_n}>\frac{2^{n+1}}{x_{n+1}}, \forall n\ge 1$, so the sequence $\left(\frac{2^n}{x_n}\right)$ is decreasing. Since it is obviously bounded by $0$, by Weierstrass's Theorem it follows that the sequence $\left(\frac{2^n}{x_n}\right)$ is convergent. However, I couldn't find the limit's value. Please help me! Thank you!


To prove $\sum_{d|n}\phi(d)=n$. What is the easiest proof for this to tell my first year undergraduate junior. I do not want any Mobius inversion etc only elementry proof. Tthanks!


I received java.lang.NullPointerException in IntelliJ IDEA and TomCat

I use TomCat 8.0 server, h2 database and IntelliJ IDEA 14 for my WebApplication, but when I run app(button event) I receive      java.lang.NullPointerException    I have successful connection to Database like this(it's already tested):   public class DbConnection { private static final String DRIVER = "org.h2.Driver"; private static final String URL = "jdbc:h2:tcp://localhost/~/Students"; private static final String USER_NAME = "doncho"; private static final String PASS = ""; private static DbConnection instance; private static Connection conn;  private DbConnection(){  }  public static DbConnection getInstance(){     if(instance == null){         instance = new DbConnection();     }     return instance; }  public Connection getConnect() throws SQLException{     Connect();     return conn; }  private void Connect() throws SQLException {     if (conn == null) {         try {             Class.forName(DRIVER);         } catch (ClassNotFoundException e) {             System.out.println("Driver isn't found");             e.printStackTrace();         }         DriverManager.getConnection(URL, USER_NAME, PASS);     } }  public void Disconnect() throws SQLException{     if(conn != null){         conn.close();         conn=null;     } }   I have create class RegisterDao which must insert data into table with name "Name" and just one column - "name"  public class RegisterDAO {  Connection conn = null; PreparedStatement state = null;  public StudentBean registerStudent(String userName) throws SQLException{      StudentBean result = null;     String sql = "INSERT INTO Name VALUES(?)";      try {         conn = DbConnection.getInstance().getConnect();         state = conn.prepareStatement(sql);         state.setString(1, userName);         state.execute();     } catch (SQLException e) {         e.printStackTrace();     }finally {         if(state != null){             state.close();         }     }    DbConnection.getInstance().Disconnect();     return result; }}   And this is my class (java bean) StudentBean  @javax.ejb.Stateless(name = "StudentEJB") public class StudentBean {  private String name;   public StudentBean() { }  public String getName() {     return name; } public void setName(String name) {     this.name = name; }}   I use thеsе classes to insert data in table "Name" through servlet - RegisterServlet  public class RegisterServlet extends HttpServlet {  protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     try {         Connection conn = DbConnection.getInstance().getConnect();         System.out.println("It Works");     } catch (SQLException e) {         e.printStackTrace();     }      String username = request.getParameter("usernameReg");     StudentBean student;     try {         student = new RegisterDAO().registerStudent(username);         request.getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);     } catch (SQLException e) {         e.printStackTrace();     }      try {         DbConnection.getInstance().Disconnect();     } catch (SQLException e) {         e.printStackTrace();     } }}   But I get the upper error. I am confused because I tested source in Eclipse and there it works, but in IntelliJ it doesn't. I'm new in IntelliJ so I hope that some with more experience will give me an idea to resolve the problem.  P.S. System.out.println("It Works"); from servlet works and I guarantee that I call servlet into "index.jsp" correct.  Sorry for this long post and best regards, D.Balamjiev.


How to open new tab in existing terminal instead of new terminal instance?

When pressing Ctrl-Alt-T in Ubuntu 18.04, a new terminal instance is opened. Is there a way to tweak the shortcut so if a terminal instance is already opened, then it just gets focused and a new tab is opened?  I'm tired of having 100 terminals opened because of my Ctrl-Alt-T habit.  I'm using hyper terminal, but something working with gnome-terminal would be a good start!


Why @class DataViewController in ModelController.h?

I have created a page based application.  What @class DataViewController  means in ModelController.h ? Why #import "DataViewController.h" in ModelController.m is not enough ?  #import <UIKit/UIKit.h>  @class DataViewController;  @interface ModelController : NSObject <UIPageViewControllerDataSource>  - (DataViewController *)viewControllerAtIndex:(NSUInteger)index storyboard:(UIStoryboard *)storyboard; - (NSUInteger)indexOfViewController:(DataViewController *)viewController;  @end


Calculating distance between consecutive points using ArcGIS Desktop?

I am not able to get the answer to the question below to work for me using the information provided:    Could someone post a screenshot?   I am using 10.0 but have access to 10.4.  I just tried running it in 10.0 and received the following error message: "There was a failure during processing, check the geoprocessing results window for details."   The info. in the geoprocessing window doesn't mean anything to me.  I am heading to work and will run it again on 10.4.    Error message from 10.4:    the multi-line text you entered in the "YEAR =" edit box when switching to Advanced mod. if this is a vb/a script, you need to select, cut and past the text from this edit box to the pre-logic edit box  I couldn't figure out how to attach an image.  this site is confusing.  I must be missing something. I have tried this with different point shapefiles in both 10.0 and 10.4.  I have tried it with the field as text and numeral.  I really need to figure this out!


How to switch between applications in current workspace only in gnome-shell?

In unity, I used to configure in ccsm. How do I do it in gnome-shell?


Opening a question that answer another question

I got my question closed ( I don't agree with the reason - but was flagged as "off-topic" because not enough details supplied by me)  Now -after much research - I have great answer I want to contribute back to the community - including details and examples - but the question is closed - I can't answer myself.  Tried to contact few people that voted to close it - none replied.  Is it ok to Post a new question that describe the problem - and answer it self, and flag it as an answer?


Aura Integration Error when installing unmanaged package

I've uploaded unmanaged private package from sandbox and trying to install the  package in developer edition but getting below error.  Aura Integration Error Service Error[{"message":"An internal server error has occured Error Id:174082486-26226(1182032983)"]   Its been more than 2 hrs that I've uploaded the unmanaged private package.  Url of Package is  ""  I've replaced "test" with "Login" from the above url before installing the package in the developer edition  Looks like some known issue. Here is the link


Understanding the length extension attack

I have been trying to understand exactly how a length extension attack works on SHA-1. I'll detail below what I've understood so far, so that I can convey my understanding of the same and hopefully get advice on where I'm going wrong.  Lets assume that for a message $m$, a secret $s$ is appended to it and the SHA-1 hash is calculated. If $\textrm{len}(m) + \textrm{len}(s)$ is not a multiple of the block size, a certain amount of padding is added to it to make it a multiple, and the hash is generated using what is essentially $s || m || \textrm{padding}$.  Now SHA-1 internally uses 5 registers — it takes in an block, generates new register values, turns the crank, takes in another block, generates new register values, turns the crank ... and so on till the end. When all blocks are exhausted, the register values are concatenated and spit out.  Assume that an attacker knows a certain value of $m$, for which he also knows the hashed key. In such a case, he knows the state of the 5 registers when $(s || m || \textrm{padding}$ was processed. Lets also assume that the attacker knows the length of $s$, so that he can predict how much padding was added.  Here is where I get confused. From what I've read so far, the attack involves taking the known hash, adding a certain amount of padding and then the value that we want. However, isn't the padding already used up in creating the hash? Why are we using padding in our attack?


I've just removed the mantle of my back tire as it has a hole (probably cut by glass). I wanted to look for a new one, but then I realized that I'm not even certain which size it is.  So I looked on the old mantle and found more numbers than I thought:  vtech EAGLE 42-622 700x42C <MDS> (Max durability System)    700 - 42 (42-622)   NL F024   17   I guess vtech EAGLE is the brand / model name, MDS is just some advertisment. But what do the numbers mean?  (Side question: Living in Germany and biking mainly / only in the city, where and for which mantle should I look?)


How to I extract a list of items between curly brackets {} in a string?

I have character strings like   str1 <- "Hello {can you please} {extract this}"   I need to extract "can you please" and "extract" this as a list with regex.  How can I do it?


Please provide a Moderators table in the Data Explorer

Moderators are special, privileged users who should serve as an example to the rest of us.  Therefore, it is natural to want to query behaviors and statistics about these model users, Like I did, for example, when researching . Unfortunately, there is no way to determine moderators in the SEDE data set!  We are left with hand-coding the current mods like in .  This is hardly a good solution and does not port if we want to quickly switch the query from, say, SO to Super User. Please provide a Moderators table, listing the ID's of that site's moderators. (Or, alternatively, add a flag-column to the Users table, but this would be less efficient.) As nhinkle notes, .  Please add it to SEDE, as well.    For reference, the identities of the mods is by no means secret -- being posted on each site's . It's just very clunky to get this list inside a query.  Currently, you can kludge a list of moderators by navigating to an About page and executing this javascript: $("#mainbar-full div.content-page div a[href*='/users/']").map ( function () {     return parseInt (this.href.replace (/.+\/users\/(\d+)\/.+$/, "$1"), 10); } ).get ();  Alternatively, parse the return from .


I'm stuck on a question:  Let $\sigma > 0$; $a_1 > 0$; and $a_{n+1} = 1/2*[a_{n}+(σ/a_{n})]$, where $n = 1,2,\ldots$  How do we prove that the limit n → ∞ a{n} exists and how do we find it?  I mean, there's no solid number given in the question, so how does one tackle this type of question?  I have a hunch on the use of mathematical induction to prove that a{n} is monotonic, followed by the application of the monotone convergence theorem, however I'm stuck because of the variable σ which I don't exactly know how to deal with. Am i going in the right direction? Any help on this would be appreciated


Post Endgame, how is the flow of time different?

The Ancient One explains:      "The Infinity Stones create what you experience as the flow of time, remove one of the stones and that flow splits."   As we know, post Avengers: Endgame,       (all instances of) the Infinity Stones are destroyed (see this question: )   What does this mean for the flow of time? In particular,       does this mean the rules of time travel are different in the MCU depending on whether you travel to before the destruction of the stones in 2018, or after?


Double tennis serve hits opponent purposely

From the video , we can see that the serve has given a point. I wonder if they revenge back by serving the tennis ball back by hitting the player, and make the whole game like dodgeball. What would happen after all?


How do I calibrate the diopter correction on my DSLR's viewfinder?

The viewfinder on my camera has diopter correction, but is there a "correct" way to set it up? In the past I've just allowed the camera to auto-focus on a distant point, and then make sure that is as sharp as possible, but this seems to be prone to error, and reliant on the auto focus of the lens. Is there a better way?


properties on javascript protoype verses on object what's the difference?

Take this example:   var personPrototype = {   firstName: '',  lastName: '',   getFullname: function() {      return this.firstName + ' : ' + this.lastName;    }  }   Person = {  };  function newPerson(firstName, lastName) {      var Person = function(firstName, lastName) {        this.firstName = firstName;        this.lastName = lastName;      }     Person.prototype = personPrototype;     return new Person(firstName, lastName); }  var p1 = newPerson('someone', 'else'); var p2 = newPerson('john', 'doe'); console.log(p1.getFullname()); console.log(p2.getFullname());   Moving the firstName and lastName from the personPrototype to the Person yields the same results. Does that mean that there is no difference between the two, or am I overlooking something?


Trouble with the listings package command \lstnewenvironment

Consider the following example:  \documentclass[oneside,article]{memoir} \usepackage{listings} \usepackage[lining]{ebgaramond} \usepackage[cmintegrals,cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage{fontspec} \usepackage{color}  \lstnewenvironment{Rlisting} {    \vskip 1\baselineskip   \noindent      \checkoddpage%    \ifoddpage%      \hspace*{-3em}%   \else%      \hspace*{-3em}%   \fi%   \begin{minipage}{1\textwidth + 6em}   \lstset{ language=R,             basicstyle=\footnotesize\ttfamily,             frame=single,            breaklines=true,            postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},           } } {      \end{minipage}     \vskip 1\baselineskip }  \begin{document} \begin{Rlisting} > library(xlsx) Loading required package: rJava Loading required package: xlsxjars \end{Rlisting}  \end{document}   As I try to compile this, my compiler just get's totally stuck in some really strange mode:  $ latexmk -pdf -pvc -lualatex test.tex Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c. Viewing pdf Latexmk: applying rule 'lualatex'... Rule 'lualatex': File changes, etc:    Non-existent destination files:       'test.pdf' ------------ Run number 1 of rule 'lualatex' ------------ ------------ Running 'lualatex  -recorder  "test.tex"' ------------ This is LuaTeX, Version 1.0.4 (TeX Live 2017)   [...]  LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <5.5> not available (Font)              size <5> substituted on input line 32.  (load luc: /Users/jonathan/Library/texlive/2017/texmf-var/luatex-cache/generic/ fonts/otl/lmmonolt10-bold.luc)) *   I seem to be stuck in a strange mode. I can't even access the normal help things but first have to break out using Ctrl + C and Enter. Can someone tell me what is going on here and how I can fix it?


I run the following code in the anonymous apex window. As you can see the accounts variable was declared inside an IF block. I output a debug outside of the IF block and the heap size was still showing the same number as it was inside the IF block. My questions are:  Why was the heap size not 'cleared' even though the accounts variable was not accessible anymore beyond the IF block? Why is the "Maximum heap size" limit shown as 0? Is setting the variable as null (to reduce the heap size?) a best practise?  System.debug(Limits.getHeapSize()); if (true) {     List<Account> accounts = [SELECT Name FROM Account];     System.debug(Limits.getHeapSize()); } // System.debug(accounts);  Variable does not exist: accounts System.debug(Limits.getHeapSize());   This is the output: |USER_DEBUG|[1]|DEBUG|1047 |USER_DEBUG|[4]|DEBUG|4346177 |USER_DEBUG|[7]|DEBUG|4346177 |LIMIT_USAGE_FOR_NS|(default)|   Maximum heap size: 0 out of 6000000  Notice that the heap size is still the same as previous (inside the IF block). If I set the accounts variable to null, the heap size is going back to close to the original size: System.debug(Limits.getHeapSize()); if (true) {     List<Account> accounts = [SELECT Name FROM Account];     System.debug(Limits.getHeapSize());     accounts = null; } System.debug(Limits.getHeapSize());   Output: |USER_DEBUG|[1]|DEBUG|1049 |USER_DEBUG|[4]|DEBUG|4346177 |USER_DEBUG|[7]|DEBUG|1061 Maximum heap size: 0 out of 6000000  Thanks.


Does "turning down the air conditioning" make it warmer or colder?

As the title says, I've heard two possible meanings for turning down the air conditioning: It could mean set the target temperature lower (i.e. colder) or make it work less (i.e. warmer).  Turning down the heat makes it colder, but both meanings are in agreement there.


I recently read somewhere a single word that described a person who enjoyed an argument - in the sense of a lively debate. It may have been a word implying a positive or neutral context but I don't think it was negative or derogatory.  A complex word (uncommon in colloquial use), medium length (7-8 letters), possibly ending in -ic. One or more of these points may be a false memory.  Any ideas?


Why does:   $$ \sum_{k=0}^{n} k \binom nk p^k (1-p)^{n-k} = np $$ ? Taking the derivative of:   $$ \sum_{k=0}^{n}  \binom nk p^k (1-p)^{n-k} = (1 + [1-P])^n = 1 $$   does not seem useful, since you would get zero. And induction hasn't yet worked for me, since – during the inductive step – I am unable to prove that:   $$ \sum_{k=0}^{n+1} k \binom {n+1}{k} p^k (1-p)^{n+1-k} = (n+1)p  $$   assuming that:   $$ \sum_{k=0}^{n} k \binom {n}{k} p^k (1-p)^{n-k} = np  $$


How can I update a record the same as another record in the same table?

I have a table like this:  // names +----+-------+ | id |  name | +----+-------+ | 1  | jack  | | 2  |       | +----+-------+   And here is the expected result:  // names +----+-------+ | id |  name | +----+-------+ | 1  | jack  | | 2  | jack  | +----+-------+     And here is my query:  update names set name = ( select name from names where id = 1 ) where id = 2   But it throws:     ERROR 1093 (HY000): You can't specify target table 'names' for update in FROM clause   How can I do that?


Cannot add items to ArrayList, get nullpointer exception nested for loop needed

import java.util.*;   public class Main {      //This method is complete. Do not change it.     public static void main(String[] args) {         Random r = new Random();         r.setSeed(System.currentTimeMillis());         int n = r.nextInt(6) + 1;         List[]a = new ArrayList[1];          makeLists(a);          System.out.println(a.length);         for(int i = 0; i < a.length; i++)             System.out.println(a[i].toString());     }      private static void makeLists(List[] a) {           for (int i=0; i<a.length; i++){       List<Character> chars = new ArrayList<Character>();       chars.add(0,'A');       chars.add(1,'B');       chars.add(2,'C');       chars.add(3,'D');       chars.add(4,'E');       chars.add(5,'F');       chars.add(6,'G');       chars.add(7,'H');       chars.add(8,'I');       chars.add(9,'J');       chars.add(10,'K');       chars.add(11,'L');       chars.add(12,'M');       chars.add(13,'N');       chars.add(14,'O');       chars.add(15,'P');       chars.add(16,'Q');       chars.add(17,'R');       chars.add(18,'S');       chars.add(19,'T');       chars.add(10,'U');       chars.add(21,'V');       chars.add(22,'W');       chars.add(23,'X');       chars.add(24,'Y');       chars.add(25,'Z');        a[i] = chars;   I have to print out the linked list where data for 0 is A, 1 is A and B, when I do this above I get an error message illegal position 0. I believe that I need a nested for loop to print this, but I am not sure where to even begin.


Let $X$ have the exponential distribution with $\lambda=2$ Find the density function of the random variable $Y=\ln(X)$

I have an answer but I'm not sure if I'm doing it right: $f(x)$ is the pdf $f(x)=2e^{-2x}$, then, if the random variable $Y=\ln(X)$, then we simply substitute:  $P(Y \leq y)$=  $P(2e^{-2X} \leq y)$  $P(-4X \leq y)$ since $y=ln(x)$  $P(X \leq - \dfrac {1} {4} y)$  This is the distribution function, right?  Thanks!


Windows disk info shows used space that I can't find

I have a 250 GB SSD installed as my primary disc on which I have Win 10 installed. I just recently realized that the explorer overview & the windows disc property dialog stated, that there are 200 GB used & only 31 GB free on that disk.    Since I was curious on where that much used space came from, I started the free application WinDirStat which told me that there were only 62 GB used on C.    Also if I select everything under C with hidden files & system folders shown in the explorer, the properties dialog states that those are only 62,5 GB in sum.    Where do the 200 GB used space come from which are shown in the disc overview?


$\lim \limits_{x \to \infty} \space f({x})=0$, $|f''(x)| < M$. Prove: $\lim \limits_{x \to \infty} \space f'({x})=0$

It's known that:  $$\lim \limits_{x \to \infty} \space f({x})=0$$  $$|f''(x)| < M$$  How do I prove that:  $$\lim \limits_{x \to \infty} \space f'({x})=0$$  I tried using the mean value theorem, but I don't really know how to approach the question.


How to have custom named xterm title that stays open

I am trying to open an xterm windows from within a shell script, this script is meant to open an xterm window that stays open with a custom name, This is what i have xterm -e -T "Minecraft Plus"


I want to use this algorithm as a black-box, I'll be implementing it either in Python or R, but I don’t really understand it well to be able to turn it into a program.  How do we choose the initial values for parameters?  What exactly is q(xt, ·) & q(y,x), I understand these are probabilities, but how do we calculate them? and what function is f(y)?  and finally, Do I use the average of the values in the output vectors for each parameter?  Thanks in advance!  Metropolis-Hasting Algorithm for parameter estimation  P – total no. of parameters  N – total no. of iterations  t – iteration variable        Initialize the parameter vector x0 = {x01, x02, …, X0P}   For iteration t = 1, 2, . . . N do         Generate a candidate ‘y’ for next sample i.e. draw from the distribution q(xt, ·)   Calculate acceptance ratio α(xt, y) using α(x, y) = min{1,(f(y)  q(y,x))/(f(x)  q(x,y) )  }   Draw u ~ U[0, 1] i.e. Uniform Distribution   Accept/Reject state depending on acceptance ratio      If u < α(xt, y)      xt+1 = y // accept the proposal      else      xt+1 = xt // reject the proposal   Save xt1, xt2,…, xtP      Return  {x11, x21, …., xN1} {x12, x22, …., xN2} . . {x1P, x2P, …., xNP}      EDIT1: My question seeks a clear-cut translation of, let's say,  α(x, y) = min{1,(f(y)  q(y,x))/(f(x)  q(x,y) )  }  How does this look like in a program? what exactly is the meaning of q(x, y)? how does the function look like? without any terminologies related to probability or statistics. Apologies if I was not clear before.  EDIT2: How should the functions 'proposal_func' & 'alpha_func' be implemented? (if rest of the program looks fine)  values <- rep(0, 100) current <- 1  for (i in 1:length(values)) {    proposal <- proposal_func(current)    accept_ratio <- alpha_func(current, proposal)    u <- runif(1,0,1)       if (u < accept_ratio) {       values[i] <- proposal       current <- proposal          } else {       values[i] <- current    } }  alpha_func <- function(current, proposal) {  }  proposal_func <- function(current) {  }


How do I display the nth result of an ls command?

I used this command to display the first result of files in my directory.    ls | head -n 1   My simple question is, how can I modify this command to display say the nth result?  Thanks!


Prove $\gcd(a,m) \mid \gcd(ab,m)$ $\forall a,b,m \in \Bbb Z$

I named $\gcd(a,m) = d$ and $\gcd(ab,m) = d' $   So I know that $d\mid a$,  $d\mid m $  and  $d'\mid ab $ , $d' \mid m$   But I can't use the transitive property of divisibility here.  How can I prove that $d \mid d'$?


$N(ab) \geq N(a)$ is not necessary for the ring to be euclidean

The definition of euclidean ring in my textbook is 1) $N(ab) \geq N(a)$ 2) Euclidean algorithm works. However there is a note that the first condition is not necessary. There is a hint that we can choose a following norm: $N'(a) = \min_{b\sim a} N(b)$. I do not understand why it works. We need to check that euclidean algorithm still works with this norm.   I tried to do the following. If $a \sim b$, then $a = bx, x \in K^*$. Let $N'(a)$ be $N(ax)$. Let us divide $ax$ by $bx$ instead of $b$. We get $ax = bxq + rx$, $N(rx) \leq N(bx)$. Here I am stuck and have no idea how to continue.


Inserting an image and forcing it between paragraphs

I am inserting a Figure named Figure1 inside a document in TexMaker using the code below:  \begin{figure} \begin{center} \begin{tabular}{|c|}\hline \ \hspace{10cm}\ \\ \\ \includegraphics[width=5in]{Figure1}\\ \\ \\ \hline \end{tabular} \end{center} \caption{Shows that the number of patients}         \label{f:pic} \end{figure}   However, this image is floating in the text that is before it. How can I force it to be displayed after a particular paragraph and before another paragraph?


Unable to add comments on closed questions or their answers in the Android app

In the Android App, if a question is closed, I won't be able to leave comments on either the question or any of its answers. There are simply no "Add Comment" buttons available anywhere if the question is closed.  See the screenshot below. The comment adding interface is simply removed on closed questions and their answers — no Reply button in the toolbar, and no Add Comment button under the question.        Occurs on Android app v1.0.50 and v1.0.51, on a HTC One running Android 4.4.3.


I have a table (in java) with numbers like this: (jTable1 has only one column)  Numbers   1   2   3   .   .   .  468  I would like to get data from this table and write it to the output with this code:         int rows=jTable1.getRowCount();        for(int j=0;j<rows;j++){             int data= Integer.parseInt(jTable1.getValueAt(j,0).toString());        }   When I run the code, it stops with NullPointerException. In first run at 410. row, and in the second run stops at 413 and sometimes at 430 and mark this row:  "int data= jTable1.getValueAt(j,0).toString();"  The table doesnt have empty row or cell and contains only numbers!!  If I change the "row1" variable to 450 then it is working well. If I increase the value of "row1" above 450, then it stops everytime at other row with this error.   Please anyone has experience with same problem?  Or maybe I have a basic problem but I do not see that.   Thank you so much for help.


Calculation of $\int^{\pi/2}_{0}\cos^{n}(x)\cos (nx)\,dx$, where $n\in \mathbb{N}$

Compute the definite integral      $$ \int^{\pi/2}_{0}\cos^{n}(x)\cos (nx)\,dx $$      where $n\in \mathbb{N}$.   My Attempt:  Using $\cos (x) = \frac{e^{ix}+e^{-ix}}{2}$, we get  $$ \begin{align} \int^{\pi/2}_{0}\cos^{n}(x)\cos (nx)\,dx&=\int_{0}^{\pi/2} \left(\frac{e^{ix}+e^{-ix}}{2}\right)^n\left(\frac{e^{inx}+e^{-inx}}{2}\right)\,dx\\ &= \frac{1}{2^n}\mathrm{Re}\left\{\int_{0}^{\pi/2} \left(e^{ix}+e^{-ix}\right)^n\cdot e^{inx}\,dx\right\}\\ &=\frac{1}{2^n}\mathrm{Re}\left\{\int_{0}^{\pi/2}\left(e^{2ix}+1\right)^n\,dx\right\} \end{align} $$  Letting $z=e^{4ix}$ gives us  $$ \begin{align} e^{4ix}dx &= \frac{1}{4i}dz\\ dx &= \frac{dz}{4iz} \end{align} $$  So the integral becomes  $$\frac{1}{4\cdot 2^n}\mathrm{Re}\left\{\int_{C}\left(\sqrt{z}+1\right)\cdot \frac{dz}{iz}\right\}$$  How can I complete the solution from here?


Overriding Equals/GetHashCode for class in order to use hashset Contains/ExceptWith/UnionWith

I currently have a C# class that appears as follows:   namespace DBModel {     using System;     using System.Collections.Generic;     using System.ComponentModel.DataAnnotations;     using System.ComponentModel.DataAnnotations.Schema;     using System.Data.Entity.Spatial;      public partial class ConnSrv     {         public int ID { get; set; }          [Required]         [StringLength(14)]         public string Service { get; set; }          [Required]         [StringLength(14)]         public string ConnectsToService { get; set; }          public virtual Service Service1 { get; set; }          public virtual Service Service2 { get; set; }     } }   In my main program, I'm creating hashsets to work with these objects. The problem I'm encountering is that I would like to be able to use operators such as Contains, Except, ExceptWith, UnionWith, and so on on these hashsets.  For an object of the ConnSrv to be considered "equal", the Service and ConnectsToService values have to be equal. As such, I realize that in some way, I will have to override the Equals and GetHashCode operators for the class. I'm just not sure how to do so, whether it's through a straight override of the object class, by implementing IEquatable or IEquatable, or through some other method. Below are a couple simple examples of what I would expect the end result to be once implemented. If I'm way out in left field, please let me know. Thanks in advance for your time.          var testHS1 = new HashSet<ConnectingService>();          testHS1.Add(test1);         testHS1.Contains(test2); // Returns true          var testHS2 = new HashSet<ConnectingService>();          testHS2.Add(test1);         testHS2.Add(test2);         testHS2.Add(test3);          testHS2.Except(testHS1); // Expect end result to only contain test3


How to remove Home Folder icon from desktop in Ubuntu 20.04?

When I start Ubuntu I had my "home/user" in my Desktop. test is my User.   How do I make the folder not be on the desktop?


Is it possible to cast 2x Final Payment while sacrificing just one creature?

Situation:   Player A controls 2 creatures. Player B controls 1 creature. Player B plays 1x  and declares his creature as additional cost. Before resolving the spell, Player B plays another , once again declaring his creature as additional cost.   What happens here?   Option 1: Only the second Final Payment is executed since the additional costs for the previously casted spell aren't paid. Option 2: Both creatures of Player A are destroyed while Player B only sacrificed one creature.   I suppose it's option 1 but we had a draft the other day where my opponent claimed that option 2 would be correct.


a very strange sentence. please help to understand

There is a book by Galina Demykina "The lost girl and the scallywags" (a Russian one, translated into English, 1977) and there is a very strange sentence: "Zoya saw nothing save thick, ever so thick bushes." I cannot undestand it. It must mean that Zoya could see nothing, but very thick bushes. So, is there a real English word-construction "save ..., ever so ..." or it is just a made-up by the translator?


From what I understand is that Bonds and loans have extrinsic value, i.e if I decide to lend my money to someone or an organization, I will get paid a certain interest on the money that I lent, as well as receive my principal back after the maturity period. However, the stocks that we invest in, don’t seem to have any intrinsic value attached to it.  The company doesn’t pay me the principal that I invested in, the paper value of my principal just increases or decreases depending on how well the company is doing in the market scenario. It doesn’t hold a physical value. And the paper value of my investment will mean nothing until someone else decides to buy it. The company might pay me the profit that they earned in terms of cash dividends but will never pay me back my principal ever. And when I am buying stock from someone, how is the paper value of that stock calculated in terms of real/ tangible money that I need to pay to buy it? And what motivates people to invest in something that doesn’t even have a physical presence and only exists abstractly?