In our bio class our teacher told us that entropy was the amount of heat lost by a system. But I had learned before that entropy was like chaos / disorder in a closed system. Which definition Is right, or does entropy have different definitions in biology and physics?


Splitting a string into words and punctuation

I'm trying to split a string up into words and punctuation, adding the punctuation to the list produced by the split.  For instance:  >>> c = "help, me" >>> print c.split() ['help,', 'me']   What I really want the list to look like is:  ['help', ',', 'me']   So, I want the string split at whitespace with the punctuation split from the words.  I've tried to parse the string first and then run the split:  >>> for character in c: ...     if character in ".,;!?": ...             outputCharacter = " %s" % character ...     else: ...             outputCharacter = character ...     separatedPunctuation += outputCharacter >>> print separatedPunctuation help , me >>> print separatedPunctuation.split() ['help', ',', 'me']   This produces the result I want, but is painfully slow on large files.  Is there a way to do this more efficiently?


Why does russian text taken from database table and info put into table turn into question marks and weird symbols?

$query = "select * from korzina"; $result = mysqli_query($link, $query); echo "
"; echo "
№	Аты	Бағасы	Саны
"; while($r = mysqli_fetch_assoc($result)){ echo "
$r[id] 	$r[Name] 	$r[Price] 	$r[Num]
"; echo "delete	"; }   when i display database info on an html page like that, russian letters turn into question marks.  and when i add info like this:  $sql= 'INSERT INTO korzina (Name, Price, Num) VALUES ("'.$nam.'","'.$prcc.'", "0")'; mysqli_query($conn, $sql);   in the database it is displayed with symbols like this Ð¹Ð¹Ð¹, Ñ†Ñ†Ñ†, Ð½Ð½Ð½, but on the html page it's completely fine.  everywhere i could think of is set to utf8


Wordpress Website now showing 404 Error? Can't fix

My website: www.kmskinboutique.com   It is now showing a 404 Error warning on 1/2 the page (on the homepage & tabs).  Nothing is missing - the warning just pushed my website down.  I have searched & can't figure out how to repair.  Any help out there??  I recently updated all of my Plug-Ins so I'm not sure which one may have caused this (if they did at all!)  Thanks in Advance! ~K


I have an HTML string as shown below
HARRISBURG - gov today issued a consumer alert about an apparent scam concerning the Affordable Care Act. In recent days, people across the country have received calls asking for personal information, in order to obtain a "national medical card" from the government. No such card exists.

"Do not ever give out personal, health care or bank account information over the phone, unless you initiated the call and you know who is on the other end," said Kane.

Kane says if someone calls, offering to help you obtain this nonexistent national medical card, you should call the AG's Health Care Hotline at (877) 888-4877.  Any information you can provide-- such as the name, telephone number, or location of the caller-- will be very helpful.

You can learn more about this (and other scams) by visiting the gov's website at     http://www.example.org     .

The Health Care Section of the test General's website can be found here:     http://www.example.org/complaints.aspx?id=458
   Is need to put some extra HTML after the first paragraph by C#.  How can I split the HTML string based on p tag and insert some more HTML after the first or second paragraph?


Please give me a hint for this problem.  Let $R$ be a ring, and $I$ a right ideal of $R$. Show if $M$ is a left $R$-module, then $$ f  \   \colon (R/I) \otimes_{R} M \to  M/IM$$  defined by $ f((r+I) \otimes m) = rm + IM$ is an isomorphism of commutative groups.   And show that if $L$ is a left ideal, then  $$ (R/I) \otimes _{R} (R/L) \cong R/(I+L)$$ as commutative groups.


\phantom causes a spacing issue between paragraghs

Could anybody tell me why does phantom command create paragraph spacing issues as described in :     This sort of code  Vin.\ i zvat.\ mn.\ imaju akcente kao i im.\ mn.: \emph{zȗbe : zȗbi},  \emph{knȅzove : knȅzovi}, \emph{púževe} i t.\ d.  \phantom{a}\symbol{"0311} na ˊ u svima padežima osim onih koji će se  na po se spomenuti, n.\ p.\ \emph{strȋc} ima u rod.\ jed.\ \emph{stríca}, dat.:  \emph{strícu}, vin.: \emph{stríca}, tvor.: \emph{strícem}, skaz.: \emph{strícu};  tako \emph{dvȏr} ima u im.\ mn.\ \emph{dvóri} i \emph{dvórovi}, i t.\ d.       produces            Why the such a big space between the paragraphs?   Does anybody know?


A rectangular box is to have a square base and a volume of 40 ft3. If the material for the base costs \$0.31 per square foot, the material for the sides costs $0.05 per square foot, and the material for the top costs \$0.19 per square foot, determine the dimensions of the box that can be constructed at minimum cost.  Ive been trying to solve this for a while but I can't figure out what the cost function should be. or even how i should construct the volume equation.


How to rewrite laravel /public directory

So by default the index.php is in the public directory. I want to rewrite the url so that abc.com/public/ becomes abc.com/ ??  I am very new to url rewriting ..


vim inside tmux: throws "E388" with  in insert mode

I've read that in insert mode in vim, one can use <C-Left> and <C-Right> to move by words. This works for me, but only as far as I don't run vim inside tmux terminal splitter.  When inside tmux, <C-Left> instead throws me out of the insert mode and gives an error:     E388: Couldn't find definition   This error is explained in the help to have something to do with definition searching. However, I don't want any definition to be searched for, I want just to move one word to the left. As well, <C-Right> does nothing more than throwing me out of the insert mode, not what I would like.  Reading somewhere that this might be connected to set (no)esckeys, I tried it with both settings of this flag, with the very same result. As well, I have seen the answers in  but they don't appear to help me.  My current .tmux.conf:  # This File is : ~/.tmux.conf  # use "|" and "-" to do vertical/horizontal splits # (press CTRL B and then - or |, CTRL D to close it) unbind % bind | split-window -h bind - split-window -v  # use the vim motion keys to move between panes # (press CTRL B and then h,j,k,l for the move) bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R  # use vim motion keys while in copy mode # To copy, press CTRL B and then [, move, space, move, enter. # To paste, press CTRL B and then ] setw -g mode-keys vi  # make vim work properly inside tmux setw -g xterm-keys on set -g default-terminal "screen-256color"   And .vimrc:  " tabs, indentation, line numbering set ts=4 sts=4 number autoindent sw=4  " sage is python au BufNewFile,BufRead *.sage set filetype=python  if &term =~ '^screen'   " Page keys http://sourceforge.net/p/tmux/tmux-code/ci/master/tree/FAQ   execute "set t_kP=\e[5;*~"   execute "set t_kN=\e[6;*~"    " Arrow keys http://unix.stackexchange.com/a/34723   execute "set <xUp>=\e[1;*A"   execute "set <xDown>=\e[1;*B"   execute "set <xRight>=\e[1;*C"   execute "set <xLeft>=\e[1;*D" endif


Is there a benefit for accessing fields via `this`?

I am looking at a very old code-base, and every field access follows this pattern:  void method() {   TYPE fieldRef = this.field;   // Use fieldRef instead of field }   I can't figure out why this pattern is followed rigorously. Is there some performance benefit to this? Does it have something to do with how fields behave with inheritance?


What are some good tutorials on writing custom styles (classes) that clearly explain commands used and some of the features that TeX has to offer in the way of styles?


Why does Java Specifications want the main method of a program to be void only?

Although the return type is not a part of a method's signature, JVM looks for exact declaration as   public static void main(String[] args)   My assumption is that since method signature does not have "return type" included, I must be allowed to change the return type.  But if I change it to public static int main(String[] args) and return a value lets say 0, JVM is not able to execute the program and exits with an error  Error: Main method must return a value of type void in class TestData, please  define the main method as:    public static void main(String[] args)   Why do Java Specifications want the main method to be void only? Why is this restriction, when return type is not a part of method signature?  This question is different than  : this question is closed as it is opinion based, while I am looking for the code places/ processes from where JVM is invoking this method, and what are the limitations which are forcing them to keep this method as void. What are the design decisions they have taken (and the reasoning behind), and where is it documented.  I am looking for facts, so as to know the reason why is it done so. Please don't mark it duplicate without going through the details of the question.  PS: exit, is another thing. I am more concerned about entry of the program. Also, the returned value might not be to the use of JVM, restricting it to void limits extensibility.  So far what I have learnt from this question is : Java specifications have explicitly fixed return type to avoid confusion to migrating programmers (C/CPP) who may expect this value to return to OS, but since JVM is in-between this value will never be returned to OS. For this special purpose (returning value to OS) they have provided System.exit() method.    For all those who are suggesting that return type is part of signature-- Just try to define both of the following methods in a class      public static void main(String[] a){      }     public static String main(String[] a){      }   You will get a compilation error, because signature of both of these methods is same.


Stack overflow UI display is strange - what happened?

My Stack Overflow page displays like following.   I have logged out and logged in and also closed the browser and reopened it but still no change:


Show that the cardinality of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$

Show that $| \mathbb N | = | \mathbb N \times \mathbb N |$, i.e., the cardinality  of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$.   How do I show it using the Fundamental Theorem of Arithmetic and the Schröder–Bernstein Theorem?


window-switching keyboard shortcuts interfere with emacs and cannot be changed in the main keyboard system preferences

As of Ubuntu 16.04, Some emacs key combinations involving Ctrl and Alt conflict with the keyboard shortcuts in Ubuntu. One way to fix this is to go to System settings > keyboards > shortcuts and disable / change all the ones that conflict.  A similar question was .  However, there are some shortcuts that are not in that setting. For example, in emacs, Alt-` (backtick key) is used to open the emacs menu. However, in Ubuntu, it opens up a window switcher with a preview. Similarly, Alt-Tab toggles the switcher. These shortcut keys are not in System settings > keyboards at all.  How can the windows-switching shortcuts be remapped so that they don't interfere with emacs?


How do I publish symlinks as regular files over SMB3?

I have this file that's dropped in a Mac via rsync, then Windows fetches it but it needs it to be named differently according to use, so the obvious answer, I thought, was to symlink it into all of these files, except that Windows recognizes it's a symlink and can't follow its location. How do I modify Samba (I'm guessing) to serve it as independent files? i.e; hide the fact that it's a symlink from Windows…or other clients, since I suppose I can't single out a single client. If it's relevant to anything; the Mac is domain-joined as are the Windows hosts; domain credentials are being used to set/access share permissions.


Can we say "He is a friend of mine I love" instead of "He is a friend of mine who/that I love"?

To mean "He is a friend of mine who I love" or "He is a friend of mine that I love", can I say "He is a friend of mine I love"? When I omit "who" or "that" in that sentence, it sounds wrong to me. I think I am not used to that structure. What do you think?  Note: I know (that) relative pronouns can be dropped like in "He is someone (that/who) I love", but in the sentence I gave, I think it is wrong to omit it because "a friend" was already modified by "of mine".  Context: I am talking about a friend, and I am saying I love him.


Probability an integer chosen at random from 1 to 1000 is divisible by 3,5, or 7

A number is chosen at random from the first 1,000 positive integers. What is the probability that it's divisible by 3,5, or 7?   So I started off by breaking the problem up and having: divisible by 3: p(a) divisible by 5: p(b) divisible by 7 p(c)    I know I'm going to apply the exclusion inclusion principle, but how do I find out how many numbers are divisible by each without going through all the numbers between 1 and 1000?


For some reason, I am not able to do any citations or even my bibliography. I get a "[BibTeX] finished with exit code 2" message when I compile in Kile. Yet, all seems to be ok in my bibliography.   Here is what I'm doing in my document:  \documentclass[12pt,oneside]{article} \pagestyle{plain} \usepackage[sort,round]{natbib} %package for bibliography \bibliographystyle{authordate1}%unsrtnat sets as sorted by order of appearance  \begin{document} \section{This is a section}  Citation: \nocite{*}  Citation with something: \citep{CHANCE1952}  \section{Bibliography} \bibliography{/home/my/path/to/library/test} \end{document}   Which outputs    Here is what my library has (yes, only one reference for testing purposes)  @article{CHANCE1952,    author = {Chance, B. and Greenstein, D. S. and Roughton, F. J.},    title = {The mechanism of catalase action. I. Steady-state analysis},    journal = {Arch Biochem Biophys},    volume = {37},    number = {2},    pages = {301-21},    note = {CHANCE, B GREENSTEIN, D S ROUGHTON, F J W Not Available Arch Biochem Biophys. 1952 Jun;37(2):301-21.},    keywords = {*Oxidoreductases Testis/*anatomy & histology},    year = {1952} }   and I'm compiling by doing PDFLatex > Bibtex >pdflatex > pdflatex >viewpdf. Could someone please help me out?  Thank you in advance!  Edit: here is part of Bibtex's output to the file .blg  ... The top-level auxiliary file: test.aux I couldn't open style file authordate1.bst ---line 2 of file test.aux  : \bibstyle{authordate1  :                      } I'm skipping whatever remains of this command I found no style file---while reading file test.aux You've used 1 entry, ...


How should I calculate the $n$th derivative of $f(x)=x^x$?

What would be the $n$th derivative of   $ f (x) = x ^ x$  I have reached the fifth derivative, very long indeed but I see no pattern that will help me find a general expression.  \begin{align*} \frac{df}{dx} &= x^x(1+\ln(x))\\ \frac{d^2f}{dx^2} &= x^x\left(\frac{1}{x}+1+2\ln(x)+\ln(x)^2\right)\\ \frac{d^3f}{dx^3} &= x^x\left( \frac{-1}{x^2}+\frac{3}{x} + \ln(x)^3 + 3 \ln(x)^2 + \frac{3\ln(x)}{x} + 3\ln(x) + 1 \right)\\ \frac{d^4f}{dx^4} &= x^x\left( \frac{2}{x^3}-\frac{1}{x^2}-\frac{4\ln(x)}{x^2}+\frac{6}{x}+\ln(x)^4+4\ln(x)^3\right.\\ &\qquad\qquad\left.+\frac{6\ln(x)^2}{x}+6\ln(x)^2+\frac{12\ln(x)}{x}+4\ln(x)+1 \right)\\ \frac{d^5f}{dx^5} &= x^x\left( \frac{-6}{x^4}+\frac{10\ln(x)}{x^3}+\frac{5}{x^2}-\frac{10\ln(x)^2}{x^2}+\frac{10}{x}+\ln(x)^5+5\ln(x)^4\right.\\ &\qquad\qquad\left.+\frac{10\ln(x)^3}{x}+10\ln(x)^3+\frac{30\ln(x)^2}{x}+10\ln(x)^2+\frac{30\ln(x)}{x}+5\ln(x)+1 \right) \end{align*}


Find $\displaystyle\lim_{n\to \infty} \bigg[\frac{1}{1\cdot3}+\frac{1}{2\cdot5}+...+\frac{1}{n\cdot(2n+1)}\bigg]$ .  This is a similar question as I've asked an hour ago .   But here, I am not able to rearrange terms to use the fact that $\gamma_{n}=\sum_{n=1}^n \frac{1}{n} -\log(n)$ .  Any ideas ? Or Is there any other way to find limit?


How can I zero the unused blocks on my filesystem in order to minimize the compressed disk image size?

If I dd my disk and compress the image with lzma or lzo the image is still big. The partition is 10GB used, 90GB available. But the image still around 20GB. I believe that is because I have copied many and deleted many files on that disk and the filesystem doesn't zero the unused blocks from those deletions.  How can I zero the unused blocks in order to minimize the disk image? So that dirty bytes don't add up on my image. I'm using ext4.


Is giving lightsabers to young children safe?

Yoda is teaching a group of younglings in AotC:    Isn't that equivalent to handing them chainsaws without protection?


How can I get an error report when I execute a command in Ubuntu server? (Backup on PostgreSQL)

I have to do a backup of a (heavy) PostgreSQL database in Ubuntu Server and I want to make sure that I don't have any fails.  The command is:   pg_dump database_name -h localhost -p port_number >> backup_file.sql   What do I have to add to this command to get an error report (if there is any error) in a specific location?


How to exclude expressions placed after specific sign in RegEx

I have a question regarding RegEx - I try to use negative lookahead in order to exclude found expressions as of specific rule, but it seems like my knowledge of the syntax is not enough to get around the problem. I currently have a regex pattern: ([A-Z]{2}\d{4}|[A-Z]{1}\d{5,6}|\b(?!20\d\d\b)\d{4,6}) which among other things is supposed to filter out expressions with 4 to 6 digits (excl. the ones which might be dates for year - preceeding negative lookahead) (the last alternative in the provided expression). As it happens, for this regex I would also need to exclude numbers which are happening after hyphen (so basically I found out that for the data I'm working with, sometimes it happens that I have codes like X-1234 for which it finds 1234 but then I'm sure it's not a code I'm interested in (I know that those codes would be always separated by space or would be at the beginning of whole sentence, e.g. "1234 xxxx yyy zzzz" or "xxxx 1234 yyyy".) Would you have any ideas how to incorporate this kind of condition in the provided RegEx in order to make it work? I assume it has to be next to the negative lookaround for 20\d\d, but I couldn't find a way to incorporate it so it doesn't disable the whole pattern. Would much appreciate any help or ideas!


Wrong Calculation ? C programming beginner

I'm learning c via a guide book and i am enjoying it. However, there is one question that i am stuck.  The question is:   "Write a program that when writing number "x" and number "y", the program shows how much % of x is in y."  "The answer should be 64 % when x = 54 and y = 84"  Obviously, 54 / 84 = 0.64...  * 100, which is about 64 %. However, when I run my program it shows 84.689699. I tested without the "*100" but nothing. It shows 0.84689699...  Is my program wrong or is it a problem of the compiler or something? I am a beginner and it would be very helpful if someone tells me what is wrong.  PS: I use atom.io and gcc-compiler   #include <stdio.h>  int main(void) {   double vx;   double vy;    printf("Enter the 1st number : "); scanf("%f" , &vx);   printf("Enter the 2nd number : "); scanf("%f" , &vy);    printf("\a\n\nx is %f of y" , vx / vy * 100);   return 0; }


Formatting Literal parameters of a C# code snippet

Is there any way that I can change how a Literal of a code snippet renders when it is used in the code that the snippet generates?  Specifically I'd like to know if I can have a literal called say, $PropertyName$ and then get the snippet engine to render "_$PropertyName$ where the first character is made lowercase.  I can't afford R#.  Please help :)


Evaluating $ \lim_{x\rightarrow \infty}e^{-x } + 2\cos(3x)$

Find the limit or prove that it does not exist by $\varepsilon-\delta$ approach: $$ \lim_{x\rightarrow \infty}e^{-x } + 2\cos(3x)$$    Note:I found this question when I was doing exercise from the book . The book just need me to show it does not exist, but I think it would be interesting to strictly prove it by $\varepsilon-\delta$  language.       Update: This question is not duplicate to the other question at all, since I am asking a strictly proof by $\varepsilon-\delta$ approach here rather than just show it does not exist. I also emphasized the requirement in my Note when I post this question. Although those two questions hold the same functions, but they have different requirements.Hence, It actually totally different from another one.


How do I install the Windows 7 boot loader?

I have 2 hard disks, on first I have installed win xp. I boot into xp and run setup of win7 and installed it on second hard disk. Now the problem is that win7 bootloader is installed on first harddisk, so if I remove the first harddisk, I cannot boot into win7.   How I can move / install bootloader of win7 on second hard disk?


Short story identification: girl addresses school in the face of genetic-engineering health-scare

An earlier, unanswered, question has had me scratching my head trying to remember the author and title of particular short story.  In the background revealed in the story, there is a health scare amongst the parents of a school. Children have received genetic modification intended to be improving. The change has an unexpected defect, causing  the eldest of the enhanced children have started to spontaneously fit and (it is implied) die. If I remember correctly, the epileptic fitting is referred to as 'blitzing',  The story itself is presented as a a first-person address by a girl, one of the few without the modification, to her school appealing for calm and understanding.  I must have read this in the early nineties, but the anthology it was in could have been published any time in the previous 15 years. I had thought it was by Asimov, but I've looked through all of the collected works and can't find it, so I suspect it was perhaps an anthology that he edited.


How to print out or iterate for each event listener attached to element?

How would one print out to console, or iterate for each event listener that is attached to specific DOM element? I have tried using .eventListenerList but I am getting undefined.


I have a four-port USB hub and four USB/serial adaptors. I want to ensure that the adaptor in port 0 is always called 'ttyUSB0' and so on.  udev will not allow device renames, with a rule such as:  KERNEL=="ttyUSB*", KERNELS=="1-1.4", NAME="ttyCOM3"   I get:  NAME="ttyUSB3" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/00-ttyUSB.rules:3   a symlink is allowed, with a rule such as:  KERNEL=="ttyUSB*", KERNELS=="1-1.4", SYMLINK+="ttyCOM3"   resulting in:  /etc/udev/rules.d# ls -al /dev/ttyUSB0 /dev/ttyCOM* lrwxrwxrwx 1 root root         7 Oct  7 11:22 /dev/ttyCOM3 -> ttyUSB0 crw-rw---- 1 root dialout 188, 0 Oct  7 11:22 /dev/ttyUSB0   the udev manual says "See systemd.link(5) for a higher-level mechanism for setting the interface name. The name of a device node cannot be changed by udev"  but this seems to only refer to network interfaces.  Is it possible to configure systemd (or some other layer) to create the ttyUSB[0123] nodes the way I want?  Thanks,


How to view a specific command executed in terminal by time?

I need to view a command in history by time executed in Ubuntu 12.04 .  So , I could know each command , the time it has been executed .  That help when you want to view a command that you should execute in a specific time .


prove that if $E$ is connected and $E \subseteq F \subseteq \overline{E}$, then $F$ is connected.

Define a set $A$ to be disconnected iff there exist nonempty relatively open sets $U$ and $W$ in $A$ with $U\cap W = \emptyset$ and $A = U\cup W.$ Define a set $A$ to be connected iff it is not disconnected.(there are many equivalent definitions, but I want to prove this lemma using this one). Prove that if $E$ is connected and $E\subseteq F \subseteq \overline{E},$ then $F$ is connected.  Let $U, W$ be a separation for $F$. Find open sets $O_U$ and $O_W$ so that $U = F \cap O_U$ and $W = F\cap O_W.$ I claim that $E\cap O_U, E\cap O_W$ separate $E$. However, I'm unable to show that $U' = E\cap O_U, W' =E\cap O_W \neq \emptyset$ (I think this should be straightforward, but for some reason, I can't figure this out). Suppose $U' = \emptyset.$ Then $E\cap O_U = \emptyset.$ Since $E \subseteq F = U\cup W = F\cap (O_U \cup O_W)\subseteq O_U\cup O_W,$ we have that $E \subseteq O_W,$ so $E\cap O_W = E\subseteq F\cap O_W = W\subseteq F\subseteq \overline{E}.$ Observe that since $E\cap O_U = \emptyset, F\cap O_U = (F\backslash E)\cap O_U\subseteq F\backslash E.$ Similarly, $W'\neq \emptyset.$ Clearly, $U', W'$ are relatively open in $E$. Suppose $U'\cap W' \neq \emptyset.$ Let $x\in U'\cap W'.$ Then $x\in E\cap O_U\cap O_W \subseteq F\cap O_U\cap O_W = U\cap W = \emptyset,$ a contradiction. So $U'\cap W' = \emptyset.$ Also, $U'\cup W' = (E\cap O_U)\cup (E\cap O_W) = E\cap (O_U \cup O_W)$ and $E\subseteq (O_U \cup O_W),$ so $U'\cup W' = E.$


The correct way to write 'The Morgans" on a sign?

How do you write "The Morgans" grammatically?   Q: Is it "The Morgans" or "The Morgan's"


I'm DMing for a group of five people. One player, Swashbuckler with the Inspired Blade archetype, wanted to select critical feats which have Improved Critical as a prerequisite. The following Inspired Blade feature describes it as follows:  Rapier Training (Ex): At 5th level, an inspired blade gains a +1 bonus on attack rolls and a +2 bonus on damage rolls with rapiers. While wielding a rapier, she gains the benefit of the Improved Critical feat. These attack and damage bonuses increase by 1 for every 4 levels beyond 5th (to a maximum of +4 on attack rolls and +5 on damage rolls at 17th level). This ability replaces swashbuckler weapon training.  It seems to me that the player cannot do it, but I've house ruled otherwise. The reason is because his character looks pretty bad in the game (I did not tell him this) and is already getting behind others on the table. Charmed Life with Opportune Parry and Riposte are letting his immediate actions overloaded whilst his char is too squishy due to spending ability points on Dex, Int and Cha. Taxing him another feat with improved critical seemed bad from a balancing perspective. There is a vanilla warrior on the group who does everything the swashbuckler does but significantly better. That being said I've got two questions for you:  Does the "Rapier Training" Swashbuckler class feature count as having the Improved Critical feat? (From the title)  What would you have done in such situation?   Obs.: this class seems quite unbalanced and badly designed to me. Thanks!


How to find source process of unknown popup in Windows 7

A random popup appears in Windows 7 titled as Information with a progress bar and a clock. The window sometimes says Please wait a moment..., and the progress bar moves very slowly and disappears.     I don't know the source of this popup. I tried to search regarding this popup on the Internet, and some people had this problem. It also has a question on Yahoo! Answers, but everyone told to scan for malware and viruses.   Is there any way to know the source process for this window/popup?   The task manager shows nothing about this window The only tasks that are running are Google Chrome, etc. Right-click and left-click does not work on this window or its title bar.


Is there any smart tip to choose seats on aeroplane?

I'm looking for a smart and absolute way to choose seats on aeroplane. For this question, there is some restrictions as:   The seat cannot be far from both toilet and kitchen. The noise from turbines must be avoided. The class must be economy. A seat near an exit door is to be preferred. The model of aeroplane is generic (The tip should be generally enough to work for most planes: Boeing 777, 737, etc.)   Is there any trick to choose my seats better when buying a ticket?


How do I approach large companies if I have a killer mobile game idea?

I have an idea for a game that has potential, but I'm not a programmer.  How do I tell this to development companies without having my idea stolen?  All I want from the company is for somebody to watch a three minute long video presentation about my idea and if they see potential in it then we can talk about the details.  I have already sent an e-mail to several big companies that have the expertise needed to code the game, they haven't answered me. Actually the idea is nothing fancy, no 3D, but fun and unique.


My C drive (SSD, the drive on which I installed the OS) recently shows that it's almost full.   (Japanese text says: empty space is 6.98 GB out of 105 GB.)   But when I checked by computing all the folders' size (including hidden folders), the result is as below. (Japanese text says: size: 54.9 GB; size on disk: 45.2 GB)   I tried system file cleanup and emptying the Recycle Bin, but nothing changed.  Would you guys give me some suggestions please?


I am new to deep learning and the terminology "L2 regularization" and "weight decay" seems to be used almost interchangeably... L2 regularization however modifies the loss function by adding a term, while weight decay does not modify the loss and instead decays the weights during the weight update. Is this correct?


Should the mean be used when data are skewed?

Often introductory applied statistics texts distinguish the mean from the median (often in the the context of descriptive statistics and motivating the summarization of central tendency using the mean, median and mode) by explaining that the mean is sensitive to outliers in sample data and/or to skewed population distributions, and this is used as a justification for an assertion that the median is to be preferred when the data are not symmetrical.  For example:     The best measure of central tendency for a given set of data often depends on the way in which the values are distributed.... When data are not symmetric, the median is often the best measure of central tendency. Because the mean is sensitive to extreme observations, it is pulled in the direction of the outlying data values, and as a result might end up excessively inflated or excessively deflated."   —Pagano and Gauvreau, (2000) Principles of Biostatistics, 2nd ed. (P&G were at hand, BTW, not singling them out per se.)   The authors define "central tendency" thus: "The most commonly investigated characteristic of a set of data is its center, or the point about which observations tend to cluster."  This strikes me as a less-than forthright way of saying only use the median, period, because only using the mean when the data/distributions are symmetrical is the same thing as saying only use the mean when it equals the median. Edit: whuber rightly points out that I am conflating robust measures of central tendency with the median. So it is important to keep in mind that I am discussing the specific framing of the arithmetic mean versus the median in introductory applied statistics (where, mode aside, other measures of central tendency are not motivated).  Rather than judging the utility of the mean by how much it departs from the behavior of the median, ought we not simply understand these as two different measures of centrality? In other words being sensitive to skewness is a feature of the mean. One could just as validly argue "well the median is no good because it is largely insensitive to skewness, so only use it when it equals the mean."  (The mode is quite sensibly not getting involved with this question.)


I have a Nikon D3100 with 18-55mm and 55-200mm lenses. I am planning to buy 50mm f1.8G lens for which I've checked reviews and they were pretty great. I came in here and browsed through other similar questions which eventually converted me to get 35mm f1.8G lens.  One thing that bothered me was, some of the comments here said that auto-focus doesn't work on D3100. Is it true?  I still need a final suggestion as to which one I should go for. The price difference is 20$ so overall I don't care. My primary aim is better photos in low light conditions, portraits and obviously taking a next step in learning to take better photographs.


Create PDFs that assume different colours on screen and on paper

Is there a way to make PDFs assume different colours when viewed on screen as opposed to when printed on paper?  As an example, I am using the titlesec package to make section labels a fancy dark blue. However, when I go on to print it, the labels look practically black. I'd like to fix this problem without having to produce a second version of my document by automatically replacing dark colors with brighter ones during printing.  Update regarding Ulrike's comment: I need this to work not just with Adobe Acrobat but other viewers as well. The suggested solution therefore does not work for me.


If a tree falls in a forest and no one is around does it still make a sound ? I know the answer is supposed to be no, because the sound is created when it enters someone's ear. What if I left a tape recorder in the forest and a tree fell, then when I go back and listen to the tape recorder won't I hear the noise from the tree falling, even though I wasn't there ? So doesn't this mean that the tree falling still made a sound even though there was no one around to hear it ?


How can I set a custom projection matrix for rendering?

How can I set a camera projection matrix? I want to render a perspective like the old SimCity 1989:


Element of maximal order in alternating group $A_{10}$: how to prove this is it?

I'm trying to solve this exercise here:     What's the maximum order of any element in $A_{10}$?   Here are my thoughts:  One way of doing this seems to be by writing down all possible elements in $S_{10}$ (I mean just per order, not actually every element) and then looking at those that are in $A_{10}$.   This seems a lot of work but for completeness I will post this here. So, (some) possible orders for elements in $S_{10}$ are:  $$  \begin{matrix} \text{ disjoint cycles } & \text{ order} \\ (1)(1)(1)(1)(1)(1)(1)(1)(1)(1)  & 1\\ (1)(1)(1)(1)(1)(1)(1)(1)(2) & 2\\ (1)(1)(1)(1)(1)(1)(1)(3) & 3\\ (1)(1)(1)(1)(1)(1)(4) & 4\\ (1)(1)(1)(1)(1)(5) & 5\\ \dots & \\ (10) & 10 \\ (7)(2)(1) & 14\\ (5)(3)(2) & 30\\ (5)(3)(1)(1) & 15 \\ \end{matrix} $$  where $(k)$ denotes a cycle of length $k$.  So these are not all orders but I think I got the interesting ones. For example, I think $30$ is the highest possible order in $S_{10}$.   Also, I think $15$ is the highest order in $A_{10}$.  But my problem is I don't know how to prove it.     How can I prove that $15$ is the highest order in $A_{10}$?   And my other question is:     Is there a failsafe way to find elements of highest order? By that I mean one that makes sure I'm not missing any elements?   It seems kind of tricky: these are such large groups but they don't seem to contain any elements of large orders. Or do they? Maybe I'm missing something?


Open Stack Installation On Ubuntu 14.04?

Can any one provide step by step installation of Open stack installation on Ubuntu 14.04?  Or   Is there any script like  for auto installation. I have tried devstack on Ubuntu but it didn't work ( Credentials Not Working ).   did work (Installation) but there is no username or password for the installation, so there is nothing to check its working or not.  Is there any way to install Openstack on Ubuntu?


Using the "open cover" definition of compactness to show that $[0,1]$ is compact

How can I prove that the interval $[0,1]$ is compact in real line topology?  I know how to prove it using concept of boundedness and closedness, but I wish to understand it by using the "open cover" definition of compactness: a set is compact if its every open cover has a finite subcover.  Kindly help me to see the compactness topologically.


How to know the size (in bytes) of a char array passed to a function?

I am testing the sizeof operator. In two cases in my code, I get the size of the pointer (I think). In the other cases I get how many bytes the arrays occupy. How can I get the size of the array in bytes when I pass it to a function? Isn't the sizeof operator enough? Am I doing something wrong?  #include <stdio.h>  /*Testing the operator sizeof*/  void test (char arrayT[]); void test2 (char *arrayU);  int main(int argc, char *argv[]){      char array1[7];     printf("array1 size is:%d\n", sizeof array1);     /*array1 size is: 7*/      char array2[] = { '1', '2', '3', '4', '5', '6', '7'};     printf("array2 size is:%d\n", sizeof array2);     /*array2 size is: 7*/      char array3[] = "123456";     printf("array3 size is:%d\n", sizeof array3);     /*array3 size is: 7*/      unsigned char array4[] = "123456";     printf("array4 size is:%d\n", sizeof array4);     /*array4 size is: 7*/      char arrayX[] = "123456";     test(arrayX);     /*arrayT size is: 4*/      char arrayY[] = "123456";     test2(&arrayY[0]);     /*arrayU size is: 4*/      return 0; }  void test (char arrayT[]){     printf("arrayT size is:%d\n", sizeof arrayT); }  void test2 (char *arrayU){     printf("arrayU size is:%d\n", sizeof arrayU); }


Surface tension: the paper clip experiment

In the paper clip experiment, the surface tension of water prevents the clip from falling, thus we can assume it exerts a force of $mg$ (weight of clip) upwards.   However, if you try to pull the clip out of water, surface tension opposes this motion also. If for simplicity we assume that the clip is a rectangle of length $l$ and breadth $b$, and the surface tension is $T$, then the liquid exerts a downward force of: $$T×2(l+b)$$  What is going on here? Why is there an inconsistency in the direction along which the force acts?


Allow only static IP to reach the admin panel

Running Drupal on an Red-Hat instance, how do I configure the server to only allow it's back-end to be reached from a specific static IP?


What does class `type.__init__` and `type.__new__` do when creating a new `type` instance(i.e. class)?

As is known to all, there are many jobs are done behind the scenes when creating a new class in Python, such as setting attributes like __dict__, __class__, __metaclass__, etc.   I know that when creating a new class, the type.__new__ method will be called, and type.__init__ will also be called on condition that call.__new__ returns a instance of type. So I guess these two methods might be in charge of some of the work, but I cannot find any description in docs about their real function. My question is, what exactly do these two methods do for making a class?   EDIT:  I know what a metaclass is and what roughly metaclass does in the process of creating a type instance, but I am wondering about how these two methods cooperate to achieve the job of creating a type instance. Maybe @BrenBarn is right that this is implementation related. And I just want to make sure about that. For example, if I rewrite the __new__ method in my own metaclass T, and return type(clsname, bases, dct) directly instead of calling __new__ in base class type as what people usually do, then neither T.__init__ nor type.__init__ will be called, since returned object is not an instance of T. If so, what am I expecting to miss owing to the absense of  __init__? And also, can I expect that to be a consistent behavior across various implementations?


how to remove an outlier from demand data in the process of forecasting

I have to forecast demand for company based on the past four years. I have data starting from 2017 to 2020 but in the data of 2020 the demand for the months april and may is 0 due to lockdown imposed in our country. Can I totally exclude the year 2020 in the process of forecasting as the demand for rest of the months is very less as compared with previous years data. Or should I include 2020 then how should i treat the demand for April and May being 0.


String is not a function on window location href

Consider:  $('.b').click(function(){     var link = 'www.yahoo.com';     window.location.href(link); });   I expect it to open www.yahoo.com, but it says "string is not a function". Why?  jsFiddle:


Automation Studio File Drop source from external FTP

Setting up an automation to occur on file drop but it appears the only options for directory choice are in the import folder or the legacy triggered automations folder.    The file that I'm dropping is actually dropping to a different business unit's FTP (the parent).  Is there any way to select a different FTP directory for the File drop starting source?


Attempted to read or write protected memory : C++ Modified Value of Memory

I for trim string "char array in c and c++ or char pointer" use this function:  inline char * trimRight(char * str) {     char * end = str + strlen(str);     while(str != end)     {         end--;         switch(*end)         {             case ' ':             case '\t':             case '\n':             case '\v':             case '\f':             case '\r':             break;             default:                 *(end+1) = '\0';                 return end+1;         }     }     return str; }   but return this error (reason in code *(end+1) = '\0' ) :     An unhandled exception of type 'System.AccessViolationException'   occurred in x.exe      Additional information: Attempted to read or write protected memory.   This is often an indication that other memory is corrupt.   please help me.


Why does the simplest TeX file give wrong page numbers and wrong page layout?

\documentclass[a4paper]{article}  \title{Hello}  \begin{document}  \maketitle \tableofcontents % I want to make the title and the TOC on the same page  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \end{document}   I want to make the title and the TOC on the same page, but there are two problems:  The first problem is the page numbers are wrong.  The second problem is the wrong page layout showed in the following screenshot:      What's the root cause?


Create custom code from variables without eval in Javascript

I'm working on a database, and it has different columns. How can I get value automatically without typing every column's name and not using eval()? Working method:     resultEl.append(        arg[i].name.toString() +        arg[i].size.toString() +        arg[i].price.toString() +        "
")  I want this without eval: const dataArray = ['name', 'size', 'price'] let resultEl = $("#result") resultEl.text("") for (var i = 0; i < arg.length; i++){   for (var j = 0; j < dataArray.length; j++){     const dataraw = arg[i] + "." + dataArray[j] + ".toString()";     resultEl.append(eval(dataraw))   } }  arg is a query from knex('table-name').select Update I was evaluating code with
 tag included and that was the reason it didn't work! However, I still appreciate a non-eval approach.


I'm drawing this plot via overleaf. This is the code: \begin{figure} \resizebox{0.5\textwidth}{!}{%   \begin{tikzpicture}     \begin{axis}[         symbolic x coords={FasterRCNN,Yolov5,EfficientDet,Ensemble},         xlabel=Detector,         ylabel=mAP,         xtick=data,         legend style={at={(0.75,0.35)},             anchor=north},         ]         \addplot [red,mark=*, nodes near coords,every node near coord/.append style={xshift=19pt,yshift=-7pt,anchor=east,font=\footnotesize}, ultra thick]         coordinates {(FasterRCNN,0.210) (Yolov5,0.248)             (EfficientDet,0.256) (Ensemble,0.259)};         \addplot [green,mark=square,nodes near coords,every node near coord/.append style={xshift=19pt,yshift=-7pt,anchor=east,font=\footnotesize}, ultra thick]         coordinates {(FasterRCNN,0.246) (Yolov5,0.263)             (EfficientDet,0.276) (Ensemble,0.285)};         \addplot [blue,mark=star,nodes near coords,every node near coord/.append style={xshift=-6pt, font=\footnotesize}, ultra thick]         coordinates {(FasterRCNN,0.269) (Yolov5,0.278)             (EfficientDet,0.281) (Ensemble,0.292)};         \legend{None, Resnet50, EfficientNet}     \end{axis} \end{tikzpicture}} \caption{Evaluation of combination of classifier and detector in the proposed framework.} \label{fig:mota_idf1} \end{figure}  My question is how to configure amount of the number of digits after the comma ? In my case, I want it show 3 digits after the comma, eg, 0.281 instead of just 0.28 Many thanks


How to compare two objects of different types where one inherits the other's type

I have two self-made objects. PersonalizedCard and BaseCard. I want to compare these two for equality.  The PersonalizedCard inherits BaseCard class.  BaseCard has Color and Number.   PersonalizedCard has Color, Number and Name  (Both of them have at least 20 different variables in them, which I left out for clarity)  I tried casting them both back and forth to check for equality, but haven't found a proper solution yet.  var oldCard = UserCards.Cast<IUserCardObject>().FirstOrDefault((card) => card.PersonalCardObject == CurrentCard);  Here CurrentCard is a BaseCard and I'm comparing it to card.PersonalCardObject which inherits the BaseCard class.  I want to compare BaseCard and PersonalizedCard on Color and Number. If they're both a BaseCard, this should be possible I feel.  How do I do this?


Why can't we treat $\text{d}y/\text{d}x$ as a fraction?

Disclaimer - I'm not a mathematician, I'm a dirty physicist.  My work often involves performing calculus on various things without thinking about what I'm doing too much (I leave the proof of various identities etc for the pure mathematicians to worry about).  However I've often noticed that mathematicians get a little upset when I do tricks such as treating the differential $\frac{\text{d}y}{\text{d}x}$ as if it were a fraction.  The simplest example I can think of is how I think about the chain rule: $$\frac{\text{d}y}{\text{d}x} = \frac{\text{d}y}{\text{d}u}\frac{\text{d}u}{\text{d}x}$$ In my head, I imagine the $\text{d}u$ terms cancelling, which is why this works.  Indeed, this is how I'll explain to others how to use the chain rule when asked about it.  My question is the following:  Is is dangerous to think about differentials in this way?  After all, one of the very first examples of calculus I've ever seen (back when I was a baby in high-school) was the derivative of $y=x^2$ calculated from first principles in the following way:     \begin{align} y&=x^2\\ y+\delta y&=(x+\delta x)^2\\ y+\delta y&=x^2+2x\delta x+\delta x^2\\ \require{cancel}\cancel{x^2}+\delta y&=\cancel{x^2}+2x\delta x+\delta x^2\\ \delta y&=2x\delta x+\delta x^2\\ \frac{\delta y}{\delta x}&=2x+\delta x\\ \text{Now let }&\delta x\rightarrow0\text{ leaving}\\ \frac{\delta y}{\delta x}&=2x\\ \frac{\text{d}y}{\text{d}x}&=2x \end{align}   And to me, this is just treating $\frac{\delta y}{\delta x}$ as a fraction.  I know that technically you're doing $0/0$ if you think about it, but are there any examples where treating $\text{d}y/\text{d}x$ is really inappropriate?


Is there a way to use that kind of symbol?


I wanted to prove following exercise   $R_l$ lower limit topology is Lindelof Space.  Lindelof space is space with every cover has countable cover.  I tried but I am not able to even start.  Please give me hint so that I could complete this .  Any Help will be appreciated


A few days ago my screen turned completly white and I was not able to do anything. I had to kill my PC with the power-button and restart it. Everything worked fine so I thought is was just some kind of system-crash.   But 5 minutes ago it happened again. I killed my PC again but it would not start for a few minutes. Only the fans started turning, but I could not even hear the high pitched sound  (which I think comes from the BIOS booting).   Now suddenly my PC was able to boot again and showed me this message in black on White while booting: "The Anti-Virus Software you have installed on your computer is now cleaning up.. Successfully done" (translated by me).  I googled a bit and found out there is ransomware going round that does exactly that. So may I be infested?  Even this message that my anti-virus program is cleaning up sounded pretty suspicious..


How can I create an RSA modulus for which no one knows the factors?

It's easy to create an RSA modulus where almost no one knows the factors: for example, I can generate two 1024-bit primes $p$ and $q$ and set $n=pq$.  If I publish $n$, I will be the only person in the world who knows, or can know, $p$ and $q$.    The (now defunct) RSA Factoring Challenge numbers were generated like this:   First, 30,000 random bytes were generated using a ComScire QNG hardware random number generator, attached to the laptop's parallel port.  The random bytes were used as the seed values for the B_GenerateKeyPair function, in version 4.0 of the RSA BSAFE library. The private portion of the generated keypair was discarded. The public portion was exported, in DER format to a disk file.  The moduli were extracted from the DER files and converted to decimal for posting on the Web page.  The laptop's hard drive was destroyed.   But all of this leaves me feeling unsatisfied because--despite claims that the laptop's hard drive was destroyed--I still worry about insiders who know the factors.  Is there a method which can generate an RSA modulus so that no one knows the factors?  This might seem a ridiculous question, but we do know composites of unknown factorization.  For example, many of the largest Mersenne composites have unknown factorizations.  I would be fine with a multi-party algorithm and an assumption that players do not collaborate.


Prove that if analytic function $f$ is such $f(0) \neq 0$, it has no zeroes in a certain disk

Problem. Assume $\displaystyle f(z)=\sum_{n=0}^\infty a_n z^n$ is analytic in $\overline{U}=\{|z|\leqslant R\}$ and $a_0\ne 0$。Prove: $f$ has no zeroes in the circular disk $\left \{|z|< \dfrac{|a_0|R}{|a_0|+M}\right\}$, where $M = \max_{z\in \partial \overline U} |f(z)|$.   My attempt: I tried to use proof by contradiction, that is to assume $f$ has zeroes in the disk, but however I was not able to deduce the contradiction. So I guess probably it is not the right approach for this problem. Also I guess it may be related to the , which I failed to establish connections with.  Any help is appreciated.


How do you programmatically create a list using an excel spreadsheet?

I have an excel spreadsheet that I would like to use as data for a SharePoint 2010 list. I know how to do this without code, but for this particular task, I need a coded solution.  Does anyone know how to create a SharePoint 2010 list and populate the list with items from an excel spreadsheet? Here is what I have so far:  using (SPSite site = new SPSite(@"http://sitecollection/"))         {             SPWeb web = site.RootWeb;             Guid listGuid = web.Lists.Add("List Title", "List Description", SPListTemplateType.GenericList);         }   Now how do I add the SPListItems that are populated using the excel spreadsheet?


Quick permanent erase with 3 modes of unnecessary files, short time and recovery search optimisation

My sister asked me to back her photos up to my external HDD and to format his laptop. Days later, my external HDD suffered a fail, resulting in loss of photos. I used Windows' Recuva, Linux's RD-Linux and TestDisk/PhotoRec, and Disk Drill's macOS to recover the photos, but it also recovered a lot of unnecessary files and it fattened another HDD with more than 1GB, taking a lot of time. I took other more than 5 hours to select less than 4 thousands photos among many and many unnecessary files.   I wanted only the unnecessary files to be permanently erased and to make them unrecoverable for optimising the recovery search on an HDD and not fattening another HDD, while the necessary files that I can recover, will not be permanently erased.   The problem is 1, 2 and 3 modes and the speed up.   I used shred -uvz -n 3, but as I am shredding a specific folder full of unnecessary files which sums more or less than 6GB, it took 3 days, and still is taking time. I read that -z speeds down and takes a lot of time, according to . I used secure-delete, and I saw srm offers only 2 or 38 modes. I would not opt for 38 modes, but I am not sure if only with 2 modes, the unnecessary files will remain unrecoverable or any recovery tools can recover them.  I used wipe -rfi, but I am not sure if wipe really makes them unrecoverable.   In all these cases, speed is not good and takes a lot of time.   I had an idea:   I cut the unnecessary folder from my HDD (let us call Adata) and pasted on my USB drive stick; I cut the folder on my neighbour's another OS of his another computer and delete it normally.   (Observe that as for this idea, I am not worried, because that unnecessary folder is not anything sensitive, I want just to optimise the HDDs and the recovery search)  But I am not sure that if I cut, the unnecessary folder in my Adata HDD, it can still be recovered by any recovery tool.   I have been suggested to use rysnc, but rsync does not cut-paste, it copy-pastes. If rsync really cut-pastes, I am not sure that it still can be recovered.   I also am not sure that if only with 1 or 2 modes, the files will be recovered easily. I only know that between 3 and 38 modes, they are made unrecoverable.


In simple linear regression, why the covariance between y bar and beta1 hat is zero?

In simple linear regression, where the model  $$\mathbb{E}(y) = \beta_0 + \beta_1 x$$  is estimated using least squares (and the errors are assumed iid of mean $0$), why is the covariance between the mean response $\bar{y}$ and the estimated slope $\hat{\beta_1}$ equal to zero?


Trouble with Yes or No do while loop in java

I'm having some trouble with my loop here, I want the user to be able to add more info(the grade and credits) if they have more classes to add. I'm stuck and hoping someone can help. Thanks.   import java.util.*;  public class DoWhileDemo  {     public static void main(String[] args){         String name;         String add;         double gradePoints = 0;         double credits = 0;          Scanner input = new Scanner(System.in);          System.out.println("Enter Students Name: ");         name = input.nextLine();         do {             System.out.println("Enter class credits: ");             credits = input.nextDouble();             System.out.println("Enter letter grade: ");             gradePoints = input.nextDouble();             System.out.println("Add another class? (Y/N) ");             add = input.nextLine();         } while (add == ("Y"));     } }


Ubuntu 12.04 desktop with no launcher and no shortkeys working

I have accidentally uninstalled python 2.7 and python-minimal from my Ubuntu. It gave me an error saying wicd has shut down and there are broken packages.  When I restarted the system, only the desktop is seen. No launcher or any other panels are seen. Even Alt+T is not working to open up the terminal. I have a folder in my desktop which can help in navigating to the file system.  Please help me...


What does the Canonical Commutation Relation (CCR) tell me about the overlap between Position and Momentum bases?

I'm curious whether I can find the overlap $\langle q | p \rangle$ knowing only the following:   $|q\rangle$ is an eigenvector of an operator $Q$ with eigenvalue $q$. $|p\rangle$ is an eigenvector of an operator $P$ with eigenvalue $p$. $Q$ and $P$ are Hermitian. $[Q,P] = i \hbar$.   I'm asking because books and references I've looked in tend to assume that $Q$ is a differential operator when viewed in the $P$-basis, then show that it satisfies the commutation relation. (I haven't read one yet that proves that the form given for $Q$ is the only possible one.) I've heard, though, that we can work purely from the hypothesis of the commutation relation and prove the properties of $Q$ and $P$ from it.


How to move a file with a space in the name? (command-line)

The file is named Bamboo Makeup Brush Set.jpg  mv /home/said/Downloads/Bamboo Makeup Brush Set.jpg /home/said/Downloads/11/   doesn't work because of the spaces in the file name. How can I move this file using the command line?


What is so special about speed of light in vacuum?

I will try to be as explanatory as possible with my question. Please also note that I have done my share of googling and I am looking for simple language preferable with some example so that I can get some insight in this subject.  My question is what is so special about $c$? Why only $c$. Its like chicken and egg puzzle for me. Does Einstein reached to $c$ observing light or does he got to light using some number which turned out equal to $c$.   Why is $c$ not relative. If something has zero rest mass like a photon why they only travel at $c$ in vacuum and not with $c+1$ or $c-1$?


properties of conditional normal random vectors

Given the partitioning: $X =  \begin{pmatrix}{} x_1  \\ \ x_2 \end{pmatrix}$ for a normal random vector with mean $\mu =  \begin{pmatrix}{} \mu_1  \\ \ \mu_2 \end{pmatrix}$ and covariance matrix: $\Sigma =   \begin{pmatrix}{} \Sigma_{11} & \Sigma_{12}  \\ \ \Sigma_{21} & \Sigma_{22} \end{pmatrix}$ where $\Sigma_{22}$ is invertible. How can I understand the following mean,covariance of a distribution of a random variable $X_1$ under condition $X_2 = x$? I'm struggling with formula for both the mean and covariance which are given specifically as: $\mu_1 +\Sigma_{12}\Sigma_{22}^{-1}(x-\mu_2) $ and $\Sigma_{11}- \Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21}$. I'm just getting into multivariate statistics, so I would preferably just try to get some intuition behind these two formulas if possible.


Map output with multiple "Zoom Levels" in QGIS 3

Just wondered if it is possible to do BBC-style multiple "Zoom Levels" output in QGIS 3 like this:      I used to use another app such as Adobe Illustrator to overlay the maps of different scales. However, as the maps were independent, it was neither fast (another step in another App) or precise (centres' coordinates may differ).  In the report I am working on, I intend to analyse a number of cases around the world, each of which is accompanied by a group of maps like the above example.  How can I have one underlying map for each location and export, say, three maps of different scales?


Who can see the rejected/approved edits in review-beta/suggested-edits/history?

On Stack Overflow, where I am not a 10K user, I can only see my decisions, on review-beta/suggested-edits/history. On sites where I am a 20K user, I can see decisions made from other users.  Is that caused from my reputation, or is Stack Overflow an exception?


I am trying to install a vagrant instance while I am sitting in a group on a congress. Since we don't have such a big bandwidth here, I would like to limit the bandwidth of the initial download of the vagrant box.  Is there a simple way how to limit the throughput of my wireless card right now?


What is the difference between ( and \left( in LaTeX? Sometimes, when the content is small, it does not seem to matter which pair I use.  What is the best practice when it comes to which parentheses use?


Does sizeof(pointer) depend on the object type?

I'm trying to understand what a pointer to an object means. I'm wondering if A is an incomplete type, why is a pointer to A a complete type. Consider the following program:  #include <stdio.h>  class B; //B is incomplete type here  int main() {     printf("%d\n",sizeof(B*));//4 }   Please explain why does sizeof(B*) return 4? What exactly does a pointer to an object represent in memory?


Recover data from hard drive with partitions (but not most data) overwritten

I have a 500GB hard drive I've been keeping around to recover data from that I removed from a failing NAS drive that got sort of... erratic at the end. I finally got rid of the NAS when during a firmware update it removed the partition table.  Fast forward to a week ago, when I was building a new PC, and a mixup resulted in me placing the hard drive in question in the new PC and installing Windows XP on the first 100GB. I'm presuming any data on that first 100GB is now gone, but for the rest of it, is there any way I can recover it at home, as professional data recovery is currently too expensive?  I have a blank 1TB HDD if I can store any images of that hard drive on. The problem was definitely with the NAS and not the hard drive, as the hard drive had a successful install of Windows when mistakenly place in the new PC, and there were capacitors in the NAS's circuitry clearly broken.  The data I want to recover (in order of priority) is:   High: Some jpgs of family photos. Medium: Some RAW files. (There are also jpg versions of all of these) Low: Some mp3s, avis and ISOs, I can re-rip most of these if need be, but it'd be handy not to have to.    (I don't need a backup lecture, and if you can hold it in from nagging Jeff Atwood for it, you can hold it in from nagging me for it)  In short:   The partition tables are gone and overwritten. The data is not overwritten, except for an amount equal to the size of a Windows XP SP3 installation.


Area and distance calculation/measurement unexpected after projecting?

I have converted a GIS shapefile of Botswana from the geographic coordinate system GCS_WGS_1984 to the projected coordinate system Africa_Albers_Equal_Area_Conic to be able to calculate the area of the polygons of the shapefile (and later to calculate buffers etc.). But the scale of the projected shapefile is completely wrong, which skews the area (and distance) calculation. For example, when I use the ruler to calculate the distance between two points, a ~113km distance in reality is measured as a 0,001087 km distance on the data frame, thus about 100 000 times too small...   But when I do the same distance measurement with the ruler when the shapefile is under the geographic coordinate system GCS_WGS_1984, there is no problem.   Does someone have an idea how to fix this problem, and end up with a correct scale when I'm using the projected coordinate system?


What's the Pythonic way to combine two sequences into a dictionary?

Is there a more concise way of doing this in Python?:  def toDict(keys, values):   d = dict()   for k,v in zip(keys, values):     d[k] = v    return d


Is Jon Snow's sword made of Dragon glass?

I was shocked to see in GOT Season 5 Episode 8, when       a white walker attacked Jon Snow, he killed him with his sword.   Can anyone explain how could this happen?  AFAIK,      white walkers can be killed with only dragon glass.


What is the value of the $x$, when $\sqrt{x}=-1$?

I tried to solve this problem, but check this out: $$\sqrt{x} = -1$$ $$x^\frac{1}{2}=-1$$ $$\frac{1}{2}\ln x = \ln (-1) = \pi i$$ $$\ln x = 2 \pi i$$ $$x = e^{2\pi i}$$ And if we plug this into the first equation: $$\sqrt{e^{2\pi i}} = \sqrt{(-1)^2} = \sqrt{1} = 1$$ This makes a paradox and there is actually no solution to the equation $\sqrt{x} = -1$ ! What is the value of the $x$ which satisfies the first equation? If there isn't, why can't we make an another imaginary number like $i$, where $i = \sqrt{-1}$?


I am trying to verify that  is available in the PRO account for Marketing Cloud. Based on my research this may not be a function available. Does anybody have any idea?


Can I run two external monitors on a 2012 MacBook pro?

computer: MacBook Pro (13-inch, Mid 2012) - 1TB SSD - Intel HD Graphics 4000 1536 MB - 8 GB 1600 MHz DDR3 - 2.9 GHz Dual-Core Intel Core i7 Currently, have one monitor setup using a thunderbolt to HDMI adapter all good there, but how can I add another external monitor? The second monitor has a VGA, DisplayPort, HDMI, and USB 2 port. Both monitors are HP. What's the cheapest way to run two external monitors in this situation? I would prefer an HDMI cable method since I already have two of these. I will not have my MacBook open when using two monitors. Thank you in advance for your time and help!


I have had to buy a new freezer as mine broke last night, a new one will be delivered tomorrow morning, but I have to unplug it tonight. Will it be safe to put the meat in the new freezer possibly 10 hours after turning freezer off? Or should I just bin it all and go shopping? (I love to shop so that's fine...lol) I hope someone can help me. I am 37 yrs old, you would think I would have had to do this before but no! - lol


Prove that every isometry on $\mathbb{R}^2$ is bijective

Let $d(x,y)=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2}$ for $x=(x_1,x_2), y=(y_1,y_2)$. A isometry of $\mathbb{R^2}$ is an image $f:\mathbb{R^2}\to\mathbb{R^2}:d(x,y)=d(f(x),f(y))$. Show that every isometry is bijective. I don't know where to start, any hints ?


JavaFx TextField password verification does not work

I need that when checking the password, it displays "password accepted" in the console, but this does not work   controller Method:  @FXML TextField loginfield; @FXML PasswordField passfield;  @FXML public void Auth(){     System.out.println("Login field: " + loginfield.getText());     System.out.println("Password field: " + passfield.getText());     if (passfield.getText() == "123") System.out.println("password accepted"); }   even that doesn't work:  @FXML TextField loginfield; @FXML PasswordField passfield; @FXML public void Auth(){     System.out.println("Login field: " + loginfield.getText());     System.out.println("Password field: " + passfield.getText());     if (passfield.getText() == passfield.getText()) System.out.println("password accepted"); }


I want to give look to my Ubuntu like Windows 10, so I have downloaded the  from gnome-look.org, but I don't know how to install or apply it.


JS Nested If Function (IUncaught Reference Error)

I'm new to Javascript (2nd day :-)) and am struggling to understand why the message  'Error: Uncaught ReferenceError: discountPercentage is not defined'.  I thought that the naming of the function defines it?? Any help is greatly appreciated. Thanks in advance. //var salePrice = prompt("Sale Price") //var discountOne = prompt("Discount Amount (£)")   var salePrice = 200; var discountOne = 100;  function discountCalculation (salePrice, discountPrice) {          var discountedPrice = salePrice - discountedPrice;      return(discountedPrice);          function discountPercentage(discountedPrice,salePrice){                  var discountPercentageCalc = discountedPrice / salePrice;         return (discountPercentageCalc)     }      }   var discountApplied = discountPercentage;  var SalePrice = discountCalculation; console.log(salePrice);


How to locate one or more underlying disks when you know only a directory?

Assume that I have some device mounted to /backups. I'm copying selected files from the system to backup and I would like to reduce the amount of noise the device is making. I know that I can can use hdparm -M to adjust the device "Automatic Acoustic Management (AAM)" setting. However, I don't know how I should get the device (e.g. /dev/sdc) from a given directory (for example, if I had a script that computed the latest backup location as /backups/2017/12/31).  The best I can do is  echo /dev/$(lsblk -no pkname $(findmnt -nvoSOURCE -T "$DIRECTORY"))   but that requires hardcoding /dev/ prefix and assumes that there's only one backing disk. How to make this more stable?  Note that this question is specifically about locating the correct disk(s), not the partition. In case you only need to find the correct partition df or findmnt will be enough.  Also note that in case a directory is mounted on md device, the parent device will be something like md0 which cannot be used with hdparm. In that case there will be more than one underlying disks so in reality this question is about mapping a single file or directory to one or more disks.


Let $X = \mathbb{R}$ and $Y = \left \{ x \in \mathbb{R}\mid x ≥ 1 \right \}$. Define $G : X → Y$ by $G(x) = e^{x^2}$. Prove that $G$ is onto.


Show that a graph with with exactly 1 vertex of degree 1, contains a cycle

I realize this question has been asked before, but I'm still confused about the answers, so bare with me.  I was asked this question on an Exam recently, and tried to prove it by constructing the graph: "Start with a vertex $v_0$ which is the only vertex with degree 1, then it's neighbour $v_1$ must have degree at least 2, such that it must be connected to a vertex $v_2$ and $v_2$ $\ne$ $v_0$, and now $v_2$ having degree 2, either has an edge back to $v_1$, forming a cycle or is connected to another vertex $v_3$, and giving that the number of vertices is n, vertex $v_n$ must be connected to a vertex belonging to the set S, such that S={$v_1$, $v_2$, ........, $v_{n-1}$}, thus, the graph must have a cycle". My proof was dismissed as it didn't cover all possibilities, and i was told to never construct graphs in problems, always destruct them, which didn't make any sense, and still doesn't.  What irritated me even more was that the proof that got the highest points, started with, and i quote: "Suppose that g is a connected acyclic graph, which has exactly 1 vertex of degree 1, so by definition of a tree, g must be a tree". Completely wrong, since a tree must have 2 vertices of degree 1. Which brings me to my second point. I saw other proofs that start with "Let G be a graph with exactly 1 vertex of degree 1, and let's assume it's acyclic" and then they go on to show that it contradicts with a tree having the longest path containing 2 vertices of degree 1. Now if we assume it's acyclic, doesn't that straight away contradict the theorem that says "A graph with 1 vertex of degree 1 must have a cycle" and we're done, nothing more to proof.   One more proof i managed to come up with is as follows: "Since every vertex in this graph G has degree at least 2, then there must be 2 distinct paths between any 2 vertices in G, except for $v_0$ ($v_0$ being the only vertex with degree 1), and thus the graph must contain a cycle.  I'm really confused about this question, it looks straight forward, but clearly not, apologies for ranting a bit, it's just frustrating. I hope somebody can clear the confusion.


I like having Hot Network Questions on the right of the questions list, but could we turn the header text into a link to ? I suppose this is a very minor feature request, but it would save me a few clicks. Anybody else? Thanks


QGIS: Script is being executed successfully in Python console (within QGIS) but not in a standalone python script

I have the following code which I have no problem executing within QGIS (2.8.6) via the python console. What the script does is it adds the two raster layers in my directory via the Raster Calculator:  from osgeo import gdal from osgeo import ogr  from gdalconst import * from PyQt4.QtGui import * from PyQt4.QtCore import * from qgis.core import * from qgis.analysis import *  from qgis.gui import * import sys import glob import re  import os, fnmatch import numpy as np import numpy.ma as ma import math  import subprocess   qgisprefix = '/usr'  # configure paths for QGIS  os.environ['PATH'] = qgisprefix+'/bin' os.environ['LD_LIBRARY_PATH'] = qgisprefix+'/lib' sys.path.insert(0, qgisprefix+'/share/qgis/python') sys.path.insert(1, qgisprefix+'/share/qgis/python/plugins')  # disable QGIS debug messages os.environ['QGIS_DEBUG'] = '-1'  # configure QGIS paths QgsApplication.setPrefixPath(qgisprefix, True)  # initalise QGIS (load providers) QgsApplication.initQgis()   #Load all the rasters   outputFolder = "/home/usr/Desktop/Output/" extent = QgsRectangle(264885.85754, 5073773.01243, 614325.85754, 5295173.01243) numCols = 11648 numRows = 7380  os.chdir("/home/usr/Desktop/") entries = []  for fname in glob.glob("*.tif"):     fileInfo = QFileInfo(fname)      baseName = fileInfo.baseName()      rasterLayer = QgsRasterLayer(fname, baseName)     QgsMapLayerRegistry.instance().addMapLayer(rasterLayer)      mc = iface.mapCanvas()     Layers = mc.layers()     for each_layer in Layers:         layerR = QgsRasterCalculatorEntry()         layerR.ref = each_layer.name() + '@1'         layerR.raster = each_layer          layerR.bandNumber = 1         entries.append(layerR)   expression = '('+entries[1].ref+'+'+entries[0].ref+')' #re-write that to include all rasters  calc = QgsRasterCalculator(expression, "/home/usr/Desktop/Output/final.tif",'GTiff',extent,numCols,numRows,entries) calc.processCalculation()   When I try to execute the same code outside QGIS in a standalone script, I get no errors but there is nothing in my Output folder. What should I adapt in order to be able to run the script outside of QGIS?


Making a UITableView scroll when text field is selected

After a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right.  I have a UITableView which is composed of custom cells. The cells are made of 5 text fields next to each other (sort of like a grid).  When I try to scroll and edit the cells at the bottom of the UITableView, I can't manage to get my cells properly positioned above the keyboard.  I have seen many answers talking about changing view sizes,etc... but none of them has worked nicely so far.  Could anybody clarify the "right" way to do this with a concrete code example?


Constant CPU utilization on consumer hardware

A computer in a manufacturing environment is running software that is in a constant communication loop with a PLC. An artifact of the implimentation is ~20-30% CPU utilization 100% of the time (24/7). Will the constant CPU cycling have an impact on the longevity of this hardware?


Period length in the decimal expansion of fractions $1/n$

1/7 is 1x 6digits repeating, 1/13 is 2x 6 digits repeating. Why? I can see this pattern of repeating digits, I can calculate it for most primes but I don't have an intuitive understanding of why it happnes. I know there are certain rules like 10 ^ k = 1 mod(p) and so on but I am after a plain English understanding if there exists one :) I would really appreciate it if you could help me with this or point me to resources that explain this. Fun fact: 2/23 = 22 digits repeating 0.222222222222222/23 = first 15 digits of 2/207 followed by 22 repeating digits of 6/23. True and is similar with different numbers but no clue why?


How do I test for a particular day of week in a .bat script?

(Win 8.1 Pro 64b on Intel i7)  All right, I have this fully-automated backup script running daily. However, it turns out, that one of the saved directories (consuming about 25% of the space,  and consequently, about the same portion of the total backup time) is modified quite rarely.  I'd now opt to save the directory in question just once weekly. Only that I am not able to figure out how to obtain the day of week in a .bat file.   (Of course, I could do what was done on a HP41C back in olden times and do calculations involving day of month, month of year, and year, but well, I think of it as plan B.)  Is there a way to load the day of week into a .bat variable in a somehow more efficient manner?


Why can Normal types still damage Haunter?

In the , it says normal types have no effectiveness against ghost types. Since Haunter is a primarily Ghost type (aside from being Poison type), it should receive no damage from Normal types right?  I'm asking this because I thought I was sneaky with my 450 CP Haunter battling a 1400 CP Snorlax... It did not turn out so well...  Follow-up question, if the answer is that "because Haunter is also a Poison type", are there any Pokémon in Go that are immune to any other pokémon's attacks?


How can I install Adobe Air on 64 bit Ubuntu 13.10

Hy, I used this tutorial and didn't work    and also this   if someone could help me with any tips about installing I remain fully grateful.


My problem is as follows:  % File name: Example.tex \documentclass[journal]{IEEEtran} \usepackage{cite}     \begin{document} \cite{key} \bibliographystyle{IEEETran} \bibliography{bibfile} \end{document}   I want to generate the reference file in a separate PDF output. I can either run the standalone Example.bbl file as input or add the code as suggested below. I want to get the an additional PDF file for example Reference.pdf as an output each time. Example.pdf also contains the reference as a main file.


Disable spell-checking on HTML textfields

Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?


how to evaluate the integral $\int_0^1 \frac{\ln(1+x)}{x} dx$？

How do I evaluate the integral:  $$ \int_0^1 \frac{\ln(1+x)}{x} dx $$  in a simple way, without using complex methods?


Linq : filter duplicated line without taking account a column

I'm trying to remove from a datatable the duplicated lines, but without taking into account a column into the duplication filter.  Example :  | Name | Region | | Toto |   5    | | Toto |   2    | | Toto |   1    | | Gege |   2    |   What I'm searching for if to filter it as the following  | Name | Region | | Toto |   5    | | Gege |   2    |   Thank for your help.


about lipid oxidation, does acid fatty transforms in glucose?

Lipid oxidation generates fatty acid and glycerol going into the bloodstream.   Can they be converted into glucose by gluconeogenesis or are they turnd into ketone bodies?


I have this mysterious problem with my rear hardtail wheel. Here's how it goes: I put in a brand new tube after getting a flat, works fine for a ride, next ride get a flat, change tube, get a flat next ride... and the constant theme here is that the tube rips right around the valve.  Now what happens is rather odd: I notice the like squishy part between the rim and the tube is shifted around the valve - so I have to force the valve in the rim hole. The tube works fine when out of the wheel, but when installed leaks.   Running stock wheels so I may just need to upgrade wheels, but the bike is pretty entry so.  Thanks in advance.


Prove that $\mathcal{P}(A)⊆ \mathcal{P}(B)$ if and only if $A⊆B$.

Here is my proof, I would appreciate it if someone could critique it for me:  To prove this statement true, we must proof that the two conditional statements ("If $\mathcal{P}(A)⊆ \mathcal{P}(B)$, then $A⊆B$," and, If $A⊆B$, then $\mathcal{P}(A)⊆ \mathcal{P}(B)$) are true.    Contrapositive of the first statement: If $A \nsubseteq B$, then $\mathcal{P}(A) \nsubseteq \mathcal{P}(B)$  If $A \nsubseteq B$, then there must be some element in $A$, call it $x$, that is not in $B$: $x \in A$, and $x \notin B$. Since $x \in A$, then $\{x\} \in \mathcal{P}(A)$; moreover, since $x \notin B$, then $\{x\} \notin \mathcal{P}(B)$, which proves that, if $A \nsubseteq B$, then $\mathcal{P}(A) \nsubseteq \mathcal{P}(B)$. By proving the contrapositive true, the original proposition must be true.    To prove the second statement true, I would implement nearly the same argument, so that isn't necessary to write. So, does this proof seem correct? Also, was the contrapositive necessary? Or is there another way to prove the initial statement?


Commandblock Output = False not working?

I have a command set as follows:  /tellraw @p ["",{"text":"[Level 10] Medium ","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 479.5 13 309.5 redstone_block 1"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to Play"}]}}},{"text":"[BOSS] ","color":"light_purple","bold":true}]   Which will show a clickable message in chat, which when clicked will place a block, however I do not want any output in chat. I have done:  /gamerule commandBlockOutput false   However after cliking the text, the following can be seen in chat:     Block Placed   Is there any way to prevent this from happening?


import java.util.*; public class s22 {      public static void main(String[] args) {         //Your Code Here         Scanner sb=new Scanner(System.in);         int n=sb.nextInt();                 int i,j;         String[] st=new String[1000];                 String[] s=new String[n];         for(i=0;i<n;i++)         {             st[i]=sb.next();         }                  for(j=0;j<n;j++)                  {                 String[] m=st[i].split(" ");                  s[i]=m[m.length-1];                  }                  for(i=0;i<n;i++){                 System.out.println(s[i]);}                        } }  I tried this code but shows null pointer exception after entering first value. For example if I give input as:  john is sleeping, lisa rapper, beautiful flower,  The output should be like:  sleeping, rapper, flower


I'd like to know how I would build Unity from source code in the current development release. Please cover the following topics:   Which packages are needed to compile Unity? Where would I get the current source code? What are the steps to actually configure and compile Unity? Is it possible to safely run the latest version alongside the version from the repositories?


Can I set up WhatsApp on my desktop when my smartphone is broken?

I've been using WhatsApp on my Android Smartphone. That phone is now broken, and until I have a new phone capable of running the WhatsApp App, I'm now using my older "non-smart" phone. My SIM card works well with it, but I can only do phone calls and SMS.  I have a couple of desktop/laptop PCs available, running Windows 7, 10, and Ubuntu. So what exactly are the steps - installation(s) of additional software, use of a WhatsApp service for this kind of matters, ... to be able to have my WhatsApp account work with a "PC interface"? I can have my phone turned on at any time, but it is really old. No Android, no WhatsApp App.  Note that before I've been using WhatsApp Web from time to time, which needs the smartphone to be powered on and online, which I currently can't do. I can currently only use plain old mobile services with my mobile number: calls and SMS.


I'm a bit confused. Is it correct to use "me too" and "I too"? (Also with other pronouns.)  For example, if I want to say that Juan gives a present to Ana and I give a present to Ana:     Juan gives a present to Ana, [me/I] too.   Or if I want to say that Juan gives a present to Ana and Pedro gives a present to Ana:     Juan gives a present to Ana, [him/he] too.


Deleting multiple indexes from a list at once - python

My problem is I have a list eg.     lst = [2, 5, 7, 12, 13]   lst.pop(3) #12 lst.pop(4) #13   Because lst[3] has been removed lst[4] is no longer there (out of range). This gives me an error. Now I know you could say change your code to this:...  lst.pop(4) #13 lst.pop(3) #12   ...and it ill fix the error, but my problem is my actual code is 'popping' random numbers so it needs to be done all at the same time to avoid error.   Is there any method of 'popping' at the same time?...like something similar to this:  lst.pop(3, 4) #12 and 13 at once   Thanks for any answers.


Can't re-order favorite sites list on Android app

I've been trying for a while (months) to fix my favorite sites list in the Android app. It neither matches my in browser list nor any sensible order I pick.  The usual issue is that while some sites will re-order, others appear to be stuck where the want to be. No matter what order I drag them to they revert to where they were when I close the editor and return to the app.  Today the problem has morphed to a message that simply says it cannot save my preferences. Is this a problem with the app, the backend, my account or my usage?


Why does modifying a string literal cause a segmentation fault?

Why does modifying a pre-initialized string literal cause a segmentation fault? For example:   char *str = "Hello world"; str[0] = 'h';    When you initialize str to that string value, doesn't the compiler automatically allocate memory for that string constant, assign its starting location to str and free it upon program exit?


How to ssh into raspberry pi via ethernet

I've been trying to connect my headless raspberry pi to my Ubuntu 16.04 via the ethernet cable since a week, but have not been able to get the IP address of the connected raspberry pi.  I've tried tools like nmap but nothing shows up in the result. My Ubuntu desktop detects when the ethernet cable is plugged into pi but is not able to establish an Automatic Ethernet connection. I've also tried to creating a static ethernet connection (by manually assigning IP address of the form 192.168.43.x), but that doesn't work as well because I guess the raspberry pi is not assigned the address set in the static ethernet configuration.  Here are the steps that I've followed:   Power up the Raspberry pi. Connect it to my ubuntu desktop via ethernet cable. My system tries to detect it, but fails on Auto Ethernet. However, statically configured ethernet connection works. Then I try to figure out the IP address of the raspberry pi, using nmap or other tools. Finally, if I'm able to successfully discover the IP address of connecte raspberry pi, ssh into the pi.   I've read several guides on the internet, but I can't complete the step 4 successfully. Can someone please help me out?


Should this sign have the preposition at the end?

I created the following sign for my computer:     "Please do not turn off this computer."   My office mate told me that this should be the correct way to do it:     "Do not turn this computer off."   He said that the preposition should be at the end. Is he correct?


I'm trying to install the drivers for my AMD RX 460 graphics card but whenever I do so Ubuntu is rendered unbootable. I get an error saying      the system is running in low-graphics mode   and whatever selection I make results in a black screen. Is this an issue with AMD's graphics card driver or am I doing something wrong? The graphics card works fine with windows. Luckily I dual boot.  Can I get the card working in Ubuntu?


Symbolic link: From NTFS partition to ext4 partition?

hope you all fine. Can i make a symbolic link of a file from NTFS partition to ext4 partition? For example, i wanna make a link from /media/username/mydeviceName/DIRECTORYNAME (which is NTFS partition)  to ~/Desktop (ext4 partition).


I've only written a small amount of JavaScript that runs embedded in a Java application, but it was tested using , has been mixed, and I've not noticed any problems yet.    Is there some conventional wisdom whether to use semicolons or not in JavaScript?


apt-get doesn't show any error but not installing or removing packages

I get this whenever I try to install a package  $ sudo apt-get install metacity Reading package lists... Done Building dependency tree        Reading state information... Done Suggested packages:   gnome-control-center The following NEW packages will be installed:   metacity 0 upgraded, 1 newly installed, 0 to remove and 157 not upgraded. 1 not fully installed or removed. Need to get 0 B/243 kB of archives. After this operation, 744 kB of additional disk space will be used. $    I tried the basic fixes, didn't work.  sudo apt-get clean && sudo apt-get autoremove sudo apt-get -f install sudo dpkg --configure -a   This is what I get when I do an apt download  $ sudo apt download metacity Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 metacity amd64 1:3.18.3-1ubuntu3 [243 kB] Fetched 243 kB in 2s (90.4 kB/s) W: Can't drop privileges for downloading as file '/home/jaison/metacity_1%3a3.18.3-1ubuntu3_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)


I am looking for QGIS function to extract (or detect) edge from a raster, which was referred in here,  as answer by @MappaGnosis.  The name could have changed since then, or it may have been integrated into other tool... I cannot find it in my QGIS Processing Toolbox (2.14.10 and 2.18.2).  There are similar tools such as GRASS "i.zc Zero-crossing" and SAGA "Gaussian filter", but I am hoping to find this QGIS geoalgorithm.


How can we change the alignment of our black dragon hatchling?

My fiance is running a campaign and the players have the opportunity to obtain a wyrmling black dragon. Now black dragons are chaotic evil, but the monk of the group believes that it shouldn't be killed outright just due to the fact that its race tends to be evil. He wants to attempt to teach and raise it in goodly or rather, less evil ways, but the other players want a backup plan to change its alignment if worst comes to worst. The problem is, the DM doesn't see anything involving forced alignment changes. Is there a mechanical way to handle this or is it going to be DM decision to add something to the game that isn't currently there?


Fields extensions over isomorphic fields of different degrees

What are the simplest examples of situations where in a field $F$ there are two subfields $L_1$ and $L_2$ such that extensions $F/L_1$ and $F/L_2$ are finite, degrees are different $$ [F:L_1] \neq [F:L_2], $$ but fields $L_1$ and $L_2$ are isomorphic as abstract fields.


I tried to program in swift but somehow I can't build my code. I am using VSCode . I read that you have to install sourcekit-lsp, but I am unsure if I installed it correctly.  Then I did the following command to check the version:  $ swift -version /snap/swift/5/bin/swift: error while loading shared libraries: libatomic.so.1: wrong ELF class: ELFCLASS32    but as you can see, there is something wrong with libatomic.so.1.  I then tried to install libatomic library but it is already installed.  I also tried the answers in this post ->   ,but that didn't solve the problem neither.  What do I have to do to be able to code in swift in VSCode?


Which Game of Thrones books correspond to each TV series season?

Which of the Game of Thrones books have been televised during the first season (April to June 2011)? I want to start reading the novels from when the TV series stopped in 2011.


Finding $\lim_{n \to \infty} \prod_{r=1}^n (1+ \frac{1}{a_r})$

Evaluate the following infinite product:   $$\lim_{n\to \infty} \prod_{r=1}^n (1+ \frac{1}{a_r}),\\ a_1=1; \quad a_r=r(1+a_{r-1}).$$   I thought of two ways in which this might be evaluated: (1) By taking log and converting into a Riemann series which I saw isn't possible and (2) by converting into a polynomial equation of nth degree where coefficients become sums as per the theory of equations. Right now, I'm stuck, trying to figure out the way to proceed.


If you view the following picture, you can see when I try to flag there is a bug:      I use: firefox 31.6.0 Debian 9 (Stretch)


I am running Ubuntu 12.04 and have a "aptd" process running as root (which I understand is correct) but eating 95% CPU (which is definitely not right).  As per one of the answers here  I tried to run dpkg-reconfigure which just added a new process eating 20% CPU for ages until it reported    /usr/sbin/dpkg-reconfigure: menu is broken or not fully installed.   Possibly related the upgrade process recently left a huge apt.log file without getting to the end:   What do I need do to get my system back into normal operation?  UPDATE #1  This bug report  suggests I run   sudo apt-get -y update   But it says  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   So I tried  sudo rm /var/lib/apt/lists/lock sudo apt-get -y update   This has not stopped aptd from maxing the CPU.  Despite warnings not to I have tried to kill the process and it refuses to be killed.  Update #2  This is now slowly cooking my CPU and the fans are on full speed all of the time. Man they are loud (must do something about that next hardware upgrade).  aptd is running with the command line /usr/bin/python /usr/bin/aptd and apparent has used 1d17h CPU Time.   However it has now been joined by apt-get which is running under the command line apt-get -qq -y -d -dist-upgrade. As a result aptd has "dropped" to 85.1MiB Memory with 183.8MiB Virtual Memory used up.  I am looking at restarting or shutting down, if only to save my hardware from cooking.  Update #3  As per ShadowMitia's comments I tried  sudo killall -9 apt-get sudo kill -9 _pid_    Which killed the naughty processes. Now to figure out what was broken and fix that?  I am going to try restarting to see if it happens again.  Update #4  Okay, so I just restarted.  apt-check got in there right away and shot to about 88% aptd  then joined in and climbed rapidly to 100% to 102%.  apt-check is still there but at 40% to 50%.  Looks like I will need to kill those off sooner or later?  Update 5  Apt-check and aptd were still burning away after over 24 hours of CPU time. I killed them off again. Will try upgrading and report back.


Let $G$ be a group. Prove that IF $x^2 = e$ for all $x \in G$, then $G$ is abelian.


Prove that if M and N are closed linear spaces and $M \perp N$, then $M \oplus N$ is a closed linear space.  I'm having trouble starting this one. Do I need to consider cauchy sequences in each M and N?


How to diagnose a search engine ranking drop?

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


Prime divisibility concerning primes of the form $4k+1$

Let $p=4k+1$ be a prime number.  I need to  prove that $p$ divides $k^k-1$.  Could anyone give me some hint?  Thank


Can I ask for creating a new tag as I do not have the sufficient reputation

While posting a question on Apache-Kafka I wanted to add Apache-Kafka as tag, however I was not able to do so as the tag was not created in  . Is there any way I can ask for this new tag to be created ?


how can i show the content of my struct using a for or while? (i dont even know how to explain it, im very new at this.)

so what i need to do is create a function where it shows(?) the content of  struct (car[]), my problem is that i dont really know how...?, im guessing i should use a pointer but im really stuck.Should i use while or for, what is the best way to do this?.( i mainly did python so u can explain it in python if u want...)  #include <stdio.h> #include <stdlib.h> #include <string.h>  struct cars{     char manufacturer[30];     char model[30];     int kub_lt;     int year;     int cost_euro; };  struct cars car[]={     {"OPEL",     "VECTRA",     1.8,     1996,     25000},      {"FORD",     "Monteo",     1.8,     2001,     25000},      {"FIAT",     "Punto",     1.4,     2002,     12000},      {"HUNDAY",     "Atos",     1.0,     2002,     9000} }; int main(void) {     int i,cptr;      i=0;     while (car[i]!="\0")         printf("Manufacturer: %s\n",car[i].manufacturer);         printf("Model: %s\n",car[i].model);         printf("Kub.LT: %d\n",car[i].kub_lt);         printf("Production year : %d\n",car[i].year);         printf("Cost in euros :%d\n",car[i].cost_euro); }


iPhone 6 dropped on my sink no cracks but broken inside

When I dropped my iPhone on the sink it didn't crack but it did break inside.  I can't use my iPhone. I can turn it on but it isn't fully functional. There are lines and white blocks on the screen.  I am wondering, if I have a warranty, can I get it repaired for free?


How many pairs of integers satisfy a cubic diophantine equation?

I need to find the number of pairs of integers (a,b) that satisfy the diophantine equation $a^3-117b^3 = 5$.  I know that I need to use modulo arithmetic somehow, I just don't know exactly how. I think it has something to do with $mod$ $9$, but to be honest I don't really know. Anything that could help me would be much appreciated.


Move a rectangle along the tangent of a circle point

We have to rotate a rectangle along the circle at an angle $\theta$ and then move the rectangle along the tangent for a distance 'lateral offset' as given in the following image  I calculated the lateral offset factors to be applied on the rectangle (after rotating it) coordinates as given below. Reference -          Slope = tan(θ);         SlopeLateralOffset = -1.0 / Slope;         LateralOffsetTranslationFactor = LateralOffset / sqrt(1.0 + SlopeLateralOffset  * SlopeLateralOffset);          LateralOffsetTranslationX = LateralOffsetTranslationFactor ;         LateralOffsetTranslationY = SlopeLateralOffset  * LateralOffsetTranslationFactor ;  Is the logic that I applied correct? I think that the formula SlopeLateralOffset = -1.0 / Slope, will not work always as I cannot form a right triangle with radius r and lateral offset What changes should I make it to work? Can you please help me?


Is it ethical to omit your PhD and write it as working experience in your resume?

My friend has recently finished her PhD, and is now looking for a job, probably outside of academia. In the mean while, she is planning to apply for a temporary, simple admin job to make ends meet while she looks for a better job. Since the admin job does not require a PhD (or even a Bachelor's degree), she is planning to omit her PhD from her resume. However, doing that will result in a gap in her resume. Hence, she plans to write that she has 4 years of working experience, working as researcher in a laboratory (nothing to indicate that she has a PhD). My question is: is this ethical? Can you "convert" a PhD education to work experience in your resume?


Better understanding of Drupal behaviors

I read about Drupal behaviors today, and I tried writing the following code.  (function ($) {    Drupal.behaviors.mymodule = {     attach: function (context, settings) {       $('#mymodule_id', context).change(function () {         alert('Handler for .change() called.');       });     }   };  }(jQuery));    Is Drupal.behaviors.mymodule the namespace? What are the context and settings parameters passed to the Drupal behavior? Is this the equivalent of document.ready()?   Can I attach any number of functions?  Can I define JavaScript functions which will be called somewhere?