Ensure numeric (floating point) input with Javascript, allowing minus sign?

I have a function which I am calling on the input event of a form input, to filter out any characters which don't belong in a floating point number:  return value.replace(/[^0-9\.]/g, '');   As it stands, though, it doesn't allow a minus sign. How do I adapt this so that it will only allow an optional initial minus sign and then the numbers (i.e., 0 to 9 and .)? I can't quite get my ahead round the negation of the pattern with regex.  LATER: Decided that the best thing to do was to treat any minus sign separately before considering the regex. This is what I settled on:  function ensureFloatingPoint(value){   let val=value;   if(val==='-') {      return val;   }   let sign="";   if(val.startsWith("-")){     sign="-";     val=val.substring(1);   }   val = val.replace(/[^0-9\.]/g, '');   if(sign){     val=sign+val;   }   return val; }   It strikes me as over-verbose but it does the job.  (The question isn't really a duplicate as I'm asking about excluding characters, not accepting them.)


I attempted to install dropbox on my Ubuntu system, but now I am unable to install or uninstall any software. I get this error:  E: Unable to lock the administration directory /var/lib/dpkg/lock?   I have already tried killing dpkg and restarting it sudo kill -TERM PID but it immediately tries to finish the installation again and gets stuck.  How do I resolve this?


RMI no such object in table, Server communication error

My goal is to create a Distributed computing program that launches a server and client at the same time. I need it to be able to install on a couple of machines and have all the machines communicating with each other, i.e. Master node and 5 slave nodes all from one application.  My problem is that I cannot properly use unicastRef, I'm thinking that it is a problem with launching everything on the same port, is there a better way I am overlooking?  this is part of my code (the part that matters)  try {          RMIServer obj = new RMIServer();         obj.start(5225);      } catch (Exception e) {        e.printStackTrace();      }         try {             System.out.println("We are slave's ");             Registry rr = LocateRegistry.getRegistry("127.0.0.1", Store.PORT, new RClient());              Call ss = (Call) rr.lookup("FILLER");              System.out.println(ss.getHello());          } catch (Exception e) {             e.printStackTrace();         } }   this is my main class (above)  this is the server class (below)  public RMIServer() {         }      public void start(int port) throws Exception {          try {              Registry registry = LocateRegistry.createRegistry(port, new RClient(), new RServer());              Call stuff = new Call();              registry.bind("FILLER", stuff);              System.out.println("Server ready");         } catch (Exception e) {             System.err.println("Server exception: " + e.toString());             e.printStackTrace();         }     }   I don't know what I am missing or what I am overlooking but the output looks like this.  Listen on 5225 Listen on 8776 Server ready We are slave's  Listen on 8776 java.rmi.NoSuchObjectException: no such object in table         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)         at Main.main(Main.java:62)  line 62 is this      :::           Call ss = (Call) rr.lookup("FILLER");


How to change lightning-radio-group selected value programmatically?

If a lightning-radio-group has two options, and a user selects one, I want to programmatically have the UI changed back to the other one.  Link to a . (code copied below)  import { LightningElement, track } from 'lwc';  export default class RadioGroupRequired extends LightningElement {     @track value = 'option1';      get options() {         return [             { label: 'Option one', value: 'option1' },             { label: 'Option two', value: 'option2' },         ];     }      handleOnChange(evt) {         this.value = 'option1';         // how to make the UI select Option one?     } }   And the html:  <template>     <lightning-radio-group name="radioGroup"                            label="Radio Group"                            options={options}                            value={value}                            required                            type="button"                            onchange={handleOnChange}></lightning-radio-group>                             value={value} </template>     I think that there is no rerendering because the bind variable, {value} doesn't actually change. However, the selected state of the lightning-radio-group does, and I want to be able to change it back. How can that be achieved?   I did not notice any methods or attributes that would seem to do the trick in the .


Auto-rendering of links stops working after the fifth link ... or does it?

contains ten links to other posts on the Stack Exchange network. On Meta Stack Exchange, bare links like these are replaced by the question titles. However, on that particular post, it stopped working after the fifth link:    When you edit the post, you see in the preview that all links are rendered, even though it takes a while:     seems to imply that it's by design, since that post links to more than 5 different Stack Exchange sites. In that case, the markdown preview should exhibit the same behaviour.


What is the pythonic way to use multiple constructors for a class?

I am writing some genetic algorithms in python.  Currently I was looking at a book that has java code, so but eventually I am trying to write my own Adaptive Genetic algorithm to optimize neural network parameters and layers, and all my neural network code is in python using keras...so I am just writing my own python code that is equivalent to the books java code.  The problem I am having with the way I have it set up currently, is that the constructor always initializes the object to the constructor in the first statement.   From what I have seen from other questions similar to this, you can use classmethods to do this...and you call also do something with ...isinstanceOf method...and you can do something with init method *args and **kwargs...and I thought you could do something with NoneType parameters which is what I am trying to do...but I have been messing with it on and off and cannot seem to get it to work without adding additional boolean arguments which I would prefer not to do.  What are peoples preferred methods to solving the multiple constructor problem, and can you do it the way I am trying to?  An example of where I am trying to use multiple constructors.  class Individual(object):    #Object Initialisation-->Generally called a constructor #In python, a variable prefixed with _ is effectively private  def __init__(self, chromosome, chromosomeLength, bool1):     if(chromosomeLength is not None and bool1==False):         self.chromosomeLength = chromosomeLength         self.fitness = -100         self.chromosome = np.empty(chromosomeLength)         for gene in range(self.chromosomeLength):                 if(0.5 < np.random.randint(2)):                     #self.setGene(gene,1)                     #cls.chromosome[gene] = 1                     self.chromosome[gene] = 1                 else:                     #self.setGene(gene,0)                     #cls.chromosome[gene] = 0                     self.chromosome[gene] =0      elif(chromosome is not None and bool1 ==True):          self.chromosome = chromosome         self.fitness = -1         print ("All variable initialized")   Thanks,  Matt


Load 64 bit C# dll from 32 bit C# application

I have 64 bit dll Test.dll. Load this dll through reflation from 32 bit exe.  AssemblyName name = AssemblyName.GetAssemblyName("Test.dll");  assembly = Assembly.Load(name);   But the Load method give below exception :     An unhandled exception of type 'System.BadImageFormatException'   occurred in TestDll.exe like "Could not load file or assembly 'Test,   Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its   dependencies. An attempt was made to load a program with an incorrect   format."   Can any one suggest how to fix this?


Evaluating a sum: $\sum_{n=0}^{\infty} nx^{2n+1}$


How do I calculate how an object will move from one point to another?

Here's the problem: A player starts the game in the 0 coordinate (x=0,y=0). When the user clicks on the screen, it returns the coordinates of the destination. Now the player has to move from its current position A(0.0) to B(x,y). Take into account that B is in the first Quadrant so x>0 and y>0.  How will the player move? I know that I will have to use this: atan2(positionY-destinationY, positionX-destinationX) to get the angle.  Now what? How will the player move with a fixed velocity (which by the way will be a variable, so a player may move faster while using some "items")?  Whose answer is better? What is more accurate? Trigonometry or Linear Algebra?


Is there an easier guide or something to George Arfken's mathematical methods for physicists?

I'm doing bachelor's in Physics and in 3rd semester the professor introduced Mathematical methods with us, which seemed like a great book at first but by the time we started a chapter on Tensor analysis, I realized I couldn't understand after that. Same goes for other students. Somehow I managed to get an A+ but now we have the second volume of the book and it's just too hard to understand.  Is there like a book or books that explains the mathematics in much more detail? I've studied Vector analysis and ODEs but the chapters on Matrices and group theory and series are still a blur.


Upright Greek font fitting to Computer Modern

I'm looking for an upright Greek font for single Greek characters (like "β-decay" or "µ-metal") which fits to the default CM/latin style, i.e. the upright version of the default italic math mode Greek letters (\beta, \mu).  The "default" upright Greek font (should be cbgreek), which is used when writing with babel or with the textgreek package (\textbeta, \textmu), doesn't quite fit to the CM/latin font, especially the µ symbol. There are packages replacing the entire font families, e.g. mathdesign or kpfonts, providing a complete set of Greek, but none of them was made for CM/latin. upgreek uses another font for math mode Greek (euler I guess, also accessible through textgreek with the respective option) which also doesn't quite fit with CM/latin.  I would already give up if it wasn't for the µ used by the siunitx package. Its default "micro" prefix (\si{\micro}) fits perfectly with CM/latin (see comparison below) and I wanted to know whether that µ is just a unique character of the CM font or whether there's a chance to also get an upright β and other letters in exactly that font. Also, how does the siunitx package get that µ? The characters µ (micro symbol) and μ (greek letter mu) print by default with the same character in cbgreek with UTF-8 encoding (see below)...  Here's a MWE (pdflatex):  \documentclass{minimal} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage{textgreek} \usepackage{upgreek}  \begin{document}  m\si{\micro}\textmu $\mu$  \textbeta $\beta$  $\upmu \upbeta$  µμβ % U+00B5 (micro symbol) U+03BC (greek lower case mu) U+03B2 (greek lower case beta)  \end{document}   Result:


Is it allowed to use a impolite nickname like ShittyCoder? Or use the name of a politician known to be a dictator? See the nickname here:   Can we flag this kind of thing?


How many users can I have on my WP site?

I bought my hosting with GoDaddy then installed WordPress on cPanel. I added a forum page on my website , but before they can post they have to sign up, my question is: How many users can I have registered under "users"? I'm worried that there's a limit to the number of people I can have registered for my forums, like only 35 users. I already checked with GoDaddy they said they didn't know how many. Please explain to me in layman's terms, I don't understand much on storage allotments in WordPress that was installed through cPanel of another hosting company.


I'm doing a beamer presentation and for this I'm using a background image on each slide. To have a readable text I put it on a untitled block with background transparency (cf image).    My problem is the overlap between the block's header and the block's body : as you can see, together, the element's transparency is lower because this overlap.  I think I've two solution :   reduce the height of the block's header extend the space between header and body's block   But I don't know how to do this. Can someone explain me how to do this properly ? Or may be existing an other (and simpler) solution…  Thank you  Here is my code :  \documentclass{beamer}  \usepackage{beamerbasethemes} \usepackage{calc} \usepackage{ifthen} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[no-math]{fontspec} \usepackage{ragged2e} \usepackage{graphics} \usepackage[frenchb]{babel} \usepackage{nicefrac} \usepackage{xcolor} \usepackage{calc} \usepackage{tikz}  % link to the backgroundimage % image should be in the same directory as the other files \def\blackboard@backgroundimagefile{bg.jpg} \DeclareOptionBeamer{backgroundimagefile}{\def\blackboard@backgroundimagefile{#1}} \ProcessOptionsBeamer  \mode<presentation>  \pgfdeclareimage[interpolate=true, height=\the\paperheight, width=\the\paperwidth]{backgroundImage}{\blackboard@backgroundimagefile}  % stretch background image over the entire page \setbeamertemplate{background}{     \begin{tikzpicture}         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight);          \pgftext[at=\pgfpoint{0cm}{0cm}, left, base]{\pgfuseimage{backgroundImage}};      \end{tikzpicture} }  \setbeamertemplate{blocks}[rounded][shadow=false] \addtobeamertemplate{block begin}{\pgfsetfillopacity{0.75}}{\pgfsetfillopacity{1}}  \begin{document}      \begin{frame}{Projet}{Axe 1 : Petite enfance et découverte}         \begin{block}{}             \begin{itemize}                 \item A deux ans, 90\% de psychomotricité globale et 10\% de jeux et d'activités sur surface élastique                 \item A 3 ans, 80\% de psychomotricité globale et 20\% de jeux et d'activités sur surface élastique                 \item A 4 ans, 65\%  de psychomotricité globale et 35\% d'activités sur surface rebondissante                 \item A 5 ans, 50\% de psychomotricité globale et 50\% d'éducation aérienne.             \end{itemize}             \vfill             En introduisant ainsi les surfaces élastiques, cela nous permettrait également une détection précoce des talents et aptitudes des enfants, pouvant alors à les orienter vers des disciplines plus appropriées une fois l’âge venu.         \end{block}     \end{frame} \end{document}


can i use .bash_profile to create an alias which copies text from a file?

I have a long string of text saved in a file that I want to easily copy to clipboard using Os X 10.11 terminal


Pointwise convergence and convergence of integrals implies $L^1$ convergence

From Donald Cohn's Measure Theory, section 2.4, exercise 10.  Let $(X, A, \mu)$ be a measure space, and let $f$ and $f_1, f_2, \dots$ be non-negative functions that belong to $L^1(X, A, \mu, R)$ and satisfy (i) $\{f_n\}_n$ converges to $f$ almost everywhere; (ii) $\int fd\mu = \lim_n\int f_nd\mu$. Show that $\lim_n\int |f_n - f|d\mu = 0$.  I let $f_n = 1/n$ on $[n, n+1]$ and $0$ elsewhere, and let $f=0$, then all the convergence theorems in that section (dominated convergence, and monotone convergence) failed.


I want to configure NAT for my network of 10 computers so that the data is transmitted via a single pc.   Can anyone give a good tutorial for it?


What happens when I delete backup folder?

Commonly backup needs for stupidity. In Ubuntu when I run default Backups application it creates a new folder. If I accidentally delete this folder also(very stupid) then is it possible to recover my lost data?


Weird Issue While Trying to Initialize a 2-D Matrix (Python)

While I initialize a square matrix with all elements as 0 and try to manipulate one of the elements, a weird "bug" happens:  Here is the sample code for a 3 * 3 matrix:  row = [0] * 3 matrix = [] for i in range(3):     matrix.append(row)  matrix[0][1]=2   I try to change one element say matrix[0][1] to 2, all elements on the column 1 change to 2  [0,2,0] [0,2,0] [0,2,0]   Can anyone please help explain what's going on here? I only try to change one element only.


How to make QgsProcessingParameterField appear depending on users input?

I wrote a progressing algorithm using Python (QGIS 3.10.4). One of the input parameters is a .shp file where I defined as default. And if a user selects another .shp file than the default one, I want that the user chooses an attribute field of the selected layer which will be used for the categorized symbology later on. Currently, my code is like this, and attribute fields appears regardless of the user selection. Can one do it that way that QgsProcessingParameterField appears only the user chooses something else than the default? self.addParameter(     QgsProcessingParameterVectorLayer(         self.GEOLOGIE_LAYER,         self.tr('Pfad zur Karte'),         defaultValue=r"XXX\km500_geo_f.shp",         optional=False     ) )  self.addParameter(     QgsProcessingParameterField(         self.LABEL_FELD,         self.tr('LABEL-FELD'),         '',         self.GEOLOGIE_LAYER,         optional=False     ) )


Exporting inset map with same quality in ArcGIS Desktop?

I am having trouble exporting my map that has the same quality in the inset.  The lines come out blurry.    You can see a big difference between the quality.  Any ideas?


I'm going through Stewart's Calculus, and in section 7.3, example 7 asks for $\int \tan^3(x)dx$. In the book, the solution is $\frac{\tan^2(x)}{2} - \ln|\sec x| + C$. This was obtained in the following way: $\int \tan^3(x) dx = \int (\sec^2(x) - 1)\tan(x)dx = \int \sec^2(x)\tan (x) dx - \int \tan (x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)|+C$ Now we let $u = \tan(x)$, so $du = \sec^2(x)dx$ and we have $\int \tan^3(x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)| = \int u du - \ln|\sec(x)| = \frac{u^2}{2} - \ln|\sec(x)| = \frac{\tan^2(x)}{2} - \ln|\sec(x)|$ However, it seems as though there's a second method of integrating it that doesn't produce the same result. If we instead let $u = \sec(x)$ and therefore $du = \sec(x)\tan(x)dx$, we get $\int \tan^3(x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)| = \int \sec(x) (\sec(x)\tan(x)) = \int u du - \ln|\sec(x)| = \frac{u^2}{2} - \ln|\sec(x)| = \frac{\sec^2(x)}{2} - \ln|\sec(x)|$. This site produces the same result as what I got:  So is there some kind of trig identity that I'm missing here, or did I integrate incorrectly? Taking the derivative of both solutions produces the same starting point.


What is the difference between "I am done" and "I am through"?

What is the difference between when we say "I am done" and "I am through"? Please give examples to make the difference clear.


How come equation a) $P=VI$ says if you double voltage, power is doubled while according to equation b) $P=V^2/R$ says power quadruples? Which one is correct?


Bounty not received after grace period despite satisfying auto-award conditions

a bounty of 50 points was announced, and the grace period has already ended. Although I had a score of 3 upvotes and the answear was also accepted, the infobox says that the reward has not been given since "This question has not received enough attention." Shouldn't the highest score over 2 upvotes get the bounty? Not that the 50 points mean so much to me, but why is this?


For $\mathbb{R}$, does every open cover have a "countable" subcover?

I am reading intro theory on Heine-Borel where the equivalent statement to "a set $E$ contained in $\mathbb{R}$ is compact" (closed and bounded) is that "every open cover for $E$ has a finite subcover". Here, they give an example of how an open set $A$ cannot have a finite subcover:      Consider $A$ to be the open interval $(0,1)$. Then for each point $x$ in $(0,1)$, consider the infinite collection of sets $O_x = \{(\frac{x}{2},1) : x \in (0,1)\}$ whose union serves as an open cover for $(0,1)$. But it is impossible to find a finite subcover for $O_x$ because for any minimum value of $x$ in $(0,1)$ we can find $0 \le y \le \frac{x}{2}$ where $y$ is not contained in the finite union of sets.    I assume this weakness lies in the fact that due to the density of natural numbers in $\mathbb{R}$, we can always find such a $y$ that is smaller than $\frac{x}{2}$ and thus a finite union of sets is insufficient.   But what if we had a countable union of sets—the same cardinality as that of the natural numbers. Then, on $\mathbb{R}$, must every open cover have a "countable" subcover?


I was using titletoc until I realized that it has some incompatibilities with hyperref. The thing is, that titletoc can do the same thing in a easier way, less one.  \titlecontents*{subsection}[5.4em] {\small} {\thecontentslabel~ } {} {} [.~\textbullet\ ] [.]   this part does the subsection as a paragraph (with section number and without page number). I have realized that the problem is the pseudo-code used by tocloft for the entries in the TOC  {\cftXfont {\cftXpresnum SNUM\cftXaftersnum\hfil} \cftXaftersnumb TITLE}% {\cftXleader}{\cftXpagefont PAGE}\cftXafterpnum\par   I mean, the last command \par make impossible to leave two subsection entries in the same textline. Any idea? Another interesting solution is with etoolbox, some examples with that package are awesome, but it's not on my hands.  This is a MWE:  \documentclass{book}  \usepackage{titletoc} \titlecontents*{subsection}[5.4em]{\small} {\thecontentslabel~ }{}{}[.~\textbullet\ ][.]  \begin{document}  \tableofcontents  \chapter{Test Chapter 1} \section{Test Section 1.1} \subsection{First Test Subsection} \subsection{Second Test Subsection} \subsection{Third Test Subsection} \subsection{Fourth Test Subsection} \section{Test Section 1.2} \subsection{First Test Subsection} \subsection{Second Test Subsection}  \chapter{Test Chapter 2} \section{Test Section 2.1} \subsection{First Test Subsection} \subsection{Second Test Subsection} \subsection{Third Test Subsection} \subsection{Fourth Test Subsection} \section{Test Section 2.2} \subsection{First Test Subsection} \subsection{Second Test Subsection}  \end{document}


How to make a battery level indicator for arduino (The battery is powering the arduino also)

Hi I am building a pocket altitude, temperature and humidity meter with 1.8" TFT display. I have a 1000mah 3.3v Li-ion battery to power the whole system. I also need to display the battery level in percentage in the device. I am confused about which way i need to use. The same battery is powering the device so using voltage divider is not useful because of the ADC reference depends on the battery. Can you guys help me to overcome this?


GPOs fail to apply; reason: Inaccessible, Empty, or Disabled; Server 2012 R2 and Windows 10

I have a Windows Server 2012 R2 Domain.  Yesterday, a computer’s (running Windows 10 Pro) network drive stopped working.  After further investigation (gpresult /h) it appears ALL group policy objects are failing with the reason Inaccessible, Empty, or Disabled.  I have confirmed that all the GPOs still exist and are enabled on both (redundant and local) domain controllers.  Furthermore, there are 20 other machines on the same domain and LAN with absolutely no problems.  However, there is one other computer that I tested which presented with the same problem!  Does that mean the problem is with the servers?  gpresult /r reports that one client is getting GPOs from local DC1, and the other from DC2.  So it is not a problem related to a specific DC.  gpupdate /force fixed nothing (though it claimed that policies were applied).   I tried deleting the registry entries for local policies (following this guide ) and rebooting - same problem.    I found this support page from Microsoft (), but it claims it only applies to Windows 7 or earlier clients.  All my machines (both server and client) are running 64-bit versions and are fully updated.  I have rebooted all of them just to be sure.


Is it possible to use multiple here-docs in bash?

Can one use multiple here-docs to provide input to a command in bash?  $ cat <<<foo <<<bar bar $ cat <<EOF1 <<EOF2 > foo > EOF1 > bar > EOF2 bar   Obviously, in both cases, the second here-doc is used as stdin, and replaces the first reference. Is the solution to use echos instead?  $ cat <(echo -n foo) <(echo bar) foobar   Also, for some reason, using a combination didn't work for me. Why would that be?  $ cat <<<foo <(echo bar) bar $ cat <(echo -n foo) <<<bar foo


What is the best method for a single user to key farm a portal?

Let assume a player is next to a portal and has about 1 hour to key farm the portal. What is the best strategy (shortest time, maximum hack count) to key farm a portal for a single user with no item limit?   I have found the following order to be most effective but can it be improved?   +->First Hack+16 times  or , Capture +->First Hack+16 times    With this method I should be able to hack the portal approximately 34 times in less than an hour. Is this correct?


I want to show that $\mathbb{R}^n\times\{0\}$ has measure zero in $\mathbb{R}^{n+1}$.  For example, take $n=1$. I want to show that the $x$-axis has measure zero in the plane. I cover it with the sets $[-1,1]\times[-\epsilon/8,\epsilon/8]$, $[-2,2]\times[-\epsilon/32,\epsilon/32]$, $\ldots$  The goal is to have the volumes be $\epsilon/2, \epsilon/4, \ldots$ so that they sum to $\epsilon$.  I think this method generalizes to $\mathbb{R}^n$, simply by choosing $[-1,1]^{n-1}\times[-\epsilon/2^{n+2},\epsilon/2^{n+2}],\ldots$. I don't think it is very elegant though. Is there a "better" way to do this?


Terminal does not accept any input when ask for a password

As you know for trying to install softwares,terminal ask us for a password!but every time i trying to install software with sudo apt-get install command,my terminal ask me for a password,but when i typed it,it does not appear in terminal & terminal does not have any reaction to my typing!when i close terminal and start it again every thing is ok until i do same command for installing.


Qualifying as a realtor to save on commission

My wife and I are thinking about selling our home and are very upset about the prospect of losing 6%+ of our home value on commission. We live in Texas.  We both have careers that are unrelated to real estate but we love and understand a little bit of the real estate market. From what I understand, in the USA it is not mandatory to use a realtor for selling your home, but obviously we would be super cautious about it.  With that in mind, and considering we want to do real estate in the long term, is it possible, does it make sense, and what are the potential risks of either getting a realtor license or simply watching all the real estate school courses (without getting a license) in order to save on that commission in the long run and deal with all the businesses ourselves?


How to install and use packages under a different name?

How do I install packages such as python3, and use them under a different name like python?


I need to know whether There exists any continuous onto map from $(0,1)\to (0,1]$  could any one give me any hint?


Sourcing works manually but fails when done from script

Using curl as in:  bash <(curl -s https://raw.githubusercontent.com/user/repo/master/script.sh | tr -d '\r')   I executed some remote script.  The remote script includes the following two aspects:  1) The command:  wget -P ~/myAddons/ https://raw.githubusercontent.com/user/repo/master/appendix.sh   2) a source ~/myAddons/appendix.sh command:  This file appendix.sh, includes some Bash aliases.    The problem  After executing the remote script, I tried to use some aliases from appendix.sh. None worked.  Only after manually executing source ~/myAddons/appendix.sh, the aliases worked.   I checked at least 3 times that both the remote script's source command, and the manual command, are the same.   The question  Why did the execution of source ~/myAddons/appendix.sh directly from the remote script, fail, while the manually it worked, and what's the right way to cope with that?


Different Value of Votes in Profile Page (Summary Tab vs. Votes Tab)

When I visit my profile page, in the Summary Tab it shows that "601 votes" have been cast. However, when I visit the "Votes Tab" I find that it shows "585 votes" have been cast (and I'm looking with "All" filter selected).  Here's a screenshot of my summary tab:    And here's another screenshot from my Votes Tab:   I just wanted to know what am I reading wrong in these two values? I referenced the following Meta posts but I don't think I could gather anything that closely relates to this. It would really be helpful if you can please let me of any specific meta posts that would help me understand this.


I think the chosen one is Luke in episode 4-6 but it was anakin in 1-3 when he turned to the darkside he lost the title,but since Luke and Leila were born one of those two would get the title and one who got it was Luke.


"That" – Which of the following sentences uses correct English grammar?

Which of the following sentences uses correct English grammar?   Don't make me play games I don't want to play.  Don't make me play games that I don't want to play.


SQL Server - In clause with a declared variable

Let say I got the following :  DECLARE @ExcludedList VARCHAR(MAX)  SET @ExcludedList = 3 + ', ' + 4 + ' ,' + '22'  SELECT * FROM A WHERE Id NOT IN (@ExcludedList)   Error : Conversion failed when converting the varchar value ', ' to data type int.   I understand why the error is there but I don't know how to solve it...


Is Luke Skywalker looking at a gravestone and whose is it?

At the end of The Force Awakens, we see Rey find Luke Skywalker to return his lightsaber and he has his back to her. It appears that he is looking a what looks like a gravestone.   EDIT: The view from the back. It looks like a cross at the top to resemble a gravestone   It resembles one the Sceilig Mhichíl gravestones like this one below. (as Janus Bahs Jacquet noted in comments)    What is this? Is it a gravestone? If so, whose is it?


I am running a GetFeature request against a WFS server which does not support to download all data at once. Can I use ogc:PropertyIsGreaterThanOrEqualTo to split the dataset into chunks at download them step by step? I wonder how I can construct the actual URL to include the paging filter. Here is what I tried:  http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \ &typeName=example:example&maxFeatures=50000 \ &FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> \ <ogc:PropertyIsGreaterThanOrEqualTo><ogc:PropertyName>OBJECTID</ogc:PropertyName> \ <ogc:Literal>50000</ogc:Literal></ogc:PropertyIsGreaterThanOrEqualTo></ogc:Filter>   This is not a valid URI though... That's why uri-encoded the filter part:  http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \ &typeName=example:example&maxFeatures=50000 \     &FILTER=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net \ %2Fogc%22%3E%3Cogc%3APropertyIsGreaterThanOrEqualTo%3E%3Cogc%3APropertyName%3EOBJECTID \ %3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E50000%3C%2Fogc%3ALiteral \ %3E%3C%2Fogc%3APropertyIsGreaterThanOrEqualTo%3E%3C%2Fogc%3AFilter%3E   This actually works. Is there a "nicer" way to do this?


Yesterday I started learning Lightning Web Components on Trailhead, installing the new CLI and updating the VS Code extensions as instructed. I got a pre-release Spring 19 dev org and enabled it as a hub, then created a Spring 19 (apiVersion 45) scratch org, etc.  Now, I'm going back to work on my old project, not LWC, using a previously created scratch org (Winter 19, apiVersion 44). When I tried to push my changes, I got this error:     ERROR:  The configured apiVersion 45.0 is not supported for this org. The max apiVersion is 44.0.   I don't know how to fix this. Not sure if it's simply a config setting I can change in VS Code, or if I have to revert my CLI to a previous version. Help please?


draw in LaTeX WITHOUT using tikz or pgfplots

I'm typesetting a drawing for an assignment, but I can only change what's in \begin{document} -- that is, I can't add any packages or make any changes in the preamble. Unfortunately, the platform I'm working on doesn't have tikz or pgfplots installed, so is there a way I can make basic drawings without using either package? (e.g. drawing squares and points)


What are the convergent sequences in the cofinite topology

I consider the co-finite topology on $\mathbb{R}$ that is $$\{G\subset \mathbb{R}, card(\mathbb{R}\setminus G)<+\infty\}\cup \{\emptyset\}$$  What are the convergent sequences in this space .  thank you


Given a function on a closed interval $f\colon I\subset \mathbb{R}\to \mathbb{R}$ with $$f(x+y) \leq f(x) + f(y).$$ Moreover, I know that $f$ is    monotonic increasing continuous on all points except countably many continuous from the right such that the limit from the left at each point exists. $f(nx) \leq nf(x)$ for all $n\in\mathbb{N}$.   Can I say more on this function? In particular, I would like to show that $f(\lambda x) \leq \lambda f(x)$ for all $\lambda \geq 1$ or at least for all rational $\lambda \geq 1$.


A ring without the Invariant Basis Number property

I was reviewing my homework and it seems I overlooked something crucial while proving some ring has no Invariant Basis Number property. This is exercise VI.1.12 in Aluffi's Algebra: Chapter 0  The setup: $V$ is a $k$-vector space and let $R = \mathrm{End}_{k}(V)$.   Prove that $\mathrm{End}_{k}(V\oplus V) \cong R^4$ as an $R$-module Prove that $R$ doesn't satisfy the IBN property if $V = k^{\oplus \mathbb N}$.   For the first, I used to the fact that $V \oplus V$ is both the product and coproduct (in $k$-Vect) of $V$ with itself to get the isomorphism. What I just realized is I only showed that the two are isomorphic as groups not $R$-modules. So what would be the $R$-module structure on $\mathrm{End}_{k}(V \oplus V)$?   For the second, I used the fact that $V = k^{\oplus \mathbb N}$ implies $V \cong V \oplus V$ which in turn implies $R = \mathrm{End}_{k}(V) \cong \mathrm{End}_{k}(V \oplus V)$. Again, I just realized that I only showed the latter two are isomorphic as groups.   It may be obvious (and maybe why my professor let it pass?) but I can't come up with a good $R$-module structure that makes the two group isomorphisms $R$-linear.  Edit:  Explicitly, these are the isomorphisms I'm dealing with. Let $\pi_j, i_j$ be the natural projection/inclusion maps of the $j$-th factor resp. and $\psi: k^{\oplus \mathbb N} \oplus k^{\oplus \mathbb N} \to k^{\oplus \mathbb N}$ the isomorphism given by $\psi(e_i, 0)=e_{2i-1}$ and $\psi(0, e_i)=e_{2i}$.  Then the first isomorphism $\mathrm{End}_k(V \oplus V)\to R^4$ is given by $\varphi \mapsto (\pi_1\varphi i_1,\pi_2\varphi i_1,\pi_1\varphi i_2,\pi_2\varphi i_2)$  The second isomorphism $R \to \mathrm{End}_k(V \oplus V)$ is given by $\alpha \mapsto \psi^{-1} \alpha \psi$  The composition doesn't seem to be $R$-linear if I use the obvious $R$-module structure on $R$ and $R^4$.


What do you call a woman who actively chases men?

I'm not looking for any derogatory term, but for something that the woman herself would say  Example:     He was a good guy. Not sure why I was so sure of that. Maybe it was a   skill that I developed when I was a [...].


In my note to the school should I write "I will pick up my daughter at 2:00," or "I will pick my daughter up..."?


I have this very simple code:    public class Player{     private int x,y,velX,velY,width,height,id;     private boolean isControllable;       public Player(int _x,int _y,int _width,int _height,int _id,boolean _cont){         x = _x;         y = _y;         width = _width;         height = _height;         id = _id;         isControllable = _cont;         if(_cont == true){             addToCont();         }     }      private void addToCont(){         Main.controllable.add(this);     }  }   And this:    public class Main {      public static Render render = new Render();     public static Controlls controll = new Controlls();      public static LinkedList<Player> controllable;      public static void main(String[] args) {         controllable = new LinkedList<Player>();         render.height = 750;         render.width = 1000;         render.RenderWindow();     } }   As You can see I am trying to add this instance of player class to the linked list. But it returns an error:    Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.NullPointerException at game.Player.Player.addToCont(Player.java:23) at game.Player.Player.<init>(Player.java:18) at game.Main.Render.<init>(Render.java:28) at game.Main.Main.<clinit>(Main.java:9)   What am I doing wrong?


I add Prolog code to my slides like this:  \documentclass{beamer}  \usepackage{listings} \usepackage{mdframed}  % No navigation symbols at the bottom of each slide \beamertemplatenavigationsymbolsempty  \definecolor{light-gray}{gray}{0.89}  \begin{document}  \defverbatim[colored]\lstMiaFood{ \begin{mdframed}[     frametitle=mia.pl,     frametitlerule=true,     frametitlebackgroundcolor=light-gray!30,     backgroundcolor=light-gray,     roundcorner=2pt,     leftmargin=1,     rightmargin=1,     innerleftmargin=1,     innertopmargin=1,     innerbottommargin=1,     outerlinewidth=2,     linecolor=gray   ]    \begin{lstlisting}[     language=Prolog,     basicstyle=\ttfamily,     keywordstyle=\color{blue}   ] likes(mia, Food) :- isItalian(Food).  likes(mia, Food) :- isAmerican(Food),                     isVegetarian(Food). isItalian(pizza). isItalian(lasagna). isItalian(spaghetti).  isAmerican(frenchFries). isAmerican(hamburger). isAmerican(macaroniAndCheese).  isVegetarian(frenchFries). isVegetarian(macaroniAndCheese).    \end{lstlisting} \end{mdframed} }  \frame{   \frametitle{Test code}   \lstMiaFood }  \end{document}   This works fine and produces slides like these:    I'd like to reuse the style of the listing and the frame which is why I tried to define a \newcommand:  \newcommand{\prologCode}[1]{   \defverbatim[colored]\lstMiaFood{     \begin{mdframed}[         frametitle=mia.pl,         frametitlerule=true,         frametitlebackgroundcolor=light-gray!30,         backgroundcolor=light-gray,         roundcorner=2pt,         leftmargin=1,         rightmargin=1,         innerleftmargin=1,         innertopmargin=1,         innerbottommargin=1,         outerlinewidth=2,         linecolor=gray       ]       \begin{lstlisting}[         language=Prolog,         basicstyle=\ttfamily,         keywordstyle=\color{blue}       ] {#1}       \end{lstlisting}     \end{mdframed}   } }   But this errors with:  (/usr/share/texmf-dist/tex/latex/listings/lstlang2.sty) Runaway argument? {  ! Paragraph ended before \\lstlisting@ was complete. <to be read again>                    \par  l.94 }   Is there a way around this error to reuse the listing and frame style?    Regarding this question being a duplicate  I'm aware of  but its two solutions both produce compilation errors with the MWE I provided above:  ! LaTeX3 Error: The verbatim command '\code' cannot be used inside an (LaTeX3)        argument.   is produced by  \ExplSyntaxOn \NewDocumentCommand{\code}{m +v}{   \exp_args:Nx \scantokens   {     \string\begin{lstlisting}[\unexpanded{language=#1,numbers=none,xleftmargin=0.35cm,framesep=0mm}]       #2     \string\end{lstlisting}   } } \ExplSyntaxOff  \begin{document} \frame{   \frametitle{Test code}     \code{C}{     int x = 200;     unsigned int y = 0;     } } \end{document}   and  Package Listings Warning: Text dropped after begin of listing on input line 110   results from  \lstnewenvironment{code}[1]{\lstset{language=#1,numbers=none,xleftmargin=0.35cm,framesep=0mm}}{}  \begin{document} \frame{   \frametitle{Test code}     \begin{code}{C}     int x = 200;     unsigned int y = 0;     \end{code} } \end{document}


What is the physical meaning of divergence?

I want to visualize the concept of  of a vector field. I also have searched the web.Some says it is   1.the amount of flux per unit volume in a region around some point 2.Divergence of vector quantity indicates how much the vector spreads out from the certain point.(is a measure of how much a field comes together or flies apart.). 3.The divergence of a vector field is the rate at which"density"exists in a given region of space. 4.Divergence measures the net flow of fluid out of (i.e. diverging from) a given point. If fluid is flowing instead into that point the divergence will be negative.  I am confused with all these definition.Can someone give me a proper visualizable definition which also satisfies in some way all the above definition and descriptions? Thanks for your response.


I'm a newbie to js. Let me illustrate my question with a few examples. Code 1 var temp = { key: "value" }; var data = ["v1", "v2"]; var result = []; for (var i in data) {     var newdata = temp; /** Note here! **/     newdata.key = data[i];     result.push(newdata); } console.log(result); // [ { key: 'v2' }, { key: 'v2' } ]  The result here is unexpected. Code 2 var temp = { key: "value" }; var data = ["v1", "v2"]; var result = []; for (var i in data) {     var newdata = { key: "value" }; /* Note here! */     newdata.key = data[i];     result.push(newdata); } console.log(result); // [ { key: 'v1' }, { key: 'v2' } ]  Now the result is what I want. It looks like the  in Python. But I googled a lot and could not get a satisfied answer. So I have to turn to stackoverflow for help. My question: Does JS have a name binding operation similar with Python? If not, why do these two piece of codes get different results? [Edit] I know about reference in C++, and name binding in Python. And I'm also aware of the differences between these two. The only thing I was confused with was: In JS, is it reference or name binding? Or something else? Thanks to all the comments, I totally understand it's similar with name binding rather than reference. (As I can't find any button to closed this question, I add the answer here.)


If $2a_{n+2} \le a_{n+1}+a_n$, then $\lim \sup a_n \le \frac23 a_2 + \frac13 a_1$

This is a reformulation of a deleted question:  If  $a_1 > 0$ and $a_2 > 0$ and $2a_{n+2} \le a_{n+1}+a_n$,  show that  $\lim \sup a_n \le \frac23 a_2 + \frac13 a_1$.  My proof involves showing that $a_{n+2} \le u_{n} a_{n+1} + (1-u_n)a_n $ where $u_n \to \frac23$, and I wondered if there is a simpler proof.  I will post my proof in a couple of days if no one does.


Do I need Schengen visa? If so, working permit or visitor?

I'm currently a green card holder through asylum (my nationality was Indonesian). Also I have the travel document (refugee travel document). Work requires me to travel to Brussels for a team training. To go there, will I need visa? If so, what kind of visa I should apply?


How to enable user input to immediately act on something as opposed to having the user type something and then press ?

I have some code which produces a sort of grid of letters that I want to scroll across- (that bit's not important I don't think). At the moment the 'scrolling' function works but only if you type in 'r' and then the  key.  Is there a way of making it so that as soon as you hit 'r' it's 'entered' and the program responds?      This is a tiny bit of the code.  print('Enter [r] for right and [l] for left:')             input_val = raw_input('Left or Right: ')              if input_val == 'r':                 a += 10                 b += 10


I'm building git and get the following error:       DB2TEXI user-manual.texi /bin/sh: 2: docbook2x-texi: not found    How do I install docbook2x-texi?


Is the sentence ‘There's no such thing as ghosts.'’ correct?

As for the sentence, 'there's no such thing as ghosts.'  Is it grammatically correct to use the plural form of ghost? From what I have learned, the object 'thing' is in singular form, so ghost should be singular too. But I see a lot of native speakers use this sentence.


Efficient way to calculate A^B mod C, where B is high number

After reading , I know how to calculate certain (easy to express with in binary) exponents.  However, I find this method inefficient to calculate on paper.  I have this following problem: 2 ^ 2000002 mod 41  What would be a "good" (efficient, quick, simple) way to approach and solve this type of problems, where the exponent is a very large number?


I need to get Account names and asset count for each account.  From Asset table I can get AccountId and asset count.  But I need to get Account names also. This is where I stuck.  How to use Ids, from aggregate query and get Account names by Id.


I was trying some coding as practice where I found the following:    df = pd.read_csv('stock.csv',usecols=[1,2,3,4]) df = df.iloc[::-1]   I am not able to understand what the second statement is doing. I tried to read the documentation for  but am not able to understand the purpose of it.    Please help me understand the reason behind the usage of second line in the code.


How do I align the equations about the equal to sign, with lines of text in between?

I want to align unnumbered equations about the '=' sign having one or two lines of statements in between. And also, I want them to be centered. Here is what I did in my code:   \begin{align*} T & = \frac{0.161V}{\sum as}\\ \sum as & = \frac{0.161V}{T}\\ \end{align*} Substituting the known values, we get,\\ \begin{align*} \sum as & = \frac{0.161 \times 120000}{1.5}\\ \sum as & = 13360 \text{ O W U} \end{align*} The total absorption of the hall is 13,360 open window units (O W U)\\ Therefore, the average absorbing power of the surface\\ \begin{align*} a & = \frac{\sum as}{\sum s}\\ \implies a & = \frac{13360}{25000}\\ \implies a &=0.5344 \text{sabine} \end{align*} The average absorbing power of the surface is 0.5344 sabine.   The above code gives an output in which the equal to signs are not aligned. I want them to be centered and aligned. Also the equation comes in the next line of the statement. I want them to come in a single line. Please help.


What exactly does null do performance and storage (space) wise in MySQL?  For example:  TINYINT: 1 Byte TINYINT w/NULL 1 byte + somehow stores NULL?


How do I defeat the knights in candy box 2? They always kill me

I have the octopus kings crown and the monkey wizards staff and pink enchanted gloves with 423 health.


Data loss over ttyACM* when 'cat' command is used for data transfer

I have a development board which will have 3 ACM interfaces when connected to Ubuntu host and i want to transfer data from Host to Device over ttyACM3.  I have followed the following procedure for data transfer,  Precondition:   Modify /etc/inittab to remove Linux console on /dev/ttyGS3  Create a binary file with a minimum length of about 20MBytes    Test Steps:   DUT side: stty -F /dev/ttyGS3 raw -echo -echoe -echok -echoctl -echoke HOST side: stty -F /dev/ttyACM3 raw -echo -echoe -echok -echoctl -echoke DUT side: cat /dev/ttyGS3 > /tmp/rx_pattern.bin  HOST side: cat ./pattern.bin > /dev/ttyACM3   By following above procedure i see some data(~300 KB) is missed at the DUT side randomly. I have also used "dd" command for data transfer but still there is a data loss.  But i tried to transfer the same "pattern.bin" file from the Host by using "minicom" application and "cat" command to receive from DUT side, surprisingly i don't see any data loss.  I have took USB Ellisys logs during issue scenario,   One of the "OUT" transaction is failed(handshake is NAK) and there is no "PING" transaction for the failed transfer. Whereas in success scenario whenever "OUT" transaction fails, "PING" transaction is present and data is sent again.   stty command difference on the both the hosts.  Ubuntu 14.04:  speed 115200 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke   Ubuntu 16.04:  speed 9600 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc   Surprisingly if i keep open ACM3 port from Minicom application and tries to send data, there is no data loss even in Ubuntu 14.4.


Which one is more correct to use: "Will you turn on the lights in the kitchen?" OR "Will you turn the lights on in the kitchen?"

I'm basically asking if it's "turn on the lights" vs "turn the lights on."


If $f$ is continuous and $f(x+y) = f(x)+f(y)$, then $f(x) = cx$ for all $x \in \mathbb{R}$

Assume $f$ is a function over $\mathbb{R}$ satisfying $f(x+y) = f(x)+f(y)$ for all $x,y \in \mathbb{R}$. Show that if $f$ is continuous, then $f(x) = cx$ for all $x \in \mathbb{R}.$   I find it hard to use the definition of continuity to derive anything from the equation. I think we could write the definition of the limit in terms to get $$\forall \epsilon,\exists \delta \quad 0<|x-a|<\delta \quad \implies \quad |f(x)-L| < \epsilon.$$ I am not sure where to go from here.


Each single post and archive page for my custom post type is giving me a 404 -- both /thing and /thing/my-post . Here is my setup in functions.php . Is there something else I'm supposed to do, such as permalink rewriting? WP should be using single.php without requiring a single-{post_type}.php, unless I want to customize it for this CPT, correct?   // Register Custom Post Type function custom_post_type_thing() {      $labels = array(         'name'                  => _x( 'Things', 'Post Type General Name', 'text_domain' ),         'singular_name'         => _x( 'Thing', 'Post Type Singular Name', 'text_domain' ),         'menu_name'             => __( 'Things', 'text_domain' ),         'name_admin_bar'        => __( 'Things', 'text_domain' ),         'archives'              => __( 'Thing Archives', 'text_domain' ),         'parent_item_colon'     => __( 'Parent Thing:', 'text_domain' ),         'all_items'             => __( 'All Things', 'text_domain' ),         'add_new_item'          => __( 'Add New Thing', 'text_domain' ),         'add_new'               => __( 'Add New', 'text_domain' ),         'new_item'              => __( 'New Thing', 'text_domain' ),         'edit_item'             => __( 'Edit Thing', 'text_domain' ),         'update_item'           => __( 'Update Thing', 'text_domain' ),         'view_item'             => __( 'View Thing', 'text_domain' ),         'search_items'          => __( 'Search Thing', 'text_domain' ),         'not_found'             => __( 'Not found', 'text_domain' ),         'not_found_in_trash'    => __( 'Not found in Trash', 'text_domain' ),         'featured_image'        => __( 'Featured Image', 'text_domain' ),         'set_featured_image'    => __( 'Set featured image', 'text_domain' ),         'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),         'use_featured_image'    => __( 'Use as featured image', 'text_domain' ),         'insert_into_item'      => __( 'Insert into Thing', 'text_domain' ),         'uploaded_to_this_item' => __( 'Uploaded to this Thing', 'text_domain' ),         'items_list'            => __( 'Things list', 'text_domain' ),         'items_list_navigation' => __( 'Things list navigation', 'text_domain' ),         'filter_items_list'     => __( 'Filter things list', 'text_domain' ),     );     $args = array(         'label'                 => __( 'Things', 'text_domain' ),         'description'           => __( 'Things', 'text_domain' ),         'labels'                => $labels,         'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', 'post-formats', ),         'taxonomies'            => array( 'category', 'post_tag' ),         'hierarchical'          => false,         'public'                => true,         'show_ui'               => true,         'show_in_menu'          => true,         'menu_position'         => 5,         'show_in_admin_bar'     => true,         'show_in_nav_menus'     => true,         'can_export'            => true,         'has_archive'           => true,         'exclude_from_search'   => false,         'publicly_queryable'    => true,         'capability_type'       => 'page',     );     register_post_type( 'thing', $args ); } add_action( 'init', 'custom_post_type_thing', 0 );


Portrait primary display rotates touchpad

I have Windows 7 64bit on a Lenovo T530 laptop (1600x900) with a Lenovo ThinkVision LT2452p monitor (1920x1200). I set up screen resolution like this:   Compose displays. Set the primary display to LT2452p monitor. Set the LT2452p monitor to portrait.   Effects:   Task bar is on the LT2452p monitor (exactly what I wanted). Minitor orientation is correct. Attached USB Mouse moves correctly. Touch pad directions are rotated 90 degrees. Moving up moves to cursor right. Moving right moves the cursor down. Mini joystick is rotated like the touchpad.   I browsed through the touch pad settings ("UltraNav" tab at mouse properties) but did not find any rotation options. It is not allowed to install any solutions from John Doe as it is a company laptop.  UPDATE: I also cannot install unmaintained software like, EeeRotate or ScreenMouseRotate.


Work around for "this software is not supported on a 64-bit OS"?

I have an older app I need to access, which will not get past the initial installation screen with the message, "software is not supported on a 64-bit operating system. Please install on a 32-bit machine." (I am using W10 Pro x64.)  Is there any hack I can do to see if I can at least get the installer to complete? I could put a Win XP VM on my PC, but I would rather not have to do that.


Is there any way to increase the speed of the blades (air coming out) of my fan?

Don't worry, my ceiling fan do not have any mechanical problem(if i will not mention it most of you will say repair your fan) it's just a part of home experiment.  Once looking at the blades of my fan I supposed can I increase the speed of blades (and hence amount of air coming from it) just by applying some physics??  The  interesting point came  when one of my friend said yes you can just bend the blades of your fan. I tried it but it didn't worked so for the final suggestion, I supposed to come here.  Someone of you may say that this question is not clear so forget all,the question you have to answer is Can I increase speed of blades of my fan just by applying some physics.  I m not asking about any formula or procedure to measuring the speed of blades, i m just asking how can i increase the speed of blades


I encountered a problem today to prove that $(X_n)$ with $X_n = \cos(n!)$ does not have a limit (when $n$ approaches infinity). I have no idea how to do it formally. Could someone help? The simpler the proof (by that I mean less complex theorems are used) the better. Thanks


Increasing nproc for processes launched by systemd on CentOS 7

I have successfully increased the nofile and nproc value for the local users, but I couldn't find a proper solution for the processes launched by systemd. Adding max_open_files to the MariaDB configuration doesn't help. su - mysql to change the limit manually doesn't work either (This account is currently not available).  /etc/security/limits.conf  * soft nofile 102400 * hard nofile 102400 * soft nproc 10240 * hard nproc 10240   /etc/security/limits.d/20-nproc.conf (no other files present in the directory)  * soft nofile 102400 * hard nofile 102400 * soft nproc 10240 * hard nproc 10240   /etc/sysctl.conf  fs.file-max = 2097152   /etc/pam.d/system-auth  #%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth        required      pam_env.so auth        sufficient    pam_unix.so nullok try_first_pass auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success auth        required      pam_deny.so  account     required      pam_unix.so account     sufficient    pam_localuser.so account     sufficient    pam_succeed_if.so uid < 1000 quiet account     required      pam_permit.so  password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type= password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok password    required      pam_deny.so  session     optional      pam_keyinit.so revoke session     required      pam_limits.so -session     optional      pam_systemd.so session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session     required      pam_unix.so   /etc/pam.d/systemd-user  #%PAM-1.0  # Used by systemd when launching systemd user instances.  account include system-auth session include system-auth auth required pam_deny.so password required pam_deny.so   /var/log/mariadb/mariadb.log  [Warning] Changed limits: max_open_files: 1024  max_connections: 32  table_cache: 491   /proc/mysql_pid/limits  Limit                     Soft Limit           Hard Limit           Units Max cpu time              unlimited            unlimited            seconds Max file size             unlimited            unlimited            bytes Max data size             unlimited            unlimited            bytes Max stack size            8388608              unlimited            bytes Max core file size        0                    unlimited            bytes Max resident set          unlimited            unlimited            bytes Max processes             30216                30216                processes Max open files            1024                 4096                 files Max locked memory         65536                65536                bytes Max address space         unlimited            unlimited            bytes Max file locks            unlimited            unlimited            locks Max pending signals       30216                30216                signals Max msgqueue size         819200               819200               bytes Max nice priority         0                    0 Max realtime priority     0                    0 Max realtime timeout      unlimited            unlimited            us   It is interesting that different processes (users) have different Max open files number:  mysql - 1024 4096 apache - 1024 4096 postfix - 4096 4096


I'm trying to get all users from my . protected static String getUsers() throws Exception {      StringBuilder sb = new StringBuilder();     List<User> allUsers = new ArrayList<>();     Directory.Users.List request;     try {         request = getDirectoryService().users().list().setCustomer("C02dnfy7r");          // Get all users         do {             try {                 Users currentPage = request.execute();                 allUsers.addAll(currentPage.getUsers());                 request.setPageToken(currentPage.getNextPageToken());             } catch (IOException e) {                 request.setPageToken(null);             }         } while (request.getPageToken() != null && request.getPageToken().length() > 0);          // Print all users         for (User currentUser : allUsers) {             sb.append(currentUser.getPrimaryEmail() + "\n");         }     } catch (Exception e) {         throw new Exception(e);     }      return sb.toString(); }   protected static Directory getDirectoryService() throws Exception {      /** Email of the Service Account */     String serviceAccountId = "****";     /** Admin email */     String serviceAccountUser = "****";     /** Application name */     String applicationName = "*****";      HttpTransport httpTransport = new NetHttpTransport();     JacksonFactory jsonFactory = new JacksonFactory();      Directory service = null;     try {         GoogleCredential credential = new GoogleCredential.Builder()                 .setTransport(httpTransport).setJsonFactory(jsonFactory)                 .setServiceAccountId(serviceAccountId)                 .setServiceAccountScopes(Arrays.asList(DirectoryScopes.ADMIN_DIRECTORY_USER))                 .setServiceAccountUser(serviceAccountUser)                 .setServiceAccountPrivateKeyFromP12File(new File(FILENAME)).build();          service = new Directory.Builder(httpTransport, jsonFactory, credential)                 .setHttpRequestInitializer(credential).setApplicationName(applicationName)                 .build();      } catch (Exception e) {         throw new Exception("Error while obtaining connection from google", e);     }      return service; }  But an error occurs:  Caused by: java.lang.NoSuchMethodError: com.google.api.client.http.HttpRequest.setResponseReturnRawInputStream(Z)Lcom/google/api/client/http/HttpRequest;  Obove source worked on normal Servlet. I'm trying to use it in a Java EE Project and got that error. Here is using .jar(downloaded from this link :)  google-api-client-1.30.2.jar google-api-client-1.30.2.jar google-api-client-servlet-1.30.2.jar google-api-services-admin-directory-directory_v1-rev118-1.25.0 google-http-client-1.30.1.jar google-http-client-jackson2-1.30.1.jar google-oauth-client-1.30.1.jar google-oauth-client-servlet-1.30.1.jar grpc-context-1.19.0.jar guava-26.0-android.jar httpclient-4.5.9.jar httpcore-4.4.11.jar jackson-core-2.9.9.jar jdo2-api-2.3-eb.jar jsr305-3.0.2.jar opencensus-api-0.21.0.jar opencensus-contrib-http-util-0.21.0.jar protobuf-java-2.6.1.jar transaction-api-1.1.jar xpp3-1.1.4c.jar gson-2.8.5.jar How can I fix the error above?


I am developing a search control, where user types in and it returns search results. When I get no matching result what message would be correct in that case?  a)  0 result  b)  0 results


Online resources for airplane seat sizes

Are there online resources for researching seat sizes and leg room of various planes of various airlines?  I'd like to know whether JAL international flight economy class seats are  (compared to a Virgin Australia domestic economy class seat), or whether I'm just imagining it.


Best practice for deleting answers that aren't answers

As a trusted user, I can vote to delete answers that have a score of -1 or lower.  Typically, the answers I find myself wanting to vote to delete come from .   These answers are new and thus usually have a score of 0.    I was thinking it would be helpful to the moderators if other 20k users (who are presumably working from the same list of answers) voted to delete such answers ourselves.  (with appropriate comments added to the answer)  But in order to vote to delete I would have to first downvote the answer.  However, I'm not sure if this is something I should be doing.    Should I:   Simply flag the answer Downvote the answer and vote to delete Downvote the answer, vote to delete, and then undo my downvote   Historically of course I would just choose the first option.  I would like to know if any one (or a combination of) these options is ideal.  In sum:  as a 20k user, what should I be doing with these sorts of answers?


How long are moderators supposed to serve?

I'm a relatively new (active) user from Mathematics SE. We are about to have an election and I asked a similar question on the Q&A thread, where I was encouraged to post it here. Rounding up, our current moderators were elected {8,8,7,7,6,6,3,2,2} years ago. My limited experience with them has been positive: as far as I can tell, they are doing a great job to keep the site working as it's supposed to. However, two-thirds of them have served for over five years, which is a rather long time, specifically when elections happen somewhat infrequently. More to the point, as far as I can tell re-elections are non-existent: once elected, mods are free to retain their privileges indefinitely. My questions:  How frequently are elections "supposed" to take place? Are re-elections a thing? Several mods indicated it is a network-wide policy that moderators do not have term limits. If this is correct, why is this so?  Personally I am in favor of gentle term limits. Over at MSE, which is a larger site, 3-5 years is probably a good length of time to get acclimated to the responsibilities and make meaningful contributions while allowing other active users to participate in the same way. Being a mod is a lot of work but I think most people have enjoyed doing it and more people should have the opportunity. Maybe the length can vary by community. To be clear: the mods at MSE are doing good work! Update: I am aware that a similar question was asked in a thread 11 years ago. I think this discussion is worth having anew.


I need to prove the following statment (actually a special case of it).     Let $R$ be a Noetherian ring, $M$ a finite $R$-module and $I$ an ideal of $R$. Then   $\operatorname{grade}(I,M)\geq 2$ if and only if the homomorphism $M\rightarrow$Hom$_R(I,M)$ given by $m\mapsto(i\mapsto im)$ is an isomorphism.   This is Exercise 1.2.24 in Bruns and Herzog, Cohen-Macaulay Rings.


Just downloaded Minecraft no bin folder or minecraft.jar

I've just downloaded Minecraft and I wanted to install Minecraft Forge, but it said I needed to go to bin folder than to minecraft.jar.  I don't have minecraft.jar, only having  versions, magic, launcher, launcher.pack.izma and launcher_profiles.json


$\sum_{n=1}^\infty a_nb_n$ convergent for all bounded sequences $b_n$, Prove $\sum_{n=1}^\infty |a_n|$ converge.

I have seen previous questions about this sort of question (assume $\sum_{n=1}^\infty |a_n|$ converge and $b_n$ bounded $\rightarrow \sum_{n=1}^\infty |a_nb_n|$). But I can't find the answer for this question , perhaps I'm missing something. I know that $\forall n : |b_n|<M$ for some $M>0$ so $|a_nb_n|\le M|a_n|$ but it doesn't suffice the comparison test since I need to find the inverse inequality symbol $\ge$ and because we don't know if $|a_nb_n|$ converge , only $a_nb_n$ converge for our knowledge. if we take $b_n = (-1)^n$ then we get that $a_n$ converge by the criteria that $b_n$ is bounded and $a_nb_n$ is convergent. I'm not sure what else to understand from the meaning of $a_nb_n$ convergent series...


can't identify the error in java program

I am working in java and inserting and updating in Jtable. Some error occurs and i am unable to identify the error please help.  Error:     java.lang.NullPointerException       at jtabledemo.Accounts.(Accounts.java:57)       at jtabledemo.Accounts$1.run(Accounts.java:33)       at java.awt.event.InvocationEvent.dispatch(Unknown Source)       at java.awt.EventQueue.dispatchEventImpl(Unknown Source)       at java.awt.EventQueue.access$400(Unknown Source)       at java.awt.EventQueue$3.run(Unknown Source)       at java.awt.EventQueue$3.run(Unknown Source)       at java.security.AccessController.doPrivileged(Native Method)       at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)       at java.awt.EventQueue.dispatchEvent(Unknown Source)       at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)       at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.run(Unknown Source)   and this is my code:  package jtabledemo;  import java.awt.Color; import java.awt.EventQueue;  import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.table.DefaultTableModel; import javax.swing.JTable; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JButton;  import java.awt.event.ActionListener; import java.awt.event.ActionEvent;  public class Accounts extends JFrame {  private JPanel contentPane; private JTable table; private JTextField textField; private JTextField textField_1; private JButton btnUpdate;  /**  * Launch the application.  */ public static void main(String[] args) {     EventQueue.invokeLater(new Runnable() {         public void run() {             try {                 Accounts frame = new Accounts();                 frame.setVisible(true);             } catch (Exception e) {                 e.printStackTrace();             }         }     }); }  /**  * Create the frame.  */ public Accounts() {     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     setBounds(100, 100, 609, 387);     contentPane = new JPanel();     contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));     setContentPane(contentPane);     contentPane.setLayout(null);       Object [] columns={"Debit","Credit"};     DefaultTableModel model=new DefaultTableModel();     model.setColumnIdentifiers(columns);     table.setModel(null);     //table.setModel(model);     table.setBackground(Color.blue);     table.setForeground(Color.white);      table = new JTable();     table.setBounds(63, 117, 383, 202);     contentPane.add(table);      JLabel lblCredit = new JLabel("Credit");     lblCredit.setBounds(84, 11, 46, 14);     contentPane.add(lblCredit);      JLabel lblDebit = new JLabel("Debit");     lblDebit.setBounds(84, 49, 46, 14);     contentPane.add(lblDebit);      textField = new JTextField();     textField.setBounds(131, 8, 86, 20);     contentPane.add(textField);     textField.setColumns(10);      textField_1 = new JTextField();     textField_1.setBounds(131, 46, 86, 20);     contentPane.add(textField_1);     textField_1.setColumns(10);      JButton btnAdd = new JButton("Add");     Object[] row=new Object[2];     btnAdd.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {             row[0]=textField.getText();             row[1]=textField_1.getText();             model.addRow(row);         }     });     btnAdd.setBounds(248, 45, 89, 23);     contentPane.add(btnAdd);      btnUpdate = new JButton("Update");     btnUpdate.setBounds(248, 7, 89, 23);     contentPane.add(btnUpdate); } }


A novel featuring an Earth without a moon

About a decade ago, I read a novel about an Earth without a moon. It talked of a dimensional portal, where you could experience a series of situations (with and without moon) and how things changed with new conditions. It featured Neanderthals in the present day, although apprehensive of new technologies. There were modern matriarchal scientists who had gorilla like bodies to withstand the wind created by the rotation of the Earth without a moon, and who also acquired very long names. There were religious zealots (priests) with monkey tails.


Microtype gives wrong letterspacing in math mode

Using the \lsstyle command gives wrong math latterspacing afterwards. I came upon this problem when using the classicthesis and putting math in a section (microtype is used there too). After the section is rendered, math letterspacing is wrong from then on.  Minimal working example  \documentclass{minimal} \usepackage{amsmath} \usepackage{microtype}  \DeclareMathOperator{\MyOp}{MyVeryLargeOperator}  \begin{document} Before: $\MyOp(1,2,3)$. % this is how it should be.  {\lsstyle $X^2 + Y^2 = Z^2$} % \lsstyle and math inside a group.  After: $\MyOp(1,2,3)$. % now math has wrong letterspacing.  \end{document}   Output    Question  Any ideas how to fix this? I would especially be interesting in a fix working with classicthesis. You can see the problem here:  \documentclass[pdfspacing]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[eulermath]{classicthesis} \usepackage{amsmath}  \DeclareMathOperator{\diag}{diagonal}  \begin{document} \section{Usual section works fine}  \[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]  \section{But some math in a title $X^2+Y^2=Z^2$ messes it up}  \[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]  \end{document}


A question about using articles before a single letter in the alphabet

I want to brush up my English and I just started to read some Grammar books. When I read the section about how to use an article before a single letter, it says that we have to use "a" or "an" depending on the pronunciation of the letter. My teachers in school have never told me about that and in fact I am not sure what is the correct article that should be placed in front of a single letter.  Here I tried to list all the 26 letters with articles. Please let me know if I am correct or not and be kind to point out my mistakes.   an "A" a "B" a "C" a "D" an "E" an "F" a "G" a "H" an "I" a "J" a "K" an "L" an "M" an "N" an ""O" a "P" an "R" a "Q" an S" a "T" a "U" a "V" a "W" an "X" a "Y" a "Z".


Error CS0120: An object reference is required for the non-static field, method, or property 'Control.Controls'

I got this error.I tried to create an instance of control but didn't work.  Can somebody help me?     Error  CS0120  An object reference is required for the non-static field, method, or property 'Control.Controls'       public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         static void Main(string[] args)         {             foreach (var button in Form1.Controls.OfType<Button>())             {              }         }     }


How to put a default image if img tag is empty using jquery

I want to do is put a default image file in the img tag if it is empty or the user havent uploaded his picture yet.  current output:   html:  <form id="form1" runat="server">
     <input type='file' id="imgInp" /> </form>   script:  $(function () {     var loader = 'http://i38.photobucket.com/albums/e149/eloginko/profile_male_large_zpseedb2954.jpg';     $('img[data-src]:not([src])').each(function () {         console.log(this);         var $img = $(this).attr('src', loader),             src  = $img.data('src'),             $clone = $img.clone().attr('src', src);         $clone.on('load', function () {             $img.attr('src', src);         });     }); });  function readURL(input) {     if (input.files && input.files[0]) {         var reader = new FileReader();          reader.onload = function (e) {             $('#Picture').attr('src', e.target.result);         }          reader.readAsDataURL(input.files[0]);     } }  $("#imgInp").change(function(){     readURL(this); });


Re-Rolling Skills for Perception/Insight/Sneak

When is it appropriate to allow/disallow players to re-roll skill checks?  For instance, a player walks into a room in a dungeon and rolls a 2 on perception.  Do I allow them to re-roll?  If so what's the point in rolling and not just telling them everything the moment they walk into the room.  The players I have always try to roll again and again, I have no problem with them checking around again, but at what point do I have them take a 10 or a 20, and how do I do that organically?  My question isn't about things that are actively in action, but more about those rolls when nothing is happening.  Like if the group is wandering around a dungeon, and stumbles into a room.  How do I handle the perception check for a secret door?  Or a rogue hiding?  Things that don't have an obvious repercussion, unlike failing to pick a lock.


How do I define a template file for a specific node ID?

I'm trying to define a custom template file for a specific node, using the node ID. I read a lot of topics saying to create a node--X.tpl.php file in the templates folder.  That's what I did; unfortunately, even after flushing the theme cache many times, nothing changes.  Is there anything more I have to do?  I am using Drupal 7.


Let $H$ be a normal subgroup of index $n$ in a group $G$. Show that for all $g \in G, g^n \in H$

I am having a lot of trouble understanding the solution to this problem.   $(gH)^n = g^nH \implies g^n \in H$  Why does $H^n$ just turn into the identity? I am very confused, any help is appreciated.


Why isn't the volume formula for a cone $\pi r^2h$?

So I understand that the volume formula of a cone is: $\frac{1}{3}\pi r^2h$, and when I read about how to derive this formula, it makes sense to me.  Funny thing is, I'm stuck on why it ISN'T $\pi r^2h$ when I think about deriving the volume formula in a different way.    Here's what I mean.  Now we're told that to figure out the volume formula for something like a cylinder or cube, we simply multiply the area of the base by the height, and this makes intuitive sense.  In the case of a cone, what if we took a triangle with base r and height h, and rotated it around some axis, producing a cone.  When I think of it this way, it seems reasonable (in my mind) to calculate the volume of the produced cone by taking the area of the triangle, and multiplying it by the circumference of the circle that is the cone's base.  So if the area of our triangle is: $\frac12rh$ and the circumference of the generated cone's circle-base is: $2\pi r$, then the volume should be: $\pi r^2h$.  This derivation seems intuitively correct to me.    Now I know it isn't correct, and I almost feel silly asking, but I just can't see WHY it's not correct.  What's the flaw in the reasoning that the volume of a cone can be derived by multiplying the area of the triangle by the circumference of its circe-base?


What is the equivalent of varchar(max) in MySQL?


How can I prefix the term "Chapter" to the chapter number in the table of contents?

I have a table of contents as follows:  \documentclass{report} \begin{document} \tableofcontents \clearpage \chapter{TEST} \section{Introduction} \section{Test section one} \subsection{Test subsection} \subsection{Test subsection} \subsubsection{Test subsubsection} \subsection{Test subsection} \end{document}   I want to appear statement "Chapter 1: TEST" instead of "1 TEST" in the list of contents. Can you help?


What is the difference between "for me" and "to me"?

I would like someone to explain me how the sense of a sentence changes with using "for me" or "to me":  Some examples:     1a.  She is a good friend to me.   1b.  She is a good friend for me.        2a.  How special you are to me.   2b.  How special you are for me.        3a.  It's an interesting topic to me.   3b.  It's an interesting topic for me.


Applying for a Passport Card while I already have Passport Book

Hi everyone I was wondering if someone on here could help me with my question. I am looking to apply for a Passport Card. The thing is that I currently own a Passport Book. I don't want to use form DS-82 because I still want my Passport Book to be valid and I don't want to be without it during the processing time. Is it possible for me to use form DS-11 and apply in person and use my birth certificate as Proof of Citizenship. Also if I apply for the Passport Card will my Passport Book definitely still be valid or do I have to tell the State Department specifically to keep it valid and NOT cancel it. I just want to make sure because ultimately I want to have both a valid Passport Book and a valid Passport Card. Any help would be appreciated. Thanks!!


Reputation graph on profile page is un-draggable. Currently displaying data only for last 30 days.  Observed on Google chrome Version 58.0.3029.110 (64-bit) (OS - Win 10)   Can this be something related to touch based screens?  Note: Not duplicate of  as graph is not draggable at all. While in the , graph timeline can selected by dragging pointer in the lower chart but the same is not reflected in the upper chart/graph


If I need a specific library -- what package to install?

Quite often i install software and i have unmet dependencies. A second a go the terminal informed me I lack libglut.so.3 when trying to run molcas gv file.xyz. apt-cache search libglut.so.3 gives no result.   After googling I found that i need to install the freeglut3-dev package. But how can I know what package to install to get a certain library, without searching the internet, preferably from the command line?   I have seen  and  question but I don't see that they would help me here.


I keep building these imperial levels and delivering supply workers to build items that show in my inventory screen (rebel secrets! security codes!) but I can't figure out why I would want to do that.  What do the imperial items do for me other than pile up in my inventory menu item?


Is it possible to get which process changed my file

I have many processes running on my Ubuntu. One day later, I find that one file has been changed. Now I want to know which process touched my file.  What can I do? (I can not modify the running processes)


Im investigating moving some large DBs from MySQL to Cassandra and Im trying to figure out how to plan the cluster. Historically, one would just buy disks to contain the relevant data but Im not clear on how Cassandra uses disk space vs RAM space.   In planning a cluster, the question of how many machines, how much disk, RAM etc per machine will come up. How do I answer this for 1Tb? 10Tb? More?


What does mv !(old-project) old-project do?

I am reading this blog post , where the author uses the command mv !(old-project) old-project.  What does it do ?  My guess is that it copies all contents of old-project to the old-project subfolder except the old-project subfolder itself. How does it do that though ?


Compute $\iint\limits_R\frac{y}{x+y^2}dA$ where $R=[0,1]\times[1,2]$

Compute $\displaystyle\iint\limits_R\frac{y}{x+y^2}dA$ where $R=[0,1]\times[1,2]$  $\displaystyle\int_0^1\int_1^2\frac{y}{x+y^2}dydx=\int_0^1\int_1^2y(x+y^2)^{-1}dydx$  How do I integrate the denominator if the superscript is $-1$?   Hints are appreciated!


Generate Magnified Image from each sample image in a figure

I want to make the magnified image arrangements as shown in the attachments for a sample image. But I have no clue how to make such magnified arrangements. Please provide a way to solve this problem.


Minimum value of $\frac{a}{b+c}+\frac{b}{a+c}+\frac{c}{a+b}$

I have been trying to minimum value of $\frac{a}{b+c}+\frac{b}{a+c}+\frac{c}{a+b}$ for $a,b,c>0$ using Cauchy-schwarz and AM-GM-HM inequality, but I cannot seem to get a lower bound. I think the answer is $\frac{3}{2}$ when $a=b=c$, but using Cauchy-schwarz I got $\frac{a}{b+c}+\frac{b}{a+c}+\frac{c}{a+b}\geq\frac{(\sqrt{a}+\sqrt{b}+\sqrt{c})^2}{2(a+b+c)}=\frac{a+b+c+2(\sqrt{ab}+\sqrt{bc}+\sqrt{ac})}{2(a+b+c)}$ I could not establish a bound for the last part of this inequality; it seems to be $\leq\frac{3}{2}$. Is there a lower bound?


Suppose that $A$ is an $n \times n$ matrix and that for all $B$ of size $n \times n$, $AB=BA$. My question is why is $A$ of the form $A=CI$ where $C$ is a scalar and $I$ is the identity matrix?


Adjective to describe someone hiding knowledge

I can't seem to recall an informal or idiomatic word that describes someone who doesn't like share what he knows, in the context of scientific knowledge. I thought it's "scringy" but that's not the right word. Any help?  Example: "Come on man, tell me how you fixed the zombie zapper, don't be ____."


Wifi not getting connected but LAN cable connection is working. Please help

I recently installed Ubuntu 18.04.1 LTS from Windows 10. After installation system is not detecting any Wifi it says no adapters available. But when connected through LAN cable the internet works.  I tried couple of things but nothing helped.   rfkill list all 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no    lshw -c network WARNING: you should run this program as super-user.   *-network                         description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:01:00.0        logical name: enp1s0        version: 05        serial: b8:ca:3a:c3:5e:d2        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.0.9 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:16 ioport:2000(size=256) memory:c0404000-c0404fff memory:c0400000-c0403fff   *-network        description: Network controller        product: BCM43142 802.11b/g/n        vendor: Broadcom Limited        physical id: 0        bus info: pci@0000:02:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list        configuration: driver=bcma-pci-bridge latency=0        resources: irq:17 memory:c0500000-c0507fff WARNING: output may be incomplete or inaccurate, you should run this program as super-user.   Please help!


Entering Schengen country via connection from another Schengen country

I have a Schengen visa type C issued by the French embassy, and my wife has a Schengen visa type C issued by the Greek embassy. Due to some changes of plan, we now both want to travel to Paris. We want to book a flight on Aegean Airlines from our non-EU home country; this flight will have a connection at Athens, Greece.   Do they stamp our Visas at the Athens Airport as our Schengen point of entry?  Will I have a problem because my visa is from France? Will my wife be able to enter Paris without a problem because her visa is issued by the Greek embassy?


Is "What have you tried" considered as an appropriate comment?

Is a comment "What have you tried" considered an appropriate comment for questions   without doing any research by the OP without having tried anything by the OP with the I-am-too-lazy-to-resolve-this-my-own attitude with do-my-homework attitude   ?


At what point of my input file is the subfig package loaded?

When trying to compile my report, I receive an error related to the subcaption package (which I load in my preamble):     ! Package subcaption Error: This package can't be used in cooperation   (subcaption) with the subfig package.   After some research, I found that the subcaption and subfig packages cannot be used at the same time. The problem is that I don't load subfig explicitly anywhere in my preamble. It must get loaded somehow, but I don't know where in my input file. How can I find that out?


Two figures side by side with two captions and alphanumeric counting

How can I have two figure side by side with two captions and in the floating format, like  fig. 10A. some caption                fig. 10B. some caption


Using "recently" with the past simple tense

Is it fine to use recently with the past simple tense in the following sentence:     Did you read any books recently?   Is it grammatically correct?  Or do I have to use:     Have you read any books recently?


Does ‘do’s and ‘don't’s look correctly punctuated, i.e., curly single quotes around each word and a single straight quote in ‘don'ts’?

• Janice used too many ‘do’s and ‘don't’s in her last paragraph.  The sentence above means that she used the individual words ‘do’ and ‘don't’ excessively in her paragraph. Without recasting and without using italics, do ‘do’s and ‘don't’s look correctly punctuated, i.e., curly single quotes around each word and a single straight quote in ‘don'ts’?  • Janice used the phrase ‘do's and don'ts’ several times in her last paragraph.  Does ‘do's and don'ts’, with the curly quotes before and after the phrase, and the straight quote in ‘don't’ look correct?  A very simple ‘yes’ or ‘no’ is fine for each question. Again, I prefer single quotes around the words/phrases in question, and I opt for not italicizing.  I think I have satisfactorily punctuated each but am looking for confirmation that I did.  Again, please no recasts.  Many thanks.


UK short-term study visa sponsored by family

I'm studying in my second year at unviersity. I will apply for short-term study visa to study General English for two weeks in Liverpool.   My sponsor is my brother: his salary is 400 pounds per month. He gets paid via the post office, and he has 2800 pounds in his bank account which is now one month old. I will pay study and accomodation fees with a total of 900 pounds and get a Visa letter from school. My brother will transfer 980 pounds from his bank account to mine one month before applying to visa.    Will I get my visa accepted?


I have read a lot of questions about reputation bug on this site, and all of them have an explanation, that reputation does not updating everywhere at the same time and in some period of time reputation display will be the same. But this bug I have noticed couple days ago, and it is not fixing. Look at screen shots:  Stack Overflow account info    Science Fiction and Fantasy account info    Meta Stack Overflow account info    Also pay attention at the number of badges.


Infinite distinct factorizations into irreducibles for an element

Consider the factorization into irreducibles of $6$ in $\mathbb{Z}[\sqrt{-5}]$. We have $6=2 \times 3$ and  $6=(1+\sqrt{-5}) \times (1-\sqrt{-5})$, i.e. $2$ distinct factorizations. And,  $$6^2=3 \times 3\times2\times2$$ $$=(1+\sqrt{-5}) \times (1-\sqrt{-5}) \times (1+\sqrt{-5}) \times (1-\sqrt{-5})$$ $$=(1+\sqrt{-5}) \times (1-\sqrt{-5})\times3\times2.$$ More generally, $6^n$ will have $n+1$ distinct factorizations into irreducibles in $\mathbb{Z}[\sqrt{-5}]$ by a simple combinatorial argument. But, can we construct a ring in which there exists an element that has an infinite number of distinct factorizations into irreducibles? To make life harder, can we construct an extension of $\mathbb{Z}$ in which this happens? I have been thinking about this for a while and have managed to find no foothold.. Any help is appreciated.


Coconut Water from White vs Brown Coconuts

The warning label on each coconut describes how to treat the water within each. The water on the brown coconut is to be discarded; the water on the white coconut is safe for consumption.   In what ways is the water from the brown coconut different than that of the white coconut?


Are the following expressions are equal?   $$\sqrt{x^2}=(\sqrt{x})^2=|x|$$  As there both are: $$x^\frac{2}{2}=x^1$$


How to avoid "ConcurrentModificationException" while removing elements from `ArrayList` while iterating it?

I'm trying to remove some elements from an ArrayList while iterating it like this:  for (String str : myArrayList) {     if (someCondition) {         myArrayList.remove(str);     } }   Of course, I get a ConcurrentModificationException when trying to remove items from the list at the same time when iterating myArrayList. Is there some simple solution to solve this problem?


It would have been nice to know that shared links include my user id

I noticed that every short-link/permalink that I share while I'm logged in includes my user id.  It would have been really nice if the UI had highlighted this fact in the link sharing popup so that people who don't always intend to share their identity elsewhere can remain secure knowing that they haven't.


I have some weird filter results with Inkscape. I am using Windows 10 and Inkscape Version 0.92. When I apply Filter > Bevel > Combined Lightening filter the following result is being rendered:    First I thought it is just a preview to save render performance but as I exported the graphic as .png it still looked the same. What is happing here? In all the "Bevel" tutorial videos it looks all great.


How can I exchange a set of coins with different currencies into USD or gift cards in the US?

I have a stack of coins that have different currencies.  Where can I conveniently convert them into USD or (less preferable) gift cards? Ideally, I would like 1) not to have to sort them 2) avoid fees or unfavorable exchange rates.  Coinstar machines don't work with foreign currencies.    ()  I live in California.


Is there any reason to disable VR in Nikon lenses? Perhaps it is safer to storage/carry lenses with VR disabled? Or, maybe with very small shorted speed VR decrease quality of picture?


How can helium be liquid at absolute zero, given the Third Law of Thermodynamics?

I learned recently that Helium is a liquid even at 0K. Doesn't that mean that it still have some entropy? If so, does it not violate the postulate of thermodynamics that states that entropy must go to 0 as temperature goes to 0?


Determining whether $f(z)=\ln r + i\theta$ (with domain $\{z:r\gt , 0\lt \theta \lt 2\pi\}$) is analytic

Define $$f(z)=\ln r + i\theta$$ on the domain $\{z:r\gt , 0\lt \theta \lt 2\pi\}$.   This domain is just a punctured disk of radius $\ln r$, correct?  How does one determine whether this is analytic, I can't see how I would take the CREs  $$u(r,\theta) = \ln r$$ $$v(r,\theta) = \theta.$$  Should I convert this back to $x+iy$ form and proceed? How can I do such a thing with what appears to be a punctured open neighborhood?  How do I show that the function is analytic and find its derivatives?


How to create a TeX command for tower functions?

Could you please explain how to define a command \tower{<1>}{<2>}, whose first argument is to be the basis (and the exponent) while the second the number of its repetitions in successive exponentiations. To be more precise, for example \tower{2}{4} and  \tower{3}{5} are to be, respectively:    I am particularly interested in pure TeX code.   The answer linked above applies \numexpr command, which (as percusse wrote below) is from etex inventory. So could you please point to these plain TeX commands which should be used to construct a suitable plain TeX counterpart of the linked solution. I am not asking for a full code, but for some hints rather.


"Due to" is used on a very wide scale as "because of" but some colleagues and friends pointed out to me that this is wrong and "due to" should be used "caused by"...my question is that in the best publications and newspapers I see "due to" as "because of"...is it a matter of style or there is a linguistic rule behind it?


Bibliography: latex error something's wrong--perhaps a missing item

I got always the error "latex error something's wrong--perhaps a missing item" in the two first items of my bibliography. In the output, the first item is not taken and the second one has two reference as you can see on this screenshot:    This is a code snap of the bibliography:  \phantomsection               \addcontentsline{toc}{chapter}{\bibname}  \bibliographystyle{bib/bmc-mathphys}   \begin{thebibliography} \bibitem{b1} .....  \end{thebibliography}


My DSLR camera (with its lenses) got stolen and I want to buy a digital camera: more precisely, a mirrorless camera. I would like to make:   street photography above all head shots, full body shots, panoramic shots, travel shots some effects such as panning, light-painting, infrared photo and high-speed photos.    I have a model in mind, but I won't write it here because I understand that's frowned upon. Sensor must be APS-C. Any suggestions how could I make up my mind about which camera to buy? It would be ok to spend more on the body and buy only lens for now, postponing the purchase of the second one to a later time.  Also, it's been many, many years since I last bought a camera, so any advice on which lens to buy together with the body would be appreciated. Again, I understand you cannot recommend a specific set, but suggestions such as focal lenght, f-ratio, etc. would be great.  EDIT: I'm not sure whether my question is an exact duplicate of the mentioned question, because I specified the applications: the other question is more open-ended (it's about "my first mirrorless camera", but I'm specifically looking for a street-photograpy camera, APS-C, capable of high-speed photos, so maybe that translates on some requirements on the lens? or only the motor?).


I want to convert string to byte array like below:   If I have a string:  String str = "0x61";   I want it as:  byte[] byteArray = {0x61};   Any idea?


How to display the following matrix in texmaker?

I want to display the following matrix in texmaker. please suggest.


Make a field required on yes/no dropdown javascript

I have a dropdown which has a value of "Yes" or "No." I have a field that is required if the user selects "No" but even if I choose "Yes" the field still wants a required input. I am using jquery to achieve this but it is still not working. My code is below. <script type="text/javascript">   $('ddlBlueStake').change(function () {     if (this.value == 'No') {       $('txtBlueStakeComm').prop('required', true);     } else {       $('txtBlueStakeComm').prop('required', false);     }   }); </script>  On my field I am calling required="true" <asp:TextBox ID="txtBlueStakeComm" runat="server" TextMode="MultiLine" required="true" CssClass="required"></asp:TextBox>  Any help would be appreciated.


Copy / Put text on the clipboard with FireFox, Safari and Chrome

In Internet Explorer I can use the clipboardData object to access the clipboard. How can I do that in FireFox, Safari and/or Chrome?


Are user names that represent domains allowed?


When I create a new object and I go to the options window that pops up to modify the object in the bottom left of the screen, the window completely disappears the moment I left click on any value in that window to change it.  It used to work fine. I have restarted both program and computer.


Distribution of the minimum of two uniform random variates

Suppose $X,Y\sim U(0,1)$ are iid random variables and $Z=\min(X,Y)$. Find the pdf and expected value of $Z$.   I've worked this out before when $Z=\max(X,Y)$, but I can't even start here with the maximum replaced with the minimum. Any help?