Expected number of dice throws to fill out a table.

Say I have a table of numbers ${1,2,3,4,5,6}$. Every time I throw a fair die, if the position in the table is unchecked, it becomes checked and if it is already checked it becomes unchecked. For how long (how many dice throws) can I expect to go on until the whole table is checked?    My first approach to solve this numerically would be to write down a state machine and then a $\bf P$ matrix of conditional transition probabilities, the initial state ${\bf b} = (1\,0\,0\,0\,0\,0\,0)^T$, and approximate the series $$\sum_{k=0}^\infty k({{\bf P}^k{\bf b}})_7$$ to some finite set of terms.    Updated approach: calculate for which the lowest $n$ such that: $$\prod_{k=0}^n (1-{{\bf P}^k{\bf b}})_7 < 0.50$$ I.e. calculate for how many throws the probability of never having had a 6 first goes below 50%. This turns out to be 50.  If we calculate a column of $(P^{10000}+P^{10001})/2$ (they are all the same) we see that we would on average get $1.56 \%$ full checked table in the long run, which is on average one in every 64 throws. Which makes sense that it is larger than the 50 to never have had 6.    However I am curious for any theoretical approaches to solve this problem.


Having issues trying to center an image using tailwinds containers - invisible padding to the right of the image

Why is my screenshot image not centered on the screen?  My css so far is this:

   When I inspect the image in chrome, I can see that there is some area on the right of the image that is not part of the image but is taking up space.  Here is a screenshot where you can see this invisible padding to the right of the image.  Any idea what is going on as I would like to understand how I can't even center a simple image.  As a bonus, if someone can figure this out using containers, can you also show me an alternate method using flex?  I tried 'flex items-center' also and that didn't work for me either.


Do we know anything about Aragorn's first time in Moria?

When the Company is forced to abandon their attempt to cross the Misty Mountains via the Redhorn Gate (the pass of Caradhras), Gandalf proposes they go "neither over the mountains, nor round them, but under them," via Moria. During the debate Aragorn remarks:     "I too once passed the Dirmrill Gate but though I also came out again, the memory is very evil. I do not wish to enter Moria a second time."    I haven't read much beyond the LOTR trilogy other than The Silmarillion. Does Tolkien ever describe Aragorn's first visit to Moria anywhere?


I can not connect intenet through dongle

I am using vodafone dongle but when I am using it ,it is detected inside computerwhile connecting take long time  but can not connect to internet


Libertine font displays slightly bold in XeLaTex compared to PdfLaTeX

I love using libertine font in my document. It looks nice and clear when compiled using pdflatex. But I got different result when compiled using xelatex. It seems to be a slightly bold in my screen. Is there any chances to get it nice and clear result in xelatex? thanks. // ps: I'm using TeX 3.14159265 (TeX Live 2014), texmaker 4.1 under ubuntu linux 14.04 lts.  \documentclass[12pt,a5paper]{memoir} \usepackage{libertine} \usepackage{lipsum} \begin{document} This is normal text, \emph{emphasized text}, and \textbf{bold text}.  \lipsum[1-4] \end{document}       Update #1: here's screenshot from the properties menu of the PDF viewer (Evince). Both pdflatex and xelatex use \usepackage{libertine}.    Update #2: ...and this is when using \usepackage{fontspec}\setmainfont{Linux Libertine O} with xelatex (as @jason-zentz's ).


How to add new a new property to an object in an array?

var fruits = [];         fruits[0] = {name:"apple", stock:"1box"}         fruits[1] = {name:"banana", stock:"2box"}         fruits[2] = {name:"banana", stock:"3box"}   so in case of this object is there any simple way to add new field inside of list like this? for example  fruits[0] = {name:"apple", stock:"1box", **taste:"good"**}   like this.  i tried create new template and copy original data and paste to the new template, for example  function fruit_2(name, stock, taste){ this.name = name; this.stock = stock; this.taste = taste; }//create new template   and re-add element from the fruit[0] and then fruit[1] to new template like this  but i was wondering if there is easier or faster way.  thank you for reading my question.  i will appreciate any help! thanks!


The command  shell$ ls . -R    works on Linux but not on OS X. This is because OS X command line options have to come before  the arguments,and not just anywhere as in Linux.   In particular, this means that any shell scripts I write on Linux will be unportable to Macs.    Question  How can I fix this on the Mac?   I can either take care to write portable Linux scripts, or I can install MacPorts so that  ls  and other commands will be picked from MacPorts and not the Apple provided binaries. Is there any better way?


How can a custom icon be loaded in an add-on?

I have created an add-on but I can't apply my own icon to the operators in this add-on.   Is there any easy way to implement this?   Or do I need to add the icon to an SVG file?


How to create reflective puddles from noise texture?

i have a problem with creating reflective puddles from noise texture.  So i have a large plane where i wanted to add reflective puddles made from noise texture, and make it look something like this  i didn't add normal texture from google because i know if you stretch texture on big plane it will be all blurry and ugly, and so instead i used noise texture, problem is, where its "dark areas" which are suppose to be puddles, they don't reflect at all, and i don't know how to change their reflection or how to control them in general! i wanted to add glass shader to noise texture but it doesn't have "base color" or anything like that where i could connect glass shader or any shader.  So my question how do i control them or how can i build nodes that way so i can change how they look ?  Here is how i built nodes for the plane. I'am using cycles render, blender Version 2.8


Do I need a composite primary key in a junction table?

I have a junction table like this:  CREATE TABLE `entitytagjunction` (      `EntityId` bigint(20) NOT NULL,      `TagId` bigint(20) NOT NULL,       PRIMARY KEY (`EntityId`,`TagId`),      KEY `IX_EntityId` (`EntityId`) USING HASH,      KEY `IX_TagId` (`TagId`) USING HASH,       CONSTRAINT `FK_EntityTagJunction_Entities_EntityId`          FOREIGN KEY (`EntityId`) REFERENCES `entities` (`Id`)          ON DELETE CASCADE ON UPDATE CASCADE,      CONSTRAINT `FK_EntityTagJunction_Tags_TagId`          FOREIGN KEY (`TagId`) REFERENCES `tags` (`Id`)          ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;   I have EntityId and TagId as composite primary key to ensure uniqueness, and SQL Server and MySql will both use the primary key as clusteredId.   As far as I could read from the other posts, Guid is not good to be a primary key because the randomness make fragments for clusteredIds, poor for performance if the table consist of millions of rows. Apparently the combination of EntityId and TagId has some randomness. Will this have impact on performance when using them as a composite primary key and clusteredId by default? or should I add an int column as a surrogate primary key though it will not be used in applications?


Does weak compactness imply boundedness in a normed vector space (not necessarily complete)?

Does this argument work? Let $X$ be a normed vector space, with $A$ weakly compact in $X$. The collection of sets of the form   $$\{x \in X:  |f(x) - f(a)| < 1 \},f \in X^*,a \in A$$    forms a cover of $A$ consisting of weakly open sets in $X$, and so should has a finite subcover.


$a=(float) 640.81; $b=(float) 636.85; $c=(float) 3.96;  $d= $a-$b-$c; echo $d;   Why  am getting -7.7271522513911E-14 this value? It should be 0 right.


I've noticed this before, but I didn't have enough data to tell if this is a repro, or if it was a one-off error.  Yesterday, two questions ( and ) were migrated here to MSE from MSO. When I went to check in on both of them, my vote was gone, but the score hadn't changed. As in, my vote was preserved, but I can still vote again. It's not associated with my account I guess.  This happened once on an SO migration to MSO - score and vote count remained intact, but I could vote again on the post. Considering child metas have the same UIDs as its attached main site, this isn't a UID issue (so someone who happens to have my SO UID here on MSE doesn't get ownership of my votes on the migrated posts).  Also, if I do vote on the posts, the score does change. There's no update and re-association of votes going on behind the scenes. My second vote acts like a completely separate vote from a different user, not a caching bug.   In case it wasn't clear, steps to reproduce:   Vote on a post Migration  Vote again    Note that this also applies to answers affected by the migration - not just the question   I'm assuming this is a bug, but what's going on here? Why not associate votes with the global account ID to prevent users from voting twice?


I'm using Windows 10 and I need to download Ubuntu 12.04 for a class. Is this possible?   I have tried downloading the 16.04, but It seems my system does not meet the CPU requirement of 16.04.


Frame inside another frame In python Tkinter

I am trying to place frame inside a frame.... like i want to place buttoncontainer and buttoncontainer2 inside the bodycontainer frame. But when i do so bodycontainer vanished,.. i cant figure out my problem.. i know i am doing some silly mistake.... Please help me to figure out this problem.  from Tkinter import * root = Tk() root.title('Tkinter Apps') root.resizable(width=TRUE, height=TRUE) root.geometry('{}x{}'.format(800, 500))  headerbanner=Frame(root,width=790,height=50,highlightbackground="gray",highlightthickness=1) headerbanner.grid(row=0,column=0,padx=5,pady=2)  bodycontainer=Frame(root,width=790,height=380,highlightbackground="gray",highlightthickness=1) bodycontainer.grid(row=1,column=0,padx=5,pady=0)  buttoncontainer=Frame(bodycontainer,width=50,height=300,highlightbackground="gray",highlightthickness=1) buttoncontainer.grid(row=0,column=0) buttoncontainer2=Frame(bodycontainer,width=50,height=300,highlightbackground="gray",highlightthickness=1) buttoncontainer2.grid(row=0,column=1)  root.mainloop()


A question Let $\mathbb{P}_X,\mathbb{P}_Y,\mathbb{P}_Z$ be the law of three random variables. If $\mathbb{P}_X=\mathbb{P}_Y$ then, are $\mathbb{P}_X \otimes \mathbb{P}_Z=\mathbb{P}_Y \otimes \mathbb{P}_Z$?  where  $\mathbb{P}_X \otimes \mathbb{P}_Z$ is the product measure of the Tonelli-Fubini Theorem


Proving any number of the form $2^n$ can't be written as the sum of k consecutive numbers.

I think i have proved that any number of the form $2^n$ can't be written as the sum of k consecutive positive integers, but i would be grateful if i could have some clarification as to whether this is a correct and valid proof or not.  Let $g=x+(x+1)+(x+2)+(x+3)+...+(x+(k-1))$, hence g is the sum of k consecutive positive integers.  $g=kx+\sum_{d=1}^{k-1}d$  Hence, $g=kx+\frac{k(k-1)}{2}$  Rearranging for x we find, $x=\frac{g}{k}-\frac{(k-1)}{2}$  So, for certain values of $k$, we can be sure that a positive integer value of $x$ can be found, and hence $g$ can be written as the sum of $k$ consecutive positive integers.There are two cases for $k$ to considor:  Case 1)  $k$ is odd. If $x$ exists, it must be the case $k$ | $g$, as for odd values of $k$, $\frac{(k-1)}{2}$ will alwyas be an integer, and hence $x$ will.  Case 2)  $k$ is even. $k$ does not divide $g$, but $\frac{g}{k}$ must be a multiple of $\frac{1}{2}$, and hence equals $\frac{h}{2}$, for some odd $h$.  Letting $j=2^n$, assume that we can write $j$ as the sum of $k$ consecutive positive integers.  If $k$ is odd, then if a $k$ exists, it must divide $j$, by Case 1. But, $j$ has no odd factors as it is a power of two, hence $k$ could not be odd.  If $k$ is even, by Case 2 it mut be the case $k$ does not divide $j$. Also, $\frac{j}{k}=\frac{h}{2}$, for some odd $h$.  But, this implies $2j$ has an odd factor, $h$. but, as $2j$ is a power of $2$, it can't have odd factors. So, $k$ can't be odd.  Hence, $k$ is neither odd or even, and this is a contradiction to our assumption. Hence no $x$ exists, and hence and number of the form $2^n$ can't be written as the sum of $k$ consecutive positive integers.  Any feedback on this proof would be appreciated.


if A is a infinite set ，define B={f|f is 1-1 correspondence on A}  I want to compute Card(B)  My attempt when A is finite ,then card(B)=$2^{card(A)}-2$  Such as A={$a_1,a_2$},then there exist two function f:$f(a_1)=a_2,f(a_2)=a_1$  $g:g(a_1)=a_1,g(a_2)=a_2$  So I guess when A is infinite ,card(B)=$2^{card(A)}$,but I can’t proof it can someone help me


Graphic issues with installing Ubuntu on PC with Radeon 7770

Haven't found anything about the issue I'm experiencing and would like someone to help me with it. I'm trying to install Ubuntu 14.04, but for some reason installation does load, but I get on monitor tiles of size 4px by 8px in zig-zag black/orange and can't see anything from them.   Managed somehow to get to select screen, but that is where issues start since I can't discern what option is what.  Anyone has idea how to fix it?  See screenshot below:


Pattern matching email address using regular expressions

Filter email address with regular expressions:  I am new to regular expressions and was hoping someone might be able to help out. I am trying to pattern match an email address string with the following format: FirstName.LastName@gmail.com I want to be sure that there is a period somewhere before the '@' character and that the characters after the '@' character matches gmail.com


Clickable intra-document cross reference across table of contents, chapters, figures and references

I am among the batch of students who now require to submit their PhD thesis entirely online instead of paper. While that is good (for the trees), it makes document navigation a bit harder. This is a concern as I feel my external examiner may not be very tech savvy and may be used to turning pages. Is it possible to make a Table of contents where, if I click Chapter 3, subsection 4, I go to that place? Likewise, if I click on the chapter header, I want it to come back to the table of contents (it really helps with navigation). Similarly, I would to click on list of Figure, say, figure no. 4 and go to that spot and vice versa. Oh and the same with references as well?


Show that if $(a,n)=d>1$ and $k$ is any positive integer, then $a^k\not\equiv 1\pmod{n}.$

So I know that if $(a,n)=1$, then $a^{\phi(n)}≡1\pmod{n}$ by Euler's Theorem. I also know that $d \mid a^k$ and obviously $d \mid n$. I know I probably need to use this in the proof, but I just don't know how to get started.


I know that there are functions which are continuous but not differentiable, but are there functions which are not continuous, but differentiable?


What do you call someone who is always complaining after getting what they want?

What do you call someone when they're always asking for something, and then is dissatisfied after getting exactly what they ask for?


Ubuntu 13.04 is showing some error while opening my computer

Few months before when I was using Ubuntu 12.04 then I found some errors while starting my computer.   Due to this problem I had given my CPU to a shop to repair it I don't know what he has done to my CPU but I only know that finally I got my CPU with Ubuntu 13.04.   The technician was unable to make any partition and I also think that he had installed 13.04 over 12.04 and so now my computer is showing some error when I'm starting my computer the error is as follows:     error: attempt to read or write outside of the disk 'hd0'.      grub rescue > _   Before showing this error, few times my computer was working very slow.  So kindly someone tell me that is there any way by which I can start my computer.  Please also tell me that what things I have to keep in mind while using Ubuntu so that in future I find no difficulties(errors) while using Ubuntu.


Does a switch statement or an if statement cost less in resource?

I'm working on a 2D engine in c++ and I know that an if statement costs less in terms of CPU usage than a switch statement; but, is the difference between a switch statement and an if statement negligible with modern PC and even on mobile porting, or must I avoid switch at all costs?


Is the boiling point of water really 100°C? If so, how come water evaporates at lower temperatures?

I had this doubt since so many years. Suppose you pour water on the floor. Then you switch on the ceiling fan and select stage 5 on its regulator. Then the water on the floor evaporates without reaching its boiling point at 100°C, within a few hours or minutes.  Is the boiling point of water really 100°C, or is that a myth?


Is there any way to suggest to ConTeXt to take advantage of multiple cores?

I have access to a relatively slow, but hugely (12) multi-cored machine. My 200+ page document has compile times in the 400 second range. Are there any flags or hints that I can give to the mtx-context engine (or better engine flag?) to improve performance of some steps?  The output it currently gives is:  mtx-context     | warning: no (local) file './trapBookProduct', proceeding mtx-context     | redirect texlua -> luajittex: luajittex --luaonly "/opt/context/tex/texmf-linux-64/bin/mtxrun" --script context --arrange --batchmode --noconsole --path=/home/ubuntu/ConTeXt/img trapBookProduct --redirected mtx-context     | warning: no (local) file './trapBookProduct', proceeding mtx-context     | run 1: luajittex --fmt="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en" --interaction="batchmode" --jobname="trapBookProduct" --lua="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui" --no-parse-first-line --c:arrange --c:batchmode --c:currentrun=1 --c:directives="logs.target=file" --c:engine="luajittex" --c:fulljobname="./trapBookProduct" --c:input="./trapBookProduct" --c:kindofrun=1 --c:maxnofruns=9 --c:noarrange --c:noconsole --c:path="/home/ubuntu/ConTeXt/img" --c:redirected "cont-yes.mkiv" This is LuajitTeX, Version beta-0.85.0 (TeX Live 2016/dev) (rev 5550)   system commands enabled.  mtx-context     | arrange run: luajittex --fmt="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en" --interaction="batchmode" --jobname="trapBookProduct" --lua="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui" --no-parse-first-line --c:arrange --c:batchmode --c:currentrun=2 --c:directives="logs.target=file" --c:engine="luajittex" --c:final --c:fulljobname="./trapBookProduct" --c:input="./trapBookProduct" --c:kindofrun=3 --c:maxnofruns=9 --c:noconsole --c:path="/home/ubuntu/ConTeXt/img" --c:redirected "cont-yes.mkiv"This is LuajitTeX, Version beta-0.85.0 (TeX Live 2016/dev) (rev 5550)   system commands enabled.  system          | total runtime: 180.058 seconds   Including the flag:     % engine=luajittex   Did improve compile times by about 200 seconds, but are there any other mechanisms to use?


How to keep footer at the bottom of the page and below content in AngularJS?

I have tried to keep the footer below some content with various methods, but it seems that the solutions don't behave as expected with AngularJS's dynamic content.   When the page is mostly blank, I want the footer to be at the bottom of the page When the page expands (or just big in general), I want the footer to be pushed below the content (not sticky to the page itself)  The same logic should follow when I redirect the page    Here is a small demo that I made to illustrate my attempt. I tried using position: absolute; for my footer, but I don't know how to change that (or use alternatives) once the content expands.      var app = angular.module('myApp', ['ui.router']); app.config(function($stateProvider, $urlRouterProvider) {   $stateProvider.   state("main", {     url: "/",     templateUrl: "main.html",     controller: "mainCtrl"   }).   state("small", {     url: "/other/small",     templateUrl: "other_small.html",     controller: "smallCtrl"   }).   state("big", {     url: "/other/big",     templateUrl: "other_big.html",     controller: "bigCtrl"   })   $urlRouterProvider.otherwise('/'); });  app.controller('mainCtrl', function($scope) {   $scope.small_text = "aaa";   $scope.big_text = new Array(100).fill("AAA"); }); app.controller('smallCtrl', function($scope) {   $scope.small_text = "aaa"; }); app.controller('bigCtrl', function($scope) {   $scope.big_text = new Array(100).fill("AAA"); }); body {   height: 100%;   margin: 0; }  footer {   background-color: #999999;   color: #F1F1F1;   text-align: center; }  .footer {   position: absolute;   bottom: 0;   height: 60px;   width: 100%; }  .main-view {   background-color: #F1F1F1; } <!DOCTYPE html>

Responsive header
       Main page       Small page       Big page

         demo website 2018 &copy;


Can you go to a country with other passport when home citizenship is not allowed in country?

Currently, US citizens are somewhat banned from going to Iran. Even while US citizens are not banned, it is still a generally dangerous place to go as a US citizen. Switzerland, however, does have good consular relations with Iran and their citizens are not banned.  This leads to my question: if (theoretically of course) a US and Swiss dual-citizen who is of no persian descent wants to travel to a country such as Iran strictly as a tourist, can he/she go with that Swiss passport legally, and can he/she remain safe in that country? Would Iran be able to figure out that you are a US citizen?


Is it possible to get the name of a function by it's reference?

I have the following code:  function abcdef() { }  function test($callback) {     // I need the function name string("abcdef") here? }  test(abcdef);   Is it possible to get the function name within the test function? And what about anonymous functions?


Generator of rational functions unchanged under $\sigma(X) = X + 1$

Let $L = K(X)$ be the field of rational functions over a field $K$ with characteristic $p > 0$, and let $\sigma \in \operatorname{Aut}_K(L)$ with $\sigma(X) = X + 1$.   Show that $G = \left<\sigma\right>$ is finite, and determine a generator of $L^G = \{ f \in L: \rho(f) = f$ for all $\rho \in G \}$ over $K$.    My solution so far: $G = \left<\sigma\right>$ is finite because char $(K) = p > 0$ and therefore $\sigma^p (X) = X + p = X $.  A rational function unchanged under $\sigma$ will also be unchanged under any $\sigma^n$, so we don't have to worry about powers of $\sigma$ I think.   Any ideas for finding a generator? Thanks.


Elementary Number Theory: If $p$ and $a$ are natural numbers with prime $p$, and $p^4|a^3$, then $p^2|a$.

I'm reviewing the basic number theory from my undergrad program (so I can jump back into abstract algebra well enough), and I've come across this problem in the section regarding the Fundamental Theorem of Arithmetic. I'm sure the answer is sitting right in front of my face, but I can't figure out if I'm having an issue of not seeing the last step or going down the wrong path in the first place. Any help is appreciated; thanks!  Prove: Let $a,p\in\mathbb{N}$ with $p$ prime. If $p^4|a^3$, then $p^2|a$.  Proof (so far): Let $a,p\in\mathbb{N}$ be given, with $p$ prime, such that $p^4|a^3$. Then $p|a^3$, so by Euclid's Lemma, $p|a$, and thus $a=pn$ for some $n\in\mathbb{Z}$. Now, for some $k\in\mathbb{Z}$, $p^4k=a^3=ap^2n^2$, so $p^2\frac{k}{n^2}=a$. (Here's where I'm stuck; it would be great if I knew $n^2|k$)


How can I change the umask for one command only?

How can I interactively execute a command in Linux (zsh, if it matters) with a different umask from the default, for one command only? Perhaps a combination of commands combined in a single line? The new umask should apply only to that command and return to its default value for the next command entered.  Ideally the command would be agnostic to the default umask in force before its entered (in other words, the default umask doesn't have to specified).


I have some data in which there are 5 categorical explanatory variables (concern, breath, weath, sleep, act) and 1 continuous response variable (tto). In addition, every categorical explanatory variable is divided into 5 levels which show how strong a person feels about it. level 1 and level 5 show the perfect and worst states respectively.   I was advised to create a box plot to see the relationship between the explanatory variables and the response variable. The plot is given below. However, I do not know how to read a box plot. Can any one please help me interpret it.


For $\gcd(p,q) = 1$ and $\gcd(r,s) = 1$ show $\gcd(ps,rq) = 1$.

For $\gcd(p.q)=1$ and $\gcd(r,s)=1$ show $\gcd(ps,rq)=1$.  I tried via contradiction. Let $\gcd(ps,rq) \neq 1$, so let $d > 1$ a common divisor of $ps$ and $rq$, i.e. $ps = dx$ and $rq = dy$ for some integers $x,y$. So $ p = \frac{dx}{s} $ and $q = \frac{dy}{r}$. It follows $\gcd(p,q) = \gcd(\frac{dx}{s}, \frac{dy}{r}) \geq d > 1$. That should do it, but I don't think the last but one inequality holds. If $s \nmid x$ or $r \nmid y$ this won't work... Might be the wrong way, but I would be very thankful, if someone could help me!


exit code of the command **before** last?

I'm running a script within a script, release.sh and caller.sh (caller.sh calls release.sh). Both are bash.  release.sh contains a bunch of conditions with 'exit 1' for errors.   caller.sh contains a line that goes "./release.sh", then a checks for the exit code of release.sh - if $? is greater than 0 then echo "release.sh screwed up" and exits.  ./release.sh         if [ $? -gt "0" ] ; then             echo "release_manager exited with errors, please see the release log."             exit 1         else              echo "release manager is done."          fi   Recently I've decided to log release.sh, and so the line in caller.sh goes:   ./release.sh 2>&1 | tee release.txt   Because of the pipe, $? is the exit code of 'tee release.txt' , which always comes out as 0, regardless of the previous command :-(  I have to check for release.sh errors and stop the caller from proceeding, but I also really need that log.   Is there a way to get the exit code of the command before last? Or a different way to log the release script in the same command?  I'm not really in charge of release.sh, I'd rather not change it.


Metadata and appstream Error while Updating

I am getting an error while updating as a root. After Update log below error was shown in terminal.   AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code   I followed  answer and executed sudo apt install appstream/xenial-backports.  My appstream package is already updated:-  $ appstreamcli --version AppStream CLI tool version: 0.10.6   After, force refreshing the cache data. I am getting the following error:-  $ sudo appstreamcli refresh --force AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml


I'm just started using LaTeX, and I ran into a problem: The text starts way down in the page, so there is a lot of empty room. How do I move the text upwards?    Code:  \documentclass{report} \usepackage[utf8]{inputenc} \usepackage[norsk]{babel} \usepackage{titlesec} \usepackage{graphicx}      \title{THT310} \author{Eivind Hagen}    \titleformat{\chapter}[display]   {\Huge\bfseries}   {}   {0pt}   {\thechapter.\ }  \titleformat{name=\chapter,numberless}[display]   {\Huge\bfseries}   {}   {0pt}   {}      \begin{document} \begin{titlepage} \maketitle \end{titlepage}  \tableofcontents \newpage      \chapter{Introduksjon} \input{kapittel1} \chapter{del 2} \input{kapittel2}      \end{document}


I am working on a very large data set, where I am comparing 2 genes. Currently I am trying to test  H0: correlation = 0.64   HA: correlation > 0.64 at the alpha = 0.05 level.   At first I thought I could use cor.test() or cor() with an argument to set the 0.64, but I am not seeing that as an option.  I'm not really sure where to go with this.


I searched for a module provide notification like one exist in facebook website. I found  but it's for D6. is There a module can i use for what i need?  thanks.


Is there a way to get "people reached" sum across entire network for a user?

The New Model profiles on Meta.SE (pretty big improvement!) have a section for "" stat.  Now, unless I'm much mistaken, that stat is specific to a given site on the network.  If that assumption is indeed correct, is there a way to find out the "People Reached" summary across 100% of the sites on the network for all your connected profiles?


Find the smallest positive number K for which following inequality   $$|\sin^2x-\sin^2y|\le K|x-y|$$  Holds for all x and y  1.2  2.1  3.$\pi$/2   No value of K is possible   My attempt: the way inequality is, it reminds me of lagrange mean value theorm.so k shud be 1, I think. I need suggestion here thanks.


I was using Python to add some simple numbers together, and I got a strange result  >>> 16+4.8+6.4+0.48+1.92+.48 30.080000000000002   That is clearly not the right answer, so why does Python add that extra bit? How reliable is Python for more complicated computations?


Evaluate the indefinite integral   $$\int\frac {\csc^2{x}-2005}{\cos^{2005}{x}} dx$$   I tried multiplying and dividing by $\sec^2 {x} $ and then setting $\tan{x}=y$ but no good. Then I set $\cos {x}=t $ and tried to create $\sin {x} $ in the numerator. But the integral which came was also a difficult one.    Please Help!     Thanks!     P.S. I am a high school student so kindly use elementary methods only.  Thanks again!


The use of was and were with singular nouns

"That's a very, very funny question given the time frame, would have been even funnier if it was a month in the future."  My friend corrected me, and said it should be "were a month in the future" Is that correct if both question and month are singular?


To form a rooted binary tree, we start with a root node. We can then stop, or draw exactly $2$ branches from the root to new nodes. From each of these new nodes, we can then stop or draw exactly $2$ branches to new nodes, and so on. We refer to a node as a parent node if we have drawn branches from it.  This diagram shows all distinct rooted binary trees with at most $0,$ $1,$ $2,$ or $3$ parent nodes:   (Note that, in the diagram, the roots are at the top and the branches extend downward -- somewhat contrary to what you'd expect for something called a "tree"!)  Prove that the number of distinct rooted binary trees with exactly $n$ parent nodes is the $n^{\text{th}}$ Catalan number.    To count the number of rooted binary trees, I think you do something with a power of 2, because there's two choices at each point.  But that's all I have.  And for the Catalan numbers, which is $C_n = \frac 1{n+1}\binom{2n}n,$ and I don't understand the other recurrence, if you could explain that, it would be great.  Can someone walk me through this problem?  Thanks in advance!


This question is more concerned with understanding the reasoning behind mathematical proving rather than explaining this specific proof. I understand why this proof works.   This is the proof of Euclid Lemma from Wikipedia:      This   states that if $x$ and $y$ are relatively prime integers (i.e. they   share no common divisors other than 1) there exist integers $r$ and   $s$ such that      $rx+sy=1$. Let $a$ and $n$ be relatively prime, and assume that   $n|ab$. By Bézout's identity, there are $r$ and $s$ making      $rn+sa=1$. Multiply both sides by $b$:      $rnb+sab=b$. The first term on the left is divisible by $n$, and the   second term is divisible by $ab$, which by hypothesis is divisible by   $n$. Therefore their sum, $b$, is also divisible by $n$.   I am mostly concerned with this statement:      Multiply both sides by $b$:   My question is why this multiplication by $b$ happens. Is it because the person proving this observed that multiplying the equation by $b$ he would get a sum of two multiples of $n$? Or is there a mathematical rule by which we know that the next step is multiplying by $b$?  I am aware that this question might seem trivial to people here, but I just want to make sure.


A secretary with ____ good knowledge of English: "a" or no article?

I'm trying to pass a test on "Articles exercise" as they call it . Reviewing my answers I got stuck about the two I posted on the picture below.  As I understand both words are uncountable (according to the ), so it looks like (or said for example ) I can't say a/an with an uncountable noun.  But this test says the opposite. Is there some trick? Or am I just dumb? Please help me to understand why I need to use "a" article in these cases?        We need a secretary with ____ good knowledge of English.          a  (marked as the correct answer)   the     a / the     no article is needed (the answer I think is correct)        We're having ____ terrible weather.         a (marked as the correct answer)     the     a / the     no article is needed (the answer I think is correct)


Let $\mathcal{B}(F)$ the algebra of all bounded linear operators on a complex Hilbert space $F$. It is well known that if $S\in \mathcal{B}(F)$, then  $$\|S\|:=\sup_{\substack{x\in F\\ x\not=0}}\frac{\|Sx\|}{\|x\|}$$  Why $$\|S\|=\sup_{\|x\| \leq 1}\|Sx\|?$$


I recently repartitioned my HDD and I have damaged GRUB on my system. On boot I get the GRUB rescue prompt and I have to go through the following steps in order to boot normally:  set root=(hd0,msdos6) set prefix=(hd0,msdos6)/boot/grub insmod normal normal   (Those steps were found on another post on here!).  I'm very tired of repeating this on every boot, how do I permanently fix GRUB?


How to find out if an object has or has not been collected?

1) Is there a tool that tells you whether a specific object has been garbage collected or not?  2) Is there a way to see what all objects are in which gc queue at a given point in time?  I remember seeing a Channel 9 video some 5 - 6 years ago where two guys were demo-ing cordbg or mdbg, the debuggers on the command line and they were showing the garbage collection data.


I'm trying to draw images on a C# form (in PictureBoxes, as well as using Graphics.DrawImage()), and am looking for a way to draw them smooth.  The images must be a format that supports transparency, so PNG, GIF, SVG, and WMF.  C# doesn't support SVG files out of the box, and I haven't found a good third-party library to use (I found SvgNet, but couldn't figure it out).  I need to draw a WMF file, which C# can do via the Image.FromFile() function, but it's not anti-aliased.  I was wondering if there's any way to smooth this out?


Posting a bug report on Stack Apps, I tried to link to its API docs:     {id}/comments   It was unsuccessful, and making the link explicit with [http://url.com][1] doesn't work either because the link doesn't show up. E.g., .


Why is the slope a part of the area of a surface of revolution?

I have previously learned about the volume of a solid of revolution about the x axis and that equation makes sense to me since it's taking the integral between points a and b of the area of a circle at each point.   $$ \int_{a}^{b} \pi [f(x)]²dx = \int_{a}^{b}Area(x)dx $$  But now when I've come across the formula for the area of a solid of revolution I can't quite understand why the slope factor is there. From looking at the volume of a solid of revolution I would assume counting the surface area is just the same as counting the volume except the area is replaced by the circumference. And looking at the equation that seems to be true, but the slope of the function on a small interval has also been added as a factor.  $$ \int_{a}^{b} 2\pi f(x)\sqrt{1+[f'(x)]²}dx $$  From the picture of it in the book it takes the arch length $$ ds = \sqrt{dx²+dy²} $$ of a small dx. But taking this ds and the integral from a to b aren't we counting every part twice since the integral already goes over every dx?


prove x/(x^2 + 1) is continuous at x = -1 using the definition of continuity

Prove  that the function $\displaystyle f(x)=\frac{x}{x^2+1}$ is continuous at $x=-1$ using the  definition of continuity.  My attempt:  Need show that $\forall {\epsilon > 0},\exists {\delta > 0}$ s.t $\forall {x \in R },\ |x - (-1)| < \delta \implies |f(x) - f(-1)| < \epsilon.\\ |f(x) - f(-1)| = |\frac{x}{x^2 + 1} - \frac{-1}{2}| = |\frac{2x - (-1)(x^2 + 1)}{2(x^2 + 1)}| = |\frac{2x + x^2 + 1)}{2(x^2 + 1)}| = |\frac{(x+1)^2}{2(x^2 + 1)}|\\ |\frac{(x+1)^2}{2(x^2 + 1)}| < |\frac{(x+1)^2}{(x^2 + 1)}| <  |(x+1)^2| \text{ since } (x^2 + 1) \text{ is at least 1}\\ |(x+1)^2| = |x + 1|^2 < \epsilon \\  |x + 1| < \sqrt{\epsilon}$  Therefore set $\delta = \sqrt{\epsilon} \text{ and } \forall {\epsilon > 0}, \ \forall {x \in R }, |x - (-1)| < \sqrt{\epsilon} \implies |f(x) - f(-1)| < \epsilon$  is this a valid way of proving this? Or is there a better way?


Applying offset to lines that are on top of each other, result like metro map

As you can see from my picture there are a lot of places where the same lines run on top of each other. Imagine a tram map. How can I make sure that the ones that are behind are visible too?  Just like you see from metro or train maps:


I know correlation does not imply causation but instead the strength and direction of the relationship. Does simple linear regression imply causation? Or is an inferential (t-test, etc.) statistical test required for that?


Calling finalize() more than once forcefully

as per Java Doc, The finalize method is never invoked more than once by a Java virtual machine for any given object.  i'm trying to call finalize on an object which is newly created and holds reference.   // Java program to demonstrate requesting  // JVM to run Garbage Collector public class Test {     public static void main(String[] args) throws InterruptedException,Throwable     {         Test t1 = new Test();         Test t2 = new Test();                 t1.finalize();                 t1.finalize();         // Nullifying the reference variable         t1 = null;          // requesting JVM for running Garbage Collector         System.gc();           // Nullifying the reference variable         t2 = null;          // requesting JVM for running Garbage Collector         Runtime.getRuntime().gc();      }      @Override     // finalize method is called on object once      // before garbage collecting it     protected void finalize() throws Throwable     {         System.out.println("Garbage collector called");         System.out.println("Object garbage collected : " + this);     }  }   output is : something like below :  Garbage collector called Object garbage collected : Test@232204a1 Garbage collector called Object garbage collected : Test@232204a1 Garbage collector called Object garbage collected : Test@232204a1 Garbage collector called Object garbage collected : Test@6fffd0ea   I can't understand the behaviour of GC how its working, and what is happening if i'm calling finalize() method.


i'm  developing a Facial Rig Panel, And I need to get the reference to an object(in this case the Armature) in a custom panel, similar to this picture.Or Maybe tip the Name of the Armature in a Text Field and get the value. Blender has any operator that allows to do it?


Can destroy command to destroy a certain type of block

Is there a way to destroy a certain type of block (ie. Oak wood planks) The command I've got so far is:  /blockdata ~-1 ~ ~ {Items:[{id:wooden_axe,Damage:#,Count:1,tag:{CanDestroy:["minecraft:planks 0"],display:{Name:"Axe"}},Slot:13}]}   I am using the blockdata command to get a wooden axe in the middle of the chest that can only break oak wood planks. With this command the wooden axe shows 'missingno' under it.


Is There Something Called a Weighted Median?

I was given some data that represents the number of lines in a document as well as the line count per hour (which is the lines in the document divided by the number of hours that the document was worked on).  Considering the following data:  lines LCPH 57    133 62    135 33    137 76    139 78    141   Typically, I would express the median LCPH as 137 as it is the 3rd of 5 figures.  However, the median is currently being reported as 139 because it is not until the fourth document that more than half the lines in all documents were seen.  This figure is currently being referred to as the Weighted Median LCPH instead of Median LCPH.  Is there a different term for this sort of figure?


I noted a discussion on groups being abelian under a certain restriction on powers of elements, e.g. . Maybe this result (probably not too well-known) concludes it all.  Let $m$ and $n$ be coprime natural numbers. Assume that $G$ is a group such that $m$-th powers commute and $n$-th powers commute (that is for all $g, h$ $\in$ $G$: $g^mh^m=h^mg^m$ and $g^nh^n=h^ng^n$). Then $G$ is abelian.


n1 = 1 n2 = 1 n3 = n1 + n2 for i in range(10):    n1 + n2    print(n3)    n1 = n2    n2 = n3   According to what I know, this should be the simplest way of outputting the first 10 digits of the series, however, it prints 2 10 times. I don't understand why n1 doesn't get set to n2, and n2 doesn't get set to n3 after n3 has been printed.


What Application Indicators are available?

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the .     I installed Ubuntu 11.04 on one of my systems and I am using the Unity interface. Unity is working quite well so far but I really miss panel applets for net speed, cpu temp, and system monitor.   These applets are useful for viewing quick info. Unlike 10.10, there is no other way to get this info onto the panel or unity launcher. There are solutions like screenlets and conky but they don't feel appropriate for a clean desktop look.  If you know one then please list out any third party indicators with links so that they can be found.


In , why did Kattappa kill Baahubali?   I saw the movie 2 times, but I'm still confused. Is there any indication in the film why Kattappa did this?


How does Facebook know the email address is invalid

Most of us use regular expressions to decide if email address in form entry is valid or not and then send a link to assure that user has access to this email account .. while browsing Facebook with an alternative account I got this pop up message   the message says that email address is no longer valid .. how does Facebook know this .. does it use mail delivery reports to get the state of the email address ? .. any idea how to do this in PHP ?


Evaluate: $I=\int\limits_{0}^{\frac{\pi}{2}}\ln\frac{(1+\sin x)^{1+\cos x}}{1+\cos x}dx$

Evaluate: $$I=\int\limits_{0}^{\frac\pi2}\ln\frac{(1+\sin x)^{1+\cos x}}{1+\cos x}dx$$


Proof of one of the most beautiful equations in Math.

$\cfrac{1}{1^2} + \cfrac{1}{2^2} + \cfrac{1}{3^2} + ...... \infty = \cfrac{{\pi}^2}{6}$ Often termed as one of the most beautiful equations in math: I tried devising a proof for the above formula. But I got stuck just as soon as I begun. Addition of any two or more rational numbers always results in a rational number. The $LHS$ is rational but the $RHS$ is irrational. How is this possible?


Icons in Gnome top bar misplaced and overlapping with applications

this week I installed Ubuntu 20.04 on my laptop and connected it to my external 27" screen (EIZO 27" with 3840x2160px). In order to enable video acceleration in Firefox via VA-API I switched to Wayland. Since all desktop elements are very small on the HiDPI external screen I enabled the "experimental-features" to allow for fractional scaling of 125% ... gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" So far it looked good except the top bar overlapping the dash and the top right icons moving out of the top bar. Apart from being an optical glitch it also impacts usability because the icons overlap application windows. Screenshot of top bar with misplaced icons  I blamed it to the "experimental-features" and the 125% setting but when I turn off the "experimental features" and revert to 100% the setting persists. Even if I switch back to the "old" X-Server and disable Wayland. Can anyone help me how to fix this issue or is it not a configuration issue but a bug? Thanks a lot! Daniel


This may be a simple question, but I was slightly confused.  I was looking at the second line $S_n(x)=1-x^{n+1}/(1-x)$.  I was confused how they derived this.  I know the infinite sum of a geometric series is $1/(1-x)$.  I just can't figure out how the partial sums, $S_n(x)$, have $1-x^{n+1}$ on the numerator.  How was this derived?  Thank you.     Example 5.20.   The geometric series   $$     \sum_{n=0}^\infty x^n   = 1 + x + x^2 + x^3 + \dotsb $$   has partial sums   $$     S_n(x)   = \sum_{k=0}^n x^k   = \frac{1 - x^{n+1}}{1 - x} \cdotp $$   Thus, $S_n(x) \to 1/(1-x)$ as $n \to \infty$ if $|x| < 1$ and diverges if $|x| \geq 1$, meaning that   $$     \sum_{n=0}^\infty x^n   = \frac{1}{1-x}   \qquad   \text{pointwise on $(-1,1)$}. $$   (Original image .)


Why do I have two desktop.ini files on my windows 8 desktop?

When I try to delete one of these two shortcuts, a message appears saying, "If you remove this file, Windows or another program may no longer work correctly."! I don't think that it is possible to keep same named files into a single directory. Is this any malware or anything harmful for my PC?


How can we evaluate what were the impacts of "Rewarding the Question Askers" on a specific site?

The reputation value from 5 to 10 on positive votes for questions has recently been changed to better reward users who create questions.  But ... what were the impacts on each community?  Has the number of questions increased due to this new incentive? Has the quality of the questions changed as the reward is better? Has there been a significant change in the amount of votes cast on the questions?  And since reputational correction was done retroactively, many users have gained the privilege of using new site tools. Is it possible to evaluate if these new users started using these tools and, if so, if they used them correctly?  How can we evaluate these points in isolation for a specific community?


Given a matrix, is there always another matrix which commutes with it?

Given a matrix $A$ over a field $F$, does there always exist a matrix $B$ such that $AB = BA$? (except the trivial case and the polynomial ring?)


normal subgroups of group of order $399$

Let $G$ be a group of order $399$. Then by Sylow, it must have a normal subgroup of order $19$, denoted by $H$. Let $N, K$ be groups of order $7$ and $3$. Then $HN$ and $HK$ are groups of order $133$ and $57$. What is the possible order of their normalizer?  The normalizer can only be either themselves or the whole group by Lagrang


What is the trade-off in the bias-variance trade-off?

Let $\theta$ be a parameter and $\hat{\theta}$ be an estimator for $\theta$.  I understand that the MSE of $\hat{\theta}$ can be decomposed into its bias and variance. That makes sense. What I don't see is where there is a trade off. A trade-off would suggest that all estimators have the same MSE and you can only get less variance by incurring higher bias and vice versa.  Can you please explain the mathematics behind it?


I would like to have optional variables in my script, because I don't always need to use them. For example in my script I have: hiveParams="" if [ "$1" == hiveParams=* ]; ### if the first param starts with hiveParams= then echo "$hiveParams" spark submit --conf spark.sql.hive.conf.list=\$hiveParams fi  And when I run the script I would like that the script takes "TestHiveParams" and replace it in $hiveParams sh test.sh hiveParams="TestHiveParams"  How can I make this run? Update: I have added:  set -o --  and run the job: sh test.sh --hiveParams="someParams"  and I get that the numbers of parameters is 0. How should I define it , so that it recognizes it?


Right at the beginning of the game, Meowth comes into your room and attempts to wake you up. At this point, I assume I have to press some button to get out of bed, but the D-Pad or A button doesn't do anything, nor any of the other buttons. How do I get out of bed to start the game?


Python decorator breaks when mutating parameters?

I cannot understand what goes wrong in the following simple example in python 3.6.8: import functools  def test(cache=False):     def decorator_init(func):         @functools.wraps(func)         def wrapper_init(*args, **kwargs):             print(cache)             #cache = False         return wrapper_init     return decorator_init  @test(cache=False) def main():     return None  main()  Uncommenting cache = False will cause this program to fail saying that Traceback (most recent call last):   File "C:/.../debug.py", line 16, in <module>     main()   File "C:/.../debug.py", line 7, in wrapper_init     print(cache) UnboundLocalError: local variable 'cache' referenced before assignment  Why does attempting to mutate this variable lead to it being referenced before assignment, but otherwise it's fine to call it in a print statement?


My data is almost only ordinal data. My dependent variable is a 4 point scale:    1 = completely agree 2 = agree to some extent 3 = disagree to some extent 4 = completely disagree     I want to use regular OLS using SPSS. Should I use ordinal regression? What is the difference between ordinal regression and linear regression? When I try to use linear and my dependent variable, SPSS refuses to run the analysis. What should I do?


How to behave with 10 months old baby around staircases?

I understand staircases are very dangerous for babies.  We have only one staircase at our home. The staircase is 20 cm high.  Our baby is very curious and wants to go down that one staircase (20 cm high) and into the other room to explore it.  I'd like to safely introduce the staircase to my baby. How should I do this? How should I approach teaching a 10 months old baby about the staircase?


What happens when creature has two mutually exclusive restrictions on what can block them?

What happens if I equip my      Juggernaut can't be blocked by Walls.   with a      Equipped creature can't be blocked except by Walls.   or if I enchant my      Charging Rhino can't be blocked by more than one creature.   with a ?     Enchanted creature gets +3/+3 and has menace.   From , I'd say they're both unblockable, but I'm wondering if the word "except" allows the blocker to block if he or she satisfies the "except" condition.


Is the E-Cat by Andrea Rossi et al. proof that cold fusion can work?

A team of researchers have tested a device (the E-Cat) produced by a team in Italy led by Andrea Rossi and claim that its 'abundant heat production' together with the change in the composition of its fuel during the reaction can only be explained by a low energy nuclear reaction (LENR) - . Despite the fact that they cannot explain exactly how it works should we all now take LENR seriously? Can anyone figure out from the description in the paper how it does work?


If $X \sim Unif(0,1) \sim Y$. How can I calculate the PDF of $Z=XY$.  I tried $P(XY < t) = P(X < t/Y) = \int_{-\infty}^{\infty}(P[X<t/Y] f_{y})dy = \int_{0}^{1} \int_{0}^{t/y} f_{x} f_{y} dxdy $ $= \int_{0}^{1} \frac{t}{y}dy = t[log(y)]_{0}^{1}$.  Which doesn't really make sense. Can some one help me with this problem?


Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed:   youtube-dl 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 237 kB of archives. After this operation, 1,106 kB of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/universe youtube-dl all 2014.02.17-1 [237 kB] Fetched 5,080 B in 3s (1,450 B/s)                        E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/y/youtube-dl/youtube-dl_2014.02.17-1_all.deb  Size mismatch  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


How to copy my /home folder data to a new partition and mount it as /home?

As you can see in my previous post (click ), I'm getting a new motherboard. However, I saw in WikiHow (click ) that I have to reinstall every operating system in my drives. However, (also because I am a distro hopper sometimes) I'm fed of backing up my entire /home folder and copying it to the new installation.  I have seen somewhere that if you don't want to wipe the entire Linux partition and lose data, you can create a partition during installation & mount it in the /home mount point. I have seen it multiple times, and now (since I want to change from Xubuntu to Ubuntu) I regret not doing that.  I can copy my files on to an external hard drive, but my problem is creating the partition & the mount point. Will it be recognized by the system and /etc/fstab?


Collecting treasury resources when storage is full?

What happens if I collect resources from treasury of clan castle if my storage is full? What happens to the remaining resource?


Why don't C++ compilers define operator== and operator!=?

I am a big fan of letting the compiler do as much work for you as possible.  When writing a simple class the compiler can give you the following for 'free':   A default (empty) constructor A copy constructor A destructor An assignment operator (operator=)   But it cannot seem to give you any comparison operators - such as operator== or operator!=.  For example:  class foo { public:     std::string str_;     int n_; };  foo f1;        // Works foo f2(f1);    // Works foo f3; f3 = f2;       // Works  if (f3 == f2)  // Fails { }  if (f3 != f2)  // Fails { }   Is there a good reason for this?  Why would performing a member-by-member comparison be a problem?  Obviously if the class allocates memory then you'd want to be careful, but for a simple class surely the compiler could do this for you?


Negative sign in rotation operator again

In Wikipedia's , section  "In relation to the orbital angular momentum", they write $$ R(z,t) = exp((-i/h) \varphi L_z) $$ where $\varphi$ is the angle being rotated through My Schaum's textbook also has the negative sign.  However,  does not have the negative sign. Its argument for deriving the rotation operator uses Taylor series. They say if you write  $ e^{iL_z \varphi / \hbar} \cdot f(\theta_0, \phi_0, r_0)$  (i.e. the operator acting on a particular point of the function $f$) and expand in Taylor series, you get:  \begin{align}  e^{iL_z \varphi / \hbar} \cdot f(\theta_0, \phi_0, r_0)&=1 \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/1!) \varphi^1 (d/d\phi) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/2!) \varphi^2 (d^2/d\phi^2) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/3!) \varphi^3 (d^3/d\phi^3) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/4!) \varphi^4 (d^4/d\phi^4) \cdot f(\theta_0, \phi_0, r_0) \\ &+ \cdots \end{align}  which is the Taylor expansion for $ f(\theta_0, \phi_0 + \varphi, r_0) $, so the expression $ e^{iL_z \varphi / \hbar} $ has successfully rotated the function's point through an angle $\varphi$.  That makes sense to me.  But if you tried it with the negative sign as Wikipedia and Schaum do, the expression is instead:  \begin{align}  e^{iL_z \varphi / \hbar} \cdot f(\theta_0, \phi_0, r_0)&=1 \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/1!) (-\varphi)^1 (d/d\phi) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/2!) (-\varphi)^2 (d^2/d\phi^2) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/3!) (-\varphi)^3 (d^3/d\phi^3) \cdot f(\theta_0, \phi_0, r_0) \\ &+ (1/4!) (-\varphi)^4 (d^4/d\phi^4) \cdot f(\theta_0, \phi_0, r_0) \\ &+ \cdots \end{align}  the Taylor expression for $ f(\theta_0, \phi_0 - \varphi, r_0) $. So that doesn't give you a rotation by $\varphi$ but by $-\varphi$, right?  So are the Wikipedia and Schaum formulation of the rotation operator wrong?  --  The linked question by Omry did not answer this question; the answer there  suggested that it was okay to have the negative sign.


How to forbid activity to change orientation even when you enable the landscape setting in your mobile?

I don't want an Activity to change orientation to landscape no matter what, even when you enable the landscape setting in your mobile.  What should I do to achieve the goal?


How do I remove the Gnome's video applications?

I use VLC to play all my videos, and wanted to know to remove the video player that comes with Gnome.


Natural Earth doesn't render well in Robinson World projection

QGIS Pisa 2.10.1 Mac Pro, Mac OS   I don't seem to be able to create a simple World Map using the Natural Earth Dataset and the Robinson World projection, unless I zoom in. What could be the problem?


Why doesn't a SQL trigger have permissions to use e-mail?

I have a vb.net 4.6.1 Windows Forms application.  In it, a SQL stored procedure is called.  That stored procedure then deletes a record from a table.  This is all working fine.  That table has a delete trigger that sends an e-mail.  That trigger fails because of a permissions issue to the msdb database.  What's going on here?  I'm guessing the trigger is trying to use the app user's SQL user to send e-mail.  I don't want to set up every user in the msdb database.  I want the trigger to run and send an e-mail no matter what user causing the trigger to fire.  Is there a way for the trigger to send e-mail without using the app user's permission? Here's the error message: The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.  Here's the vb.net code.  It just calls the stored procedure:             Dim cmd As SqlCommand = MSSQL_CONN.CreateCommand              cmd.CommandType = CommandType.StoredProcedure             cmd.CommandText = "sp_cancel_backlog_detail"             cmd.Parameters.Add("@id", SqlDbType.Int).Value = backlog_detail_id              Call cmd.ExecuteNonQuery()  Here's the connection string the app is using: SERVER=sql01;DATABASE=MyDatabase;Integrated Security=SSPI;Connect Timeout=10;Pooling=false;MultipleActiveResultSets=True;  Here's the stored procedure.  Again, pretty simple in that it just deletes a record form the table: CREATE PROCEDURE [dbo].[sp_cancel_backlog_detail] @id int  DELETE FROM backlog_details WHERE id = @id;  Here's the delete trigger on the table.  This is where the e-mail is sent: ALTER TRIGGER [dbo].[delete_backlog_details] ON [dbo].[backlog_details] AFTER DELETE AS BEGIN  DECLARE @body NVARCHAR(MAX) DECLARE @subj VARCHAR(255), @rcpt VARCHAR(MAX), @atch VARCHAR(255), @q VARCHAR(255), @profile VARCHAR(255)            SET @rcpt = 'xxxxx'           SET @subj = 'Deleted'            SELECT @profile = value           FROM dishbooks.dbo.settings           WHERE name = 'event_manager.dbmail_profile'            EXEC msdb.dbo.sp_send_dbmail                @execute_query_database = 'MyDatabase',                @profile_name = @profile,                @blind_copy_recipients = @rcpt,                @subject = @subj,                @body = @body,                @body_format = 'HTML'  END


Can you build houses in Minecraft that villagers will detect as villages?I mean building a village from scratch?


What should /etc/sudoers contain normally?

When I run sudo visudo , what should it contain? Please give me an example of what it should have normally for a sudo user.


How to Cancel or Prevent Windows 10 from rebooting my PC?

This may be, after decades of Windows use, the moment when I switch to Mac...  Issue: Win is rebooting my PC, once or twice a day, once when I was on a phone call, with a word doc in front of me, discussing it by tel.  I believe the core issue is that the big update to Win 10 is failing to install properly.  I followed the steps here:   But the reboots continue.  The GUI currently shows as below.  a) How do a PREVENT auto reboots, in general?  b) How do I STOP the reboot that the system is telling me will occur in the next hour?


Converting a .lasd (Lidar) coordinate system?

How can one change a coordinate system for a .lasd (Lidar) dataset?  The file is currently in UTM_Zone_15N and I am trying to convert it to IL_East.


I can't find the download for adobe reader any more. I installed it about a month or two ago on my other machine. AM I BLIND?


Hard Drive not allowing me to use max capacity

I have a 1TB SSD that I formatted. It use to allow me to use 960GB. I went to Disk Management and checked the partitions. I have 1 partition for 894GB. I've wiped it and created it again and I can't get my 60+ GBs back. In Disk Part CMD tool it only shows the single 894GB partition. Says the max capacity is 894GB. There is no sign that it's a 960GB except the title of the drive and that I know it was 960 before.


How to log all Bash commands by all users on a server?

Our small company runs an Ubuntu Server 11.10, to which a couple of people have SSH access. The actual terminals are sometimes used, too. How can we locally log all Bash commands run, along with user and time stamp?  We can assume that no-one is nefarious and actively trying to avoid the logging, but we'd still prefer the users not to have direct write-access to their log files. Simultaneous sessions must be handled correctly.


I want to get the relative path from one file to another.  In other words, if I input the file foo/foobar/dafool.html and foo/style.css, how do I end up with ../style.css?  I'm using Java.


. means match any character in regular expressions. * means zero or more occurrences of the SINGLE regex preceding it. My alphabet.txt contains a line  abcdefghijklmnopqrstuvwxyz   Doesn't grep a.*z alphabet.txt mean match any substrings that start with a, with zero or more occurrences of any type of SINGLE character in between them, and end with z? For example, abz, abbz, ahhhhhz, but not abbdz?  I thought grep a.*z alphabet.txt wouldn't catch the line in my alphabet file.


PHP - Extract data from MySQL database and place into multidimensional array

I am attempting to loop through the rows of a database (in this case players) and gather their scores. The columns of the database represent different positions, for each of which a player has a score value. As there are more columns than positions within a formation, the query must SELECT only those 11 columns within the given formation ($most_common_formation). The scores must then be multiplied by the corresponding value in the player's "total_picks" column before being placed into a multidimensional array.   The final array should contain the 25 players as arrays, and within each display the "full_name" along with the 11 scores that have been multiplied by "total_picks".  The $team array holds the "full_names" of all players.  Please help it's driving me crazy!  // Create array to hold final scores per player $player_scores = array();  // Loop through all players in $team array for ($l=0; $l < 25; $l++) {      // SELECT each players scores per position in $most_common_formation     $players_picks_query = "SELECT                                  ?,                                 total_picks,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?,                                 ?                             FROM table";      // prepare and bind statement     $stmt = mysqli_prepare($conn, $players_picks_query) or die(mysqli_error($conn));     mysqli_stmt_bind_param($stmt, 'ssssssssssss', $player_name, $pos1, $pos2, $pos3, $pos4, $pos5, $pos6, $pos7, $pos8, $pos9, $pos10, $pos11);      $player_name = $team[$l];     $pos1 = $most_common_formation[0];     $pos2 = $most_common_formation[1];     $pos3 = $most_common_formation[2];     $pos4 = $most_common_formation[3];     $pos5 = $most_common_formation[4];     $pos6 = $most_common_formation[5];     $pos7 = $most_common_formation[6];     $pos8 = $most_common_formation[7];     $pos9 = $most_common_formation[8];     $pos10 = $most_common_formation[9];     $pos11 = $most_common_formation[10];      mysqli_stmt_execute($stmt);     $result = mysqli_stmt_get_result($stmt);      while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {         foreach ($row as $r) {             echo "$r ";         }         echo "<br>";     }      // close statement     mysqli_stmt_close($stmt);   }


Flipping the Removable Media bit -- alternatives to BootIt?

There's a utility called the Lexar BootIt utility that flips the Removable Media Bit on certain USB flash drives.  I want to flip the bit on my USB flash drive (it's supported) but really am not too comfortable downloading this utility from random file-sharing sites, nor do I see a license anywhere for it.  The end goal is to recommend a tool for corporate customers so they may flip the bits themselves.  Are there any free or open alternatives to this tool?


Facing issues while using the update command on terminal

I am not so familiar with Linux and I am still learning. I am facing this issue whenever I run 'update' command on terminal.    How can I fix this?


I'm asking more about what this means to my code.  I understand the concepts mathematically, I just have a hard time wrapping my head around what they mean conceptually.  For example, if one were to perform an O(1) operation on a data structure, I understand that the number of operations it has to perform won't grow because there are more items.  And an O(n) operation would mean that you would perform a set of operations on each element.  Could somebody fill in the blanks here?   Like what exactly would an O(n^2) operation do? And what the heck does it mean if an operation is O(n log(n))? And does somebody have to smoke crack to write an O(x!)?


If $f(x) + f'(x) + f''(x) \to A$ as $x \to \infty$, then show that $f(x) \to A$ as $x \to \infty$

This problem is an extension to the simpler problem which deals with $f(x) + f'(x) \to A$ as $x \to \infty$ (see problem 2 on ).     If $f$ is twice continuously differentiable in some interval $(a, \infty)$ and $f(x) + f'(x) + f''(x) \to A$ as $x \to \infty$ then show that $f(x) \to A$ as $x \to \infty$.   However, the approach based on considering sign of $f'(x)$ for large $x$ (which applies to the simpler problem in the blog) does not seem to apply here. Any hints on this problem?  I believe that a similar generalization concerning expression $\sum\limits_{k = 0}^{n}f^{(k)}(x) \to A$ is also true, but I don't have a clue to prove the general result.


Following error output on  apt-get install -f:  E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?


How many wand makers are there in the Harry Potter universe? Is there only a select few people that can make wands or is there like a wand company?


I am parsing user input as an "int", but how do I handle invalid inputs?

I'm trying to make an If-else statement to parse input as "int", but I also want to resolve the exceptions. What if the input is a string? How can I make my computer reading different values in order to decide whether the input is right or wrong? Thank you. static void NumberApp() {     Console.Write("Choose a number, I'll count from that to 100: ");     int number = Convert.ToInt32(Console.ReadLine()); // How can I correct this?      if (number >= 100)     {         Console.WriteLine("Choose a number lower than 100.\n");         NumberApp();     }      else if (number < 100)     {         for (int i = number; i < 100; i++)         {             Console.Write(i + " ");         }         Console.Write("100.");     }      else if (number is string) //Error?     {         Console.WriteLine("Choose an integer\n");         NumberApp();     } }


I used the following code to find out the time past between two dates:  $date1 = "1900-00-00"; $date2 = "2000-00-00";  $diff = abs(strtotime($date2) - strtotime($date1));  $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));  printf("%d years, %d months, %d daysn", $years, $months, $days);   But this prints 100 years, 0 months, 24 daysn, instead of 100 years, 0 months, 0 daysn  What is going on?


Does $K \subseteq L$ and $K \cong L \implies$ $K=L$?

Suppose $K,L$ are infinite fields with $K \subseteq L$ and $K \cong L.$ Does it imply necessarily that $K=L$?  This is certainly not true for infinite groups. For instance $2 \Bbb Z \subsetneq \Bbb Z$ but $\Bbb Z \cong 2 \Bbb Z.$ Is there any similar counter-example for infinite fields?  Any help in this regard will be highly appreciated. Thank you very much for your valuable time.


I had a meeting at my Company's HQ office in Belgium from July 1 to July 15 my embassy's interview was at June 28 I had an accommodating and flight ticket from 1-7 July and of course it has been cancelled finally i've got a refusal from the embassy with code 2 (the purpose and conditions of stay plans have not been justified) Do you think i've got refused because of intervention between interview date and visit date ? And what am i suppose to do now especially we have another office meeting at Sep-15 do i have to appeal with the new ticket and accommodation date  15-30 SEP or i have to reapply one more time *i don't got any stamp on my passport  Please advise


How are lopsided binomials (eg $\binom{n}{n+1})?$ defined?

For instance is $\binom{n}{n+1}=0$ always or something else?


Minecraft doesn't work after updating to Windows 8.1

Minecraft has always worked great on this computer, until I updated it to Windows 8.1. I'm not entirely sure if it's because of Windows 8.1, or Java, or my graphic cards (Which it claims to be, but I've updated all the needed ones), or whatever. All of my other games work great. Anyways, here's the crash report:  ---- Minecraft Crash Report ---- // This doesn't make any sense!  Time: 10/29/14 9:43 PM Description: Initializing game  org.lwjgl.LWJGLException: Pixel format not accelerated at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method) at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52) at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:252) at org.lwjgl.opengl.Display.createWindow(Display.java:306) at org.lwjgl.opengl.Display.create(Display.java:848) at org.lwjgl.opengl.Display.create(Display.java:757) at org.lwjgl.opengl.Display.create(Display.java:739) at bsu.am(SourceFile:523) at bsu.aj(SourceFile:352) at bsu.a(SourceFile:299) at net.minecraft.client.main.Main.main(SourceFile:120)   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Stacktrace: at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method) at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52) at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:252) at org.lwjgl.opengl.Display.createWindow(Display.java:306) at org.lwjgl.opengl.Display.create(Display.java:848) at org.lwjgl.opengl.Display.create(Display.java:757) at org.lwjgl.opengl.Display.create(Display.java:739) at bsu.am(SourceFile:523) at bsu.aj(SourceFile:352)  -- Initialization -- Details: Stacktrace: at bsu.a(SourceFile:299) at net.minecraft.client.main.Main.main(SourceFile:120)  -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_67, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 76715600 bytes (73 MB) / 160890880 bytes (153 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. GL Caps:  Using VBOs: No Is Modded: Probably not. Jar signature remains and client brand is untouched. Type: Client (map_client.txt) Resource Packs: [] Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled)   I don't know too much about computers, but thanks anyways!


Why can't you defragment Solid State Drives?

I keep hearing that this is a huge no-no. Why is this? I run Ubuntu mostly so it doesn't affect me, but I was just wondering.


Why is "&" necessary to make a Unix fork bomb work?

Consider the canonical example of a Unix fork bomb:  DANGER: running the following command, might crash your system.  :(){ :|: & };:   I wonder why & (background) is needed in order to use up all of the system's resources - after all the function : is recursive? Also, I have attempted to execute : without &, but in this case Bash doesn't accept the syntax, why?


Can a Green Lantern's construct exist independently of the Green Lantern? And for how long?

If a Green Lantern can .   Can the Green Lantern then leave the new ring with that person indefinitely?  How long will the ring last?  Are there any example of this in any canon?


I am a US Citizen that also has Israeli citizenship. Can I leave the US on my American passport and enter Cuba on my Israeli passport?

I am hoping to visit Cuba in May direct from Miami. I am a US citizen that would leave Miami on my American passport, but when arriving to Cuba, I would show my Israeli passport. Is this a possibility?   My husband is a permanent resident of the US, but his main passport is the Israeli passport, so that should be no issue for him to come and go into Cuba, correct?


error in main: java.lang.NullPointerException

i'm new to java programming. i have a problem with my code, i keep getting this error no matter what i try. so i have a main class and a Pair class (which has 2 member variables (private int a, private int b) the Pair class has it's setters and getters. i have been trying to create an array of Pair and initialize it, yet i keep getting this error: Exception in thread "main" java.lang.NullPointerException  package com.company;  import java.util.Scanner;  public class Main {  public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     System.out.println("enter a puis b");     int x=0;     int y=0;      Pair p []= new Pair[6];      for (int i = 0; i < p.length; i++) {         x = sc.nextInt();         y = sc.nextInt();         p[i].setA(x);         p[i].setB(y);     }     for (int i = 0; i < p.length; i++) {         System.out.println(p[i]);     }   } }   heres the Pair class:  public  class Pair { private int a = 0; private int b = 0;  public Pair() {     this.b = 0;     this.a = 0; }  public int getA() {     return a; }  public void setA(int x) {     a = x; }  public int getB() {     return b; }   i need some help. thank you for your time :)


converse cauchy integral's formula: $F$ is holomorphic if $F(w) = \frac{1}{2\pi i} \oint_{\gamma} \frac{F(z)}{z-w} d z$?

Let's explain it more detail. Suppose that $U\subseteq \mathbb{C}$ is an open set. Let $F\in C^0(U)$. Suppose that for every $\bar{D}(z,r) \subseteq U$ and $\gamma$ the curve surrounding this disc (with counterclockwise orientation) and all $w\in D(z,r)$ it holds that \begin{align}   F(w) = \frac{1}{2\pi i} \oint_{\gamma} \frac{F(\zeta)}{\zeta-w} d\zeta \end{align} Textbook says that $F$ is holomorphic. How do I prove this from the definition of holomorphic. $i.e$, $\frac{\partial F}{\partial \bar{w}}=0$.


Unable to Deploy MetaData using Workbench/ANT

I'm trying to deploy a metadata package using the migration tool of workbench/ANT with no success. In both cases, I got "Maximum size of request reached" error message. The package file size is 80 mb. Can some shed some light on what I'm doing wrong?  Thanks in advance.


If ($X$,$\Sigma$,$\mu$) is $\sigma$-finite, is $L^p$ space separable with 1$\leq$p<$\infty$?  If it is correct, please tell me a proof.


What words describe the relation between "dollars" and "cents"?

A dollar can be divided up into 100 cents.  A Swiss franc can be divided into 100 rappen.  What are the words that describe these units (dollar vs cents or franc vs rappen)? I found out that currencies that are based on the decimal system are called "decimalised" currencies. But I did not find a word to describe the "base unit" and the "sub unit" for arbitrary currencies.  Usage example: "This number describes <x>, but it needs to be converted to <y>".


Is there some "types" of "discontinuous derivative"?

I'm just started learning standard Calculus class in the university (It treats James Stewart's "Essential Calculus: Early transcendentals" for 1 semester, just letting you know) and I got some questions about the relationship between 'differentiability of a function' (i.e.the existence of $f'(a)$ regarding $x = a$) and 'continuity of a derivative of function'. I made a derivative of a function on my own, which is $$f'(x)=\begin{cases}-x + 2 & x<0, \\ 1 & x=0, \\ -x & x>0. \end{cases}$$ I said the integral constant $C = 0$ arbitrarily for convenience. Because $f'$ is defined at every $R$, then $f$ is continuous at every $R$ by theorem (don't remember the number of it...) By integrating $f'$ at every interval, then we get $$f(x)=\begin{cases} -x^2/2 + 2x & x<0, \\ 0 & x=0, \\ -x^2/2 & x>0. \end{cases}$$ But by using the definition of $f'(0)$ and given $f(x)$, we have to say that $f'(0)$ doesn't exist! So this was a contradiction. I asked about this in my country's internet community, but the answers were the following.  "If $f'(a)$ exists, and $f'$ is not continuous at a, then there are 2 types.  Both left and right limit of $f'$ at $x = a$ exists but $f'$ is not continuous at $a$  Either left or right limit of $f'$ at $x = a$ doesn't exist, so $f'$ is not continuous at $a$.   $f'$ is only available at type 2.  I just accepted with no excuse, but after few days, I just wanted to know some prove about this. I read about  but as I said before, I just started Calculus, so it was too hard for me to understand some comments at there. I am not American or British, so I'm not very good at English and sorry about that. Question is that could somebody prove that "if $f'(a)$ exists and $f'$ is discontinuous at $x = a$, then left-hand or right-hand limit of $f'$ at $x = a$ doesn't exist." Thx for reading this awful long writing.


Performance comparison of result set extracting data using index vs column name

Would there be a difference in performance when i use index to get data vs column name and I am talking about doing this operation a millions of times a day in the server.  rs.getString(1) vs rs.getString("columnname");  EDIT:  JDBC version Oracle JDBC driver 10.2.0.4.0


How does System.out.println() works on binary data?

I am unable to understand the output of the below code  package beg;  import java.util.*; import java.io.*; public class Hell {     public static void main(String[] args)     {         System.out.println(10+010); //Prints 18         System.out.println(010+010); //Prints 16         System.out.println(010+10); //Prints 18     } }   Can somebody please explain?


Does a non-abelian semigroup without identity exist?

I was introduced to semigroups today and had a question. So all the examples of semigroups I was given were either monoids or groups. So I was curious, does there exist a semi-group which is not abelian and does not contain identity?   I tried to construct an example, but every example I tried to construct had an identity element.   Thanks!


How to remove a USB drive without worry if its been unmounted?

Sometimes I unplug my usb drive only to find out files were not written to it.   I suppose the only way to ensure files are written to it is to right click on the USB drive on the desktop and then select "un-mount", but sometimes I forget.  What is the best way to ensure files are written to the USB drive instantly? This way I can remove the USB drive as soon as I notice the LED light on the USB drive stopped blinking.  OS: CentOS 6


apt-get remove with wildcard removed way more than expected. why?

Last night I was trying to burn CDs. Being annoyed with k3b and choosing to use brasero instead, I went to remove k3b.  I typed in:  sudo apt-get remove k3b   I hit tab twice and saw that I had both k3b and k3b-data on my system. Assuming that I wouldn't need k3b-data on my system without k3b, I wanted to remove it as well so I typed in:  sudo apt-get remove k3b*   Unfortunately I hit Y to confirm without looking. It uninstalled a whole lot more than k3b and k3b-data. It uninstalled packages which did not fit my k3b* regex. For example: transmission and network-manager.  I'm fairly certain that I didn't have a space between k3b and * but I don't know why else it would remove all that it did. Is there something about apt-get that I'm misunderstanding?


I had opened a terminal to install macchanger via sudo apt-get install -y macchanger, and then entered my password. It stated that macchanger was already the newest version, so I typed clear and then ran:  sudo ifconfig eth0 down   which is when this error message appeared:  eth0 ERROR while getting interface flags: no such device   This is a laptop and I am connected via ethernet cable.  How can I resolve this, so that I can run macchanger?    So I used ifconfig -a and I'm looking but seeing no mention of  eth0  The interfaces that are showing top to bottom are:  enp58s0f1 lo tun0 UNSPEC wlp59s0   The only reference to ethernet is the MAC and also txqueuelen   Does this help in figuring what I need to do to get this sorted?


Camera perspective doesn't have small rectangle screen and rendering differently

I'm very new to Blender and I'm currently following Blender Guru's donut tutorial. However, I have a problem about my camera perspective that looks like this  And when I render it, it looks like this  Which is different from my camera perspective. What can I do about this?


Why does exit(0) in TRY loop result in an exception being thrown?

Consider the following example:  try:      print "Try this."      exit(0) except:      print "Failed."      exit(1)   When this simple example is executed, the following is printed to stdout:  Try this. Failed.   Forgive me if there is an obvious answer or if this has already been asked, but why does exit(0) (which should give me a clean exit) throw an exception?    I tried using a try: except: loop in an actual use-case script, and found that the script would exit(1) even when the try condition says to exit(0).  So I guess exit(0) is throwing a(n hidden?) exception of some sort, but why?  It doesn't show the traceback (such as when CTRL + C is used to generate a KeyboardInterrupt exception), and results in unexpected behavior such as in my case when I'm expecting a 0 return and end up with a 1 return.  Is an exception (any exception) the only way to exit a python script?


Are groups satisfying $g=g^{-1}$ for all $g \in G$ abelian?

Is the following statement true or false:  If $G$ is a group with the property that $g=g^{-1}$ for all $g \in G$, then $G$ is abelian.   I believe it is false since I know that abelian or commutative property implies that every element in $G$ must have an inverse. Thus $g\cdot g^{-1}= g^{1}\cdot g = e$. I need someone to check my attempt.


Load PostgreSQL database from corrupt drive

I suffered corruption of a hard drive but managed to recover files for a PostgreSQL server. We are running on the assumption that the files themselves are not corrupted (yet to be able to tell). My server was running on Windows 10 Pro.  Is it possible for me to load the database(s) onto another PC running the same server version? I have the entire directory recovered from "Program Files/PostgreSQL/11" onward (so I have all of "data" etc).  If so can someone guide me on how to do this, or direct me to existing guidance? I really need to recover this data and sadly with the above corruption I lost the drive containing my dump files (backups).  Can I simply copy the "data" folder into a new build, or is it a bit more complex than that?


PHP How to get the timestamp of a server in unix?

Hello there :) I am basically trying to pull data from a MySQL table, and with it I need the PHP to get the current time on the server as well. So E.G. if it is currently 16-12-2015 and 20:50:36, i need this time to then be converted to unix (which is done with strtotime()).  My question is, how do I get the time of the server in unix put into a $variable?  Thank you,  Joshua


Position vs Time Function for a Falling Object Without Assumption of Constant Acceleration

If you have an asteroid for example and a planet, isolated from all other gravitational influence and initially at rest with respect to each other, how would you find a position vs time function for the asteroid and the planet falling toward each other?


Exporting x,y coordinates as latitude,longitude

I have a shapefile and I loaded it into QGIS using Add vector layer. After that, I can see points in different positions. I open the Attribute table and I can see columns "X" and "Y" with values such as (151449.965057, 204642.790761). Now I want to convert them to latitude and longitude. How can I do that? Therefore, I use the option Save as to export the data to csv format using the CRS WGS 84. However, nothing changes in the CSV file ("X" and "Y" stay the same as the original data).  I read and tried several suggestions from this forum without help, e.g., .


Physic simulation hitting non existing face

I'm trying to make a simple animation: ice cubes falling into a glass. I modeled my glass, my cube and applied Rigid body behavior to them (Active/Passive). But for some reason (probably me being stupid), the cube is stopped in its fall by a non-existing face at the top of the glass. I tried to switch the collision shape (tried pretty mush all the possibilities) and it didn't solve the issue.  What am I doing wrong here? Thanks in advance !


If posed with the subject question, given that I will not do the action in question, then what is the correct answer     No, I will not do it.   or      Yes, I will not do it.   #1 sounds better to me, but #2 is more logical. #1 sounds somewhat paradoxical in context of the question.


I'm a newbie on programming (sorry for that) and I have a problem regarding these errors on my windows form application using the myo armband:   Cross-thread operation not valid: Control 'label5' accessed from a thread other than the thread it was created on.  I've read that i need to use backgroundworker but i think i cant use backgroundworker class on this one. so, here is my simplified code:  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;  using MyoSharp.Device; using MyoSharp.Communication;  namespace HandGestureApplication { public partial class Form1 : Form {     private readonly IChannel _channel;     private readonly IHub _hub;     public Form1()     {         InitializeComponent();         MessageBox.Show("Lets get started");         _channel = Channel.Create(ChannelDriver.Create(ChannelBridge.Create()));         _hub = Hub.Create(_channel);          _hub.MyoConnected += Hub_MyoConnected;         _hub.MyoDisconnected += Hub_MyoDisconnected;     }      private void Hub_MyoDisconnected(object sender, MyoEventArgs e)     {         MessageBox.Show("disConnected");         e.Myo.OrientationDataAcquired -= Myo_OrientationDataAcquired;         e.Myo.SetEmgStreaming(false);     }      private void Hub_MyoConnected(object sender, MyoEventArgs e)     {         MessageBox.Show("Connected");         e.Myo.OrientationDataAcquired += Myo_OrientationDataAcquired;         e.Myo.SetEmgStreaming(true);     }      private void Myo_OrientationDataAcquired(object sender, OrientationDataEventArgs e)     {         const float PI = (float)System.Math.PI;          var roll = (int)((e.Roll + PI) / (PI * 2.0f) * 10);         var pitch = (int)((e.Pitch + PI) / (PI * 2.0f) * 10);         var yaw = (int)((e.Yaw + PI) / (PI * 2.0f) * 10);          label5.Text = roll.ToString(); // this is the error     } }   I've used pictureBox and it works fine but when i use textbox or label, it gives me that error. I know there's a lot of solutions here, i've tried some of them but still i'm in error. I hope you can help me. i really appreciate if you will help me. Thanks guys.


What characterizes a function that is easy to learn?

When performing machine learning, the performance of the machine learning method is dependent on the original function $f$ that we are trying to learn (let's forget for a moment the non-deterministic error and focus on the properties of $f$).  I have a conceptual question. What would make a function easy to learn? For instance, a linear function can be easily learnt by linear methods such as linear regression and SVM. But in the general case, what would make a function easier to learn for decision trees or a neural network?   I believe feature engineering helps us move to a feature space in which the function we want to approximate is easier to represent. But what properties exactly are we trying to achieve for this function?


Natural class of functions whose $\mathcal O$-sets are linearly ordered

In doing complexity analysis of algorithms, we often restrict to their asymptotic complexity. A function $g: \mathbb N \to \mathbb R_+$ is asymptotically bounded by $f: \mathbb N \to \mathbb R_+$ if there are constants $c \in \mathbb R_+, N \in \mathbb N$ such that for each $n \geq N$, $$ g(n) \leq c\cdot f(n). $$ The set of all such $g$ is referred to as $\mathcal O(f)$. By letting $g \preceq f$ if $\mathcal O(g) \subseteq \mathcal O(f)$, we obtain a preordering on the set of functions $\mathbb N \to \mathbb R_+$.   Examples of functions that typically come up as complexities of algorithms are: $$\tag{*} \log(\log(n)), \log(n),\log(n)^2, \sqrt{n}, n, n\log(n),n\sqrt{n},n^3, 2^n, 3^n, 2^{2^n}. $$ Interestingly, these functions are all linearly ordered by $\preceq$. Note that it is not hard to find functions which are not linearly ordered by $\preceq$, like $|\sin(n)|$ and $|\cos(n)|$, and with some fiddling it would not be too hard to make examples of strictly increasing (or even convex) functions which are not linearly ordered by $\preceq$. However, these examples all seem artificial, and in particular I would be surprised if they ever came up as complexities of algorithms.  Can we explicitly give a nice class of functions that includes at least all the functions listed in (*), and for which $\preceq$ is a linear ordering? Is this class also closed under some operations, like multiplication, exponentiation by a constant, or taking logarithms? And, perhaps, could we even justify why any algorithm is likely to have a complexity in this class?


Calculating sum of values in point shapefile within moving window using QGIS

I have a point shapefile that has a 'rank' attribute with numbers between 0-100. I need to calculate the sum of this value for points within a 10km circular moving window anywhere within my area of interest. The result would be a raster, where each pixel represents the sum value of the ranks taken from all point features within a 10km radius. In ArcGIS Desktop, I could do this using the Point Statistics tool. Is there a way of doing this in QGIS?


What is the proof for Gauss's law? Can you give me some explanation and details with the proof?


Diablo 3 adding second weapon is decreasing my overall damage ? Why is this?

I am not a Diablo 3 expert so I just want to know why after adding a second weapon for my monk, my overall damage decreases ?!


What is the source of the difficulty (within the variational approach framework) in the attempt to unify quantum mechanics with general relativity?

It seems to me that quantum mechanics can be formulated within the general mathematical framework of variational  principles.  Derivation of the equations of nonrelativistic quantum mechanics based on the principle of minimum Fisher information.     On the other hand, it looks like that is not the case for general relativity.  The Einstein field equations cannot be derived, based on the minimum or maximum of the  action integral.    As long ago as 1900, Hilbert formulated problem 23 (In his famous list of problems ).     You have to read the original formulation of this problem, not the Wikipedia version. The connection with this question will be clear.  Question 1. Is this the source of the difficulty in the attempt to unify quantum mechanics with general relativity?  Question 2. Is it possible to imagine some other measure of information, related to our knowledge of a physical system  (analogy with Fisher information ),  so that general relativity can be cast within the mathematical framework of variational  principles?


Finding all the possible values of an Integral in the Complex Plane

I am studying Complex Analysis by Lars V Ahlfors. I am unable to solve one of his exercises. It is:  Find all possible values of $$\int \frac{dz}{\sqrt{1-z^2}}$$ over a closed curve.  I do not have any clue as to how to solve the above problem, if the denominator terms like $z-z_0$ then I can try winding a curve around $z_0$. But in this in particular question I cannot think of any way to approach it. If anyone can give some hints it would be great. Thanks.


Is there any unwritten rule in the academia regarding the rate of paper publication during the PhD?

Is there any unwritten rule in the academia regarding the rate of paper publication by a PhD student?  I.e. how many paper publication per year is considered as a good performance for a PhD student?  How does that vary from 1st to last year?


I am running Windows 7 x64. I have a file type that I want to associate with Microsoft Access 2003.  I right-click on the file and select Open With->Choose Default program. In the "Open With" dialog, I select the browse button. I choose Program Files (x86)\Microsoft Office\Office11\msaccess.exe and press "Open".  I end up back at the "Open With" dialog, but nothing has changed. Access is not listed as a program to use to open the file with. The original program (Adobe Acrobat) that is associated with this program is still selected.  Any tips on getting this association to work?


Can't find folder that file was just written to

I just wrote a new config file for Jupyter in my shell:  jupyter notebook --generate-config   The output of that command says:  Writing default config to: /home/me/.jupyter/jupyter_notebook_config.py   I can change the directory in my shell by doing cd ~/.jupyter/, but I can't find the folder anywhere in the GUI, which is what I'd like.  How can I find it? Where is this thing exactly?


Who has the better claim to the Iron Throne, Gendry or Jon Snow?

So, supposedly Jon Snow is an heir to the Iron Throne because he is the son of a Targaryen prince. However, Gendry is the son of an actual king. So, is it better to be son of a prince, or the illegitimate son of a king?


How do I change which audio jacks are used for input and output?

I'm using a Realtek HD audio card built-in my motherboard. The Windows driver comes with a control panel that allows me to select which back panel jacks are used for what. So for example I can make both the blue jack and green jack for output and only the red one for mic-in. (Whereas by default, the blue jack is for line in, which I never need.)  How can I do the same under Linux? If possible, please don't suggest something that involves PulseAudio or JACK; I'd like to do it the plain way, e.g. by editing ALSA configuration files, if possible. The way I understand it, my problem should have nothing to do with software servers redirecting streams, just instructing the driver to treat this jack as so and so because it's hardware supported.  Thank you very much!


How do these anonymous VPNs work? They say you can browse the web using a different IP address than your own. How does this work?  I understand the Virtual Private Network model, I am just confused on how I browse the web with a different IP?


I have an issue with getting correct date of last Monday of previous month. I think there isn't absolutely right to calculate it like in  question and want to refuse arithmetic operations with constants. This code working as expected:  public class mCalendar {   private int thisMonth;   private int prevMonth;   private int lstDayThisMonth;   private int lstDayPrevMonth;   private int weekOffset;   private int LstMnd;   public String monthLetter;   Locale locale = Locale.getDefault();   private Calendar mCal;  public mCalendar(){   this.mCal = Calendar.getInstance();   mCal.set(Calendar.MONTH,0);   this.thisMonth = mCal.get(Calendar.MONTH);   this.prevMonth = thisMonth - 1;   this.lstDayThisMonth = mCal.getActualMaximum(Calendar.DAY_OF_MONTH);   this.monthLetter = mCal.getDisplayName(Calendar.MONTH, Calendar.LONG, locale);    mCal.set(Calendar.MONTH,prevMonth);   this.lstDayPrevMonth = mCal.getActualMaximum(Calendar.DAY_OF_MONTH);   mCal.set(Calendar.DAY_OF_MONTH,lstDayPrevMonth);   this.LstMnd = mCal.get(Calendar.DAY_OF_WEEK_IN_MONTH);   mCal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);   mCal.set(Calendar.DAY_OF_WEEK_IN_MONTH, LstMnd);   this.weekOffset = mCal.get(Calendar.DAY_OF_MONTH); }   But when I set Calendar.MONTH to 1 in second instruction of constructor's body Calendar.DAY_OF_MONTH return frist Monday of February. I expect the function return me January 26 but it's return February 2. I think it's happens because February 1 it's a Sunday but, for example, for March code is working correct.  Help me please, i'm confused)