How to get the program to read a set of integers from an input file. The goal is to store them in an array and then display greater values than input. Also, Also, create a method called greater_than_n() that accepts an integer array and an integer n. The purpose of this method is to display numbers greater than n  import java.util.Scanner; import java.io.*; public class Lab5 // File Name{ public static void main(String[] args) throws IOException {     Scanner userInput = new Scanner(System.in);     File Integers = new File("Integers.txt");      Scanner inputReader = new Scanner(Integers);       String line = inputReader.nextLine();      System.out.print(line);      inputReader.close();       System.out.print("Enter an Integer: ");      int userAction = userInput.nextInt();        System.out.println("The numbers in the input file that are greater than " + userAction + " are: ");      for (int index = 0; index < Integers.length; index++)      {         if(Integers[index] > userAction)         {             System.out.print(Integers + " ");         }     } }   }

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


Say I want to mention an author and their work, i.e. The Beatles—Abbey Road or Herman Melville—Moby Dick, which dash should go betwixt the two?  This question has been marked as a possible duplicate of  However, my question is very different as I want to attribute a work, not a quote. The dashes are used quite differently in the opposing scenarios.   What can be inferred from the other question is that em dashes are used for quote attribution.

If I’m citing a poem or quotation, what kind of dash precedes the author’s name? For example:  This Business of Printing; which I am heartily tired of, and repent I e’er attempted....  —John Baskerville  Should this be an em dash, an en dash,  or something else? And should there be a space between the dash and the author’s name?


I'm working on a chat-bot, however before I can do so, I need to understand the English language a lot better, in order to make the bot understand. Say I have 'The quick brown fox jumped over the lazy dog,' I have the adjectives quick, brown, and lazy, and two nouns, fox and dog. That makes a complete sentence, however how can I identify a sentence assuming I only know the structure of the English language, and punctuation, but not what the words are (yet)?  Alternatively, I COULD get a dictionary library to find the type of word each word is individually, and format it such as 'The ADJ ADJ NOUN VERB(past) over the ADJ NOUN' and go from there, however then I need to translate 'the' and 'over the' to a readable format.  Is there any type of English 'equation' for formatted sentences which I could use? Potentially in a RegEx expression of sorts?

I am studying English in Korea.   All my friends and I are studying about 'sentence patterns'  Sentence patterns, said in here, are S+V, S+V+C, S+V+O, S+V+I.O+D.O, S+V+O+O.C.  But my teacher said these 5-sentence patterns are not perfect in grammar. But  because we don't use English by mother language, they will be helpful for understanding English.  Then, I came up with something.   Is sentence patterns used everywhere? (like U.S.A, U.K, Australia, anyother country where people use english by their mother language?)  I really wonder.


I have been following   I have a dedicated server and in case I have to restore the whole server on a new machine, I'm practicing using a virtual machine in vmware.  I've managed to restore all the files by doing an untar of the backup. However I can't get apache to start:   could not reliably determine the server's fully qualified domain name using 127.0.1.1 for servername   and   The Apache error log may have more information   The problem is that there are no logs since I've excluded them from the backup.   Do I need to first install Apache and then untar the backup ?   Is this the proper way to restore the server ? I have some doubts because things like ip address and host name would be different if I create a new dedicated server, so there is potentially a significant number of files that would need to be updated. Is there a recommended way to do that?

When I restart my Apache server using the command  sudo /etc/init.d/apache2 restart   I get the following error:  Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName   Is the server using 127.0.1.1 instead of 127.0.0.1? What causes this error?


Is there a way to block all numbers from an area code but keep one number unblocked. I see applications for blocking unwanted calls but nothing on saving a number from being blocked on iPhone.

Recently I have been getting a few unwanted telemarketing calls, all coming from the same source. Each number though is different at the end.  For instance, if the numbers to be blocked are:    123-4567 123-7642 123-8643   It would be convenient for the future to simply block with a wildcard, such as:   123-*   Is this at all possible?


I am using Ubuntu 14.04, and run a partial upgrade via Update Manager. This resulted in removing VLC.    I've tried reinstalling using sudo apt-get install vlc but got this error:     Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created or  been moved out of Incoming. The following information may help to  resolve the situation:   The following packages have unmet dependencies:  vlc : Depends:    vlc-nox (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not  going to be installed           Depends: libavutil53 (>= 6:9.1-1) but it is not installable           Recommends: vlc-plugin-notify (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not going to be installed           Recommends: vlc-plugin-samba (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not going to be installed    E: Unable to correct problems, you have held broken  packages.   I've tried the solutions mentioned  (purging vlc) and  (adding the stable-daily ppa) but none of them worked, still getting the same error.  What can I do now?   Updates     Tried sudo apt-get install -f and then installing vlc, still the same results.   Tried the solution from the other question, and after trying several suggestions with no succes, I selected the one that offered to install the most of the packages. VLC was installed but not properly, as I am getting this error now   VLC media player 3.0.0-git Vetinari (revision 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) [000000000243c118] core libvlc error: No plugins found! Check your VLC installation.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I had an interesting conversation with CuriousOne the other day about the question . I thought that wave-particle duality existed, CuriousOne thought it didn't (whether CuriousOne thought this wasn't true for both light and matter, or just matter I'm not really sure). Some of the comments were really interesting, and I wanted to know what some of the physicists here thought.   The comments on the question are just below the main question, and are just below my answer to the question (now moved to chat). Please don't close this with "not enough research" as the reason, I did look into it, but some of CuriousOne's comments left me kind of confused.   In terms of people thinking this is a duplicate: I am asking whether there is experimental evidence for electrons having a wave-particle duality (this duality being like the one light has) and whether the double-slit experiment is an example of experimental evidence for this.    Question:  Was de Broglie's hypothesis that electrons  (and other matter) have wave-particle duality correct? Does the double-slit experiment prove this, or have anything to do with this? What is some experimental evidence for de Broglie's hypothesis?  Thanks!

I often hear about the wave-particle duality, and how particles exhibit properties of both particles and waves. However, I wonder, is this actually a duality? At the most fundamental level, we 'know' that everything is made up out of particles, whether those are photons, electrons, or maybe even strings. That light for example, also shows wave-like properties, why does that even matter? Don't we know that everything is made up of particles? In other words, wasn't Young wrong and Newton right, instead of them both being right?


I asked myself this question, to which I think the answer is "yes". One reason would be that an invertible matrix has infinitely many options for its determinant (except $0$), whereas a non-invertible must have $0$ as the determinant.   Do you have another approach to this question, in terms of probability for example?

Given a matrix $A_{n \times n}$, which has elements $a_{i,j} \sim \mathrm{unif} \left[a,b\right]$, what is the probablity of $\det(A)$ being zero?  What if $a_{i,j}$ have any other distribution?  Added: Let's assume an extension of the about problem; What is the probability of, $\mathbb{P}(|\det(A)| < \epsilon ), \; s.t. \; \epsilon \in \mathbb{R} $ ?  Thanks!


I am not entirely sure if this is unique to the beamer class, but I am running into a plethora of errors with a variety of biblatex commands when I use the ieee style (I am relatively sure that it's a feature of the ieee style because many (including authoryear-comp) seem to work fine).    Some commands I can't seem to get working with the aforementioned combination of ieee, and beamer biblatex:     \cite{} works intermittently (depending on my theme) adding \printbibliography breaks the success of cite when it was part of a compatible theme *** parencite compile fails *** fullcite compile fails *** there was a redefinition of some commands in the answer to this question:   that I tried to implement because fullcite was one of the first commands I recognized wasn't working under the ieee style and i thought the custom chicago style might have had a similar underlying problem, but I don't think thats the case.   *** only worked with  authoryear-comp, beamer, and biblatex  Skeleton MWE:  \documentclass{beamer}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib}     @misc{A01,         author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},         year = {2001},         title = {Alpha},         url = {https://tex.stackexchange.com/q/12806/510},     } \end{filecontents}  \usepackage[backend=biber,style=ieee]{biblatex}  \addbibresource{\jobname.bib}  %\AtEveryCitekey{\clearfield{title}} %\AtEveryCitekey{\clearfield{url}} %\AtEveryCitekey{\clearfield{doi}}   \setbeamertemplate{bibliography item}{}% remove article icon:  https://tex.stackexchange.com/questions/53127/removing-document-icons-from-a-bibtex-bibliography-in-beamer  \begin{document}  \begin{frame}      Text \cite{A01}      %Text \fullcite{A01}  \end{frame}  \begin{frame}      \printbibliography  \end{frame}  \end{document}   This question is likely the first in what will be a series of questions as I endeavor to create a biblatex solution to implement custom compressed-full inline text citation in a beamer presentation.

I have heard rumors that you can compile documents online, and more specifically that Google has a free online compiler, but I have never been able to find any. Is there a way to compile documents online, so that I can write and compile documents even if I don't have a TeX distribution installed on my computer?


I have proven that in $\mathbb F_{p^2}^*$ exists an element $\alpha$ with $\alpha^8 = 1$.      Let $f(X) := X^4+1 \in \mathbb F_p[X]$. How can I prove that $f$ is reducible over $\mathbb F_p$?    Has $f$ a zero in $\mathbb F_p$ ?

How to show that $x^4+1$ is irreducible in $\mathbb Z[x]$ but it is reducible modulo every prime $p$?   For example I know that $x^4+1=(x+1)^4\bmod 2$. Also $\bmod 3$ we have that $0,1,2$ are not solutions of $x^4+1=0$ then if it is reducible the factors are of degree $2$. This gives that $x^4+1=(x^2+ax+b)(x^2+cx+d)$ and solving this system of equations $\bmod 3$  gives that $x^4+1=(x^2+x+2) (x^2+2x+2) \pmod 3$. But is there a simpler method to factor $x^4+1$ modulo a prime $p$?


As can be seen below, I am trying to figure out how to remove big spaces in the BibTeX based bibliography when URLs are used. I have already checked similar questions on tex.stackexchange but to no avail.  The below example also shows that this issue is evidently caused by the associated URL.  Can anyone provide me with an easy fix for this problem?  Minimal working example:  Document:  \documentclass[11pt,a4paper]{article} \usepackage{a4wide} \usepackage[breaklinks]{hyperref}  \begin{document} \pagenumbering{arabic} \setcounter{page}{1}  \cite{McL10a} \cite{McL10b}  \bibliography{references} \bibliographystyle{alphadin} \end{document}   .BibTeX-File:  % Encoding: UTF-8  @Electronic{McL10a,   author    = {G. Harry McLaughlin},   year      = {2010},   title     = {SMOG - Simple Measure of Gobbledygook},   url       = {https://web.archive.org/web/20100415194430/http://webpages.charter.net/ghal/SMOG.htm},   timestamp = {2010-04-15}, }  @Electronic{McL10b,   author    = {G. Harry McLaughlin},   year      = {2010},   title     = {SMOG - Simple Measure of Gobbledygook},   timestamp = {2010-04-15}, }  @Comment{jabref-meta: databaseType:bibtex;}   Output:    Edit1: @davidpurton - Using \Urlmuskip=0mu plus 4mu fixed the spaces in the title, but created new spaces in the url itself.

This question led to a new package:      I wish to typeset some relatively long URLs in a piece of text, and when I use \url{..}, the resulting text does not respect the margin boundaries that govern the main text body, instead going all the way to the edge of the paper before wrapping around.   For reference, my preamble looks like this:  \documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{fullpage} \usepackage[pdftex]{hyperref}   and example of the url I'm including is:  \begin{itemize} \item Some text  \url{very-long-url} ... \end{itemize}   I'm compiling using pdflatex, although I doubt this makes a difference.


How do i get an object to shoot out an object that is shooting out objects with the particle system.

In a scene with two particle system configured as boids and boids brain set to fight, one swarm attacks the other. I would like to emit child particles as lines (laser or something) to visualize some fighting action. I couldn't find a way to setup the line emitting particle system, either they are created from the plane or further cones will be added. Is there a way to do this as I saw on a  but I didn't get the trick? Blend file   At blendersushi  the author says:  PARTICLE INSTANCE MODIFIER > PARTICLES With this stacking thing, we can now pretty much emit Particles from emitted Particles, > if you know how to set it up. Not very obvious, but basically you Instance some meshes > (using Instance Modifier) and then add Particle System to the object with Instance > Modifier. Make sure you have "Use Modifier Stack" turned on.  But I can't get this to work.


A few days back I deleted one audio file accidentally. I created that file by recording using the application Asus sound recorder. That file had the extension of .3gpp or .wav. I'm working on Android lolipop.  Also, I would prefer a solution that doesn't require rooting my android device.

I just deleted a file on my Nexus S that I really need back. (It was actually part of an app using a sqlite database that did a drop table when upgrading to a new version.)  Presumably I need to root the phone first (which I hear is easy on Nexus phones) but am I in a catch-22 here? Namely, does rooting the phone mean wiping/overwriting the partition where the data lives?  If not, what do you recommend for data recovery tools? Presumably the file was just unlinked and not actively overwritten (per usual when "deleting" a file) so technically the data must be there...


In an app I'm working on, I'm trying to target a specific dynamically generated element in a list of dynamically generated elements (search results).   Each element has a button with a generated ID (primary key in the database).   I've tried using this article: , but it does not fit my situation.   HTML code:  <div id="search-result">  //example of generated element  <div>   username(<user_id>)   <button id="<user_id>">Uitnodigen</button>  </div>  //end of generated element </div>   I have already managed to select the generated element using  Jquery:  $("#search-result").on("click", "button", function(event)  {  user_id=event.target.id;   $("#search-result").on("click", "button", function(event)  {   user_id=event.target.id; });   Yet when I want to call on the element, for instance using:  $("#search-result").find("user_id").html("Loading..."); //or $("#search-result").on("click", "#user_id", function(event)  {  //code });   But both solutions don't work. The .find() function cannot find dynamically generated elements. The .on() function requires an event, yet the event has already been fired previously.   Would there be an alternative to .on() that does not require an event, or an alternative to .find that can find dynamically generated elements. Or perhaps a different solution?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have the following JavaScript structure:  obj = [    {       "patient_category_id":1,       "patient_category_alias":"He",       "patient_category_name":"Hello",       "translate_id":null,       "active":1    },    {       "patient_category_id":2,       "patient_category_alias":"Hi",       "patient_category_name":"Hilo",       "translate_id":null,       "active":1    }];   I want to remove translate_id and active, then insert created, like this:  obj = [    {       "patient_category_id":1,       "patient_category_alias":"He",       "patient_category_name":"Hello",       "created": 'xxxx'    },    {       "patient_category_id":2,       "patient_category_alias":"Hi",       "patient_category_name":"Hilo",       "created": 'xxxx'    }];

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


This is the eps file looks like :   However, when I include in latex, and it becomes:   What happened??? How to prevent this distortion?  Environment:   Ubuntu 17.10, TexStudio, pdfLatex  code:  \begin{figure}[h]%     \centering     \subfigure[blahvlah]{\label{fig:123123}\includegraphics[width=0.433\linewidth]{figures/figure}}     ... several subfigers     \label{fig:rte} \end{figure}

issue also opened at     When I compile this MWE latex file in texstudio, on windows, using MikTex, then view the result using texstudio internal PDF viewer, it shows white streak lines going over the image. These lines are not in the original image.  Also these lines do not show up when I view the compiled PDF file using external PDF reader such as adobe.   Why is that?  The image is also a PDF file. Is it possible to resolve it? It is not a big issue really, since this seems to be just an artifact of texstudio pdf viewer itself, but thought to ask if there is an option to fix this.  Here is MWE  \documentclass{article} \usepackage{graphicx} \begin{document} This is my image, as PDF file, imported using includegraphics  \includegraphics[width=\textwidth]{image}     \end{document}   I put the file image.pdf is on my web page   This is how the compiled PDF looks like inside texstudio PDF viewer    This is how the PDF looks like inside adobe PRO pdf reader    Notice the white lines that show up in texstudio. This is pdfinfo on the image file  pdfinfo image.pdf   Creator:        Wolfram Mathematica 11.2.0.0 for Microsoft Windows (64-bit) (September 10, 2017) Student Edition - Personal Use Only Producer:        CreationDate:   Sat Mar  3 16:13:39 2018 ModDate:        Sat Mar  3 16:13:39 2018 Tagged:         no UserProperties: no Suspects:       no Form:           none JavaScript:     no Pages:          1 Encrypted:      no Page size:      470 x 367 pts Page rot:       0 File size:      99049 bytes Optimized:      no PDF version:    1.5   I am using   TeXstudio 2.12.6 (hg 6632:7777b2b8a906) Using Qt Version 5.9.1, compiled with Qt 5.9.1 R   Windows 7.


Edit: I think this is a duplicate of  .  I wanted to see the code for the hyperref \autoref command, so created this simple document:  \documentclass{article} \usepackage{hyperref} \begin{document} \show\autoref \end{document}   However, in the log output, instead of the code, I see:  > \autoref=macro: ->\protect \autoref  . l.4 \show\autoref   Changing line 4 to \show\section shows the code for \section, as expected:  > \section=\long macro: ->\@startsection {section}{1}{\z@ }{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus .2ex}{\normalfont \Large \bfseries }. l.4 \show\section   How can I get the actual code for \autoref?

After reading another question relating to how to see definitions of commands, I tried:  \documentclass{article} \begin{document} \show\LaTeX \end{document}   But this shows me in my logfile:  \LaTeX=macro: \protect \LaTeX   I just want to see where the \LaTeX command deep down somewhere finally says "OK, make the 'L' big, then make a little raised 'a,' then ..."


By the logic of the wave speed equation, shouldn't a 1000 Hz sound travel twice as fast as a 500 Hz sound? I know it doesn't, but why not?

A sound wave is essentially air particles oscillating parallel to the direction of travel of the wave.  We learnt that $v = f\lambda$, where $v$ is the speed of the wave, $f$ is the frequency of the wave and $\lambda$ is the wavelength of the wave.  Suppose the air particles oscillate with a frequency of $f_{particle}$. Is there any relationship between $f_{particle}$ and $v, f, \lambda$ of the entire sound wave?   I thought about this because intuitively, if the air particles vibrated faster, then the wave should travel faster, but I am unable to come up with any formula that describe this relationship (if it is even true!).


Is it possible to use the present perfect to describe an action that happened earlier today and lasted for some time? As in:  I've slept for 16 hours today and that alone made me happy. I've been on hold for four hours today! You just lost a frequent customer.  Wouldn't the simple past be more appropriate here, since these actions took place some considerable amount of time before the moment of speaking and are not quite linked to the present? During my reaserch I only got more confused, as I've even encountered sentences like:  I've been playing the guitar for two hours today.  Which, I believe, is not correct at all?

I am very much confused with two aspects which are perfect aspect and present perfect continuous.  From the sentences below I am not sure what to use..  Perfect aspect:     I've lived here for ten years.   Perfect Continuous aspect:     I've been living here for ten years.


I have a mobi file, and want to convert it to a pdf file. I tried several online conversion websites, but couldn't convert it. Can you help me? Thanks! Here is  to the mobi file.

I have a Hanlin V3+ e-book, unfortunately it crashes too often when reading mobi files, so I want to convert them first into pdf, and then read pdf on V3+. Is there any tool for converting mobi files to pdf files? Thanks.


This question was originally asked in the 1988 IMO.  It has been answered many times and in almost as many ways.  I have not been able to find a complete and logical set of solutions this problem.  Two solution sets are known.  1) K=B^2,A=B^3.; &   2) K=M^2/4,B=M^3/8 .  I know how Set 1) was derived. How was Set 2) derived?

Let $a,b$ be positive integers.  When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square.    Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.)  Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation.  WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root.    Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class.    Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German.  I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance.  I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English.


I'm trying to apt-get -f install on my Ubuntu 12.04 server. I get the following error message:  After this operation, 157 MB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 122731 files and directories currently installed.) Unpacking linux-image-3.5.0-34-generic (from .../linux-image-3.5.0-34-generic_3.5.0-34.55~precise1_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-34-generic_3.5.0-34.55~precise1_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.5.0-34-generic': No space left on device No apport report written because the error message indicates a disk full error                                                                               dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-34-generic /boot/vmlinuz-3.5.0-34-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-34-generic /boot/vmlinuz-3.5.0-34-generic Errors were encountered while processing:  /var/cache/apt/archives/linux-image-3.5.0-34-generic_3.5.0-34.55~precise1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   My primary disk isn't full - however, my boot partition is only ~100MB. Is apt-get trying to install stuff to /boot? It does mention trying to do something to ./boot/vmlinux[...]   I get a longer but eventually similar error trying to apt-get -f upgrade as well. What's going on?  uname -r yields simply 3.5.0-31-generic dpkg -l | grep linux-imageyields this:  ii  linux-image-3.5.0-28-generic      3.5.0-28.48~precise1         Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii  linux-image-3.5.0-30-generic      3.5.0-30.51~precise1         Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii  linux-image-3.5.0-31-generic      3.5.0-31.52~precise1         Linux kernel image for version 3.5.0 on 64 bit x86 SMP iU  linux-image-generic-lts-quantal   3.5.0.32.39                  Generic Linux kernel image   Which I'm guessing means I have a certain number of kernels that I could purge?  But when I try to apt-get purge, it asks me to run apt-get -f install because of an unmet dependency...  And yeah, I checked disk space and /dev/sda (which is /boot/) is 100% full. This install has been running ~40 days total, and has been booted once (today)I I did some research before deciding on a /boot size, and 100MB seemed to be a pretty reasonable size. What's going on?  I tried running apt-get clean, autoclean, autoremove, and manually purging a given kernel. I keep getting    linux-image-generic-lts-quantal : Depends: linux-image-3.5.0-32-generic but it is not installed E: Unmet dependencies. Try using -f.

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


I am a US citizen. I entered the UK on November 2016, and after my 3 months were over in the UK, I traveled to Spain for another 3 months. I am now in the United States since May.  Because I have been in Europe for 6 months, when is the earliest date I can legally return to England on a tourist visa?

I am a US citizen and have recently visted the UK  with simply a passport which allowed me to vist for 6months I have heard rumors that I am obligated to stay in the US for a Equal amount of time that I have visited the UK before I am able to return, but I am struggling tour no any proof of this obligation .. Am I missing somthing or is it simply not true


I am doing a few courses on Coursera and youtube, while watching the lectures I usually take some notes, adding extra explanations and examples on things that I found difficult to understand. Now, I am thinking that I can clean them up a little and post them on my website, but I don't know if that would be considered plagiarism or otherwise inappropriate. If I do post anything I will properly cite the course I am referring to and not post any quiz/assignment questions or answers, but also I won't really be adding any original work of my own, just a condensed summary and maybe some additional examples that I found useful from other sources. Would something like that be a good idea?

I am considering to create a wiki/blog for most of my study notes that I have made or taken digitally.  Also, for the handwritten and rough ones I am thinking about storing them in my GitHub repository.  Is this a good idea? How do professionals in academia and PhD students organise their notes?  Also, should I keep my notes publicly available?  Edit: The main purpose of keeping my notes public is to have them readily available and searchable of myself and my immediate peers in college. If that benefits someone else, I will be more than glad to have helped.   Update regarding having a blog/wiki: I was thinking about having stuff regarding my take on a certain topic or similar rather than just straightaway putting mugged up lecture notes. (as I mentioned in a comment)  So basically, as I go along a certain topic whatever interesting I find, I post  it. Also I will put in links to papers, books and other interesting literature on the topic that might be helpful while studying the topic. This seems easier to deal with and also serves as a way to track my current interests and/or workflow.


The game gives me the ability to provide a gun at an altar, to dead heroes. Are there any bonuses of this?

I found this statue on chamber three. What does it do?    Are there other kinds of statues/shrines what do they do?


This is related to this question:  Let $A$ be a complex square matrix. In one of the answers, they used eigenvalues of $A^2$ to calculate eigenvalues of $A$. I have a question in terms of this. We can easily show that if $\lambda$ is an eigenvalue of $A$, then $\lambda^n$ is an eigenvalue of $A^n$. So, in set notation, If $\{\lambda_1,\cdots \lambda_k\}$ is a set of eigenvalues of $A$, $\{\lambda_1^n,\cdots,\lambda^n_k\}\subset \{\textrm{Set of eigenvalues of }A^n\}$ holds. My question is, does $\{\lambda_1^n,\cdots,\lambda^n_k\}=\{\textrm{Set of eigenvalues of }A^n\}$ hold? If so, how can we prove it?

Theorem 13.9 in these  is the polynomial spectral mapping theorem:     Theorem 13.9 For a polynomial $p$ we have $\sigma(p(T)) = p(\sigma(T))$.     My questions:   First direction: Why would $q(T) (p(T) - p(\lambda) I)$ be an inverse for $T - \lambda I$? Update: @RobertIsrael said that instead $(p(T) - p(\lambda) I)^{-1} q(T)$ should be $(p(T) - p(\lambda) I)^{-1}$ be? According to the lines in the proof above, we have $$ (p(T) - p(\lambda) I)^{-1} = ((T - \lambda I) q(T))^{-1} \overset{?!}{=} q(T)^{-1} (T - \lambda I)^{-1}, $$ but as $\lambda \in \sigma(T)$ by assumption, $(T - \lambda I)^{-1}$ doesn't exist, right? For the second direction: Why does $x_i \in \sigma(T)$ imply that $p(x_i) - \mu = 0$? I thought that $x_i \in \sigma(T)$ only implies that $T - x_i I$ is not boundedly invertible. Since $\mu \in \sigma(p(T))$ we have that $p(T) - \mu I = c \prod_{k = 1}^{n} (T - x_i I)$ is not boundedly invertible but how does that help?   In both statements there seem to be a notion of "a product of operators is not invertible iff all factors aren't invertible", but how can that be true? Consider i.e. shift operators on a sequence spaces such that $ST = I$, i.e. the left and right shift operators, then the above mentioned notion doesn't hold, right?


I am making a text that consists of 4 chapters and I add parts to it, and I would like to see text in the parts as an introduction, as I introduce text to the parties?, Thank you

I am writing a report divided into parts. I would like to write a short description of each part on the same page as the part headline. When I just write:  \part{Hello} Hello there...   The text "Hello there.." skips to the next page instead of the same.  Can you help me?


How to get the Pixel Data of  UIimage after scaling and moving,I wan to get the CGImage Pixel Data and then get the UIImage from CGImage Pixel Data.How can we do this?.

I have a UIImage (Cocoa Touch). From that, I'm happy to get a CGImage or anything else you'd like that's available. I'd like to write this function:  - (int)getRGBAFromImage:(UIImage *)image atX:(int)xx andY:(int)yy {   // [...]   // What do I want to read about to help   // me fill in this bit, here?   // [...]    int result = (red << 24) | (green << 16) | (blue << 8) | alpha;   return result; }


I am doing a paper on famous planar curves and one of them is the Euler spiral or cornu spiral. The only representation of this curve is over the Fresnel integrals, but how do I plot the Fresnel integrals in LaTex.

I would like to draw something like this:    The circle in the center is not connected to the spiral, but the spiral gets arbitrary close to the circle.  A problem why I can't draw this is that I don't know how to describe this mathematically / formally.   I have found this one:  \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz}  \begin{document} \begin{tikzpicture}     \draw [domain=0:30,variable=\t,smooth,samples=100]         plot ({\t r}: {0.005*\t*\t}); \end{tikzpicture} \end{document}   but it seems not to get closer to a fixed size circle in the center.   looks similar to what I'm looking for, but I only need one spiral.  Background of my question  I'm currently studying geometry and topology. Sadly the professor does not provide a script, so I write one by my own to make studying easier for other students (see  with source files and compiled pdf). The space that is described by the spiral and the circle is connected when you have a definition that makes use of $\varepsilon$-environments, but not connected when you make use of a definition that demands the existance of a path.


I imported an .obj model of my character from zbrush into blender.  After import I joined all the different objects using Ctrl+J and started rigging, all went well until I saw that the deformation cuts the object at the strands where they were joined while animating.   Any advice on how I can make the character into one piece so that it doesn't cut or separate?

As I attempt to complete a "Walk cycle" with my model, the mesh at the pants line separates from the skin as the model moves or as I rotate the controls. This happens in many places on my model and it reveals the model interior. It is a one piece mesh, though, so I don't understand why this happens. Is this caused by weight painting problems? How can I fix this?


I'm trying to install Ubuntu on a system that is not solely mine so I want to install Ubuntu alongside the existing Windows system.  I already tried to "Alatnen" [unclear to the editor] but I erased all data on the hard drive.  I want a way to install Ubuntu alongside Windows on another partition.  How should I proceed

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


For my thesis, I want to mention that Apple Pay is often stylized as  Pay, but the compiler warns me that this is an unknown character. It outputs Ô£ø. I have found that this symbol is encoded as \uF8FF.  How can I put this so that it outputs the apple symbol?

Is there a standard way to typeset the special symbols of the Apple Mac keyboard? That is, the curly rectangle ⌘ and the others?  If there is none, what would you suggest as workarounds?


I'm scraping a webpage and need to use dataset to get the information I need. The dataset that I can't handle is formated like <... data-info='["a","b","c"]'>. I can extract the dataset and get an array containing eg. info: "["a","b","c"]" but I can't make it an array to get the data from it.  From what I understand dataset always returns strings and in this case the string is formatted as an array. I've tried using the split() function but can't seem to make it work the way I want to.  // myElements is an array of the elements i want by // const myElements = [...querySelectorAll('myQuery')] const myObj = myElements.map(a => ({ name: a.textContent, info: a.dataset.info }))   This gives me an array of objects {name: "Some name", info: "["a","b","c"]"}. Since info is a string I can't use it the way I want to, so I tried:  const myNewObj = myObj.map(a => ({     name: a.name,      info: a.info.split(/(?:\[")|(?:",")|(?:"\])/g) }))   This comes close to what I want with {name: "Some name", info: ["","a","b","c",""]}  The problem is that the first and last entry is empty.  I could add .filter(a => a ? true : false) which works, so by writing this question I've solved my problem. But I find the resulting code messy and would love your input on better ways to solve it!    Solution (see linked question):  const myObj = myElements.map(a => ({ name: a.textContent, info: JSON.parse(a.dataset.info) }));

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I'm new to using Unity (2019.30a2) and am currently learning by watching Brackey's (youtube) ""    At 6:58 he is able to rearrange his layers easily.  On my hand, I can create but am unable to change the order of the layers.    Looking at other questions on similar subjects hasn't provided me with a solution yet.  I'm currently working around it but feel this will hinder me in the future.   The screenshot of the unmovable layers is included below:

I'm trying to rearrange my layers in Unity but I can't seem to drag them. When I try to do this I'm in edit layers under the heading sorting layers and I click on the = symbol and try to drag it but it won't move. I also tried restarting Unity twice but it won't resolve the problem.  Could someone help me with this?


This question here  says you can only standardize or center variables after transforming them into log. Because my variables are in different units, my coefficients vary widely from > 10,000 to less than 0. I need to use the scale function on R, but because some of my data is negative, it's impossible to take log of some of the variables. Can I standardize the values without log transformation first or is there any other way to standardize the units?

Because my dependent variables in a multiple linear regression model are in different units, some coefficients are > 10,000 and others less than 0. I need to standardize them by using the scale function on R, but because some of my data is negative, it's impossible to take log of some of the variables which I need to do before standardizing. Is there any other step I can take? Can I standardize without log transformation first?


From Isaac Asimov (Little Lost Robot)     WHEN I DID SEE SUSAN CALVIN AGAIN, IT WAS AT the door of her office   Is this a grammatic error? Past simple - WHEN I SAW SUSAN

Which tense are sentences like:   "When people do make changes good things happen" "Even if monkeys can play an important role, their actions can pose risk to the general public"


Is there a downside to starting every java program with all the imports? This would prevent me having to recall which import I need.  Could I simply start the java code with   import java.util.*; import java.io.*; //etc    What is the downside to coding this way?

It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?


I need to replace test word up to next comma in a string. For example the string is "abc test xy, tmy test 1, vks , csb"; The output after replacement should be "abc , tmy, vks,csb". Removed test followed by any character or number up to comma.  I tried the following code but did not work.  import java.sql.Timestamp; import java.time.Instant; import java.util.regex.Matcher; import java.util.regex.Pattern;   public class TESTREPLACE {      public static void main(String[] args) {         String str = "abc test   xy, tcs test  1, vks , csb ";          String regex = " default.+\\,";         Pattern pattern = Pattern.compile(regex);         Matcher matcher = pattern.matcher(str);         System.out.println(matcher.replaceAll("\\,"));     } }

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


If $a^6 \mid b^6$, where $a,b\in \mathbb{Z^{+}}$, then does $a\mid b$?    I was thinking of using the Fundamental Theorem of Arithmetic to show that $$a^6=\prod_{i}p_{i}^{6k_i}\quad\text{and}\quad b^6=\prod_{i}p_{i}^{6q_i}$$ And, since $6k_i\leq 6q_i$, $\forall i$, $k_i \leq q_i$ which implies $a\mid b$.   Is this correct?

I would like to show that $a^n \mid b^n$ implies $a \mid b$  I thought I could convert it to congruences and work backwards, but as far as I remember, $a \equiv b \pmod{m}$ implies $a^n \equiv b^n \pmod{m}$, not the opposite, unless $m$ is prime. Is that right?  So I am not sure how to approach this one. Any ideas?  Thanks!


I have an Intel Pentium N3700 at 1.6 Ghz. Am I out of luck with 16.04?  If so, what is then suitable? Please and thanks in advance.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I would like to override the default behavior of the DateTime.ToSting() function so I can add it automatically the CultureInfo.  My final result is that if someone use the function like this:  DateTime.Now.ToString("g");   I can make it work like this:  DateTime.Now.ToString("g", new CultureInfo("en-US"));   It's a multi threaded application in .NET 4 Framework and I prefer not the set it on each thread.

Is there a way of setting culture for a whole application? All current threads and new threads?  We have the name of the culture stored in a database, and when our application starts, we do   CultureInfo ci = new CultureInfo(theCultureString); Thread.CurrentThread.CurrentCulture = ci; Thread.CurrentThread.CurrentUICulture = ci;   But, of course, this gets "lost" when we want to do something in a new thread. Is there a way of setting that CurrentCulture and CurrentUICulture for the whole application? So that new threads also gets that culture? Or is it some event fired whenever a new thread is created that I can hook up to?


How can I make my enemies shoot bullets in intervals?   I already have the enemy shooting bullets, however my problem is that it shoots the next bullet instantly, making it look like a line instead of bullets with gaps between them.   I tried to use gluttimerfunc but it didn't work since it just delayed the trigger of the bullet but once the trigger (bool statement) was set to true, it would shoot the max bullets on screen instantly.

I'm having some trouble simulating bullets in my 2D shooter. I want similar mechanics to Megaman, where the user can hold down the shoot button and a continues stream of bullets are fired but with a slight delay. Currently, when the user fires a bullet in my game a get an almost laser like effect. Below is a screen shot of some bullets being fired while running and jumping.    In my update method I have the following:  if(gc.getInput().isKeyDown(Input.KEY_SPACE) ){     bullets.add(new Bullet(player.getPos().getX() + 30,player.getPos().getY() +  17));   }   Then I simply iterate through the array list increasing its x value on each update.  Moreover, pressing the shoot button (Space bar) creates multiple bullets instead of just creating one even though I am adding only one new bullet to my array list. What would be the best way to solve this problem?


I have seen in Kleppner & Kolenkow that for a rigid body moving with a fixed point on it, the angular momentum about an axis passing through that fixed point is given by the product of inertia tensor and angular velocity. Does that apply for an axis not passing through the rigid body too?

I have been told [Warning: I leave this because it's what I asked and allows to understand the dialogues in the comments, but Azad, whom I thank, has pointed that the formula does not hold in general in the form it is expressed] that the angular momentum of and rigid body with respect to any point $P$ can always be expressed as $$\mathbf{L}_{P}=\mathbf{r}_{cm}\times M\mathbf{v}_{cm}+\big(\sum_im_iR_i^2\big)\boldsymbol{\omega}$$ where $\mathbf{r}_{cm}$ is the position of the centre of mass with respect to $P$, $M$ the mass of the body, $R_i$ the distance of the $i$-th point, having mass $m_i$, composing the body, and $\sum_im_iR_i^2=I$ its moment of inertia with respect to the instantaneous axis of the rotation around the centre of mass of angular velocity $\boldsymbol{\omega}$.  I know that the velocity $\mathbf{v}_i$ of each point $P_i$, having mass $m_i$, of a rigid body of mass $M$ can be see as the sum of a translation velocity of one of its points $C$ plus a rotation velocity around that point: $\mathbf{v}_i=\mathbf{v}_{C}+\boldsymbol{\omega}\times\overrightarrow{CP_i}$. If we chose $C$ as the centre of mass I see that $$\mathbf{L}_{cm}=\sum_i \overrightarrow{CP_i}\times m_i\mathbf{v}_{i}=\sum_i \overrightarrow{CP_i}\times m_i\mathbf{v}_{cm}+\sum_i \overrightarrow{CP_i}\times m_i(\boldsymbol{\omega}\times\overrightarrow{CP_i})$$$$=\sum_i \overrightarrow{CP_i}\times m_i(\boldsymbol{\omega}\times\overrightarrow{CP_i}) $$because, if I am not wrong, $\sum_i \overrightarrow{CP_i}\times m_i\mathbf{v}_C=(\sum_i m_i\overrightarrow{CP_i})\times\mathbf{v}_C=\mathbf{0}$ since $\sum_i m_i\overrightarrow{CP_i}$ is the position of the centre of mass with respect to itself, which is $\mathbf{0}$.  How can it be proved that $\sum_i \overrightarrow{CP_i}\times m_i(\boldsymbol{\omega}\times\overrightarrow{CP_i})=(\sum_im_iR_i^2)\boldsymbol{\omega}$? I have searched a lot on the Internet and on books, but I find nothing. To give some background of mine, I have studied nothing of analytical mechanics. I find the formula very, very interesting both in itself and because, if the moment of inertia does not depend upon time, $\forall t\quad I(t)= I(t_0)$, the above expression can be differentiated to get the formula of the resultant torque with respect to the centre of mass $\sum\boldsymbol{\tau}_{cm}=\frac{d\mathbf{L}_{cm}}{dt}=I\boldsymbol{\alpha}_{cm}$ where $\boldsymbol{\alpha}$ is the angular acceleration around the centre of mass. I heartily thank you for any answer!    Some unfruitful trials: by using the "BAC CAB identity" as suggested by Azad, whom I heartily thank, $\mathbf{a}\times(\mathbf{b}\times\mathbf{c})=(\mathbf{a}\cdot\mathbf{c})\mathbf{b}-(\mathbf{a}\cdot\mathbf{b})\mathbf{c}$, I can see that$$\sum_i \overrightarrow{CP_i}\times m_i(\boldsymbol{\omega}\times\overrightarrow{CP_i})=\sum_im_i\|\overrightarrow{CP_i}\|^2\boldsymbol{\omega}-m_i(\overrightarrow{CP_i}\cdot\boldsymbol{\omega})\overrightarrow{CP_i}$$which, by decomposing every $\overrightarrow{CP_i}$ into an axial component $\mathbf{A}_i$ and a radial component $\mathbf{R}_i$, whose norms respectively are $A_i$ and $R_i$, with $R_i$ as the distance from $i$ to the axis of rotation, becomes $$\sum_im_iR_i^2\boldsymbol{\omega}+\sum_i m_i A_i^2\boldsymbol{\omega}-m_i(\mathbf{A}_i\cdot\boldsymbol{\omega})\overrightarrow{CP_i}$$but I cannot prove that $\sum_i m_i A_i^2\boldsymbol{\omega}-m_i(\mathbf{A}_i\cdot\boldsymbol{\omega})\overrightarrow{CP_i}=\mathbf{0}$.


I need to show that $\lim_{n\to\infty} (\frac{1}{n^2+1} + \frac{1}{n^2+2}+...+\frac{1}{n^2+n}) = \frac{1}{2}$ by estimating the upper and lower bounds and showing that the two new sequences have the limes $\frac{1}{2}$.  Could you please help me, because I have absolutely no idea on how to start.  Thank you!

I’m having a problem approaching the question. The fact that it’s a limit of a sum is confusing to me.   $$\lim _{n\to \infty }\left(\frac{1}{n^2+1}+\frac{1}{n^2+2}+...+\frac{1}{n^2+n}\right)$$


How reputable is the online journal "Scientific.Net: Materials Science and Engineering"

A colleague and I recently submitted a paper to a journal with an impressive-sounding name, the "International Journal of Artificial Intelligence and Computational Research". According to ,      IJAICR is a referred [sic] journal in the field of computer science, artificial intelligence and soft computing methods.   It was accepted two days after we submitted it. That's too fast. We were suspicious. Although the journal said that all papers are peer-reviewed, we could not see how that was done in two days. Plus, we received no comments from the reviewers. Also, the submission guidelines didn't ask for a "blind" copy (without our names or any references to who we were).   But wait, there's more.  The acceptance letter asked us to send them US$300 to publish it. We did not. We've withdrawn our submission and will submit a new version of the paper to a more reputable journal in the coming months.  How might we make a better choice of respectable journals before we submit next time?


Everytime I type in sudo it says that after it. I tried following others instructions, but it says bash: /etc/host: permission denied.

When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it?


"Like -exec, but the specified command is run from the subdirectory containing the matched file, which is not normally the directory in which you started find.  This is a much more secure method for invoking commands, as it avoids race conditions during resolution of the paths to the matched files." "As with the -exec option, the + form of -execdir will build a command line to process more than one matched file, but any given invocation of command will only list files that exist in the same subdirectory.  If you use this option, you must ensure that your $PATH environment variable does not reference the current directory; otherwise, an attacker can run any commands they like by leaving an appropriately-named file in a directory in which you run -execdir."  When you run the -execdir command using the + method, why does it make you vulnerable to attack if someone puts an aptly named file in your PATH?  Is it because it's possible that that executable will be run instead of the expected executable?  Sort of like in Windows 7 when you replace sethc.exe with a renamed cmd.exe to access cmd.exe from the login prompt, except in this case it's run by find thinking the command it's running is /usr/bin/ls for example, when it's really running something else named ls? If that's the case I guess one just needs to check sum the command and make sure the entire path is specified when running such a command. I suppose the other version with ; would be volunerable to that as well correct?

From the :   -exec command ;     There are unavoidable security problems     surrounding use of the -exec action; you should use the     -execdir option instead.  -execdir command {} +     Like -exec, but the specified command is run from the     subdirectory containing the matched file, which is not     normally the directory in which you started find.  This a much     more secure method for invoking commands, as it avoids race     conditions during resolution of the paths to the matched     files.    What does this mean? Why are there race conditions with running it from the starting directory? And how are these security risks?


I want to vertical align the tan container/text container in the middle. Like this.    I don't want to use the transform: translate method because I want to support IE8

Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin euismod mauris non tellus luctus, ac dignissim arcu tincidunt. Praesent vulputate orci nibh, a egestas mauris interdum vitae. Sed convallis porta dui efficitur interdum. Sed id porta arcu, vitae ultrn porttitor nisi ac placerat vestibulum.

    .container {   width: 100%;   background-color: grey; }  .text-container, .img {   width: 50%;   float: left; }  .text-container {     background-color: tan;   }  .img {   height: 300px;     background: url('https://static.pexels.com/photos/56875/tree-dawn-nature-bucovina-56875.jpeg');     background-size: cover;   }   .clearfix:after {    content: " ";    visibility: hidden;    display: block;    height: 0;    clear: both; }

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


As I understood this option, when I have something like \footcite{test}, ..., \footcite{test}, it should have the same footline and it should not make the footline twice, right? It is not working for me!

I'm using BibLaTeX to handle my bibliography and I want a reference to be placed in a footnote on every page where I cite the same work and have the same number. Also I want to be able to cite the same work on one page several times. The latter could be done by using  from the Joseph Wright's blog. However, it puts a reference in a footnote only once.


The problem is that \obeylines macro is not working while it's inside \def  Compare:  \long\def\linesaver#1{\obeylines#1} \linesaver{ Test1 Test2 }   VS  { \obeylines Test3  Test4 Test5 }   First does not saving newlines, but second does. Why?  Disregard targets i'm trying to reach - consider i'm just trying to understand how exactly tex works under the hood.

I want to change the catcode in a macro, but it seems it doesn't work. Can anyone help me?  \def\A{\catcode`\|=0 |bf{test}}    |bf{test} would not work as expect.


I have problem with this function because i work in Maya and other 3D applications that use this key combination... This option on Ubuntu 11.04 was in "window" section so i could change it to something else to avoid conflicts... where is this located in Ubuntu 11.10?

In Ubuntu 14.04, when you hold Alt and click a window, you can drag it around.  As I understand, you used to be able to disable it through gconf, but Unity doesn't read settings from here any more (hence not being able to change where the window buttons are any more).  There's no setting for this by default, and I can't find anything in Unity Tweak Tool either.  Is there anyway to disable Alt+click window movement in 14.04?


When posting user content from the Stack Exchange Network onto some other websites, it is not possible to be in compliance with the attribution requirements set forth in the Terms of Service.  Examples include:     embedded URL's in non-HTML documents, such as source code   websites that do not allow hyperlinks   websites that `nofollow` all hyperlinks   websites that do not allow URL's in non-obfuscated form   Currently user content from the Stack Exchange Network cannot be used on such websites. Is this intentional, or is this a mistake in the Terms of Service? If the latter, does it need to be changed?

I read the blog post "" by Jeff Atwood. As I understand the post, SE "require[s]" that reusers "Hyperlink directly to the original question", that reusers "Hyperlink each author name", that users use "standard HTML", and that "the links must not be nofollowed." Taken literally, this would mean that republishing substantial portions of a question or answer in any medium other than the web would infringe copyright, as would republishing in web environments that forbid hyperlinks to SE sites. It would end up ruling out substantial quoting in the following situations:  Print, because hyperlinks are impossible. URLs may be printed, but that's like using nofollow. Sites like Everything2, because external hyperlinks are disabled as a spam control measure. URLs may be posted as text, but that's like using nofollow. Several web sites' comment systems, because external hyperlinks are disabled as a spam control measure. They reject any post that contains text that looks like a URL.  What did I misunderstand? Or did SE intend to forbid quoting questions and answers outside the web when it set the attribution policy?


In my last question,  I made a mistake.  The actual circuit seems like this   I am beginner in linear electronics and I am very interested to know how the output current of transistor is being controlled with Vin voltage.  1) OpAmp is being used as Open Loop gain Amplifier ? Vout = A (V+ - V-)  In LtSpice Simulation, when the sum of feedback current through 1 Ohm Sense Resistor and Vin is greater than 6V by almost 0.6V, the output of OpAmp gets saturated at +Vcc and transistor current Ic doesn't change anymore.  2) In case Feedback is providing at inverting terminal from Emitter, I might assume V+ = V- and hence Ve = V-, which solves the problem. In this case, i am not sure if V+ = V- for an opamp, it doesn't come to be true from simulation either.  What would be the relation of output current with input voltage?  Thanks in anticipation.

Hi Folks,  I want to analyse the functionality of following OpAmp configuration which seems to be employed as voltage - current conversion. Positive feedback (This is not a Failure and is intentionally done so !) from current sense resistor 1 Ohm is being fed back to Op Amp and compared with reference voltage +15V while being added to \$V_{in}\$. The error signal is amplified by open loop gain of OpAmp to drive the transistor emitter current. The transistor emitter current is almost equal to transistor collector current.  I would appreciate if someone can add further to my analysis.  $$V_{out} = A \cdot (V_+ - V_-)$$  $$Ie = \dfrac{V_{out} - V_{be}}{R_e}$$  \$I_c\$ is approximately equal to \$I_e\$, voltage at feedback node is:  $$V_c = 15 - I_c$$  \$V_+\$ is again depending on output current \$I_c\$, which can be solved using simultaneous equations.  The problem is, when this circuit is simulated in LtSpice the gain of OpAmp which is mentioned to be 85dB in data sheet as typical value doesn't comply exactly with the output voltage from simulation but only for a small range of input voltages. For different range of input values \$V_{in}\$, only certain values of calculated output voltages \$V_{out}\$ come out to be same as from simulation and few even exceed \$+V_{cc}\$ which is not possible in simulation as it saturates at \$+V_{cc}\$.  It looks as if either the gain of OpAmp varies with different input voltages or my mathematical modelling has errors.  I would like to share your experience generally about the configuration, and any hints about mathematical transfer function from \$V_{in}\$ to output emitter current of NPN transistor.


I am a chess player. Quite often, when I am in a familiar position, I automatically reach out to move a certain piece to a certain square without thinking too much. That's usually the first move that I see and I make it rather "automatically" in a blitz game. But sometimes this automatic way of moving pieces causes me to make mistakes. I need to break this "automaticity", if that is even the right word? Looking up the Oxford Reference-      The ability to perform a task by automatic processing, independent of   conscious control and attention. Strong automaticity is almost   entirely automatic and can be carried out without attention. Partial   automaticity refers to processing that can be performed without   conscious control, but which is performed better with attention.   However, this isn't exactly the sense in which I want to use a word to describe the automatic way I do things. In my case, sometimes the "automaticity" can be a bad and undesired thing and not an "ability". So is there a word for this?

In the  Merriam-Webster dictionary skill is defined as     1.      a: the ability to use one's knowledge effectively and readily in execution or performance      b: dexterity or coordination especially in the execution of learned physical tasks      2.      learned power of doing something competently : a developed aptitude or ability   In Russian there are two words for different kinds of skills, "умение" (umeniye) and "навык" (navyk). The first word designates skill in the above three (1a, 1b, and 2) senses. The second word designates the kind of skill which doesn't require voluntary actions.  For example, a basketball coach teaches a kid to shoot a ball: the coach shows how to put a ball in a hand, how to locate and move an arm, how to use legs, how to release a ball, etc. After few attempts (let's assume that the kid is very talented) the kid is able to execute a shot in the way the coach taught him/her. The kid has acquired a shooting skill in the sense of умение (umeniye), because the kid still has to pay attention to his/her body position, arm movement, releasing technique... But after several days of practice the kid doesn't have to pay any attention to those things, because all these movements are done automatically (unlike, for example, shot selection). So the skill in the sense of умение (umeniye) became the skill in the sense of навык (navyk).  So I'm wondering is there a word in English to designate this notion of skill.    I have considered several options, but I’m not sure of their accuracy. The word ‘habit’ seems like the closest one.  However, the main distinctive feature of the word ‘navyk’ is automatic or involuntary trait of an action, so the English analogue has to have the same feature. To me the main feature of the notion ‘habit’ is an inclination to do something in a particular manner. For example, I could say ‘I have a habit to eat eggs for breakfast’. Habit in this context doesn’t require any skill, while shooting a basketball does. Moreover, I could lose a skill (or even ability) to do something, but a habit could remain, I just won’t be able to satisfy my habit (or it would be more difficult if I lose a skill in the sense of 'navyk').  Update.  The word "skill" could be applied not only to physical activities, such as shooting a basketball, but also to mental activities. For example, we can say “communication skills” or “mathematical skills” etc. And the distinction between the two types of skills I mentioned in the original question is applicable for mental activities as well.  Let me give an example of what I believe is called a spelling skill. For most of the words we use we don’t have to think about how to spell them, because we read or wrote them too often. But in some cases we have to think about the correct spelling by remembering some rules or etymology of a particular word. Here, again, we can distinguish two kinds of skills: first is the one I called “navyk”, and the second one is “umeniye”.  This example illustrates that the notion of muscle memory, which has been offered, doesn’t really fit the concept I’m trying to find a word for.


I attend daily standups with one of our development teams.  On Thursdays, I have a conflict but can attend all other days.  Is there a way to decline all Thursdays going forward, while accepting any other day?    Currently, I decline each Thursday individually, which isn't ideal.  Did a pretty extensive search and found plenty of answers around declining all meetings after specific dates, but nothing on this specific use case. But I'm sure I'm not the only one with this scenario!  I use outlook on both PC and Mac, if that affects the answer.

I have a weekly meeting at which I am the only attendee. It represents something that has to be done at a particular time every Tuesday. When I am out of town and can't do it, I can invite someone else to that instance, which succeeds in getting it on their calendar. However I don't seem to be able to get it off my calendar, which messes up my view of all the things I am doing out of town.    Even though I am the organizer, and do not want to be removed from all the other instances of the meeting, can I somehow be removed from just this one? Failing that, can I arrange for this instance not to appear on my calendar, to make more room for other things?


With  \documentclass{standalone}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture} \begin{axis}[samples=10, domain=0:pi] \addplot {x-sin(x)}; \end{axis} \end{tikzpicture}  \end{document}   I get a plot and an x axis from 0 to pi and labels 0, 1, 2, and 3.  What is the best way to get labels with pi instead of whole numbers on the axis?

How do I make the axis labels use multiples of \pi in PGFPlots?


I asked a question earlier and I received a reply with a minute of posting. It didn't answer my question and I replied to state why it did not answer my question. Within that period someone else had also replied.  The answer was then edited several times but the "edited [time] ago" didn't appear because it had been edited within the grace period. This now meant that the replies looked crazy and irrelevant.  Unfortunately the answer has since been deleted from the thread so I cannot link it to demonstrate.    I didn't know users with 10k rep can see deleted posts. So here's the thread:

When answers are posted within a question's initial grace period, it is possible that further edits could completely change the question (see ""), and render those first few answers incorrect.   Worse yet, nobody is notified that there was a change to the question, except those that are sitting on the page and notice the edit bar pop in. And of those, only those bothered enough to open it in a new window to compare the differences, will see how much was changed.   After the grace period is up, nobody will be able to consolidate why the first few answers actually answered a different question. And the answerers won't know unless someone comments or down-votes (and in the latter case, without context, they still might have trouble understanding, unless they memorized the question's initial state).  Jon Skeet stated it pretty well in  on :     I'd like this to apply to the question, as well as answers. Sometimes I (or others) have added perfectly good answers, but then the question has been changed within the grace period, making answers look foolish without any indication of what's happened.   So this time, my proposal is quite simple:     Once an answer is posted to a question within the initial grace period, a new grace period should start, and the current state of the question should be saved as the first revision. Further edits within the next 5 minutes will be aggregated into a new, second revision.   This will only noticeably affect questions where answers are posted within the grace period and the author of the question makes edits within 5 minutes of the first answer. (Effectively, it would treat it as if a different user made an edit within the author's grace period.) All other scenarios will continue to behave as they do today.  This feature request comes close:    However, the answer suggests a simple change to the wording or a pencil icon (like we see with edited comments), without adding a revision that can be viewed and compared. I don't think this is enough - in some cases it's going to be important to know what changed, not just when.


What is the difference between static and non-static nested class?

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


Alright fairly new to Java and coding in general. I've created a program that reads a .txt file containing the results of several soccer matches and then is meant to output a scoreboard displaying their scores numerically ordered and then alphabetically ordered for tied scores. I have gotten the output so far but can't seem to sort the results by value. Any help would be amazing.  public class Scoreboard {  private static class Results {      public int score = 0;      public void addWin() {         score += 3;     }      public void addTie() {         score += 1;     }      public void addlost() {     }      @Override     public String toString() {          return " " + score;     }  }  public static void main(String[] args) throws IOException {     BufferedReader br = new BufferedReader(new FileReader("C:\\Users\\Jeremy\\Desktop\\ADV JAVA\\SoccerProject\\SoccerScoresTest.txt"));     String line;      Map<String, Results> teamResults = new HashMap<>();     while ((line = br.readLine()) != null) {         String[] data = line.split(" ");         Results team1 = teamResults.getOrDefault(data[0], new Results());         Results team2 = teamResults.getOrDefault(data[2], new Results());         if (Integer.valueOf(data[1]) > Integer.valueOf(data[3])) {             team1.addWin();             team2.addlost();         } else if (Objects.equals(Integer.valueOf(data[1]), Integer.valueOf(data[3]))) {             team1.addTie();             team2.addTie();         } else {             team1.addlost();             team2.addWin();         }         teamResults.put(data[0], team1);         teamResults.put(data[2], team2);     }      Formatter formatter = new Formatter();     System.out.println(formatter.format("%20s %20s", "Team", "Score"));     for (String team : teamResults.keySet()) {         Results teamres = teamResults.get(team);         formatter = new Formatter();         System.out.println(formatter.format("%20s %20s", team, teamres));     } }   }  Current Result:              Team                Score        Liverpool                    1       Tarantulas                    6        FCAwesome                    1            Lions                    4         Grouches                    0 ManchesterUnited                    1   Expected Result:              Team                Score       Tarantulas                    6            Lions                    4        FCAwesome                    1        Liverpool                    1 ManchesterUnited                    1         Grouches                    0

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I have been trying for a while to load the algorithm2e package to the IEEE ACCESS template. Whenever I use the following code, I am getting the error \usepackage{amsmath,amssymb,amsfonts} % \usepackage{algorithm, algorithmic} \usepackage{graphicx} \usepackage{textcomp}  \usepackage[ruled, linesnumbered]{algorithm2e}   \begin{document}   \IncMargin{1em} \begin{algorithm*}[!t]     \caption{Caption}     \DontPrintSemicolon     \Indm          \KwIn{%             Input 1          }%     \Indp     Statement 1 \;  \end{algorithm*} \DecMargin{1em}   \EOD  \end{document}  Error is Argument of \relsize  has an extra }. <inserted text>                 \par  l.23     S          tatement 1 \; Runaway argument?  If preamble \usepackage[ruled, linesnumbered]{algorithm2e} to \usepackage[ruled]{algorithm2e}, above code works well, but following code doesn't compile with other error messages \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} % \usepackage{algorithm, algorithmic} \usepackage{graphicx} \usepackage{textcomp}  \usepackage[ruled]{algorithm2e}   \begin{document}   \IncMargin{1em} \begin{algorithm*}[!t]     \caption{Caption}     \DontPrintSemicolon     \Indm          \KwIn{%             Input 1          }%     \Indp     Statement 1 \;     \If{$a==1$}{         aaa \;     }  \end{algorithm*} \DecMargin{1em}   \EOD  \end{document}  Error is  Paragraph ended before \@algocf@endoption was complete. <to be read again>                     \par  l.27 \end          {algorithm*}

I am using overleaf. When using the algorithm2e package, it gives me bold line numbers prefixed with a "-" symbol for each line. I want to have a line number in small fonts without the "-" symbol. An output pdf snapshot is attached with minimal working code. Thank you in advance. \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{graphicx} \begin{document}      \begin{algorithm}     \DontPrintSemicolon        % enter the algorithm environment     \caption{algorithm}               % give the algorithm a caption     \label{alg1}        %\begin{multicols}{2}                       % and a label for \ref{} commands      %\begin{algorithmic}[1]      \KwIn{         $a=\sum_{i=0}^{n-1} a_i\cdot2^i$,         $b=\sum_{i=0}^{n-1} b_i\cdot2^i$,         $m=\sum_{i=0}^{n-1} m_i\cdot2^i$}     \KwOut {$c = a \times b$ \text{mod} $m$}          $c \leftarrow 0, \quad reg_1 \leftarrow a$\;     $reg \leftarrow 2a$ mod $m \qquad \text {//     \scriptsize Pre-computed value //} $\;     %$N \leftarrow n+2 \quad \quad \quad \text{ //  \scriptsize append two 0's to left of MSB of y //}$\;     $N=      \begin{cases}     n+3,& \text{ if $n \bmod 2 = 0,$ append two $0$ to the left of MSB of $b$} \\     n+2,& \text{ if $n \bmod 2 = 1,$ append single $0$ to the left of MSB of $b$}     \end{cases}     $\;     $N \leftarrow N+1 \qquad  \text{ // \scriptsize append 0 to right of LSB of b //}$\;          \For {$(i=0; i \leq N-2; i \leftarrow i+2)$ }{         \Switch{$(b_{(i+2:i)})$}{             \textbf{when} $ 000 \mid 111 \Longrightarrow v\leftarrow 0$ \;             \textbf{when} $ 001 \mid 010 \mid 101 \mid 110 \Longrightarrow v\leftarrow reg_1$  \;             \textbf{else} $ \Longrightarrow  d\leftarrow reg_2$ \;         }         \tcp {following critical operations are executed concurrently //}         $reg_1 \leftarrow 4\times reg_1 \text{ modulo } m$\;          $reg_2 \leftarrow 4\times reg_2 \text{ modulo } m$\;          $v \leftarrow v \pm d \text{ modulo } m$\;     }     \Return{$v$}\;     %\end{multicols}     \end{algorithm} \end{document}


I want to show that Aut$K_4\cong S_3$, where $K_4$ is the Klein's 4-group. I have shown that there exist 6 automorphsms from $K_4$ to $K_4$. But how to show that Aut$K_4$ is nonabelian?

I'm currently working my way through Harvard's online abstract algebra lectures (if you're interested, you can find them ).  The lectures come complete with notes and homework problems.  Of course, since I don't actually go to Harvard, I can't hand in the homework assignments to find out if I'm doing them correctly.  So I've decided to try to crowd source the grading of my solutions.  I'll post individual questions as I finish them and wait for comments.  I would like to get critiques of not just my reasoning but the style of my write ups as well.  Also, any alternative approaches to the problem would be welcome.  I've looked for forums dedicated to these kinds of OCW courses but have not been able to find any.  This surprises me.  It seems like, with the advent of these free online educational resources, an online meeting place for those who take advantage of them would be a natural offshoot.  So this might be a bit of an experiment.  Unless I'm the 873rd person to post something like this here.  If that's the case, sorry for being so long winded.  Anyway, on with the question.  This one is assigned in the 4th lecture.     Let $V$ denote the Klein 4-group.  Show that $\operatorname{Aut}(V)$ is isomorphic to $S_3$.   (I've moved my solution below to keep this question from showing up in the unanswered list.)  Thanks...


My setup is several VM's, with a local subnet (192.168.10.0/24) Host machine is 192.168.10.1 (br1) (or 10.30.0.7 interface with inet) it runs a DHCP server to assign my VM's their IP's. I don't want to bridge the connection like normal with brctl addif but instead I want the VM's to be able to connect to the internet sharing the host's IP (specifically 10.30.0.1 or interface wg0 (wireguard)) How can I do this with iptables?

I'm still reading the iptables manual page and other documents and  digging around questions and their answers.  This is the problem which arises. When we setup the NAT we use a POSTROUTING rule such as this:  iptables -A POSTROUTING -t nat -j MASQUERADE -o eth0    It seems when a packet hits this chain then an internal host needs to initialize some connection with the internet right? Incoming traffic will route through the same path without hitting the chain? Am I right on this?


In my Astronomy class, I learned that temperature results from the speed of air molecules colliding into your skin. Thus, if the air molecules in the room have a high kinetic energy and thus collide with you at high speeds, your temperature will increase. So how does a breeze of wind, in which I imagine air molecules would be moving very fast (or if they're not moving fast, YOU are moving fast relative to them), result in feeling cooler?

The title says it all. If I'm standing in the wind and I'm wet, I feel much colder than when I'm dry. This is true no matter how warm or cold the water. Why is this?


I have a requirement to replace all the lines in a file that start with a certain string to be replaced by a variable.   Contents of te file -      SDI=/u05/rdbms/admin     NONSDI=/u07/rdbms/admin1     NONNON=/u01/rdbms/     SDI=/u05/rdbms/admin3   I have a variable SDI_N="SDI=/u01/data/admin/instance"  $echo $SDI_N SDI=/u01/data/admin/instance   Expected output -    $cat file      SDI=/u01/data/admin/instance      NONSDI=/u07/rdbms/admin1      NONNON=/u01/rdbms/      SDI=/u01/data/admin/instance   I am trying the following -  sed -e "s/^SDI=.*/${SDI_N}/g" file ERROR - sed: -e expression #1, char 16: unknown option to `s'  sed -i 's/^SDI=.*/\${SDI_N}/' file   It does not replace with the value of SDI_N         $cat file         ${SDI_N}        NONSDI=/u07/rdbms/admin1        NONNON=/u01/rdbms/        ${SDI_N}   Nor is this helping   sed -i 's/^SDI=.*/"${SDI_N}"/' file  sed -e "s/^SDI=.*/${SDI_N}/g"  file        sed: -e expression #1, char 16: unknown option to `s'   Please let me know what changes I will have to make to my existing code to get the desired output.The issue could be with " or '. But I am unable to get through. I used all the possible combination of Single and Double quotes but with no success.

I am looking for a way to replace a string in a file with a string that contains a slash by using sed.  connect="192.168.100.61/foo" srcText="foo.bar=XPLACEHOLDERX" echo $srcText | sed "s/XPLACEHOLDERX/$connect"   The result is:  sed: -e Expression #1, Character 32: Unknown option for `s'


I have a layer with column "ADDL_INFO" having values like BM 12.4 BM 140!5 BM 320.6 BM 22!5    I want to change '!' mark with '.'  How to change it in qgis 3.5?

I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using   regexp_replace("zone_nr", '+', ', ')   but I get an Eval Error: Invalid regular expression '+': quantifier does not follow a repeatable item.


If I want to throw a 100d6, I have to:  int sum=0; for(int i=0; i<100; i++)     sum += Random.BetweenInclusive( 1, 6);   But for high dice count it may be expensive.  Does there exist any algorithm that is able to throw many dice with an algorithm that always require the same time (it is CONSTANT in the number of dice) and that will still produce a binomial distribution?  The goal is to write a function that:  int RollADice( int rolls, int faces) {     if( rolls <1245) // constant determined by profiling     {         int sum=0;             for(int i=0; i<rolls; i++)                 sum += Random.BetweenInclusive( 1, faces);         return sum;     }     else     {         return RollArbitraryDice( rolls, faces); // how would be that function?     } }   The only progress so far is throwing 2 dice at the same time (by noting that the distribution of 2 dice is a linear ramp, so we could cut the ramp in the middle and get a rectangle).  I also found an algorithm that does roll many dice , but it actually have a cost that is binomial on number of dice, not really a good trade (unless you need entropy).

OK so if your game rolls lots of dice you can just call a random number generator in a loop. But for any set of dice being rolled often enough you will get a distribution curve/histogram. So my question is there a nice simple calculation I can run that will give me a number that fits that distribution?  E.g. 2D6 - Score - % Probability  2 - 2.77%  3 - 5.55%  4 - 8.33%  5 - 11.11%  6 - 13.88%  7 - 16.66%  8 - 13.88%  9 - 11.11%  10 - 8.33%  11 - 5.55%  12 - 2.77%  So knowing the above you could roll a single d100 and work out an accurate 2D6 value. But once we start with 10D6, 50D6, 100D6, 1000D6 this could save a lot of processing time. So there must be a tutorial / method / algorithm that can do this fast? It is probably handy for stock markets, casinos, strategy games, dwarf fortress etc. What if you could simulate the outcomes of complete strategic battle that would take hours to play with a few calls to this function and some basic maths?


I need to know whether my HP Pavilion dv6 i7 quad core will run Ubuntu 16.04 LTS smoothly? Whether it will support all my HP laptop functions and vice versa?  How resource intensive is Ubuntu 16.04 LTS compared to Windows 8.1?   I haven't as yet ever used Ubuntu, but am excited to try, it look spectacular. Please give me feedback in laymen's terms I am a newbie to Ubuntu.

I am a bit financially strapped and received a Gateway GT5056 tower. The tower has an AMD dual core 64-bit processor in it. Will Ubuntu 12.04 run on this machine? I will not have any other application other than LibreOffice installed.


In $\mathbb{Z}\left [ x \right ]$, let $I = \left \{ f\left ( x \right ) \in \mathbb{Z}\left [ x \right ]: f\left ( 0 \right ) \text{ is an even integer} \right \}$   In fact, $I=\left \langle x,2 \right \rangle$  How do I show that the order of $\mathbb{Z}\left [ x \right ]/I$ is 2?

In $\mathbb{Z}\left [ x \right ]$, let $I = \left \{ f\left ( x \right ) \in \mathbb{Z}\left [ x \right ]: f\left ( 0 \right ) \text{ is an even integer} \right \}$. Is $I$ a Prime ideal of $\mathbb{Z}\left [ x \right ]$?  Let $f_{1}\left ( x \right ),f_{2}\left ( x \right ) \in \mathbb{Z}\left [ x \right ].$ Let $f_{1}\left ( x \right )f_{2}\left ( x \right ) \in I$. Clearly, I is a proper ideal of $\mathbb{Z}\left [ x \right ]$ since the elements in $\mathbb{Z}\left [ x \right ]$ evaluated at 0 can produce an odd integer but this cannot be true in I. Now, $f_{1}\left ( 0 \right )f_{2}\left ( 0 \right )$ is an even integer in I. Hence, either $f_{1}\left ( 0 \right )$ has an even constant integer or $f_{2}\left ( 0 \right )$ has an even constant integer. Thus, I is a prime ideal by definition. Is this correct? I would now like to show if I is a maximal ideal. Again, clearly, I is a proper ideal by the above argument. Let B be an ideal of $\mathbb{Z}\left [ x \right ]$ and I $\subseteq B\subseteq \mathbb{Z}\left [ x \right ]$. How should B be defined so that I would conclude either $B=I$ or $B=\mathbb{Z}[x]$?


I am making my own cards to sell, however, I would like to use some graphics and or backgrounds once in a while without having to make them all the time.   Where is the best place to buy graphics, images and backgrounds for a low cost that I can use in some of my cards that I will be selling?   Sometimes I just need to add one image or graphic and would like to purchase some but not sure where I can get them  so that I can use them in a card that I will sell.

I am running a web site design service for local small business owner. I want avoid legal issues on the images I use. Usually, the images found on Flickr are forbidden for commercial use. Where would be a normal channel to get pictures for commercial use with minimal cost? How can I validate that the picture I used has no legal risk?


I am facing problem in writing PostgreSQL select statement in Python when I have to pass more than one values in a statement. Below is the sample example.    from sqlalchemy import create_engine   values = [ 'a' , 'b' ]   con = create_engine(conn_string)   results = con.execute( "select * from table where var in (%s)", [ values ] )   I am able to run query with single value but getting format error for an array.

I have a python list, say l  l = [1,5,8]   I want to write a sql query to get the data for all the elements of the list, say  select name from students where id = |IN THE LIST l|   How do I accomplish this?


I have url :   I disallowed /?b=9 from robots.txt  as  User-agent: * Disallow: /?b=9   But when i test this from Google Webmaster, on Robots.txt Test Tools, it Shows this page allowed while it should not...  Please tell any wrong with my robots.txt    Also   URL -   there /?b=9 this will be same in all cases and /shopping/books/ will be change with different category.  How to Block this types of string ?  Disallow: /?b=9    Is it correct ?

I have the URL   http://www.example.com/shopping/books/?b=9   and the following robots.txt file:  User-agent: * Disallow: /?b=9   But when I test this in Google Webmaster Tool's robots.txt tester it is showing allowed when it should be disallowed.  Whilst /?b=9 is fixed, /shopping/books will change with different categories and I need to block them all.  Please tell me what's wrong with my robots.txt.


I'm calling an  which gives me the sunrise time of specific cities I request. The issue is that when the sunrise is before 10 am I get it in the format, for example, '9:10 am'. This messes up my code and I need it in the format '09:10 am'. I'm using UTC time depending on the location which is why it can give me time in am or pm. Is there a way to know the length of a string before a specific character, in this case ':'? Example string {"results":{"sunrise":"9:28:40 PM","sunset":"10:16:12 AM","solar_noon":"3:52:26 AM","day_length":"12:47:32","civil_twilight_begin":"9:05:59 PM","civil_twilight_end":"10:38:53 AM","nautical_twilight_begin":"8:39:14 PM","nautical_twilight_end":"11:05:38 AM","astronomical_twilight_begin":"8:12:02 PM","astronomical_twilight_end":"11:32:50 AM"},"status":"OK"}

What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?


I am having trouble breaking out of a recursive setTimeout() and I do not know what I am doing wrong.   timer.start = function() {   //do something here   recursive(); //call the recursive once to start it up   function recursive() {     setTimeout1 = setTimeout {       function() {         //do something         recursive();//call recursive after a delay       }, delay}   } }   How would I stop that once the "pause" button has been hit?  I have tried this:  clearTimeout(setTimeout1); <br /> setTimeout1 = null;   This does not work all the time.

What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?  An example (psuedo code):  function mouseClick() {    moveDiv("div_0001", mouseX, mouseY); }  function moveDiv(objID, destX, destY) {    //some code that moves the div closer to destination    ...    ...    ...     setTimeout("moveDiv(objID, destX, destY)", 1000);    ...    ...    ... }   My issue is that if the user clicks the mouse multiple times, I have multiple instances of moveDiv() getting called.  The option I have seen is to create a flag, that only allows the timeout to be called if no other instance is available...is that the best way to go?  I hope that makes it clear....


Update:  It seems infinite login is a Ubuntu 16.04 problem. There is no infinite login on Xubuntu 16.04, but I will encounter Nvidia card problem described below.   I also tried Ubuntu 17.10. Ubuntu 17.10 actually can detect my Nvidia card. However after installing the driver, whenever I boot my machine, it will get stuck on loading, with black screen flickering.   I described in my answer that I switched to use Xubuntu 16.04. I managed to install Nvidia driver through PPA, and I did not get stuck on the log in screen. I have set secure boot to off. I now switch to use a proprietary driver. This way I can open Nvidia settings, but Nvidia settings does not list any GPUs.  However, something is still wrong with my graphics card.    I did   $ sudo lshw -C display  *-display                   description: 3D controller    product: NVIDIA Corporation    vendor: NVIDIA Corporation    physical id: 0    bus info: pci@0000:01:00.0    version: a1    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list rom    configuration: driver=nvidia latency=0    resources: irq:16 memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffffioport:e000(size=128) memory:ed000000-ed07ffff  *-display UNCLAIMED    description: VGA compatible controller    product: Intel Corporation    vendor: Intel Corporation    physical id: 2    bus info: pci@0000:00:02.0    version: 04    width: 64 bits    clock: 33MHz    capabilities: pciexpress msi pm vga_controller bus_master cap_list    configuration: latency=0    resources: memory:eb000000-ebffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff  $ lspci 00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)  In Software & Updates the graphic card is unknown:   With PPA installed open source Nvidia drivers, when run nvidia-settings:  Xlib:  extension "GLX" missing on display ":0.0". ERROR: Unable to load info from any available system  At this point, I cannot:    change brightness either through function keys or through apps, detect or extend to second monitor  Per requested:  $ uname -a      Linux wei-XPS-15-9560 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux  $ dpkg -l nvidia\* | grep '^i' ii  nvidia-384                       384.111-0ubuntu0.16.04.1 amd64        NVIDIA binary driver - version 384.111 ii  nvidia-opencl-icd-384            384.111-0ubuntu0.16.04.1 amd64        NVIDIA OpenCL ICD ii  nvidia-prime                     0.8.2                    amd64        Tools to enable NVIDIA's Prime ii  nvidia-settings                  361.42-0ubuntu1          amd64        Tool for configuring the NVIDIA graphics driver  $ dkms status bbswitch, 0.8, 4.13.0-38-generic, x86_64: installed  nvidia-384, 384.111, 4.13.0-38-generic, x86_64: installed nvidia-384, 384.111, 4.4.0-119-generic, x86_64: installed      Original problem:  I know that this may have been asked numerous times, but none of the solutions I found online worked.  I am running a new XPS 15 9560 with GTX 1080. I installed the Ubuntu 16.04 today, following this  .  In particular, I followed the above instruction to use PPA to install a Nvidia graphics driver. I also disabled secure boot on my machine. I got into an infinite login loop no matter which driver I use. I can manage to get out of the login loop by . I could not get the Nvidia driver to work no matter how.  I have looked at .xsession-erros:  line 1: Xlib:: command not found line 2: Xlib:: command not found line 3: openConnection:: command not found line 4: cannot: command not found line 5: syntax error near unexpected token '(' line 5: 'upstart: gnome-session (Unity) main process (1497) terminated with status 1   I have also tried the method mentioned in this post: . I did have  -rw-------  1 root root   53 Nov 29 10:19 .Xauthority drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp.   However changing ownership (chown) of .Xauthority and .ICEauthority did not help. I cannot login to either of my account or the guest account.

This didn't start out as a problem with the login loop.  I was attempting a clean install of Ubuntu 16 and using the new feature that allows it to detect proprietary drivers for me.  I started off with   When I attempted to use the recommended Nvidia Drivers, it caused the laptop to become unstable and freeze.    I attempted the remedy from that post and it resulted in a login loop.  I have attempted   sudo mv ~/.config/dconf/user ~/.config/dconf/user.old   Tried   sudo mv ~/.Xauthority ~/.Xauthority.backup sudo service lightdm restart   I have tried locating and disabling secureboot, but there is no secureboot option in the bios.  This is an HP DV2000 series laptop.  Nothing is helping    Can someone help?  edit:  Guest session does the same loop.  /var/log/Xorg.0.log shows a lot of stuff, but I took a pic of what seems relevant   Thing is the driver I first tried that started this mess was 304 drivers and the 364 drivers were supposed to be the fix according to other posts.  More editing:  I purged the nvidia files and it came back to a blank desktop w/o the interfaces so I right clicked and restored a backup.. The sidebar came back and it was running gallium.  I restarted and its the blank purple screen again.  I am thinking of just reinstalling and not using nvidia drivers.  The software center is telling me I have a presario and i should use 304 drivers.  Its not a presario. =(  At least the software center provides a suggestion for the coprocessor driver which is nice.