PHP 7 version is not working in Ubuntu 12.04

I have recently updated by php. My php -v command show following result:  PHP 7.0.6-6+donate.sury.org~precise+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies     with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies   But still phpinfo() function shows php 5.3.10 version  What should I do to start using it.


Do cosmological and Doppler redshift produce different patterns?

For a given black body radiation curve, would the changes to the spectrum resulting from cosmological expansion and those from Doppler effects be distinguishable on the basis of the shapes of the resulting curves alone? Or, put another way, starting from the same spectrum, can both processes produce the same observation (for suitably chosen magnitudes of expansion or velocity)?


Mistake of bash compiler? what is going on

#!/bin/bash i="a001" if ! [[ $i =~ "a[0-9]{3}"  ]]; then     echo "success" fi   input i="a001" makes it success, although it does match a[0-9]{3} pattern and if statement should not be executed. What is going on? in my opinion it is compiler mistake. It is a part of bigger problem that I have not solved since yesterday.


It always possible to shrink a domain $U_\alpha$ to $V_\alpha$ in the sense that $$V_\alpha\Subset U_\alpha\quad\text{and} \quad\bigcup_{\alpha}U_\alpha=\bigcup_{\alpha}V_\alpha\,?$$   What does $\Subset$ mean ? Is it an error ?


What is function of force $F$ and work $W$?

I know that :  Position $$r:\mathbb{R} \to\mathbb{R^3} \ \ \ \ \ ;  \overrightarrow{r}(t)$$  Velocity $$v :\mathbb{R} \to\mathbb{R^3} \ \ \ \ \ ;  \overrightarrow{v}(t)$$  Acceleration $$a:\mathbb{R} \to\mathbb{R^3} \ \ \ \ \ ;  \overrightarrow{a}(t)$$  Now i want to know that , what is function of force $F$ and work $W$ ?


Find smallest n such that $na$ $mod$ $b = k$.

This was a different question but it simplifies to this. I want to calculate this $n$ as efficiently as possible. The time complexity of naive approach will be $O(d)$ for some number $d$ such that $d - na \ge 0$. Can we calculate this value in any less time?


Movie about a game show where the prize is a new life

Some years ago I watched a movie I can't remember the title of. The action is kind of blurry as well, but I seem to remember some kind of 'game show' where the contestant got a 'new life'. The main character escapes through some service tunnels, I think, and eventually ends up in a city nearby... or something..? Does it ring any bells, anyone?


I just got Rosetta Stone and was wondering how compatible it is with Wine. And whether or not it would only work when installed on Windows/Wine.


How to place a figure in Latex while the [htbp] doesnt work?

I insert a figure in to my document using code like below, right after 2 tables in a page.  \begin{figure}[htbp] \centering \includegraphics[with=350mm, bb=0 0 1350 743]{path/to/figure.png} \caption{Caption for it} \label{label for it} \end{figure}   This surely inserts the figure into the document in a new page, but is placed at the bottom of the page, and I am trying to put it on the top or at least the center of the page, since it would be the last page of a chapter. But the [htbp] settings are not working at all. What should I do to deal with this figure?  Update: I made a minimal working example and paste it here. I am not using the package of float actually because it is not working for me, but I put it in this example.  \documentclass[a4paper,12pt]{report}  \usepackage{graphicx} \usepackage{float} \usepackage{amsmath,amssymb} \usepackage{bm} \usepackage{layout} \begin{document} \tableofcontents \newpage \chapter{EXPERIMENTS} In this chapter the results for the tests and experiments are presented.  ...for words before this figure.  \begin{figure}[H] \centering \includegraphics[bb=0 0 1166 693, width=30cm]{figs/result3.png} \caption{Result for Matrix Multiplications: Time for Multiplication and Data Transfer} \label{result3} \end{figure}  \end{document}   And the figure result3.png is 1166 by 693 with 19.4KB.  Is there anyone can tell me why this figure keeps staying at the bottom of the page please?


How can I remove all non-alphabetical characters of any language in a string?

I am building an app that uses a tagging system like SO. I don't want to except any non-alphabetical characters, but I do want to allow actual letters of any language. Using a filter to only allow certain letters seems unreasonable, as I don't have a collection of all possible letter of every language, so I think the right way to go around it would be to block the characters that aren't allowed. But even then, there are 1000s of characters that should be blocked.  How should I go around it? Is there some magical array out there that holds all these characters? How do other products usually tackle this?  Would love ideas, thanks!


Can't comment, but I can screw up someone else's code?

I am not a very active member of stackoverflow. My reputation is veeeery low. I've just found an answer to somebody's question, that solves my problem too! But I would like to add a very tiny bit of code (4 chars actually) that the person who answered obviously hadn't thought of. Well, I can't post a comment with my extra piece of code because of my low reputation. I can edit his answer though! But not quite... I have to add more than 6 characters (or something).  So my only option is either to leave his post as is, or add my 4 characters inside his code and also add some crappy sentence below, explaining why I did this. In my humble opinion, this doesn't make sense.  Thank you for you time.


var bark = function() {   var animals = "Dogs";   var sound   = "Bark"   console.log(animals + " go " + sound); };  console.log(animals); console.log(sound);   When I log the variables to console, no cigar...  ReferenceError: animals is not defined  ReferenceError: sound is not defined


pgfplots from file: search path, looking for \graphicspath equivalent

I have recently discovered the wonderful pgfplots package and I've started coding my Python code to output tabular data of whatever is plotted (at least for simple plots). In my LaTeX source code, I use plot file {../datafiles/data.dat}; and similar commands extensively. All my external figures (yes, I still have some) are in a separate directory that I specify in my preamble using \graphicspath{...}. Is there any equivalent path that TikZ and pgfplots use to search for data files?  I have difficulties searching for an answer to this question, because the word path has such a specific meaning in a TikZ context. I'm using PGF 2.10 and pgfplots 1.5.  I checked in the PGF manual (section 19.4, page 224) and in the pgfplots manual (section 4.2.2, page 25–26) but did not find anything relevant.  MWE:  \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot plot file {somedata.dat}; \end{axis} \end{tikzpicture} \end{document}   where somedata.dat contains:  1 2 3 4 5 6 7 8 9 10   Sorry for not adding a MWE earlier, I figured it wasn't needed because the question was obvious.


Shell script to send a mail once every 20 days

Need a shell script to be called via cron job every day and see if it's 20th day,it should send a mail


Can you change your team over once you've chosen a team or is it permanent?


Should questions include "tags" in their titles?

I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?


Find all integral solutions of $y^2=x^3+7$

Find all integral solutions of $y^2 = x^3+7$.  I tried to use many different moduli, but it never works. With modulo $9$, you can get $x$ is divisible by $3$.


Distribution of Y/X if X and Y and i.i.d. standard Normal

Suppose $X$ and $Y$ are i.i.d. Standard Normal random variable. I need to find $\Pr(Y^2/X^2<3)$. Instead of doing integral, I am thinking whether there is a simpler way. Since $Y/X$ is $\tan(\theta)$ where $\theta$ is the angle of the point $(X,Y)$ to the $X$-axis, but in order to solve this probability, we need to know the distribution of $\theta$ and I do not know how to proceed.


How can I select multiple objects and spread their origins apart from each other without scaling the objects themselves? I have several fragments of a shape that I want together at the first keyframe and all of the pieces separated at the last keyframe. I don't want to use the logic engine to do this. Is this possible?


Surface cannot be created with nurbs curves by pressing F key

I followed several tutorial to create a nurbs curve, and duplicate it in edit mode. Of course I pressed A key to select all points and F key to create surface. But there was no surface be created, a start point of one curve and an end point of another point were connected instead.     Is there anybody get any idea about this case?


Hi I have been trying to run this script using all of the cpu cores  however it will only use one core and I can't find out why. Is there some initialization that tells it to use only one core or does python not use all cores? I thought about having it save the exponent it is on to a text file and having multiple instances of the program. It would then reopen the text file and check the next number. But it seems that multithreading this would be the fastest.  test = 1 one = 2281 i = 1 init = 1 f_open = open('PRIMEEXPONENT.txt', 'r') data = f_open.read() f_open.close()  print (data) string3 = "%s" % (data)  def check(p):     s = 4     m = 2 ** p - 1     for _ in range(p - 2):         s = ((s * s) - 2) % m     return s == 0  def is_prime(number):      if number % 2 == 0:         return number == 2      i = 3     while i * i <= number:         if number % i == 0:             return False         i += 2      return True  print(3)   var2 = 1 while var2 == 1 :     i = i + 2     if init == 1:         print ("RELOADING PREVIOUS SAVED PRIME NUMBER")         i = int(data)         print ("DONE")         init = 0     if is_prime(i) and check(i):         print ("START NUMBER")         print(2 ** i - 1)         string = "%s" % (2 ** i - 1)         string2 = "%s" % (i)         string5 = "%s" % ("START    ")         string6 = "%s" % ("END    ")         string7 = "%s" % ("    ")         print ("END NUMBER")          f = open("PRIME.txt", 'a')         f.write(string5)         f.write(string)         f.write(string6)         f.close()          f = open("PRIMEEXPONENT.txt", 'w')         f.write(string2)         f.close()          f = open("PRIMEEXPONENT2.txt", 'a')         f.write(string5)         f.write(string2)         f.write(string7)         f.write(string6)         f.close()


What would have been our number system if humans had more than 10 fingers? Try to solve this puzzle.

Try to solve this puzzle:     The first expedition to Mars found only the ruins of a civilization.   From the artifacts and pictures, the explorers deduced that the   creatures who produced this civilization were four-legged beings with   a tentatcle that branched out at the end with a number of grasping   "fingers". After much study, the explorers were able to translate   Martian mathematics. They found the following equation:   $$5x^2 - 50x + 125 = 0$$   with the indicated solutions $x=5$ and $x=8$. The value $x=5$ seemed   legitimate enough, but $x=8$ required some explanation. Then the explorers    reflected on the way in which Earth's number system developed, and found   evidence that the Martian system had a similar history. How many fingers would    you say the Martians had?      $(a)\;10$      $(b)\;13$      $(c)\;40$      $(d)\;25$   P.S. This is not a home work. It's a question asked in an interview.


Terminal lines shown during scrolling, use CLI

Long listings are only partially shown since the amount of lines remembered isn't too large. I'd like to cancel the limit of lines in a similar way to the following:        only I'm running an Ubuntu Server 15.10 and I'd like to do it using CLI.  I've also tried to use xrandr from the x11-xserver-utils package, but I keep getting Error: Can't open display: when running it, or when running xvidtune. I tried using a Terminal Multiplexer, but neither screen nor tmux did the trick (admit I'm not sure I took full advantage of tmux though), and setting the GRUB_CMDLINE_LINUX value did not change anything either. I've tried 1024k, 2048k etc, but nothing happend - the amount of lines remains limited.  To do the above said, I've tried to use information from the following:  ,  and  , by following the links given by commentators and those who submitted their answers - I still haven't solved it, but thanks a bunch for that, guys.  NOTICE 1  One thing that did happen, is after changing the lines value with the screen Terminal Multiplexer to a large value (65000) - the screen refreshed badly. I saw white lines whenever I typed something. So I guess it did affect RAM consuming, but the amount of lines did not change.  NOTICE 2  I installed Ubuntu-Server 14.04.3 for reference - and most methods above work. I was able to send settings to the kernel through fbcon and set the "lines-history" file size to what ever I wanted, for example.  Ideas?


How do you get git to always pull from a specific branch?

I'm not a git master, but I have been working with it for some time now, with several different projects.  In each project, I always git clone [repository] and from that point, can always git pull, so long as I don't have outstanding changes, of course.  Recently, I had to revert to a previous branch, and did so with git checkout 4f82a29.  When I was again ready to pull, I found that I had to set my branch back to master.  Now, I can not pull using a straight git pull but instead, have to specify git pull origin master, which is annoying, and indicates to me that I don't fully understand what is going on.  What has changed which does not allow me to do a straight git pull without specifying origin master, and how to I change it back?  UPDATE:  -bash-3.1$ cat config [core]     repositoryformatversion = 0     filemode = true     bare = false     logallrefupdates = true [branch "master"] [remote "origin"]     url = git@github.com:user/project.git     fetch = refs/heads/*:refs/remotes/origin/*   UPDATE 2: To be clear, I understand that my original method may have been incorrect, but I need to fix this repo so that I can simply use git pull again.  Currently, git pull results in:  -bash-3.1$ git pull You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me either.  Please name which branch you want to merge on the command line and try again (e.g. 'git pull  '). See git-pull(1) for details on the refspec.  If you often merge with the same branch, you may want to configure the following variables in your configuration file:      branch.master.remote =      branch.master.merge =      remote..url =      remote..fetch =   See git-config(1) for details.   I can tell git pull which branch to merge, and it works correctly, but git pull does not work as it did originally before my git checkout.


My sugar daddy wants me to pay a $50 conversion fee on paypal

This is the first time i’ve properly been involved with a sugar daddy and he wants me to pay $50 for the USD to AUD conversion rate on pay pal. is this a scam and should i just block him? i don’t want to get conned into anything


Exercise 9 Chapter III from Kunen's Set theory: An intro to independence proofs

(9) Show in ZF: AC is equivalent to $\forall$ $\alpha$(P($\alpha$)) can be well-ordered. Hint: Show by induction on $\alpha$ that R($\alpha$) can be well-ordered.   PROOF: By induction on $\alpha$.  Case i. $\alpha$ = $\emptyset$ ; then R($\alpha$) = R($\emptyset$) = $\emptyset$ and $\emptyset$ is well-ordered trivially.    Case ii. $\alpha$ = R($\beta$ + 1) where $\beta$ is an ordinal. Suppose for induction hypothesis all $\beta$ < $\alpha$ are well-ordered, to show $\alpha$ is well-ordered.Then R($\alpha$) = R ($\beta$ + 1) = P(R($\beta$)). If P(R($\beta$)) is not well-ordered, there is no least member of P(R($\beta$)). But $\beta$ is well-ordered by hypothesis, guaranteeing a least member given R($\beta$). Contradiction. So  P(R($\beta$)) must be well-ordered after all.    Case iii. $\alpha$ is a limit ordinal. Then R($\alpha$) = $\bigcup$R($\beta$) for $\beta$ < $\alpha$, and must be well-ordered since every constituent of the union is well-ordered.   END PROOF.   Ballpark? Any help appreciated.


Python - Adding variable to functions on the fly. Why is this possible?

I am a Java programmer making his way into Python, and some things are just baffling. For example, adding variables to functions, dynamically. For example:  def main():     print ("Hello World")   main.temp = 50  print (main.temp)   What does that even mean? Why would you want to add a variable to a function? Why is that allowed? And why am I allowed to reference the function via main.temp?


Given $X_1...X_n\stackrel{iid}{\sim} N(\mu,\sigma^2)$ and  $U=\sum_{i=1}^n (X_i-\overline{X})^2$, why is $U\sim\sigma^2 \chi_{n-1}^2$ ?  And what would be the distribution of $V=\sum_{i=1}^n (X_i-\mu)^2$ ?


Is it possible to split integer such as "12.13" to 12 and 13?

I am new in Javascript and I don't know much about the js programming. I am thinking of separate 12.13 into two-part 12 and 13 from the dot in javascript.   I found on the website separate string into two-part but I don't know how to do with the integer.     For example,  var i = "12.13" var t = i.split("");


How do I transpose data in columns to rows?    If the data is:  Joe   some city   some state   Bob   no city   no state     and I use Paste Special » Transpose, I get    Joe some city some state Bob no city no state     What I want is:    Joe some city some state   Bob no city no state     I do not know VBA.


Calculating the expected number of unbalanced dice needed to reach a sum

I was recently commenting on game mechanics, when I realized that I actually underestimated this particular part.  Given an unbalanced die (in this case, some of the sides are 0), what is the expect number of rolls to reach a total sum of N.  As an example. What is the expected number of dice rolls with a die having sides [0,0,0,1,2,6] to reach the sum 24.  I can do this for a balanced die, because that is uniform distribution, so the expected number of rolls is ceil(N/((1+2+3+4+5+6)/6)) so in this example it would be ceil(24/3.5)=7 rolls.


I'm looking for a way to reinterpret an array of type byte[] as a different type, say short[]. In C++ this would be achieved by a simple cast but in C# I haven't found a way to achieve this without resorting to duplicating the entire buffer.  Any ideas?


Trying to identify a short story in which aliens turned an entire city block into a spaceship

My mom read this story in the 1950's when she was a teenager. She recounted the story to me and my siblings many years ago, probably trying to entertain us on some road trip. She has always wanted to go back and re-read it, and of course, we want to read it, too! But she can't remember the title or who wrote it.  The protagonist is a guy who works in an office building and notices one day that the janitor has an extra eyeball in the back of his head that is normally hidden by his hair. The man gradually comes to realize that several people working in this building are aliens. With some snooping, he figures out that the office building is actually a spaceship.  One day, the building starts vibrating, and this guy knows he's got to get out. He hurries downstairs and runs outside. The ground beneath his feet continues to shake. Suddenly, he realizes that the spaceship encompasses the entire block. He sprints toward the street, but just as he reaches the sidewalk, a metal wall shoots up from the ground, basically encapsulating the entire block with him inside, and the block blasts off into outer space.  Can anyone help track down this story?


Leaving out section numbers in LaTeX align environment

I'm writing in the document class, and using the align environment from the amsmath package.  My align environment in chapter 2 is giving numbers as (2.2), (2.3) etc (since it's in chapter 2), where I'd like it to appear as just (2), (3) etc.  I've tried using \numberwithin{equation}{document} command, but 'document' isn't accepted.


I am on a project where much of the queries are performed by including multiple tables in the FROM clause.  I know this is legal, but I have always used explicit JOINs instead.  For example, two tables (using SQL Server DDL)  CREATE TABLE Manufacturers(     ManufacturerID INT IDENTITY(1,1) PRIMARY KEY NOT NULL,     Name varchar(100))  CREATE TABLE Cars (     ModelID INT IDENTITY(1,1) PRIMARY KEY NOT NULL,     ManufacturerID INT CONSTRAINT FOREIGN KEY FK_Manufacturer REFERENCES Manufacturers(ManufacturerID),     ModelName VARCHAR(100))   If I want to find the models for GM, I could do either:  SELECT ModelName FROM Cars c, Manufacturers m WHERE c.ManufacturerID=m.ManufacturerID AND m.Name='General Motors'  or  SELECT ModelName FROM Cars c INNER JOIN Manufacturers m ON c.ManufacturerID=m.ManufacturerID WHERE m.Name='General Motors'  My question is this: does one form perform better than the other?  Aside from how the tables are defined in Oracle vs SQL Server, does one form of join work better than the other in Oracle or SQL Server?  What if you include more tables, say 3 or 4?  Does that change the performance characteristics, assuming the queries are constructed to return an equivalent record set?


If $Y$ is connected, why is $A\cup Y$ connected in this case?

If $(X,\mathcal{T})$ is a connected space, and $Y$ a connected subset, and $X\setminus Y=A\cup B$ for separated sets $A$ and $B$, then why is $A\cup Y$ connected as well?  Thank you kindly.


I'm looking for a way to replace \DeclareMathOperator{\Operator}{Operator} by something which would resemble \MathOperator{Operator}. I tried to define a new command \newcommand\MathOperator[1]{\DeclareMathOperator{\#1}{#1}} and then call it \MathOperator{MyOperator} but this doesn't seem to work, I got the following error: "Undefined control sequence." when calling $\MyOperator$. Any idea what I should do?  Thanks a lot.


Can a Specialist Wizard multiclass to cast spells from his prohibited schools?

I've had DMs rule both ways on this..I haven't seen any official RAWs on this so I was hoping someone here could point me in the right direction?  If a Wizard specializes (giving him 1-2 prohibited schools) and later multiclasses can his cross class use the prohibited class?    ie, an "illusionist" gives up Evocation & Conjuration and later crosses into Cleric, would he be prohibited from casting healing (conjuration) spells or would it be ok now that it is divine magic and not arcane?  Or does the arcane vs divine source even matter?  So the same Wizard instead crosses into Sorcerer, can he now cast Sorcerer spells from the prohibited schools?


Oracle - Select where field has lowercase characters

I have a table, users, in an Oracle 9.2.0.6 database.  Two of the fields are varchar - last_name and first_name.  When rows are inserted into this table, the first name and last name fields are supposed to be in all upper case, but somehow some values in these two fields are mixed case.  I want to run a query that will show me all of the rows in the table that have first or last names with lowercase characters in it.  I searched the net and found REGEXP_LIKE, but that must be for newer versions of oracle - it doesn't seem to work for me.  Another thing I tried was to translate "abcde...z" to "$$$$$...$" and then search for a '$' in my field, but there has to be a better way?  Thanks in advance!


Define a relation and find its equivalence classes.

Define a relation $\sim$ on $\Bbb{N}$ as follows. For any $a,b∈\Bbb N$, $a\sim b$ if and only if $ab$ is a perfect square. Show that $\sim$ is an equivalence relation. What are the equivalence classes?  So far I have $a\sim a$ so $\sim$ is reflexive, $ab\sim ba$ $\sim$ is symmetric, $ab=x^2$ and $bc=y^2$ prove $ac$ is a perfect square so $$ac =\frac{ab\cdot bc}{b\cdot b} = \frac{x^2\cdot y^2}{b^2} = \left(\frac{xy}{b}\right)^2$$ Therefore ac is square, ~ is transitive and an equivalence relation.  I think you use the equation $a=b^2a'$ to find the equivalence classes but I don't know how.


How can I hide my email from other members at stackoverflow.com?

I went to preferences, but I didn't see any option to make my email private. I did a search on this site regarding this query, but I was not satisfied with the answer. It seems only moderators can view my email, but there should be an option to make my email public if in case it is private (I should be able to toggle between public and private). But there is no such option, so how do I make sure that my email is private?  Also I don't receive any email in my Gmail inbox if there are any unread messages at Stack Overflow.


How to decrypt encfs folder without Gnome EncFS?

I've recently installed Ubuntu 20.04 and for some reason, I'm unable to install Gnome EncFS in it. I've been using this for a long time and I was able to install it just fine in 18.04. I tried installing it in 20.04 with these commands:  sudo add-apt-repository ppa:gencfsm/ppa sudo apt-get update sudo apt install gnome-encfs-manager   This is the output I get when I add the repository:  Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Ign:2 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal InRelease               Hit:3 http://archive.canonical.com/ubuntu focal InRelease                       Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease                          Err:5 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal Release                   404  Not Found [IP: 91.189.95.83 80] Hit:6 http://dl.google.com/linux/chrome/deb stable Release Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease Hit:9 http://archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done E: The repository 'http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I have an encfs folder in an external hard disk named Western Digital that I need to decrypt. I also tried using encfs via terminal but it did not work. I followed the command format encfs /path/to/.stash_encfs /path/to/stash but it gave me the following output:  When specifying daemon mode, you must use absolute paths (beginning with '/')   I'm not mentioning the path due to privacy and security reasons, but this is located on my external hard disk which is named Western Digital. That's the only thing in the pathway that has a space in it but I also tried running it with quotes round the entire pathway and that yielded the same result. Also, if the stash is called .stash_encfs, the mount point is stash. The pathway before that is exactly the same.  Is there any way to do this without Gnome EncFS? Or any way to install Gnome EncFS? Or even a Windows alternative to enfcs that can recognise and decrypt an existing Cryptkeeper stash would help. Any help would be appreciated.


JavaScript setInterval callback before defining function?

I'm currently a teacher's assistant in a web development course. Today, a student asked for help with his homework, in which he'd used setInterval, passing as the first parameter a function which he didn't define until a few lines of code later. I told him that wouldn't work, as the function would be undefined by the time the interval setting code was reached.  To my surprise, it worked perfectly. I've been trying to research this and am coming up blank: does JavaScript actually wait until the first execution of the callback to even see if the function name passed to it exists? That seems so counter-intuitive, but I can't imagine any other reason it would have worked. Where can I find out more about this unexpected behavior?


cp a b and cat a > b, what's the difference?  In x86 install script of linux kernel's source tree (arch/x86/boot/install.sh), both are used:  cat $2 > $4/vmlinuz cp $3 $4/System.map   Why don't they just keep the same format if one is better than the other?


Why didn't I get notification of this answer in my inbox?

I posted  to SO recently and by chance I noticed I had ; however I only noticed this answer by chance - I never received a notification in my inbox like I always do.  I thought I may have missed it, but I checked my inbox and it is not showing there whatsoever - my last notification is from Feb 19th.  Is there a reason I wasn't notified or is there some kind of issue here?


What exception to throw on invalid object state?

I always missed a built-in exception type in c# which would indicate that an object is corrupted. What do you throw in such cases?  Usually I miss it when I realize that a method, that is supposed to work on an object, would fail if the object had a certain state. In such situations I often suspect that this state probably won't be ever reached. But being defensive about it, I'd like to throw an exception just in case it will (e.g. after a future code change).  For method arguments we have ArgumentException so we can deny invalid parameters. But for object state? In Java I'd use IllegalStateException.  Of course you could argue that the methods, that are actually changing the state, could check for state correctness. And they better should, but then if they don't (say in legacy god classes)?  Edit:  Although InvalidOperationException seems to be the best fit, as the accepted answer states (and also ), please note:  It is subtle, but semantically this has a different meaning than InvalidOperationException. InvalidOperationException indicates a problem in the "protocol" of the object, which the caller has to obey (e.g. not initialized, closed already, ...). In my case the caller did nothing wrong, it's the object that is broken. I would like to transport exactly that message.  Example:  switch(this._someType) {   case SomeType.A: doSomething(); break;   case SomeType.B: doSomethingElse(); break;   /*...*/   default:     // Unexpected type! Someone introduced a new type and didn't update this.     throw new IllegalStateException("Unknown type "+this._someType);  }


Intel Turbo Boost temperature safety limits?

I have read many posts about Intel turbo boost technology and I am still a little confused. I get how it works and I even went as far as turning it off but it didn't seem to do anything. When I disabled turbo boost in my bios it still would make my CPU jump above it's 3.3 GHz max. So because that didn't work I just went back into my bios and left it enabled hoping that Intel knows what it is doing.   Now I do a lot of BOINC processing in my spare time when I am not home (Seti@home and others). I've seen my Intel processor hit Ghz of 3.73 and I believe higher, but I don't remember exactly. My main concern is how hot my CPU is getting. I've registered temps as high as 83 degrees Celsius. Normally tho when doing processing it is bouncing somewhere between 60-77 degrees Celsius. I am assuming that is the Intel technology boosting it and then reducing it when it hits higher temps.   My actual question is, is this safe? Are temps of 80+ dangerous? For reference when I am just gaming, WoW on ultra settings, in Ashran, only make my CPU hit 60 degrees Celsius max.   On a side note, my GPU is always a very constant low temperature, so I have that going for me. Which is nice.


Is there a tool to automatically calculate Big-O complexity for a function

While studying algorithms and data structures I manually evaluate BigO complexity for my script. Is there a way, let say a button in any Python IDE or a package, to calculate BigO for any given function or a program?  UPDATE:  Let's say I have  def print_first_element(a):     print a[0]   why I can't write the analyzer which will say me ok you access the array (list) by index and its O(1), or  def print_all_element_of_list(a):     for i in a:         print i   ok you have full scan so the complexity is O(n)  and so forth


Can I secretly kill every guard in a town?

Is it possible to kill all of the guards in a town?  Ideally, I'd like to do this secretly so the entire town doesn't see my deeds and put a bounty on my head.  Edit: I was questing in Markarth and was told by a guard to back off and stop being nosy. I didn't and when I went to the Shrine of Talos I was set upon by a bunch of guards.  Now I have a huge bounty and I had to sneak/kill my way out of the city.  Every time I killed a group of guards the bounty was reduced by $1000, but I still have a $30,000 bounty.  I haven't even been through 1/3 of the city yet and know there has to be a lot of quests, so what do I do?  The only solution seems to kill every single guard (and inhabitant).


I am currently using gnome-keyring to manage my ssh passwords. I would like to know if there are any alternatives to this, which I can use in situations when I don't have access to the UI. I am currently running Ubuntu 12.04.


"Andrew looked at him in the mirror": can "him" refer to Andrew?

(1) Andrew looked at him in the mirror.    (2) Andrew looked at himself in the mirror.   Does (1) include (2)’s possibility? Or does him in (1) only refer to someone other than Andrew?


Do the Publication Retraction impact on Co-authors

I am a co-author of a retracted paper. It is very unfortunate for me. I just provided technical assistance in the experiment but the 1st author did some scientific misconduct and as a result, the article has been withdrawn by the corresponding author. I want to know how it is going to impact my career. I just helped with the experiment designing and completely unaware of the scientific misconduct by the 1st author and now I am suffering. Please suggest what to do. I want to stay in the same field of research. Hence, is it possible that my abilities will be judged by this retracted article?


How can I show the current network transfer speed on Windows?

I am looking for a way to show me an approximate current network transfer rate (incoming and outgoing) over LAN and WLAN.  I am currently struggling with internet speeds (they can go from normal 100 Mbit/s to measely 5 Mbit/s in a matter of seconds) and constantly running speedtest (or similar services) during regular internet use will only make my situation worse. Yes, this is ISP issue they are aware of, but it will take some time to fix and I need an indicator of my current speed for now. I am using Windows 10 version 1909 (build 18363.476).  I am not even sure if this is possible (thus my question). Can I do that, and if so, how? Can it be done with a PowerShell command?


Is the L'Hopital's rule true when using limits on $\mathbb{C}$ (the complex field)?  I don't know if it is only valid using the real numbers $\mathbb{R}$... is that the case?


IList vs IEnumerable for Collections on Entities

When I have entities in my domain with lists of things, should they be exposed as ILists or IEnumerables? E.g. Order has a bunch of OrderLines.


How do you exit Dutch railway stations with an international paper-based ticket?

According to the media the Dutch railways are getting rid of the paper-based ticket, relying fully on a chip based prepaid card called the ov chip card. I do have such a card. However, when arriving from abroad I can't iniate this journey on a ov-chip card.  I thought a paper-based ticket for international arrivals would suffice. Much to my surprise I noticed today that they were installing automatic doors, technically sealing the exits. You would need a chip card to operate the sliding doors.    Today they weren't functioning yet, but I worry about future visits. How do I get out of the station with sliding doors sealing of the exits?


jQuery - on mouseover / hover etc not working on new created elements

I create new element with js like this:  $("#vorschau_tr").append('	');   And try to just alert something like that:  $(".js_is_a_broken_time_wasting_piece_of_garbage").on({     mouseover: function () {         alert('enter');     },     mouseleave:function () {         alert('leave');     } });   I know it was asked multiple times but every time it says the solution is to use on which I do but it's not working so how to do that?  $(".js_is_a_broken_time_wasting_piece_of_garbage").live( click, function(){     alert('js_inventor_is_a_pos'); });   isn't working too


Let f is differentiable on R. Following statement is true?  If $\lim_{x\to a}f'(x)=\alpha$, then $f'(a)=\alpha$ (where $\alpha$ and $a $ are real numbers)


What should one do if they are being targeted by a single individual?

For the past few months, every one of my questions (total of eight) have been downvoted almost immediately after posting.  If they are poorly written questions or even if asking a question for something that shouldn't be attempted, I deserve and welcome the downvote.   I am not paranoid or a conspiracist, and while I have zero proof, it appears to have being done by a single individual.  My reason for thinking so is:  This didn't happen in the past and now is happening 100% of the time. A single initial downvote occurs about 4 hours after the initial post. They are downvoted only once, and are often later voted up. Whoever downvotes never leaves a comment.  In an attempt to learn whether I am doing something wrong and deserve these downvotes, I've started leaving comments asking the reason for the downvote.  Not only do I not receive a reply to my comment, my comments are deleted by someone. Yesterday, I asked , sure enough it was promptly downvoted, I left a comment but this time saved a screenshot of it, and like the rest it was gone by the time I woke up in the morning.  I have no formal software education and owe all that I have learned from the many generous members of this site, but now dread asking a question.  I am also not concerned about the loss of two votes, but I am concerned that questions with negative votes are less likely to be responded to by others, and feel I am now wasting my time asking a question. What could I do?  As I see it, several options are:  No longer be a member of the stack platform.  Hopefully, not necessary. Delete my existing account and create a new account.  If so, will I need to use a different email? Aggressively add large bounties until I have very few votes and hopefully fall off their radar.  I have started doing so with no avail. Have someone who can query the DB determine whether it is only a single individual who is systematically downvoting my questions and deleting my comments (I don't even want to know who) and if so ask them to stop.  Thank you in advance for your advice.


I'm trying to make my .py files executable so I can run them using ./filename.py, but its not working for me.  What I did was adding the shebang #!/usr/bin python3 and used the command chmod +x filename.py. When I run ./filename.py then as normal user, I get the error message below   bash: ./filename.py: /usr/bin: bad interpreter: Permission denied   As superuser, it tells me this instead:  sudo: unable to execute ./filename.py: Permission denied   Opening the file the usual method (python3 filename.py) it works fine.  When I changed the shebang to #!/usr/bin/env python3 it tells me this:  /usr/bin/env: ‘python3\r’: No such file or directory


Why are there dark patches in my rendered drop diamonds?

Does anybody know why there are dark patches in the corners of the pear shaped diamonds in my renders? I have attached the node set up of the diamonds (which i followed from a tutorial) incase there is anything wrong in there, and also the lighting setup for the same reasons.  I have tried spinning the ring and no matter which angle it is rendered at there is still darker patches, and i have also used a boolean to make sure there are no intersecting pieces of 'metal mesh' on the 'diamond mesh'.   Is it just a lack of light behind the claws and the shadows that are cast causing the diamond to reflect the darkness or are there other problems?


How Can I get the Process information of the process which is holding apt-get lock?


How to debug a database error of "Incorrect syntax near the keyword X"?

I'm trying to count the number of user so that I can generate the unique id for new user. But the query which I have written shows some syntax error near User where User is my Table name.  private int GenerateAutoId() {     con.Open();     SqlCommand cmd = new SqlCommand("Select Count(*) from User",con);     var temp = cmd.ExecuteScalar().ToString();     int i = Convert.ToInt32(temp);     con.Close();     i=i+1;     return i; }   Error Message:     [SqlException (0x80131904): Incorrect syntax near the keyword 'User'.]   System.Data.SqlClient.SqlConnection.OnError(SqlException exception,   Boolean breakConnection, Action'1 wrapCloseInAction) +2555926   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException   exception, Boolean breakConnection, Action'1 wrapCloseInAction)   +5959200    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject   stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,   SqlCommand cmdHandler, SqlDataReader dataStream,   BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject   stateObj, Boolean& dataReady) +4169   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58   System.Data.SqlClient.SqlDataReader.get_MetaData() +89   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,   RunBehavior runBehavior, String resetOptionsString, Boolean   isInternal, Boolean forDescribeParameterEncryption, Boolean   shouldCacheForAlwaysEncrypted) +430   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior   cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean   async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry,   SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2598   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior   cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String   method, TaskCompletionSource`1 completion, Int32 timeout, Task& task,   Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1483   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior   cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String   method) +64   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior   behavior, String method) +240   System.Data.SqlClient.SqlCommand.ExecuteReader() +99   SignUpPage_SignUp.GenerateAutoId() in   d:\SEM-4\WT\ProjectStayHealthy\StayHealthy\templates.aucreative.co\Project\SignUpPage\SignUp.aspx.cs:22   SignUpPage_SignUp.SignUp_Click(Object sender, EventArgs e) in   d:\SEM-4\WT\ProjectStayHealthy\StayHealthy\templates.aucreative.co\Project\SignUpPage\SignUp.aspx.cs:31   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782698   System.Web.UI.WebControls.Button.RaisePostBackEvent(String   eventArgument) +204   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String   eventArgument) +12   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler   sourceControl, String eventArgument) +15   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)   +35    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   +1639


Ignore citations in captions in list of figures when numbering

When using the \cite command in figure captions and the ieeetr bibliography style, then  BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]).  Is there any way to get BibTeX to ignore the \listoffigures section when numbering?


How to get started to typeset mathematical proofs with LaTeX?

I want to start using LaTeX to organize my proofs into a readable fashion. This motif is due to my professors preferring e-mail communication instead of reading a chicken-scratch proof. I know enough LaTeX such that I can post on math.SE and make my question readable, but I do not know how to include LaTeX in a document.  How do I make my proof into a LaTeX document?


Does this strict reading of the rules allow both Extra Attack and the Thirsting Blade warlock invocation to be used together?

The warlock's Thirsting Blade eldritch invocation cannot be normally used with the (non-warlock) class feature Extra Attack, since both feature explicitly say you attack twice instead of once. But it seems to me that you could use both features (if you have them) when using Two-Weapon Fighting.  Assume your character is wielding two light weapons, one of which is your pact weapon. You take the Attack action on your turn to attack twice with your non-pact weapon using your  class feature.  Then, given the Two-Weapon Fighting rules, you use your bonus action to attack once using your pact weapon this time.  The  rules (PHB p. 195) state:     When you take the Attack action and attack with a light melee weapon that you're holding in one hand, you can use a bonus action to attack with a different light melee weapon that you're holding in the other hand.   But since your have the Thirsting Blade invocation, and you used the Attack action, you get to attack twice with your pact weapon.  The Thirsting Blade  (PHB p. 111) says:     You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn.   Does this combo work within the rules, or is there any interaction I'm not aware of?


Problem-solving approach to Classical Mechanics

I'm looking for a book with problem-solving approach to the intermediate classical mechanics. The book I expect should have:   Solutions to all of its problems Be Calculus based(!) - try to show me the way to solve the problem with integration techniques or using differential equations, even much more advanced material. Give clear definition of concepts and no  more fluff, going to solve the problems straightforward. Keep me focused on the problems rather than the amount of text remained to be read.   To put it in a nutshell, I don't want a book with bunch of useless text, I want something to help me go through problems. It would be really helpful to introduce the topics which are alike this topic.Moderators only specialty is to close topics for fun and profit.


Reduce linespread between \item globally

Because of a page limit for a report, I would like to decrease the linespread between individual \items. I know this is generally not a good idea, but I really need the space.  How can I achieve this globally, say, with a couple of lines of code in the preamble?


Can something become "increasingly smaller"?

I was reading a news story recently, and saw this sentence:      "Police used tear gas and what appeared to be plastic bullets against increasingly smaller groups of protesters."   I wasn't sure if it was right or not. It seems somewhat oxymoronic. Can something become increasingly smaller? Is that logical?


Document viewer doesn't have add annotation enable for pdf

I have a vmware setup with Xubuntu and I have found myself not going back to OSX. Now I'm trying to learn a bit more about the ecosystem and how to set things that accommodate my needs. In my working environment, I read pdfs' often. I'm utilizing Document Viewer to read. However, I don't see the Add Annotations feature in the app. How I can enable this feature?


I need to upload and compile stuff on a remote machine that is only reachable inside a specific network that I can access over SSH.  So for example I perform the following steps:  me@mymachine$ ssh user@network_gateway user@network_gateway$ ssh seconduser@targetmachine seconduser@targetmachine$ #do stuff   Is there a way to make my local machine aware of the tunneling without undergoing the trouble of connecting to the network gateway every time?


Are the Elves Aware that Gandalf (Etc.) Are Maiar?

I was inspired to ask this question by   Basically, are they aware that they are basically godlike beings of immense power and wisdom on a mission of utmost importance, given to them by their god[s]. And if so, why not act like it?  I understand that Gandalf would never seek any role beyond giving advise, but why are the Elves not falling over themselves to help him? They treat him as an equal, and possibly not even that at times, when should they not be worshiping him (to some extent)?  Similarly, all elves are immortal. They are all like lesser angels, and unlike the Istari are not even garbed in mortal men, so are not really as corruptible as Saruman turned out to be. So why do they not act like it? From things I have read, it sounds like they sort of even lack some of the freewill of mortal men (a similarity to christian angels). So how are they so uncaring of the outside world? Why are they not every much as obsessed with Gandalf's mission as he himself is?


In case of password security I often read, that the use of rainbow tables is appreciated. It is possible, that I don't get it right, but my current perspective is just confusion.  You save a couple of salts in a table, but you must reference them in the table with password hash, which allows you to rebuild the password hash. So I would do it like this:  By creating a new password, save hash ( input + salt ) into the table  Table: Password: hash, Salt reference: 123  I thought, this is used to prevent "dictionary attacks", but what happens, when the user uses a password, which is contained by the dictionary. The attacker can easily pass through.  Just a list with events, which are happening in my point of view:   User/Attacker "types" in this login data Email/Username is looked up and returns salt reference Look up salt with reference Build password Check password in table with email/username   So how can the salt matter, if it is automatically looked up? This might be a bit confusing, but in the end it makes all sense to me.


I'm trying to install apache2 server, but it gives following error message:  It looks like you've deleted /etc/apache2/mods-available/cgid.load, so mod_cgid cannot be enabled. To fix this, please purge and reinstall apache2.2-common. Setting up apache2 (2.2.17-1ubuntu1.5) ...  I've done the same using ubuntu software center, but getting the same error again.


I need to use both figure and figure* In my twocolumn article, but I have problems with the numbering. The figures are not numbered by the order of appearance. Apparently, the large figures* are the problem. Any suggestions, please?  I am using  \begin{figure*}[ht!]   and  \begin{figure}[h]


Prove that if $x$ is a set, then $x$ is not an element of itself.

I am having troubles with proving the following statement:  if $x$ is a set, then $x \notin x$.  I am only allowed to use the axioms from the Zermelo-Fraenkel Set Theory. Thanks so much if someone could give me a hand!


So I wanted to create a citation like the following:  US. Census Bureau (2017). Retrieved from https://.....  I have tried the following: @Online{USCensusBureau2017, label = {United States Census Bureau}, Title = {Statistics of U.S. Businesses (SUSB)}, url = {https:...}, author = {United States Census Bureau}, year = {2017} }  But it gives me a formatted bibliographic entry like this: U.  S.  C.  Bureau.   Statistics  of  u.s.  businesses  (susb),  2017. URL https://.....  Could you tell me how I can achieve what I need? Thank you!


Programmatical Setting of 'Store Relative Pathways' for multiple MXDs ArcGIS 10.1

I am looking to move large number of mxds to a different location on the same drive. Many mxds haven't got 'Store relative pathways' option checked therefore this operation will result in broken links to data. I've only started using ArcGIS 10.1 and it is now possible to programmatically update relative pathways for all mxds by using arcPy and setting relativePaths to be "True". I had a go at writing Python script which (in theory) loops through a top folder and searches for all mxds and then updates "Store relative pathways" setting to be on. When I run this script in PyScripter, it fails to complete, I get the following error:  "exceptions.NameError: name 'mxd' is not defined  Can anyone help ?!? Thanks in advance, Magda      import arcpy, os  folderPath = r"C:\My Folder Path\...\...\..."  for filename in os.listdir(folderPath):     fullpath = os.path.join(folderPath, filename)     if os.path.isfile(fullpath):         basename, extension = os.path.splitext(fullpath)         if extension.lower() == ".mxd":             mxd = arcpy.mapping.MapDocument(fullpath)             mxd.relativePaths = 'True'         mxd.save() del mxd


Find the value of $a$ if the value of the limit is $1/\pi$

Let $a$ and $b$ denote two positive constants. If $$\lim_{x\to 0} \Bigg(\frac{\int_0^x \frac{t^2}{\sqrt{a+2t^5}}dt}{bx-e\sin x}\Bigg)= \frac{1}{\pi},$$ find the value of $a$.  What I've tried: I've used L'Hospital's rule since it is a $\frac00$ form, to get $$\frac{\lim_{x\to 0} \Big(\frac{x^2}{\sqrt{a+2x^5}}\Big)}{{\lim_{x\to 0} ( b-e\cos x)}}$$ If  $x$ tends to $0$, the equation will become $\frac{\frac{0}{\sqrt{a}}}{b-e}$, making it impossible to become $\frac{1}{\pi}$. Did I make a mistake somewhere?


Having trouble finding a specific string (with wildcards in the middle) using regex and python

Sample Text:     "UNCKEV\nPumpkins 10/1/20-2030\nRunners\nha\nH[ 12 ]\nA[ O   ]\nKNOWLEDGI\nPLA\nDISTRIBUTION\nHOME TEAM\nPINK VISITING   TEAM\nBLANCHE BUREAU NATIONAL\nJAUNE \u00c9C\nALE\nPR\u00c9CISER LES   DE\nSEULEMENT\nOFF\nSORTIE\nSTART\nD\u00c9BUT\nON\nRETOUR\nPER\nP\u00c9R.\nMIN\nSERV\nPURG\nOFFENCE\nINFRACTION\nDUR\u00c9E\nNo.\nDU\nNeinterferCACE   =\n188 Cross clicak 3\n1010hgh shicle\n"   I'm trying to extract H[(wildcard)] and A[(wildcard)] from the sample text, separately.  If I use x = re.search('H\[.*\]', ocr[0]) it finds the whole string H[ 12 ]\nA[ O ]  If I use 'A\[.*\]' it will find A[ O ] by itself - but I can't seem to just find H[ 12 ].


What is the cartesian product of a nonempty set and an empty set

Let $A=\emptyset$ and $B=[a,b]$ where $R⊃A,B$  What is $A \times B $ where $\times$ denotes the cartesian product?  How can we explain this $A\times B$ in $R^2$, what does it look like?


If a database stores password encrypted by using salt values, how are they stored?  I read somewhere, it uses timestamps.  So is the timestamp also stored?  How about when a user tries to login next time, then how are timestamps considered?


Non-normal variable: multiple vs poisson regression

If my outcome variable is count data, people often recommend using some type of poisson regression. I'm struggling to understand why this is the preferred method.  Lets say for this scenario that my mean count is low, so the distribution is skewed and does not look normal.  Given that regression makes no assumptions about the normality of the outcome variable, why does it matter that it is skewed? Why could I not run OLS regression anyway?  If my outcome mean was large the poisson distribution of the variable would look more normal, and I've heard people say in that case OLS with no transformation is acceptable. So there seems to be something special about a low mean count and the skew of the resulting distribution  Is it because the likelihood of a non-normal residual distribution increases with highly positively skewed data, and the reason for using poisson regression is to circumvent that normality violation?  Assuming the residuals are distributed normally, what is the actual problem with modelling (untransformed) count data using OLS regression (barring the decimal predictions)?


Verifying third party apps doesn't do anything

When I get a third party app it says it needs to be verified before I can use it but when I go to settings to verify I tap verify and nothing happens. Is there something I can do so I don’t have to constantly reinstall my apps?


In polar coordinate how we can get $dx\;dy=r\;dr\;d\theta$?  with these parameters:    $r=\sqrt{x^2+y^2}$ $x=r\cos\theta$ $y=r\sin\theta$  Tanks.


Trying to overwrite ... which is different from other instances of package

I tried to upgrade Intel graphics in ubuntu 16.10 using the official installer. The last stage of unpacking libcairo2 produces an error (see figure).  When I do upgrade I get the same error also:   Preparing to unpack .../0-libcairo2_1.15.2-0intel1_amd64.deb ... Unpacking libcairo2:amd64 (1.15.2-0intel1) over (1.15.2-0intel1) ... dpkg: error processing archive /tmp/apt-dpkg-install-aYhdFd/0 libcairo2_1.15.2-0intel1_amd64.deb (--unpack): trying to overwrite shared '/usr/share/doc/libcairo2/changelog.Debian.gz', which is different from other instances of package libcairo2:amd64 Preparing to unpack .../1-libcairo2_1.15.2-0intel1_i386.deb ... Unpacking libcairo2:i386 (1.15.2-0intel1) over (1.15.2-0intel1) ... dpkg: error processing archive /tmp/apt-dpkg-install-aYhdFd/1-libcairo2_1.15.2-0intel1_i386.deb (--unpack): trying to overwrite shared '/usr/share/doc/libcairo2/changelog.Debian.gz', which is different from other instances of package libcairo2:i386 Errors were encountered while processing: /tmp/apt-dpkg-install-aYhdFd/0-libcairo2_1.15.2-0intel1_amd64.deb /tmp/apt-dpkg-install-aYhdFd/1-libcairo2_1.15.2-0intel1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   It seems that there is a conflict in thelibcairo releases; if yes, how to resolve it ?


Is there a stopwatch, so that I can measure time taken for different commands for BASH shell?


Create multiple users roles and views at the same time

I'm using D7, I need to create views and user roles, when I'm using the interface mode, it takes me too much time, how can I do that using code? or could you please suggest to me a module to install, that can create, for example 10 roles at the same time, or cloning a view 5 times at the same time.


Math and Theoretical Physics Topics & Textbook for Self-Study

I am from Singapore, a civil engineering graduate and I've graduated from university in 2009.  Throughout my school days I've been interested in Physics, unfortunately I was not accepted into the local university as my grades did not match up. And I couldn't afford to study abroad. Hence I took up whatever was offered to me at that point; civil engineering.  Right now, I'm on a mission to self-study theoretical physics so that I can fully appreciate the beauty of it; I mean right down to the deep mathematical level of it. I am particularly interested in the subjects: General Relativity, Quantum Theory, M-theory. I acknowledge that first of all I'd have to master the math before I can delve deeper into the theoretical physics subjects.  I would like to ask forumers the following questions:  (1) - May I know what are the sequence of math & physics topics I have to master? I mean in a step-by-step way starting from high school level knowledge.  (2) - Could you recommend texts both from the math & the theoretical physics side? Based on my research I have shortlisted a few and they are   (a) Introduction to Mathematical Physics: Methods and Concepts by Chun Wa Wong.  (b) A course in theoretical physics by P. john Shepherd  (c) Introduction to Modern Physics: Theoretical Foundations by John Dirk Walecka &  (d) A Unified Grand Tour of Theoretical Physics, Third Edition by Ian D. Lawrie.    Are these books suitable and good for my cause? What other textbooks do you all recommend? I am willing to self-study patiently even if it takes me 10 years.


smelling something Dangerous about update

I am attaching two screen shots, self explained. Why do an update asking something regarding my boot sector? isn't dangerous?


how to prove that if $A$ and $B$ are open in $(\mathbb{R},|.|)$ then  $A+B$ is open ?  Where   $A+B=\{a+b\mid a\in A,b\in B\}$   Thank you


The diagram that I am providing depicts a pile of bricks. I have the border and brick the color of BurntOrange. I would like the border to be three times the default line width of the \draw command. Is the default line width 0.4pt?  \documentclass{amsart}  \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{calc}  \begin{document}   \noindent \begin{minipage}{4.5in} \noindent \raggedright{\textbf{5.) }The following figure depicts a stack of bricks. A bricklayer \\ intends to number every brick that is not in the bottom \\ row with the sum of the numbers on the two bricks \\ supporting it. What is the number that will be \\ put on the top brick?} \end{minipage} % \hspace{-0.5cm} % \raisebox{0mm}[0mm][0mm] { \begin{tikzpicture}[baseline=(current bounding box.west)]   %A pile of bricks is drawn. \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (0,0) -- (0.75,0) -- (0.75,0.5) -- (0,0.5) -- cycle; %\node at (0.375,0.25){18}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (0.75,0) -- (1.5,0) -- (1.5,0.5) -- (0.75,0.5) -- cycle; \node at (1.125,0.25){7}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.5,0) -- (2.25,0) -- (2.25,0.5) -- (1.5,0.5) -- cycle; %\node at (1.875,0.25){15}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (2.25,0) -- (3,0) -- (3,0.5) -- (2.25,0.5) -- cycle; %\node at (2.625,0.25){17}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (3,0) -- (3.75,0) -- (3.75,0.5) -- (3,0.5) -- cycle; \node at (3.375,0.25){3}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (0.375,0.5) -- (1.125,0.5) -- (1.125,1) -- (0.375,1) -- cycle; \node at (0.75,0.75){25}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.125,0.5) -- (1.875,0.5) -- (1.875,1) -- (1.125,1) -- cycle; %\node at (1.5,0.75){22}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.875,0.5) -- (2.625,0.5) -- (2.625,1) -- (1.875,1) -- cycle; \node at (2.25,0.75){32}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (2.625,0.5) -- (3.375,0.5) -- (3.375,1) -- (2.625,1) -- cycle; %\node at (3,0.75){20}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (0.75,1) -- (1.5,1) -- (1.5,1.5) -- (0.75,1.5) -- cycle; %\node at (1.125,1.25){47}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.5,1) -- (2.25,1) -- (2.25,1.5) -- (1.5,1.5) -- cycle; \node at (1.875,1.25){54}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (2.25,1) -- (3,1) -- (3,1.5) -- (2.25,1.5) -- cycle; %\node at (2.625,1.25){52}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.125,1.5) -- (1.875,1.5) -- (1.875,2) -- (1.125,2) -- cycle; %\node at (1.5,1.75){101}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.875,1.5) -- (2.625,1.5) -- (2.625,2) -- (1.875,2) -- cycle; %\node at (2.25,1.75){106}; \draw[draw=BurntOrange, line width=1.2pt, fill=BurntOrange!75] (1.5,2) -- (2.25,2) -- (2.25,2.5) -- (1.5,2.5) -- cycle; %\node at (1.875,2.25){207};   \end{tikzpicture} }   \end{document}


I haerd that we cannot add two different types quantities.    Is there no law which includes an addition of different types quantities?    In the future, maybe we find a law like this $$F = \frac{\alpha}{r+m_1 m_2}.$$


Clarifications on how scoped variables behave in the context of a Javascript closure

Context I have this code var a = 10;   // function "outer" created a closure of the global scope // the moment it was defined function outer() {     // variable a is available in this scope (execution context)     const b = 10;       // function "inner" created a closure of the global scope     // and outer function's scope the moment it was defined.     // When it's executed it can use this closure as part of     // its own scope     function inner() {         // variables a and b are available in this scope         const c = 20;         console.log(a + b + c);     }       return inner; }   The closure for inner has these scopes:  Local scope Outer function's scope Global scope  Let's execute outer and then execute the return value, which is inner : const inner = outer(); inner() // prints 40  Now here is where I am confused. I always thought that the inner function gets a "snapshot" of variables a and b as they existed the moment inner was defined. So, I thought that after const inner = outer();, then every execution of inner would always return 40. However I came to find out (while making a demonstration nonetheless) that this is not what happens const inner = outer(); a = 100; inner() // prints 130 while I expected for inner to be "locked" to 40  Question I would like someone to clarify/correct my mental model of how closures work in js. More specifically, I expected that the moment a function is defined, it gets a hold of all the outer scopes defined up to that moment and var (or const or let) values stay "locked" to the values they had the moment the function (in this case function inner) was defined. However, I just showcased that altering the value of one of the variables referenced inside inner actually changes its return value. So, values are evaluated "live" when the inner function gets executed instead of being a snapshot of what they were the moment inner was defined?


What causes odd deformations when using Subsurf?

first time here.  Alrighty, I'm quite new to 3D model design in Blender, but I have a little problem with my book model. The mesh is fine (I think). But there are a good few points where the text mesh goes wrong for some weird reason. If you need to know which version of Blender I'm using, it's Blender 2.69.  When I apply the "subdivision surface" modifier and set the subdivision render to 2, the faces go in and deform in certain areas. As far I'm not sure what is wrong at this point. I've taken two pictures just in case you need them.       Take note that I'm still unaware of some certain tools and common knowledge in Blender, go easy on the in depth reasons and fix details. Just simplify it please :)   Blend file :


What is the city in Zootopia/Zootropolis called in the US version?

In the U.K. the film Zootopia is called Zootropolis, possibly because of some copyright nonsense (). But I was just wondering if in the movie itself does the name of the city change between versions? In the U.K. version it's referred to as "Zootropolis" which could have been over dubbed, although the play Judy performs in at the beginning has "Zootropolis" written on a banner - possibly its written in other places as well - which would be harder to change. I also noticed that Gazelle opens her concert at the end with something like "Hello Zootopians" so my assumption is they missed over dubbing that line.  Follow up question; If in the US version the city is still called Zootropolis, why would they call the film Zootopia anyway?


At work we have a big database with unique indexes instead of primary keys and all works fine.  I'm designing new database for a new project and I have a dilemma:  In DB theory, primary key is fundamental element, that's OK, but in REAL projects what are advantages and disadvantages of both?  What do you use in projects?  EDIT: ...and what about primary keys and replication on MS SQL server?


Google add the domain name at the end of the search results

I am not an SEO expert but I tought that Google use the <title> to display link in the search results. For a reason that I don't know, It add the domain at the end of the link. Does anybody have an idea why?  Web page source code:  <html xmlns="http://www.w3.org/1999/xhtml"> <head>   <title>     Home | Le Boot Camp - Sleeman   </title>   What Google display:


Why is my vector giving me an out of range at memory location error?

Like my title says I am having an issue with getting an out range error with my code in C++. The basic gist is that I am making a vector for a 52 card deck. After which I am randomizing the order of the cards.   When I go to print out the cards one by one in the terminal I get an out of range error for the location of memory. The output gives me the first card but then breaks.   From error checking I know my Deck size is 1 but I thought that my push back when creating the deck would increase the deck size to be 52.   Is there something I am missing? Any help is appreciated.  #include <iostream> #include <chrono>        #include <random> #include <vector>  int main() {     srand(time(0));     std::vector <std::string> Deck[52];     CreateDeck(Deck);     ShuffleDeck(Deck);     ShowDeck(Deck); }  void ShowDeck(std::vector <std::string> Deck[52]) {     for (size_t i = 0; i < 52; i++) {          // Microsoft C++ exception: std::out_of_range at memory location 0x004FF718.         std::cout << Deck->at(i) << ",";         if ((i + 1) % 13 == 0) {             std::cout << "\n" << std::endl;         }     } }  void ShuffleDeck(std::vector <std::string> Deck[52]) {      //shuffle deck to a randomize order     unsigned seed = rand() % 100;     std::shuffle(Deck, Deck + 52, std::default_random_engine(seed));     std::cout << " Shuffling Deck......." << std::endl; }  void CreateDeck(std::vector <std::string> Deck[52]) {     //using the arrays below contruct a 52 playing card deck      std::string suit[4] = { "S","C","D","H" };     std::string value[13] = { "A","2","3","4","5","6","7","8","9","10","J","Q","K" };     int x = 0;     for (size_t j = 0; j < 4; j++)     {         for (size_t i = 0; i < 13; i++)         {             Deck[x].push_back("[" + value[i] + suit[j] + "]");             x++;         }     } }


Why "Questions needs votes too." is displayed so shortly?

Popup with message "You haven't voted on a question in a while. Questions need votes too." is displayed so shortly and dissapears so quickly, that I managed to read and understand, what it says, after about fifth attempt or so. Though, I think, my English is quite good.  People with worse understanding of English simply won't read / understand, what this message is saying.  If I'm not mistaken, this popup uses the same mechanism as the one used to display "Thanks, we'll take a look at it". But -- if, again, I'm not mistaken, the second one is displayed noticeable longer.  It there any reason, why this -- kind important -- message, telling people, that they should vote also on question, is displayed so shortly?


Is Doctor Who's name John Hurt or Mildred?

I've been trying to figure out his name, and some people tell me it's Mildred and some say it's John Hurt - which one is it?


How can I make a DVD bootable Windows 8?

I've bought a computer with Windows 8 pre-installed. I don't want Windows , so I intend to format and install Linux. But I don't have any Windows 8 CD/DVD that I'd like to keep . How can I make a usable copy out of my current system in a CD/DVD ?


Is the ally hero that I can use during a battle the strongest of my ally's heroes?

Before a battle starts, during the hero selection, I can choose one of my allie's strong heroes to help me during the battle.  But is it always the strongest one ? How does it work ?


In , K tells Edwards to come to the MiB building where he ends up with a few members from different branches of the military. They're all there to take a test to join the MiB. What I don't understand is if it was really a test for everyone or just for Edwards. If it wasn't just for Edwards, did he pass or did K influence Zed into choosing him?  I was wondering if Edwards had passed or not because during the written test, he pulled the table over so he could write on it and in the shooting test, he shot the little girl, but gave a great explanation of why. Were these things what Zed was looking for in a candidate?


How to reset or recover admin account password for MySQL?

I have a MySQL database that I "inherited" and I was not given the admin credentials.  I do however have access to the box that it runs on.  Is there a way to either recover the admin credentials or create new ones?


Which embassy to apply for schengen visa

My partner needs to apply for a schengen visa (double entry), we land in france and will spend 4 days and four nights there, then fly out of the schengen area for 18 days then fly back to spain where we will also spend 4 days and four nights, so the total number of days and nights is the same for both schengen countries, but we have slightly more hours totally in spain.  So do we apply at the french emabassy since that is our first stop and we will spend the same amount of days and nights there as we will in spain, or do we apply at the spainish embassy as we have slightly more time there (if they consider total hours) even though that is a second destination?  Thanks!


Physical meaning behind $\sum_{r=1}^{\infty}r = -\frac{1}{12}$?

(Regarding stack exchange users proposing this as a duplicate: I've gone through answers for these types of questions on this site, but I only found proofs for this and no physical meaning if any. And they also did not talk about why the integral test fails for this sum which worked for me all these years and also makes sense. Thanks for reading this)  So, I've known this identity for a long time now but never thought about it much.   $\sum_{r=1}^{\infty}r = -\frac{1}{12}$.  I've also looked at proofs for this sum. One was through the reimann zeta function.  But, what I was wondering about was its intuition.    To begin with I am not really that advanced in maths so I just use Integral methods to test the divergence and convergence of series. This makes perfect sense to me. But when testing this series it is obviously not finite. So, why can this be a finite value? Why does the integral test fail here? The second thing is that I am not comfortable with this series. To demonstrate what I am saying, consider I give you apples. Each second, I give you more apples. But this feels like saying the sum of all apples is an orange.  Math is simply logic put in the framework of a language (symbols and stuff). Addition, multiplication, division, Integration, Euclidean geometry, Hyperbolic geometry etc.. are just intuition in a language. But sometimes when we obtain absurd results, why are these considered valid?  Is there intuition that I am missing? ( that's what I am looking for). Aren't we supposed to check whats wrong with our theory? Is there any intuition (Physical meaning) behind this result that I am not aware of?


The number of permutations of $\{1,2,\ldots,n\}$ that have exactly one ascent (rise).

Sloane's  counts the number of $n$-permutations with exactly one ascent.  For example $a(3)=4$ because we have: $1\wedge32$, $21\wedge3$, $2\wedge31$, $31\wedge2$ where I have marked the unique ascent with $\wedge$.  The same sequence also counts the number of length $n$ binary words that contain at least two $1$'s. For example $a(3)=4$ because we have: $011, 101, 110, 111.$  Is there a simple bijection between these two classes?  The formula for the sequence is $a(n) = 2^n - n - 1$.  I see how this counts the number of such binary words.  Is there a combinatorial derivation of this formula demonstrating that it counts the number of such n-permutations?  Both the exponential and ordinary generating functions of the sequence are given.  Again, I understand their symbolic derivation for enumeration of such binary words but can these functions be derived symbolically by considering the structure of such n-permutations?


Has there been a movie produced without a title sequence?

I'm not quite sure if "title sequence" is the phrase I'm looking for, so I'll explain what I mean.   Older movies would begin with a short credit sequence, which would also include the title of the movie. Recently, it is becoming more common to skip this in preference of showing the title at the end of the movie, perhaps as part of the credits.   What I'm wondering, is if there has been an instance of a movie being produced without any inclusion of its title in such a sequence. If there is some legal requirement to have the title listed somewhere (e.g. copyright notice) then those mentions can be ignored. If there has been a movie produced with no title at all then I suppose it would qualify by default.


Automatically turn on grayscale mode in windows 10

I want grayscale mode to turn on at a specific time every day, then turn off automatically a few hours later. I know ctrl + windows + c can be used to do it manually but it would be great to automate the process such as turning on at 9pm and off at 7am for example.


\documentclass{amsart}   \begin{document} $\chi_{A}$  $\chi_{S_{i}}$  \end{document}   I found that the $A$ in $\chi_{A}$ does not look like a subscript; it seems too large. This problem becomes more obvious in the second example, $\chi_{S_{i}}$, which looks like $\chi S_{i}$. How do I fix this?


File l3backend-pdfmode.def not found when loading expl3

I updated my TeXlive distribution a couple times in the past week, and now I get this error when I include package expl3 (or any other package that includes it, such as fontspec). Before the updates it was working fine. Am I missing any package that should be installed? I tried searching for l3backend-pdfmode.def, but I found no results.  \documentclass{article} \usepackage{expl3} \begin{document} Hi \end{document}   λ lualatex a This is LuaTeX, Version 1.10.0 (TeX Live 2019)   restricted system commands enabled. (./a.tex LaTeX2e <2018-12-01>  luaotfload | main : initialization completed in 0.042 seconds (/opt/texlive/2019/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/opt/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3-code.tex)  ! LaTeX Error: File `l3backend-pdfmode.def' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def)  Enter file name:  ! Emergency stop. <read *>   l.282   }   379 words of node memory still in use:    2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attrib ute_list, 1 write nodes    avail lists: 2:9,3:3,4:1,5:2,7:2,9:2 !  ==> Fatal error occurred, no output PDF file produced! Transcript written on a.log.


I have data in a MySQL database. I am sending the user a URL to get their data out as a CSV file.  I have the e-mailing of the link, MySQL query, etc. covered.  How can I, when they click the link, have a pop-up to download a CVS with the record from MySQL?   I have all the information to get the record already. I just don't see how to have PHP create the CSV file and let them download a file with a .csv extension.


Wordpress custom post type odd and even styling

I've got a custom post type that I would like to be able to show in the following:          is this possible using the following code:  <?php query_posts(array('post_type' => 'story', 'orderby' => 'title', 'order' => 'asc', 'post_status' => 'publish', 'paged' => $paged)); ?>  <?php if ( have_posts() ) : ?>  <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?>  <hgroup>
   <?php the_title(); ?>
 </hgroup>

   <?php the_post_thumbnail(184, 260); ?>

 <?php the_content(); ?>
<?php the_tags(); ?>


How to replace only the Nth occurrence of a pattern in a file?

How to replace the third occurrence of the string in the file using sed command. Example: Change only the third occurrence of is to us in the file. My input file contains: hai this is linux. hai this is unix. hai this is mac. hai this is unchanged.  The expected output is: hai this is linux. hai thus is unix. hai this us mac. hai this is unchanged.


Difference between Python and PCRE when matching lookahead at the beginning of a string

Generally lookahead assertion follows some other pattern like:  Isaac(?!Asimov)   But what does it mean when it appears at the beginning of pattern?  Here is an example (the simplename pattern is from docutils):  #!/usr/bin/env python import re  regex = re.compile(r'(?P<simplename>(?:(?!_)\w)+(?:[-._+:](?:(?!_)\w)+)*)') input = ['_1_2_name', '1_2_name', 'name_1_2', ':123', 'name:s:s_dd', 'name_-+.sdf'] for i in input:     match = regex.match(i)     if match:         print "MATCH: ", match.group('simplename')     else:         print "NOT MATCH: %s" % i   This regex will correctly match variable names that don't start with _, but it doesn't work when using libpcre to run the same regex. Python will not match "_1_2_name" but libpcre will match it and get "1_2_name" as a result.  I guess Python matches the position of beginning but libpcre doesn't. What is the difference between Python and PCRE? What is the equivalent pattern using PCRE?


\centering doesn't seem to center my text

I am trying to center this page but it will not work.  All is get is for the first line to be indented about one "tab" space to the right, but the second line will not shift.  However, the first line's indent does not appear to be centered either.  Is it possible that the binding offset or the indentfirst package is interacting with this negatively?  All of the other pages seem to work just fine. Any help would be appreciated.  \documentclass[12pt, a4paper, twoside]{article} \usepackage[margin=1in,bindingoffset=15.5mm,heightrounded]{geometry} \usepackage[T1]{fontenc} \usepackage{indentfirst} \begin{document} \pagestyle{empty} \vspace*{36 pt} {\centering \textbf{\emph{\Huge{Since I Saw You Last,\\There's a Change Upon You}}} } \end{document}


Where to find geckodriver needed by Selenium Python package?

I am using Ubuntu 16.04.1 LTS. Executing python -V returns Python 2.7.12. I am building a virtualenv off of that so as to install the  package into it via:  pip install -upgrade selenium   But when doing a trial run with the following python script:  from selenium import webdriver browser = webdriver.Firefox() browser.get('http://seleniumhq.org/')   it results this error:   Traceback (most recent call last):    File "/home/myuser/bin/selenium-experiment.py", line 2, in <module>      browser = webdriver.Firefox()    File "/home/myuser/python_virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__      self.service.start()    File "/home/myuser/python_virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 71, in start      os.path.basename(self.path), self.start_error_message)  selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.    Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x7f782c1caa50>> ignored   Since geckodriver is an executable, I concluded that it should be provided by the installation of the selenium package via pip or at least error out with some message stating what I need to do next. Apparently not, so I dug further: I thought that perhaps Ubuntu should have a package that provides the geckodriver executable so I used apt-file search geckodriver to search for it and found no results.  Where do I get this geckodriver executable?


I am looking for an isolated non-normal singularity on an algebraic surface. One obvious example occurs to me: the union of two $2$-dimensional affine subspaces of $\mathbb{A}^4$ which meet in a point. But this seems like "cheating." Can someone provide an irreducible example?


$G/Z(G)$ is cyclic then $G$ is abelian where $G$ is a group and $Z(G)$ is the center of the group.

I read the proof of this theorem but the question i have is If $G/Z(G)$ IS Cyclic then $G$ is abelian therefore $G = Z(G)$ which implies that $G/Z(G) = \{e\}$. Am i right? For example If $o(G/Z(G)) =11$ then $G/Z(G)$ is cyclic therefore $G$ is abelian which implies that $o(G/Z(G)) = 1$ a contradiction. Please explain or correct me if i am wrong.


How to get the target path of any shortcut file in windows in java program?

I have also created VBScript file but it doesn't turns out to be helpful.Is there any way that i can get the absolute path of shortcut(.lnk) files in my java program?


How do I stop my 2013 Macbook Air from putting the computer to sleep?

I've been fiddling with my new Haswell macbook air (with Mountain Lion), and there's a difference between the "energy saver" settings on my macbook vs my 2011 iMac. On my iMac, there's a "Computer Sleep" as well as a "Display Sleep" setting, but the macbook air only has "Display sleep":    When I don't use the computer for an hour or so, I want the display to go to sleep, but the computer should still be on, and shouldn't e.g. disconnect me from my chat sessions. How can I do this?  Thanks for your help.


just after the Big Bang and before inflation the currently observable universe was the size of a coin. One millionth of a second later the universe was the size of the Solar System, which is an expansion much much faster than speed of light. Can space expand with unlimited speed?


I got irritated by the standard Windows 8 logon screen (the same one as lock screen). How do I change the background?


typesetting source code (Funnelweb), 2nd attempt

Second version of .  ADDED: here is my input (Funnelweb file).  @p typesetter = tex \documentclass{article} \begin{document} @$@<Example@>==@{ABC@^D(025)@} @O@<ex.txt@>==@{@- @<Example@> @} \end{document}   And here is the full, minimal example of the auto-generated Latex.  \tolerance=10000 \parindent=0pt \def\fwparskipon{\parskip=\medskipamount} \def\fwparskipoff{\parskip=0pt} \fwparskipon \raggedbottom \font\fwfontnote=cmr7 \font\fwfontnorm=cmr10 \font\fwfontnorma=cmr10 scaled \magstep1 \font\fwfontnormb=cmr10 scaled \magstep2 \font\fwfontbold=cmbx10 \font\fwfontbolda=cmbx10 scaled \magstep1 \font\fwfontboldb=cmbx10 scaled \magstep2 \font\fwfontboldc=cmbx10 scaled \magstep3 \font\fwfontboldd=cmbx10 scaled \magstep4 \def\fwbeginmacro{\fwparskipoff\bigskip} \def\fwendmacro{\fwparskipon\par} \def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$} \def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$} \def\fwzero#1{{\bf Z}} \def\fwmany#1{{\bf M}} \def\fwlib#1{{\bf L}} \def\fwequals{ $\equiv$} \def\fwplusequals{ $+\equiv$} \def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt} \def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt} \def\fwoquote{`} \def\fwcquote{'} \def\fwoparen{$($} \def\fwcomma{$,$} \def\fwcparen{$)$} \def\fwparam#1{$\diamond #1$} \def\fwparams#1{$(\diamond #1)$} \def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip} \def\fwnote#1{{\fwfontnote #1}\par} \def\fwisafile#1{\fwnote{#1}} \def\fwusedin#1{\fwnote{#1}} \def\fwseealso#1{\fwnote{#1}} \def\fwendmacronotes{\endgroup} {\catcode`\`=\active \gdef`{\relax\lq}} {\obeyspaces\global\let =\ } \def\fwbtx[{% \begingroup% \def\par{\leavevmode\endgraf}% \catcode`\`=\active% \obeylines% \def\do##1{\catcode`##1=12 }\dospecials% \obeyspaces \parskip=0pt% \tt% \fwverbatimgobble} \def\fwverbatimgobble#1]fwetx={#1\endgroup} \def\fwrule{\medskip\hrule\medskip} \def\fwqh{\hskip1.5em\relax} \def\fwbeforesec{\penalty-200\bigskip\medskip\par} \def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule} \def\fwtoca#1#2{\leftline{{\bf #1 #2}}} \def\fwtocb#1#2{\leftline{\fwqh #1 #2}} \def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}} \def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}} \def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}} \def\fwtocfinish#1{\fwrule} \def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip} \def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip} \def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip} \def\fwlibd#1#2{\fwbeforesec{\bf          #1 #2}\penalty200} \def\fwlibe#1#2{\fwbeforesec{\bf          #1 #2}} \def\fwseca#1#2{\fwliba{#1}{#2}} \def\fwsecb#1#2{\fwlibb{#1}{#2}} \def\fwsecc#1#2{\fwlibc{#1}{#2}} \def\fwsecd#1#2{\fwlibd{#1}{#2}} \def\fwsece#1#2{\fwlibe{#1}{#2}} \def\fwlit#1{{\tt #1}} \def\fwemp#1{{\it #1}} \def\fwnewpage{\vfill\eject} \def\fwvskip#1{\null\vskip #1mm} \def\fwfontnormal#1{{\fwfontnorm {#1}}} \def\fwfonttitle#1{{\fwfontboldd {#1}}} \def\fwfontsmalltitle#1{{\fwfontboldb {#1}}} \def\fwleftline#1{\leftline{#1}} \def\fwcenterline#1{\centerline{#1}} \def\fwrightline#1{\rightline{#1}} \def\p#1{{\tt #1}}  % P for Program text. \def\flagpage#1#2{    \null    \vfill    \centerline{\fwfontboldd #1}    \vskip 1cm    \centerline{\fwfontboldd #2}    \vfill    \null    \vfill } \documentclass{article} \begin{document} \fwbeginmacro \fwmacroname{Example}{1}\fwequals \fwodef \fwbtx[ABC]fwetx=% \fwcdef  \fwbeginmacronotes \fwusedin{This macro is invoked in definition 2.} \fwendmacronotes \fwendmacro \fwbeginmacro \fwfilename{ex.txt}{2}\fwequals \fwodef \fwmacroname{Example}{1}\fwbtx[ ]fwetx=% \fwcdef  \fwbeginmacronotes \fwisafile{This macro is attached to an output file.} \fwendmacronotes \fwendmacro \end{document} \bye   And here is the error  ! Text line contains an invalid character. l.97 ...Example}{1}\fwequals \fwodef \fwbtx[ABC^^Y                                                   ]fwetx=%   Ideally, I would like to only have to replace one macro definition, not add any new things.


What is the difference between quotes and brackets for pre-processor directives in C++?

I am looking at a code example and notice some pre-processor directives using quotes and the others using brackets? What is the difference?  #ifdef WIN32 #include <windows.h> #else // Redhat Linux Version 6.0 #include <stdio.h> #include <stdlib.h> #endif #include <iostream.h> #include <string.h> #include "CamCoStr.hh"


Best way to find date nearest to target in a list of dates?

I have a list of Date objects, and a target Date. I want to find the date in the list that's nearest to the target date, but only dates that are before the target date.  Example: 2008-10-1 2008-10-2 2008-10-4  With a target date of 2008-10-3, I want to get 2008-10-2  What is the best way to do it?


Prove that $4\sin\frac{2\pi}{7}- \tan\frac{\pi}{7}= \sqrt{7}$ .

Prove that $$4\sin\frac{2\pi}{7}- \tan\frac{\pi}{7}= \sqrt{7}$$   I think midway calculations are not easy formulas, I can't find what kind of formula transformation to solve! I think the best solution here is using right triangle . . . I have one solution too, but not pretty . !


How to use Pearson correlation correctly with time series

I have 2 time-series (both smooth) that I would like to cross-correlate to see how correlated they are.  I intend to use the Pearson correlation coefficient. Is this appropriate?  My second question is that I can choose to sample the 2 time-series as well as I like. i.e. I can choose how many data points I will us. Will this affect the correlation coefficient that is output? Do I need to account for this?  For illustration purposes  option(i)  [1,    4,    7,    10] & [6,    9,    6,    9,    6]  option(ii)  [1,2,3,4,5,6,7,8,9,10] & [6,7,8,9,8,7,6,7,8,9,8,7,6]


I was browsing  looking for gems I could learn some stuff from.  In this list you can only see the title of the question, it would be nice to see the tags as well. In the titles shouldn't be the tags, which is good in my opinion, but then it's hard to find the questions that are interesting to you here.


I have this HashMap:  HashMap<String, Integer> m   which basically stores any word (String) and its frequency (integer). The following code is ordering the HashMap by value:  public static Map<String, Integer> sortByValue(Map<String, Integer> map) {         List<Map.Entry<String, Integer>> list = new LinkedList<Map.Entry<String, Integer>>(map.entrySet());          Collections.sort(list, new Comparator<Map.Entry<String, Integer>>() {              public int compare(Map.Entry<String, Integer> m1, Map.Entry<String, Integer> m2) {                 return (m2.getValue()).compareTo(m1.getValue());             }         });          Map<String, Integer> result = new LinkedHashMap<String, Integer>();         for (Map.Entry<String, Integer> entry : list) {             result.put(entry.getKey(), entry.getValue());         }         return result;     }   Now the scenario has changed and i have this:  HashMap<String, doc>;  class doc{ integer freq; HashMap<String, Double>; }   How can i sort this HashMap by value, following the same approach as sortByValue?


Can multi-classing prerequisite ability score(s) be met through a magic item?

The multiclassing rules (PHB, p. 163) state:     To qualify for a new class, you must meet the ability score prerequisites for both your current class and your new one [...] Without the full training that a beginning character receives, you must be a quick study in your new class, having a natural aptitude that is reflected by higher-than-average ability scores.    Can the ability score prerequisite(s) for multiclassing be met by (long-term) use of a magic item(s) such as the Headband of Intellect (INT 19), Ioun Stones (+2 to various ability scores), etc.?  The phrase "natural aptitude" suggests nonmagical, but a character could have been using a magic item for years which seems virtually indistinguishable.


careers.stackoverflow.com should allow multiple bitbucket profiles

It's not uncommon to have multiple profiles on bitbucket and/or belong to multiple teams. For example to be part of the company team as well as having a separate blog profile (for demo projects) and a personal profile.   careers.stackoverflow.com should allow to either import multiple profiles from bitbucket or should also add all projects of all teams the person is part of. Actually I think both should be added.  This problem is made worse by bitbucket's decision to disallow team logins. So I cannot even switch to a team for granting careers.stackoverflow.com access. I'm limited to a profile without any interesting projects.


Children's or young adults novel about travelling in a vast flooded dungeon to reset a computer

I read this book back in the 1980s, and it was about a space ship crew (by the set up I'm sure it was a series, but I can't remember reading any other of the series) who happened upon a world that was in the midst of some crisis.  The only way to avert this crisis is to visit some sort of mythical overlord computer - who just happens to be within a vast underground flooded series of chambers filled with dangers etc.  So our heroes set off in some self propelling pods that their ship was carrying, on an underwater journey in which they were attacked by huge hostile sea creatures etc etc.  They eventually reach the end of the tunnels and interact with the computer, averting the aforementioned crisis.


JAVA trying to find positions of the year. Not Working

I have a small program that reads a json file that gives the weather, time, temp, wind, ect. I need to calculate the average tempature for 2009 through 2015. The years are in an array, and are in length, around 60k. I am trying to write a small loop that will first find the position of the first instance of the year 2009 and then the last instance of the year 2009. Then I can run my average temp loop through that, but I am running into an issue as seen below.  place will be the index of the array. However, no matter how I run my code, it always equals -1, rather than giving me the position of the index in the array. Both arguments in the if statements are strings.   So what am I doing wrong?   String twozerozeronine = "2009"; int place = -1; for (int a = 0; a < years.size(); a++){     if (years.get(a) == twozerozeronine){         place = 1;          break;     } } System.out.println(place);


So I'm trying to do some insane home DIY with my room blinds. I'm trying to make them adjust (go up and down) automatically.  Now for this, obviously, I will need a motor.   The blinds I'm working with don't require much strength to pull down, but a fair bit to pull them up (using the little string/cord), So I'll need something fairly powerful, but slow.  I'm taking a look at a few gear motors on  site, but I have no idea which one would be right to use for this kind of task.  Could anyone help me out?


A Group Having a Cyclic Sylow 2-Subgroup Has a Normal Subgroup.

I want to prove the following:          Let $G$ be a group of order $2^nm$, where $m$ is odd, having a cyclic Sylow $2$-subgroup.     Then $G$ has a normal subgroup of order $m$.      ATTEMPT:  We will show that $G$ has a subgroup of order $m$. Let $\theta:G\to \text{Sym}(G)$ be the homomorphism which is defined as $$  \theta(g)=t_g,  \quad  \forall g\in G $$ where $t_g:G\to G$ is defined as: $$  t_g(x)=gx,  \quad  \forall x\in G. $$ Let $g$ be an element of order $2^n$ in $G$. (There exists such an element since $G$ has a cyclic Sylow $2$-subgroup.)  The cyclce representation of $t_g$ is a product of $m$ disjoint cycles each of length $2^n$. Therefore $t_g$ is an odd permutation.  Thus the homomorphism $\epsilon\circ \theta:G\to\{\pm 1\}$, where $\epsilon:\text{Sym}\to\{\pm 1\}$ is the sign homomorphism, is a surjection.  By the First Isomprphism Theorem, we conclude that the kernel $K$ of $\epsilon\circ \theta$ is of order $2^{n-1}m$.  If $n$ were equal to $1$ then we are done.  If $n>1$ then note that any Sylow $2$-subgroup of $K$ is also cyclic. This is because each Sylow $2$-subgroup of $K$ is contained in a Sylow $2$-subgroup of $G$, where the latter is cyclic.  Now we can inductively show that $K$ has a subgroup of order $m$.    What I am struggling with is showing the normality.  Can anybody please help me with this.  Thanks.