A program reads a very large dictionary-style TXT file into a hash. Sometimes, there is a lower case version of a key that is preferable. My solution below is clumsy because it searches twice even if we already know the lc version exists:  if ( exists $hash{ lc $key } ) {    $key = lc $key; } if ( exists $hash{ $key } ) {     # lot of code involving $key } else {     # the key doesn't exist, other code }   Is there a way to avoid two exists tests? If lc $key exists I want to do the identical code to it as in the second if but I need to know which version, lc or not, of $key to use. I'm hoping to condense it to one if-else pair.  Knowing the case of the valid key is important for the rest of the program since it is used to look up information in another hash.

Evidently hash keys are compared in a case-sensitive manner.  $ perl -e '%hash = ( FOO => 1 ); printf "%s\n", ( exists $hash{foo} ) ? "Yes" : "No";' No  $ perl -e '%hash = ( FOO => 1 ); printf "%s\n", ( exists $hash{FOO} ) ? "Yes" : "No";' Yes   Is there a setting to change that for the current script?


I'm using natbib and can't get it to run. Is there something obvious I'm missing?  \documentclass[DIV=10,openany, titlepage=false]{scrreprt}  \usepackage{enumerate} \usepackage[toc,page]{appendix} \usepackage[T1]{fontenc} %Zeichensatz erweiterter Tex Zeichensatz \usepackage[latin1]{inputenc} \usepackage[english]{babel} %Silbentrennung nach neuer Rechtschreibung \usepackage{tikz} %schicke Grafiken \usepackage{natbib} %Zitierhilfe \usepackage[symbol, perpage]{footmisc} %nette Fußnoten; symbol für Symbole statt Zahlen \usepackage{setspace} %einfachere Änderung des Zeilenabstandes \usepackage{hyperref} %Links im PDF Dokument \usepackage{scrpage2} %Schicke Kopf und Fußzeile \usepackage{graphics} %Grafiken einbinden \usepackage{booktabs} %schicke Tabellen \usepackage{longtable} \usepackage{picins} %Grafiken von Text umfließen lassen  \usepackage{dirtree} %einfach Baumstrukturen setzen \usepackage{titling} \usepackage{lmodern} %\usepackage{ngerman} \usepackage{url} \usepackage{tabulary} \usepackage{hfoldsty} \usepackage{xcolor} \usepackage{soul}  \bibliographystyle{plainnat}  \begin{document}  \citep{Test}  \bibliography{main-tex}  \end{document}   blg-file output:  I couldn't open database file main-tex.bib ---line 45 of file main-tex.aux  : \bibdata{main-tex  :                  } I'm skipping whatever remains of this command I found no database files---while reading file main-tex.aux Warning--I didn't find a database entry for "Test" (There were 2 error messages)     Why can't he create the bib file?

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I want to extract creation date of a file and modification time. The format should be (yyyymmddhh24miss).   My unix shell /usr/bin/ksh The file: file.txt My system: SunOS 5.10 Generic_150400-23 sun4v sparc sun4v

I want to execute stat command in my unix shell /usr/bin/ksh:  Input:  /bin/date +%Y%m%d%H%M%S -d "$(/usr/bin/stat -c %x find.txt)"   And the output:  /usr/bin/ksh: stat:  not found   My system: SunOS 5.10 Generic_150400-23 sun4v sparc sun4v


Ubuntu version 18.04 LTS   I installed this version of Ubuntu using a USB installer on its own dedicated SSD, I believe I did the correct partitions (./, ./home, swap, EFI) however after installation I get the following screen. At first I thought it maybe because I was telling Ubuntu to update along side the installation, so I tried it without that option and the problem still persisted.  Any help would be appreciated!  Ryan (Ubuntu noob)

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I married Lydia and gave her the  to hold, but later she died. I don't remember where she died and now I need the  to complete the  - do any of you know a way to find Lydia or the mask?

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


I've been trying to parse this XML file for the last hour  <?xml version="1.0"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">     <name>MEDO PUB</name>     <SSIDConfig>         <SSID>             <hex>4D45444F20505542</hex>             <name>MEDO PUB</name>         </SSID>     </SSIDConfig>     <connectionType>ESS</connectionType>     <connectionMode>manual</connectionMode>     <MSM>         <security>             <authEncryption>                 <authentication>WPA2PSK</authentication>                 <encryption>AES</encryption>                 <useOneX>false</useOneX>             </authEncryption>             <sharedKey>                 <keyType>passPhrase</keyType>                 <protected>true</protected>                 <keyMaterial>someReallyLongString</keyMaterial>             </sharedKey>         </security>     </MSM> </WLANProfile>   but I kept getting errors. This is a saved Wi-Fi profile and I used  to export the XML file. Later, I wanted to parse and read some data from the XML file. I couldn't. After admitting the defeat, I had nothing else to try but modify the XML file. So I tried parsing  <?xml version="1.0"?> <WLANProfile>     <name>MEDO PUB</name> </WLANProfile>   and it worked. xmlns="http://www.microsoft.com/networking/WLAN/profile/v1" was causing the trouble. Why is that?  I'll be generating the XML and reading from it on the fly, so I can't manually open and delete that part from the XML file. How can I fix this?    Using:  Visual C# 2010 Express (Not All-In-One, separate installation)  Windows 8.1 Pro x64  XmlDocument doc = new XmlDocument(); doc.Load("c:/key.xml"); XmlNode node = doc.DocumentElement.SelectSingleNode("//WLANProfile/name"); XMLOutput.Text = node.InnerText;

Its a .vbproj and looks like this  <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">     <PropertyGroup>         <ProjectGuid>15a7ee82-9020-4fda-a7fb-85a61664692d</ProjectGuid>   all i want to get is the ProjectGuid but it does not work when a namespace is there...   Dim xmlDoc As New XmlDocument()  Dim filePath As String = Path.Combine(mDirectory, name + "\" + name + ".vbproj")  xmlDoc.Load(filePath)  Dim value As Object = xmlDoc.SelectNodes("/Project/PropertyGroup/ProjectGuid")   what can i do to fix this?


I'm writing a bash script to download a BUNCH of data files from a source. The data files all have a numeric portion of their filename to identify their segment, like so: Filename_blahblah_000000 or Filename_blahblah_000024, etc.  I want to open multiple threads, so I can pull these segments in parallel (there are roughly 4200 of them).   Here's my question: Is there any way I can pass input parameters that I can invoke in a for loop? Sample code is below.  Here's the code in "brute force" format. This particular example would pull 3 files: File 000000, file 000001 and file 000002, called as follows:  sr/bin/env bash (initial non-related stuff)  for i in {0..2} do     filenum="00000$i"      ...blahblahblah  done   And here's the result:  % ./data_download-19-x.sh <-- This is the code entered into the command line  Downloading file /blah/file_000000... (stuff happens) Downloading file /blah/file_000001... (stuff happens) Downloading file /blah/file_000002... (stuff happens) (done, everybody happy)   However, I want to be able to pass in the start and end parameters, so the code now looks like this:  #!/usr/bin/env bash (initial non-related stuff)  start=$1 end=$2  for i in {@start..@end} <-- I KNOW THIS IS WHERE THE WRONGNESS IS do     filenum="00000$i"      ...blahblahblah  done   Except now, the end result looks like this:  % ./data_download-19-x.sh 0 2 <-- Notice the 2 input parameters  Downloading file /blah/file{0..2}  Error: Program failed. Exception: File not found   It's interpreting the iterative parameter as the literal string {0..2} instead of processing $start and $end as numbers.   So is there a sneaky way to make bash interpret the values of $start and $end as the bounds of this for loop, or do I have to make a bunch of different files with the bounds hard-coded into them and execute them that way?

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


In my answer to  SO question I originally tried using regex to grab the javascript array that follows json_items = and ends lazily at first ";" i.e. captures everything in the javascript array [array]  variable called json_items.  You can see the start of the match here:    And the regex is saved . I can correctly match with json_items = (.*?); in both python and PCRE (PHP) if I set the re.DOTALL flag or single line flag respectively.   For example, in Python the following functions correctly:  import requests, re, json  data = {   'inputType': '1',   'stringInput': 'https://www.youtube.com/channel/UC43lrLHl4EhxaKQn2HrcJPQ',   'limit': '100',   'keyType': 'default' }  r = requests.post('https://youtube-playlist-analyzer.appspot.com/submit',  data=data) p = re.compile(r'json_items = (.*?);', re.DOTALL) results = json.loads(p.findall(r.text)[0])   The array is retrieved. However, I cannot seem to find the right setting (or to adjust regex appropriately) to do the same in VBA. My best attempt is shown below. It simply fails to match. How do I grab the javascript array as discussed using Regex in VBA please?  Option Explicit Public Sub RegexMatch()      Dim s As String, ws As Worksheet, body As String, re As Object      body = "inputType=1&stringInput=https://www.youtube.com/channel/UC43lrLHl4EhxaKQn2HrcJPQ&limit=100&keyType=default"      Set ws = ThisWorkbook.Worksheets("Sheet1")     Set re = CreateObject("vbscript.regexp")      With CreateObject("MSXML2.XMLHTTP")         .Open "POST", "https://youtube-playlist-analyzer.appspot.com/submit", False         .setRequestHeader "User-Agent", "Mozilla/5.0"         .send body         s = .responseText     End With      Dim matches As Object      With re         .Global = True         .MultiLine = True         .IgnoreCase = False         .pattern = "json_items = (.*?);"         If .Test(s) Then             Set matches = .Execute(s)             Debug.Print matches(0).SubMatches(0)         Else            Debug.Print "Failed"         End If     End With End Sub     To preserve two answers given in comments:  FlorentB:   var json_items\s*=\s*((?:"(?:\\"|[^"])+"|[^;"]+)+)   Wiktor Stribiżew:  There is no option, use [^] or [\s\S] / [\d\D] / [\w\W] instead of a dot.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Let $\Omega \subset \Bbb C$ an open and connected subset. Let $f,f_i \in H(\Omega)$ for all $i \in  \{1,2,...,n\}$ For all $n \in \Bbb N$, characterise $f$ knowing that, $$|f_1(z)|+|f_2(z)|+...+|f_n(z)| = |f(z)|$$ for all $z \in \Bbb C$

While studying for an exam in complex analysis, I came across this problem. Unfortunately I was not able to solve it. Any help would be greatly appreciated.  Let $U ⊂ \mathbb{C}$ be a domain and $f_1, . . . , f_n : U \rightarrow \mathbb{C}$ holomorphic functions, such that $\sum_{k=1}^n \left| f_k(z) \right|$ is constant on $U$. Show that $f_1, . . . , f_n$ are constant.


I am currently tackling real-time multiplayer physics updates for a game engine I am writing. My question is how best to use Box2D for networked physics. If I run the simulation on the server, should I send position, velocity etc to every client on every tick? Should I send it every few ticks? Maybe there is another way that I am missing?  How has this problem been solved using Box2D before? Anyone with some ideas would be greatly appreciated!

I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should only be about every 100ms. I can see how this works for a player since they can just concurrently simulate physics and do lag compensation through interpolation.  What I do not understand is how this works for updates from other players. If clients only get notified of player positions every 100ms, I do not see how that works because a lot can happen in 100ms. The player could have changed direction twice or so in that time. I was wondering if anyone would have some insight on this issue.  Basically how does this work for shooting and stuff like that?  Thanks


Consider the case of having three arrays:  X = {A , B , C}; Y = {D , E , F}; Z = {G , H , I};   How to generate all the possible combinations from these three arrays ( C++ or Python ), that's like  C1 = {A , D , G}; C2 = {A , D , H}; ... C4 = {A, E , G}; ... C10 = {B , D , G}; ... ...

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I repost with a simplified question (my previous post was closed).  I need to output all combination of a list of length N.  I already know that combinations will do this with, as example, the actual input list: ['A, 'B'] ==> output: ['A', 'A'], ['A', 'B'], ['B', 'B']  But I need this: ['A', 'A'], ['A', 'B'], ['B', 'A'], ['B', 'B'].  Is there a way to do it with combinations()?

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


I have installed Ubuntu 16.04 LTS in my new Laptop (Dell Vostro 3568) about a week ago. My right-click is working same as the left click.  I am attaching a screenshot of the settings.  I tried various options, but no result.

I'm using Dell Vostro 3568 model, recently installed ubuntu 17.04. My touch-pad left and right click working same way.   If left radio button selected in my settings( All Settings->Mouse & Touchpad->General->Primary button) then left and right click behaving like left click always no matter even I clicked left or right.  If right radio button selected in my settings( All Settings->Mouse & Touchpad->General->Primary button) then left and right click behaving like Right click always no matter even I clicked left or right.  Can some one help me to get this fixed, please?? Thanks in advance.


Via trial and error where I guess the number of statistical degrees of freedom, I have determined that the single variable linear regression "automatically" performed by Excel provides a p-value for the Y-axis-intercept  that is identical to the one that can be calculated by "explicit" Excel functions as follows:  2*T.DIST(0-t,n-2,TRUE)  (The p-value is for the null hypothesis that the Y-axis-intercept is zero.)  Here T.DIST is the function name and it is left tailed, hence the need to flip the sign on the t-statistic. This flip operation is visible as the 0-, or "zero minus".  Here t is the t-statistic.  Here n is the number of observations.  Here TRUE means the function operates in cumulative mode.  The second argument to the function is the statistical degrees of freedom. I guessed that the value would be n-1 which was wrong and then I guessed it would be n-2. Why should the statistical degrees of freedom be 2 less than the number of observations?

I'm reading a textbook and I see this question:    So there are 200 women, and the DF is 196, implying that the equation for DF is $n - k - 1$. There are 3 variables: bp, age, and type so $k == 3$. What's the intuition behind this?  Also, why is the degrees of freedom for linear regression n - 2?


What i am suppose to do is create a method that is able to copy a 2d array. The code below is what I have so far, the first part is made for user to enter the array info and the bottom is were my problem starts. I don't know what is wrong, every time I run the code I get something like this :   Enter the no. of rows:  2  Enter the no. of columns:  2  Enter the elements: 3  Enter the elements: 7  Enter the elements: 5  Enter the elements: 8  [[I@3669ae9f  [[I@3669ae9f  This is my code:      public static int[][] copyArray(int[][] array) throws IOException    {     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));     System.out.println("Enter the no. of rows: ");     int m = Integer.parseInt(br.readLine());     System.out.println("Enter the no. of columns: ");     int n = Integer.parseInt(br.readLine());      int A[][] = new int[m][n];       for(int row = 0; row < m; row++)     {         for(int column = 0; column < n; column++)         {             System.out.print("Enter the elements: ");             A[row][column] = Integer.parseInt(br.readLine());         }     }       int[][] newArray = new int[A.length][];     for(int x = 0; x < A.length; x++)     {         newArray[x] = A[x].clone();         System.out.println(newArray);     }     return newArray;    }

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]


How can I measure the performance of an application in .NET?  Are there any frameworks for this? Performance means time taken by certain functions, CPU utilization and all such metrics.

I'm doing some real quick and dirty benchmarking on a single line of C# code using DateTime:  long lStart = DateTime.Now.Ticks; // do something long lFinish = DateTime.Now.Ticks;   The problem is in the results:   Start Time [633679466564559902] Finish Time [633679466564559902]  Start Time [633679466564569917] Finish Time [633679466564569917]  Start Time [633679466564579932] Finish Time [633679466564579932]   ...and so on.  Given that the start and finish times are identical, Ticks is obviously not granular enough.  So, how can I better measure performance?


Problem  $\frac{x}{100}= \sin(x)$ We are asked to find the number of possible values of $x$ in this scenario and I had tried to figure it out by the use of trigonometric identities but then i had realized that there are no trig identities that can help me... or is there?  steps that i had tried: I first multiplied 100 on both sides to get $x$ by itself to get: $100(\sin x)=x$  Then i determined that $\sin x \le 1$ therefore I had determined that $\frac{x}{100}$ is $\le 1$  But when i look at the answer choices all of them are less than $100$ meaning that all of them are going to make $\frac{x}{100}$ less than 100 when $x$ is substituted.

How many solutions has the equation $\sin x= \frac{x}{100}$ ?   Usually when I was asked to solve this type of problem, I would solve it graphically but this one seems to be trickier. It doesn't seem wise to put $f(x)=\sin x$ and $g(x)=\frac{x}{100}$ in the same graph and then counting all the intersection points.  What would be some algebraic methods to solve this?


So I've only just installed ubuntu on my laptop, as I'd like to get more comfortable with it. Doing apt-get update gives me a hell of a lot of 404 errors, followed by failed to fetch errors.  I also can't seem to install chrome, as after downloading the executable it says it's missing a dependency (Which i tried to fix via google help, but none of the results fixed it as they did for others)  I've read a few threads regarding similar things to what I'm experiencing but nothing seems to fix it. Any help at all would be much appreciated!

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


\newtheorem{thm}{Theorem}[section]  \newtheorem{defn}{Definition}[section]   \begin{defn} --some text \end{defn}  \begin{thm} --some text \end{thm}   when using the above commands i get as output the following code:  Definition 1.1 Theorem 1.1  But i want as output the following values: Definition 1.1 Theorem 1.2  Every time theorem and definition is used only the decimal values should be incremented. How can i do this?

I am trying to number my theorems, corollaries, Lemmas, Propositions, Definitions, Remarks etc. I put the following code:  \theoremstyle{theorem}  \newtheorem{theorem}{Theorem}[section] \newtheorem{corollary}{Corollary}[theorem] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition}  \theoremstyle{definition} \newtheorem{definition}{Definition}[section] \newtheorem{example}{Example}[definition]  \theoremstyle{remark}     \newtheorem{remark}{Remark}[section]   I want to produce the following:  theorem 1.1  proposition 1.2  definition 1.3  example 1.4  remark 1.5  lemma 1.6  but the code above gives me  theorem 1.1  definition 1.1  remark 1.1  lemma 1.2  Can anyone tell me if there is a code that numbers all these respectively?


I am using gprint as a shell call to print pdf files. I have to install the network printer first, but the program runs under a different account. Is there anyway to install a network printer under Windows XP so that it is available to all accounts on the machine?


This is probably a really obvious question, but I don't see the explanation.  We have a population of $(X, Y)$ pairs for which $\rho_{XY}=\rho$ and $Y$ is given by the linear representation $Y = \alpha + \beta X + e$ where $\operatorname{Cov}(X,e)  = 0$.   What is the best linear representation of the relation between $Y$ and $X$ with the variables reversed: $X = \gamma + \delta Y + u$. Specifically what would $\delta$ be in terms of $\alpha$ and $\beta$?

Let's say that there exists some "true" relationship between $y$ and $x$ such that $y = ax + b + \epsilon$, where $a$ and $b$ are constants and $\epsilon$ is i.i.d normal noise. When I randomly generate data from that R code: x <- 1:100; y <- ax + b + rnorm(length(x)) and then fit a model like y ~ x, I obviously get reasonably good estimates for $a$ and $b$.  If I switch the role of the variables as in (x ~ y), however, and then rewrite the result for $y$ to be a function of $x$, the resulting slope is always steeper (either more negative or more positive) than that estimated by the y ~ x regression. I'm trying to understand exactly why that is and would appreciate it if anyone could give me an intuition as to what's going on there.


Find all primes $p$ such that $$x^3+x+1\equiv0\pmod p$$ has   $3$ incongruent solutions.   By a standard result in number theory, it has $3$ incongruent solutions iff there exists $q(x),r(x)\in\mathbb{Z}[x]$ with $\deg r(x)<3$ such that $$x^p-x=(x^3+x+1)\,q(x)+p\cdot r(x).$$ I am unable to proceed from here. I tried to write out the coefficients of $q(x)$ and multiply out, but it was in vain. How do I solve this problem? Thanks in advance!  I am unclear about what tags to add, so please fix this.

Find all the primes $p$ so that $$x^3+x \equiv 1 \pmod p \tag{1}$$ has integer solutions.   We consider $x$ and $y$ are the same solutions iff $x\equiv y \pmod p.$  We can prove that $(1)$ cannot have exactly $2$ solutions unless $p=31$. When $p=31$, the solutions of $(1)$ are $x \equiv {17\text{ (double), } 28} \pmod {31}.$  My question is: when does $(1)$ have no solution, and when does $(1)$ have $1$ solution and when does $(1)$ have $3$ solutions? (As Ma Ming has pointed out, an equation of degree $3$ has no more than $3$ solutions.)  I have proved that if $p \not = 31$, and $a$ is a solution of $(1)$, then $(1)$ has $3$ solutions iff  $$\left(\frac{a-1}{p} \right)=\left(\frac{a+3}{p} \right),$$ here $\left( \frac{a}{p} \right)$ is the Jacobi symbol. Thanks in advance!


When I fight the first boss, Kayran (difficulty: Dark, version: 3.3.3.1, no mods), I attack the tentacles but they don't get cut. The life of the monster goes down a bit with each attack until disappointingly the bar returns full or almost full, in an infinite cycle. Nothing else happens.  How can I defeat Kayran?

In the first chapter you are supposed to slay the Kayran, this enormous beast:    I'm having a hard time with it. I drank the Mongoose potion for poison resistance and I have the Kayran trap, but it just hits me too often with its tentacles. Especially when the Kayran swings a tentacle sideways, not from above, I have a very hard time evading it.  Is there any trick besides not getting hit by the tentacles?  With a lot of luck I'm getting as far as the point where it's throwing stones. Any idea what I'm supposed to do then?


I suggest using the k suffix for question scores where appropriate, just as it is used when displaying for instance reputation, view counts, "people reached" etc.  Example: I suggest changing this    to this:    The fact that the question has a score of exactly 10851 isn't really that interesting, and suffixes are used consistency elsewhere on the site.

I don't really enjoy the ragged view of linked posts:    This feature request is to use a format that suggested in ; something that matches the user-profile tags page in terms of the tally:    That is, use abbreviations for 1000+ (k for 1,000+, m for 1,000,000+, ...).


This is a problem from a linear algebra textbook. Given a finite dimensional inner product space $V$ with orthonormal basis $e_1, \ldots, e_n$, show that if a list of vectors $v_1, \ldots, v_n$ satisfies $\|e_j - v_j\| < \frac{1}{\sqrt{n}}$ for all $j$ in $\{1, \ldots, n\}$, then $v_j$'s form a basis of $V$.  I have no idea. It's intuitive when I think about $\mathbb{R}^2$, looking at little spheres at the tips of the $e_j$'s.   I thought about looking at prefixes, like it should be true that $\|e_j - v_j\| < \frac{1}{\sqrt{i}}$ for all $j$ in $\{1, \ldots, n\}$. So now if $v_i \in \operatorname{span}(v_1, \ldots, v_i)$ then it should violate the inequality. It just looked ugly. Is this even a good direction? Edit: I see it's ridiculous now...  Is this something hard (it's Axler's book, 3rd edition, and the problems aren't marked by difficulty, so I don't want to waste time), or am I just being silly?

Prove that if $e_1, \dots e_n$ is an orthonormal basis of $ V$ and $v_1, \dots , v_n$ are vectors in $ V$ such that $$\|e_j - v_j\| < \frac{1}{\sqrt{n}}$$ for each j, then $v_1, \dots v_n$ is a basis of $V$.  I have fiddled around with this for a while now unfortunately nothing came close, so I'll just say I have no idea how to do this. Help :(?


If I hover over a user with an expandable usercard, the hat is only showing on the profile pic of the usercard for a very short time. After that, it teleports back to the original picture.  I don't want my hat to travel through cyberspace. Please make it stop!  I'm using Safari 11.0.2 on macOS 10.13.

When I hover a profile picture, the hat blinks and then disappears (stays in the back).    I've tested in many SE sites.  OS: macOS 10.13.2 Browser: Safari 11.0.2  I'm not using any browser extensions.


I want to install apps from another region (example ), but can't, because I have a different region on my phone. I'm using Google Pixel 2 running on Android 10 (latest Android version at the moment).  I don't find the app either on Aurora Store and Yalp Store.  What would be the simplest way to do this? Preferably without having to go to a different "desktop".  (logging in the whole phone to a different account)

I'm travelling to country X. I want to install an application which isn't available in my country, but is available in country X; but I prefer to download and install it in advance, while the data connection is still cheap.  Unfortunately, the Play Stores does not allow me to install this app. Is there any way to circumvent this limitation?


After upgrading to Ubuntu 13.10 I get a lot of error messages with no info when the desktop starts:    How can I solve this? I tried to update and install kde-full and gnome. But it was not solved.

This started to happen immediately after I had rebooted the first time after doing a system upgrade. It first starts with a dialogue that says "System program problem detected". Then when I try to hit 'report problem' not much happens. I am led through a dialogue that always ends up the problem cannot be solved.  I am aware this is not a lot of information, however I'm not sure which information I need to publish and how should I obtain it to debug this problem.  Here's a screenshot!


Im writing a class for a card that takes in two string parameters,   When I check the string if it's an "a" it throws the NumberFormatException error.  Card(String s, String  f)  {     suit = s;     if(f == "a")     {         value = 11;     }      else if (f == "j" || f == "k" || f == "q")     {         value = 10;     }      else     {         value = Integer.parseInt(f);     }     face  = f;  }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


First off, I realize my question is too broad as it depends on the country, but I would be interested to hear mostly about the process in Canada and in western Europe, where it is common to complete a Master's degree before one's PhD.  I am an MSc mathematics student, and I am considering to switch to a different field for my PhD studies. I am thinking about certain directions in Computer Science or Electrical Engineering, which are completely unrelated to my current research.  Within my university such a switch is not uncommon, as the duration of a PhD has quite a soft upper bound, and a student coming from a different background can be accepted and simply required to learn the necessary basics of the new topic. Also, students who have received their MSc from the same university are not required to present official letters of recommendation when applying for a PhD, and the acceptance depends pretty much solely on the new advisor.  However, I imagine such a process would be much more complicated when applying to a different university, especially in a different country, as the department (or the potential advisor) has no way to evaluate the student's potential in the new field (assuming his MSc has nothing to do with the new field), and the student can't present letters of recommendation from researchers in said field.  Are such cases common? Are students coming from a different background at a significant disadvantage when competing with applicants from the same field, and how could one raise their chances of acceptance?  Thanks!

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


apt transaction returned result exit-failed    apt transaction returned result exit-failed apt transaction returned result exit-failed

I'm using 17.04 ( Clean Install ), and as far as I remember, every try to install any sofware- it fails with that error code.  I tried sudo apt-get update && apt-get upgrade and problem persists.  any idea why?   edit: Using software Updater gave this result :   edit : output of update  guy@LG-LAPTOP:~$ sudo apt-get update && apt-get upgrade [sudo] password for guy:  Ign:1 http://il.archive.ubuntu.com/ubuntu zesty InRelease Ign:2 http://il.archive.ubuntu.com/ubuntu zesty-updates InRelease               Ign:3 http://il.archive.ubuntu.com/ubuntu zesty-backports InRelease             Err:4 http://il.archive.ubuntu.com/ubuntu zesty Release                           503  Service Unavailable Get:5 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]      Err:6 http://il.archive.ubuntu.com/ubuntu zesty-updates Release                   503  Service Unavailable Get:7 http://archive.canonical.com/ubuntu zesty InRelease [10.2 kB]             Err:8 http://il.archive.ubuntu.com/ubuntu zesty-backports Release                 503  Service Unavailable Get:9 http://archive.canonical.com/ubuntu zesty/partner Sources [1,416 B]       Get:10 http://archive.canonical.com/ubuntu zesty/partner amd64 Packages [1,616 B] Get:11 http://archive.canonical.com/ubuntu zesty/partner i386 Packages [1,612 B] Get:12 http://archive.canonical.com/ubuntu zesty/partner Translation-en [708 B] Get:13 http://security.ubuntu.com/ubuntu zesty-security/main amd64 DEP-11 Metadata [11.7 kB] Get:14 http://security.ubuntu.com/ubuntu zesty-security/main DEP-11 64x64 Icons [9,219 B] Get:15 http://security.ubuntu.com/ubuntu zesty-security/universe amd64 DEP-11 Metadata [14.4 kB] Get:16 http://security.ubuntu.com/ubuntu zesty-security/universe DEP-11 64x64 Icons [31.0 kB] Reading package lists... Done                                          E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-updates Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-backports Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. guy@LG-LAPTOP:~$    output of apt get  guy@LG-LAPTOP:~$ sudo apt-get install putty Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   putty-tools Suggested packages:   putty-doc The following NEW packages will be installed:   putty putty-tools 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 661 kB of archives. After this operation, 2,713 kB of additional disk space will be used. Do you want to continue? [Y/n]  Err:1 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty-tools amd64 0.67-3   503  Service Unavailable Err:2 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty amd64 0.67-3   503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty-tools_0.67-3_amd64.deb  503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty_0.67-3_amd64.deb  503  Service Unavailable E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? guy@LG-LAPTOP:~$


I am shooting wide shots of storefronts. I am standing across a street and using a zoom. I am confused about how to use the QP 101 gray card.  How big does the gray card have to be in the frame?  Do I maintain my camera position and try to zoom in as much as possible to the card being held in front of the store (which means it is very small in the frame)?  Or do I have the person holding the gray card come close to me, as long as the lighting on the card is the same as on the store?

There are already   on how to make a gray card, but unfortunately my ignorance goes deeper than that.  How do you use a gray card?


Let $\Bbb Z$ be the ring of integers and $I$ a non-countable index set. Why $$\prod_{i\in I} \Bbb Z$$ is not a projective $\Bbb Z$-module?

Why isn't an infinite direct product of copies of $\Bbb Z$ a free module?   Actually I was asked to show that it's not projective, but as $\Bbb{Z}$ is a PID, so it suffices to show it's not free.   I am stuck here. I saw some questions in SE, but there is no satisfactory answer at all.


I'm trying to show that if $E$ is a finite monoid, then there exists $s$ such that $s²=s$, i.e, there exists an idempotent element in $E$.  What I did is this: Take an element $a$ of $E$, and consider the application $F_a :E\to E$ such that for $x$ in $E$, $F_a(x)=ax$. Now, if $E$ was a group, it's easy to see that $F_a$ is a permutation of $E$ (consider $F_{sym}(a)$)  since $E$ is finite. Then there exists at least one element $x$ such that $F_a(x)=x$. Take $x=a$ we'll have $a²=a$.  But what about the initial case, where $E$ is just a finite monoid?   Thanks.

Let $(G,\cdot)$ be a non-empty finite . Is there any $a\in G$ such that: $$a^2=a$$ It seems to be true in view of theorem 2.2.1 page 97 of  book (I'm not sure).  But is there an elementary proof?  Theorem 2.2.1. [R. Ellis] Let $S$ be a compact right topological semigroup. Then there exists an idempotent in it.  This theorem is also known as .


I need to compute the nearest point of $x$ from a probability simplex. Formally, I want to ask if there is a close form for the solution to the following optimization problem: for $y\in \mathbb{R}^k$,  $$\min\limits_{x} \|x-y\|^2_2 $$  $$s.t. \ \sum\limits_{i=1}^k x_i =1,\  x_i \geq 0 ,\ \forall i \in[k]$$  If not, how can I derive an iterative algorithm to find the unique solution? Thanks!

Given an elementwise nonnegative vector $y$, I'd like to find the projection of $y$ onto the simplex $S: \{ (x_1, \ldots, x_n) ~|~ \sum_{i=1}^n x_i=1, x_i \geq 0 \mbox{ for all } i \}$.    Is there a closed form expression for this? If not, I need to write a computer program which will compute this projection; is there something simple I could do to compute this?   Simplicity is more important to me than running time; I don't want to spend a long time coding this. I do realize this is a convex optimization problem and could be solved by using various optimization solvers, but that seems like overkill.


Is their a command or trick to check if given server is a DNS Server or not .

This case scenario is for a router with embedded linux, but I think   the answer could be the same for any Linux system.   This is my DNS check:  ~ $ cat /etc/resolv.conf nameserver 80.58.61.250 nameserver 80.58.61.254 ~ $ ping 80.58.61.250 PING 80.58.61.250 (80.58.61.250): 56 data bytes 64 bytes from 80.58.61.250: seq=0 ttl=250 time=50.0 ms 64 bytes from 80.58.61.250: seq=1 ttl=250 time=40.0 ms ^C --- 80.58.61.250 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 40.0/45.0/50.0 ms ~ $ ping www.google.es PING www.google.es (2a00:1450:4007:808::101f): 56 data bytes ping: sendto: Network is unreachable ~ $ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: seq=0 ttl=57 time=50.0 ms 64 bytes from 8.8.8.8: seq=1 ttl=57 time=40.0 ms 64 bytes from 8.8.8.8: seq=2 ttl=57 time=40.0 ms ^C --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 40.0/43.3/50.0 ms   As can be seen, there is a response from internet (8.8.8.8) but not from domain names (www.google.es, same for www.google.com). The DNS server (80.58.61.250) answers to pings. So I was wondering if the problem could be in that DNS server.    Is there some way, like telneting or similar, to check if a given DNS IP works as it must (this is: answering with a IP address when requested for a domain name)?    For example, when testing a SSH server, a possible trick is:  C:\Users\Luis>telnet Midnighter- 22 SSH-2.0-OpenSSH_6.7p1 Debian-5   Third party tools accepted. Command line and Open source preferred.


Issue with install, searched gnu.org - unfortunately manual is more than 810 pages thick without instruct for install;    Plus manual pages in ubuntu is 8529+ lines (again) without straight forward instruct as to install..  Noting that to configure GCC, it must be made from a shell environment first;   % mkdir objdir  % cd objdir  % srcdir/configure [options] [target]   Not sure whether this is the same with distributions through package manager on ubuntu, version 4:4.8.2-1ubuntu6 (or) just releases through gnu.org - versions 5.3 (the latest).

This question always bothers me! Last time for 4.9 I tried the commands mentioned in . The same trick doesn't work now:  sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-5.1 g++-5.1   results in...  E: Unable to locate package gcc-5.1 E: Couldn't find any package by regex 'gcc-5.1' E: Unable to locate package g++-5.1 E: Couldn't find any package by regex 'g++-5.1'   What is the correct command for directly installing the latest g++ in Ubuntu? Is there any magic command which works uniformly for all the updates of g++?  Update:  I found that the correct command to install it is:  sudo apt-get install g++-5   This works now! Though in the , the version is 5.1.


Can anyone show the mathematical steps proving   $K_{box}*K_{box} = K_{triangle}$

I've been wondering about this one for a while; I find it a little weird how abruptly it happens. Basically, why do we need just three uniforms for $Z_n$ to smooth out like it does? And why does the smoothing-out happen so relatively quickly?  $Z_2$:     $Z_3$:    (images shamelessly stolen from John D. Cook's blog: )  Why doesn't it take, say, four uniforms? Or five? Or...?


Feeling stupid here. The .click() function is not firing and I have no idea why not. The code is really as simple as below. Note: the spans in the .selector-book div are dynamically loaded by a previous function. Any help is appreciated, as always.  HTML:
                         ...
   JS:  $(document).ready(function() {     $('.selector-book span').click(function() {         console.log('test');         $('.selector-chapter').html('');         var p = $(this).data('book-number');         for (var i = 0; i < myBible[p][2]; i++) {             $('.selector-chapter').append('' + i + '');         }     }); });

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.


So I want to accept a file name from the user. I then want to check if the last four characters of the string are ".txt". If they aren't, append ".txt" to the end of the user inputted string. If they are, skip. Simple.  But it's not working - when I enter "exampledata.txt" it still adds ".txt" and throws a FileNotFoundException - and I can't figure out why. I've taken the same calculation and printed it out/verified in debugger; my method call to substring is correct.   Relevant code:  import java.util.*;  import java.io.*;  public class MappingApp {     public static void main(String[] args) {         Scanner sc = new Scanner(System.in);          String userInput;         System.out.print("Enter file to read from: ");         userInput = sc.nextLine();          if ( (userInput.substring(userInput.length()-4, userInput.length())) != ".txt" ) {             userInput += ".txt";         }          try {             File f = new File(userInput);             BufferedReader br = new BufferedReader(new FileReader(f));         }         catch (FileNotFoundException e) {             System.err.println(e);         }     }  }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


What is the best method with which to approach the following integral?     $$\int_0^1 \frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}dx$$   Thanks

This question is inspired by my own answer to a  which I tried to answer and got stuck at one point.     The question was:     HI DARLING.      USE MY ATM CARD, TAKE ANY AMOUNT OUT, GO SHOPPING AND TAKE YOUR FRIENDS FOR LUNCH.      PIN CODE: $\displaystyle \int_{0}^{1} \frac{3x^3 - x^2 + 2x - 4}{\sqrt{x^2 - 3x + 2}} \, dx $      I LOVE YOU HONEY.      Anyone knows? Are we gonna get an integer number?     My attempt:  Does this help?     $$\frac{3x^3-x^2+2x-4}{x-1}=3x^2+2x+4$$   (long division)   \begin{align*} I&=\int\frac{3x^3-x^2+2x-4}{[(x-1)(x-2)]^{1/2}} dx = \\ &=\int\frac{(3x^2+2x+4)(x-1)^{1/2}}{(x-2)^{1/2}} dx = \\ &=\int 3(u^4-4u^2-4)(u^2+1)^{1/2}du \times 2 \end{align*}   after the substitution   \begin{gather*} (x-2)^{1/2}=u\\ du=\frac1{2(x-2)^{1/2}}dx\\ u^2=x-2\\ (x-1)^{1/2}=(u^2+1)^{1/2} \end{gather*}   Update:  may help us proceed.    I tried to proceed:     $$6\int (u^4-4u^2-4)(u^2+1)^{1/2} du = 6\int ((t-3)^2-8)t \frac{dt}{2u}$$   after $u^2+1=t$ and $dt=2udu$   \begin{align*} u^4-4u^2-4 &= (u^2+1)^2-(6u^2+5) \\ &= (u^2+1)^2-6(u^2+1)+1 \\ &= ((u^2+1)-3)^2-8 \end{align*}   I wonder whether this question can be solved from here?    Update:   This has been getting a lot of views, and I think most people came for the sort of problem mentioned in the title (where I got stuck) rather than the original problem itself.  Keepin this in mind, I'm reopening the question and here's the kind of answers I expect — Solutions to the original problem are good, but I'd prefer solutions that continue from the part where I got stuck — the polynomial in $u$ — that's the sort of problem mentioned in the title.


In the Star Wars movies stormtroopers tend to die from a single hit no matter from what weapon or on what location. A single blaster hit anywhere on their armor is all that is needed to take them out. Even hitting them with a wooden stick or small stones seems to be lethal to them.  If that is the case, what is their armor good for? Has there been any example of a stormtrooper's armor protecting him from any harm?  Durasteel armor would be very effective against , this is why slug-throwers are , but as they don't face such weapons on a regular basis, what threats are on a battlefield against which the stormtrooper's armor provides protection?

When stormtroopers get into fire fights with the rebels, I noticed that a few are killed after a single shot to the chest. Is their armor not really armor or are the rebels guns just that powerful? In some of the books in Legends, it seems they can take more of a beating but in the original movies they can't seem to take as much. Do some stormtroopers have different grades of armor?


I have read that       for (int i1 : A) {     }   is better than       for (int i1=0; i1 < A.length; i++) {     }   but if I want to access index value in first one is there any mean or should I use the second one only.

Is there a way in Java's for-each loop  for(String s : stringArray) {   doSomethingWith(s); }   to find out how often the loop has already been processed?  Aside from using the old and well-known for(int i=0; i < boundary; i++) - loop, is the construct  int i = 0; for(String s : stringArray) {   doSomethingWith(s);   i++; }   the only way to have such a counter available in a for-each loop?


Let $f$ be an entire function and suppose there is a constant $M$, and an integer $n \geq 1 $ such that $|f(z)| \leq M|z|^n $ for large $|z|$. Show that $f$ is a polynomial of degree $ \leq n$.

Suppose that an entire function $f(z)$ satisfies $\left|f(z)\right|\leq k\left|z\right|^n$ for sufficiently large $\left|z\right|$, where $n\in\mathbb{Z^+}$ and $k>0$ is constant. Show that $f$ is a polynomial of degree at most $n$.


I posted a  on Super User (after discovering the broad  tag), then proceeded to ask my original question.  However, I got this error.    I have more then enough rep to get past the new user restrictions.    Is this a , or is the posting limit not a new user restriction?

I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features.  Where else is rate limiting applied on Stack Exchange sites, and what are the limits?


I'm using quad inside itemize. In detail,  \documentclass{article} \begin{document} \begin{itemize} \item Item 1a\\Item 1b \item Item 2\\\quad Subitem 2a\\\quad Subitem 2b \item Item 3 \end{itemize} \end{document}   The quads in front of Subitems 2a and 2b don't work. Can I activate the quads by force? Thanks.

My code is this:  \setlength{\parindent}{0ex} \texttt{ x\hspace{1ex}\hspace{1ex}\hspace{1ex}y \newline \hspace{1ex}\hspace{1ex}\hspace{1ex}\hspace{1ex}y }   What I'd like to see is:  x   y     y   What I actually see is:  x   y y   I've tried various other ways of inserting a space. So far, they've all resulted in leading whitespace being ignored.  I've also tried using \verbatim and \alltt but they eat too many of the other commands that I need preserved (not shown in the example above).  I suppose I could (in the script that emits the LaTeX) count the leading spaces in each line and use different \parindent values. I'm looking for something more elegant first.


I am creating a large PowerShell script to change a bunch of system preferences and personalization options, as I am using a computer cluster where everything is wiped upon restart and I simply cannot be productive with the default settings.  More specifically, I would like to also enable "Ask where to save Downloads" in Chrome and change the default search engine from Google to Bing. I know of no way to do this from a script, and I don't think it's as simple as copying a file over that will change those settings, so I thought I could at least have my script open the settings window so I can do that more easily.  I can't figure out how to get PowerShell to open Chrome to a specific webpage. For example, the following does not work:  Start-Process -FilePath "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList 'chrome://settings/?search=ask+where'   I can open Chrome itself from PowerShell but not to anything but this page. I have tried moving the quotes around behind and after the Argument List, enclosing everything in quotes, and every other possible combination of quotes, etc.  I have spent an hour looking for solutions online. Every one of them entails either:   PowerShell opening the webpage, but using the default browser. (Chrome is not the default browser, and I am opening Chrome specific links anyways so that would not work in the default browser). Opening Chrome with arguments that change how Chrome opens - i.e. "--incognito" for opening in Incognito.   I have found nothing that will let me open a webpage in Chrome. Is this even possible?  I realize now that the problem is the URL I am attempting to open, rather than the code which is fine.  However, I cannot do anything in the suggested answer. I can't make any changes at all to the filesystem, because everything is wiped upon logout. Hence the ps1 script to setup the environment. It needs to be quick so I can't copy over an entire GoogleChromePortable directory.

Does anyone know how to launch chrome and immediately open a "chrome url"?  I'm trying to make a shortcut like this, but its not working when I tried. it only accepts http:// urls  GoogleChromePortable.exe "chrome://settings/"   Thanks in advance who can help out


I want to backup my data according to the 3-2-1 rule. I already backup to 2 different drives (2 different systems) at home.  In addition i would like to use cloud storage (Google, Amazon etc.). Considering the future weakening of cryptography by advancements in computing power (e.g. key guessing by quantum computing) i want my data to be as safe as possible because once it's uploaded it's prone to decryption in the future (i can't guarantee the data is deleted if i delete it from the cloud(s)). Does it increase securtiy of my data if i split the CBC chunks to let's say 2 clouds? Uploading the even numbered CBC elements to e.g. Google and the odd numbered elements to Amazon. Since one storage hoster is constantly missing the next part of the CBC-Chain (1/2 in total) shouldn't this increase security of the data even if the AES key is known by the hoster(s)?

I want to backup my data according to the 3-2-1 rule. I am already back up to 2 different drives (2 different systems) at home. In addition, I would like to use cloud storage (Google, Amazon, etc.). Considering the future weakening of cryptography by advancements in computing power (e.g. key guessing by quantum computing) I want my data to be as safe as possible because once it's uploaded it's prone to decryption in the future (i can't guarantee the data is deleted if I delete it from the cloud(s)). Does it increase the security of my data if I split the CBC chunks to let's say 2 clouds? Uploading the even-numbered CBC elements to e.g. Google and the odd-numbered elements to Amazon. Since one storage hoster is constantly missing the next part of the CBC-Chain (1/2 in total) shouldn't this increase security of the data even if the AES key is known by the hoster(s)?


Got a virus that every once in a while opens a new tab in any browser. It does so even while I am watching video on YouTube - it just goes ahead and opens up a new tab with some page from the internet. It is quite annoying. Is there any way to get rid of it?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I downloaded deb-creator-i386 and it seemed to install. It is supposed to be a GUI for compiling and packaging. After install it says in order to run or execute the program or app, I have to do that with a command in terminal. Tried use ./.  Did not work. I am using Lubuntu 16.04.

How do I install a .deb file via the command line?


I want to calculate $$\int_0^\infty \frac{\ln t}{t^2+a^2}\,dt$$ using the Residue Theorem. The contour I want to use is almost the upper half circle of radius $R$, but going around $0$ following a half-circle of radius $\epsilon$, and using the branch cut at $7\pi/8$. The picture is below.

I want to verify the following result using the residue theorem:     $$\int_0^\infty \frac{\log(x)}{x^2+a^2}dx = \frac{\pi}{2a}\log a, \, a > 0.$$   Here are my ideas:    At first I might want to show that this function is in fact a well defined improper Riemann integral, but I didn't come up with any nice solution yet.    I want to integrate the function $f(z) := \frac{\log(z)}{z^2+a^2}$ along the contour $C:= \gamma_1 \cup \gamma_2 \cup \gamma_3 \cup \gamma_4$ constisting of to semicircles with center at 0 around the upper half plane and radius $R$ and $\epsilon$ (resp.) as well as the intervals $[-R, -\epsilon]$ and $[\epsilon, R]$.    For the complex logarithm, use the branch $\log z = \log|z| + i\theta, \theta \in [-\pi/2, 3\pi/2)$ so we don't get any problems on the real line (is this choice correct?).  Note that I have one pole in my contour, namely $z = ia$. The Residue theorem yields $$\int_C f(z) dz= 2\pi i \text{ Res}(f, ia) = 2\pi i\lim_{z\to ia}(z-ia) \frac{\log z}{(z-ia)(z+ia)} = 2\pi i\frac{\log(ia)}{2ia} = \pi \frac{\log(a)+ i\pi/2}{a}$$ Proceeding, we choose the following parametrizations: $$\gamma_1 : [-R,0]  \to \mathbb C, \quad t\mapsto -\frac{\epsilon t}{R} + (t-\epsilon) \\ \gamma_2 : [0, R] \to \mathbb C, \quad t\mapsto -\frac{\epsilon t}{R} + (\epsilon+t) \\ \gamma_3: [0, \pi]\to \mathbb C, \quad t\mapsto \epsilon e^{it} \\ \gamma_4:[0,\pi] \to \mathbb C, \quad t \mapsto Re^{it}$$ Now here's what I am unsure about. To show that the big and the small circle vanish as $R\to \infty$ and $\epsilon \to 0$ is not too hard, but how to deal with the other integrals? Can I just say  $$\int_{\gamma_1} f(z)dz = \int_0^R \frac{\log(-\frac{\epsilon}{R}t+\epsilon+t)}{(-\frac{\epsilon}{R}t + \epsilon + t)^2 + a^2}(\frac{\epsilon}{R}+1)dt \xrightarrow{\epsilon \to 0} \int_0^R \frac{\log t}{t^2 + a^2}dt$$  or what kind of reasoning should be used to interchange limit and integral?Also, I then finally I get $$\int_0^\infty \frac{\log(x)}{x^2+a^2}dx = \pi \frac{\log a + i\frac{\pi}{2}}{2a}$$ almost what I want, but where does $i\pi /2$ come from?  Thanks in advance!


I have run the code multiple times in multiple scenarios and have gotten the same result. What it is supposed to do is move right, and when it hits the point it is supposed to turn, it turns. Instead, it gives me the error dialog box I instructed it to give when it hits something unidentified. It seems to be skipping the part of the code that tells it to execute a separate method. I have three other methods like this that do the same thing in different directions.  To detail how the situation works. I start the game and it loads  the level with the player in it. I use some form of input that executes the code below. The character moves right, but then refuses to move even though the level says it should.  EDIT: I have amended the code to use .equals() instead of ==. I found that the problem actually arose with me forgetting how java does it's x and y axis. I thank those who fixed my flaw in coding though, it was really helpful.  public static void moveRight(){     move = true;     while(move == true){         Point character = load.getCharacter();         Point space = character;         space.x += 20;         String name = load.getSpace(space);         System.out.println(name);         if(name.equals("empty")){             load.setCharacter(space);         }else if(name.equals("fTurnUp")){             load.setCharacter(space);             move = false;             moveUp();         }else if(name.equals("fTurnDown")){             load.setCharacter(space);             move = false;             moveDown();         }else if(name.equals("fTurnLeft")){             load.setCharacter(space);             move = false;             moveLeft();         }else if(name.equals("fTurnRight")){             load.setCharacter(space);             move = false;             moveRight();         }else if(name.equals("turn")){             load.setCharacter(space);             move = false;         }else if(name.equals("finish")){             load.setCharacter(space);             move = false;             Component frame = null;             JOptionPane.showMessageDialog(frame,                     "Congratulations! You have completed the level.",                     "Level Completed",                     JOptionPane.PLAIN_MESSAGE);         }else if(name.equals("wall")){             move = false;             Component frame = null;             JOptionPane.showMessageDialog(frame,                     "The level was not designed correctly. Click 'Ok' to return to main menu",                     "Invalid Level",                     JOptionPane.ERROR_MESSAGE);         }     } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Am I able to fit 20x2.4 tires on my 20x2.175 Bmx rim? I dont know if im able to fit that type of tire beacause I want street tires

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


I'd like to use the workbench engine on a remote headless server (linux). However, blender crashes giving me the following error:  Unable to open a display   Is this even possible?  PS: Please excuse the rather meaningless tag. However, neither headless, workbench or server exist as tags.

I have been trying to get this to work for a couple days now. I have an EC2 P2 instance with NVIDIA CUDA configured by default, its a Deep learning Ubuntu AMI. This OS does not have a GUI so everything is via terminal.  I downloaded Blender's 2.8 TAR file for Linux and set it up on the EC2 instance. And ran the following command from the directory where the TAR file is extracted:   ./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG --verbose 4   All I see in the output is this:  Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04) found bundled python: /mnt/blender/blender-2.80-linux-glibc217-  x86_64/2.80/python Read blend: /home/ubuntu/file.blend  Blender quit   Don't know why its quitting but I am unable to debug this any further. Any help would be appreciated.  UPDATE: As per @rjg's recommendation, ran the following command:  ./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG -f 1 --verbose 4   Got the following error:  Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04) found bundled python: /home/ubuntu/blender/blender-2.80-linux-glibc217-  x86_64/2.80/python Read blend: /home/ubuntu/file.blend Unable to open a display Aborted (core dumped)


I am pretty sure this is a common beginner mistake and it is already answered, but i couldn't find anything helpful. So since this happened to me twice, I would like to know where my mistake is and what i can do to prevent this. Also it would be awesome if there was a way of fixing this without losing my data.  What happened is, I created another ext4 partition alongside my existing Xubuntu system (consisting of a EFI and a ext4 partition) and then installed Peppermint on it (the first time this happened it was Windows 7, so i don't think the OS matters at all). Both OS worked perfectly fine, but when I decided to delete the new partition (the one with Peppermint), i couldn't boot it any more, instead it would show me a grub console where I could enter commands. I can still boot from a live Disc tho.  Thank you for helping and being an awesome community allaround. Johannds

I want to reinstall GRUB 2 and I found these instructions: . In my case, the boot loader is installed in the EFI partition. If I use the commands provided in this guide, will GRUB be reinstalled to the EFI partition automatically, or will it be installed into the root partition where Ubuntu is installed ? Obviously, I do not want this to happen.


I'm trying to convert OBJ to FBX for my project in Unity. I downloaded this Link model which comes with an OBJ file and MTL file from:  I imported the OBJ file to Blender using the Import > Wavefront (.obj) option and it shows up like this:  When I look in the Texture Paint tab in Blender it shows the material file has been added successfully:  But when I export the model to FBX and import to Unity the material is not there? I am very new with Blender and 3d modelling so I am not sure what I am doing wrong :(

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


I am playing with regular expressions in Javascript and have stumbled across an unexpected behaviour. Take a look:   I am trying to replace .html-wrap string in a #my-html-wrapper-random .html-wrap .main-content with #my-html-wrapper-random .html-wrap. For some reason, the result after replacement is:  #my#my-html-wrapper-randomper-random .html-wrap .main-content instead of expeceted #my-html-wrapper-random #my-html-wrapper-random .main-content  What is the reason for this behaviour?    var testString = "#my-html-wrapper-random .html-wrap .main-content"; var rxString = ".html-wrap"; var rx = new RegExp(rxString); var result = testString.replace(rx,"#my-html-wrapper-random"); // unexpexted result strinf console.log(result);

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


Let $T \in L(V,W)$ where $L(V,W)$ denotes the set of linear maps from $V$ to $W$. Prove that $ \text {(null}~T^*)^\perp \subseteq \text{range}~T $ where $T^*$ is the adjoint operator ( not related to the adjoint matrix) and $A^\perp $ refers to the orthogonal complement of $A$. Reference source is linear algebra done right by sheldon axler  Attempt: Let $w_2 \in \text{(null}~T^*)^\perp$.  Our aim is to show that $\exists v \in V$ such that $Tv=w_2$.  We can express $W = \text {null} ~T ~\oplus~\text{(null}~T^*)^\perp$. Thus, Let $w = w_1+w_2$ where $w_1 \in \text {null} ~T$.  $T^*(w)=T^*(w_2)=v$ for some $v \in V$     If we somehow prove that $<(Tv-w_2),~(Tv-w_2)>=0$, then we are done   But expanding the above seems to make it only more complicated.  Any ideas on how to move ahead? I have browsed through similar questions and tried to employ similar techniques but in vain.  Thanks a lot!

How can I prove that, if $V$ is a finite-dimensional vector space with inner product and $T$ a linear operator in $V$, then the range of $T^*$ is the orthogonal complement of the null space of $T$?  I know what I must do (for a $v$ in the range of $T^*$, I have to show that $v\perp w$ for every $w$ in $\ker(T)$ and then do the opposite), but I don't know how to show that this inner product is zero.


How to disable bluetooth automatic turn on in Ubuntu 18.10

How can I deactivate Bluetooth on system startup?


How can I do a screencast (having a video file out from my screen output) without X server? I mean, purely from the tty, no KDE, no LXDE, no Xorg beneath them. Like if I were in single-user mode.

We need to make some videos about working with LaTex documents. We have the typescript and timing -files and now we need to convert them into videos to display them in answers. Basically, the way to do that is to make small Gif -animations. Basically if I could record some area in the X window to GIF, then it would be possible over X to make such videos but it is a bit hxckish way and slow. So how can I convert script -processing into Gif -animations?  $ script -t 2> timing   # pastie.org etc to show your working ...WORKING... $ scriptreplay timing   #how to make them into videos on this site?   Example videos  The source is  but created with pay-ware W tool.     Perhaps related    Screencasting in Windows , what about in *ix?


As you can see in the photo there lines dont link up pefectly and don't follow the guidelines precisely. Is there a way I can make every exact?

So I'm doing this isometric thing.  I started using a grid and thought I was well on my way. Loving it and understanding it. Until disaster struck. I needed to enlarge a couple of things. Found out that this doesn't work on a grid.  I found in  question that it is nearly impossible.  Until someone suggested that it can be done without a grid. Because the explanation would be to long to do in a comment I would like to hear your export vision on how to draw isometric shapes in Illustrator without the use of a grid.


What I have done so far:  $n$ must be even $(n-1)(n+1)|2^{n!}-1$ because $n-1$ and $n+1$ are odd, they are relatively prime so both $n-1$ and $n+1$ should divide $2^{n!}-1$  Then I get lost in how I should handle it. Could anyone help me with that?

Prove that for any even positive integer $n$, $n^2-1 \mid 2^{n!}-1$     This is from a book. They have given the proof. But I didn't understand it well. I am looking for a simpler proof. Or it will be helpful if someone explain this a little bit more - Proof: Let $m = n+1$ then we need to prove that $m(m-2) \mid 2^{(m-1)!}-1$. Because of $\phi(m) \mid (m-1)!$, we have $2^{\phi(m)} -1 \mid 2^{(m-1)!} -1$. And from Euler's theorem, $(m-2) \mid 2^{(m-1)!}-1$. Because $m$ is odd, $gcd(m,m-2)=1$ and the conclusion follows.


I am making a text game about investing in the stock market, however I need a better algorithm, as the current simulation just goes up and down randomly. How can I make it so that its a more realistic simulation in python.   I've looked at the answer to the question "", but I want the stock price to be influenced by the users actions, and based on non random actions that they have done. For example, if they buy a massive quantity of an item in the game, the value will go up

I'm making a corporation simulator, and it contains stocks. In the game you can buy and sell stocks, but I can't implement a realistic change in the price for them. How do I make them change up/down in a realistic way?


I bought a Canon EOS 500N body (EF mount) and I want to also buy a Nikon N65 (F mount) camera. The question is if with  I can use a lens for both cameras?  maybe you have some similar experience?

Can we use the lenses from, say a Canon EOS 550D kit (Canon EF-S 18-55mm) with a Nikon DSLR D5000 for example) ? Also, is the reverse possible ?  I'm looking at interchangeability between recent DSLR lenses only, and not with older lenses. Also, for "average" lenses, and not ultra wide/ultra zoom.  The reason for this question is that I'm trying to decide between a Nikon D5000 and a Canon EOS 500D. I like the Nikon better, but Canon is more popular here amongst people I can interchange lenses with :)


Is it OK to leave an airport while in transit?   I am from Algeria and am going to fly to Turkey with a 14-hour layover in Amsterdam. Can I leave the airport without issues?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I'm trying to visualize real time or hypothetical example (Human body, bus etc any existence in nature)  to differentiate between static and non static nested classes. Its little strange question, but I think its good relate with real world :)  Usually I follow below concept   class A {     class B     {         // static int x; not allowed here     }      static class C     {         static int x; // allowed here     } }  class Test {     public static void main(String… str)     {         A a = new A();          // Non-Static Inner Class         // Requires enclosing instance         A.B obj1 = a.new B();           // Static Inner Class         // No need for reference of object to the outer class         A.C obj2 = new A.C();      } }   But its something just code and formula to code. But am curious to know how people understand with any hypothetical scenario if any.  Please share..!

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?


Are the experiments that prove that time dilation exists, actually proving that an atomic clocks ability to keep time is affected by gravity/acceleration? How do we know 100% that that is not the case?  I am having trouble wrapping my head around how and why time dilation happens. I am not looking for a math explanation in any sense at all but a practical one. You can explain to me mathematically how a spinning spaceship creates a sense of gravity for people inside but I can take a bucket of water and spin it around and see and experience why that happens quite easily.  Is there any clear, practical explanation like this for time dilation?  Secondly how is this actually proven? How do we know for sure that atomic clock's frequencies don't fluctuate as gravity/acceleration changes? How do we know we are actually measuring "time"

Atomic clocks were used in Hafele and Keatings experiment which supposedly helped to prove time dilation.    How can we be sure other forces didn't act upon the clocks as a result of their being at different speeds and elevations? Perhaps the elapsed time may have been the same for all and only appeared different as a result of the clock's atoms behaving differently in different environments.  How might the presence of dark matter (presumably all over the place) impacted the clocks if say the dark matter is stationary relative to the earth's rotation?  What experiments have been done to test the constancy of clocks at different speeds and elevations?


I want to get the latest END BALANCE of customer, when the STATUS is success. Picture of the table and result wanted is attached above.

I'm used to working with VLOOKUP but this time I have a challenge. I don't want the first matching value, but the last. How? (I'm working with LibreOffice Calc but an MS Excel solution ought to be equally useful.)  The reason is that I have two text columns with thousands of rows, let's say one is a list of transaction payees (Amazon, Ebay, employer, grocery store, etc.) and the other is a list of spending categories (wages, taxes, household, rent, etc.). Some transactions don't have the same spending category every time, and I want to grab the most recently used one. Note that the list is sorted by neither column (in fact by date), and I don't want to change the sort order.  What I have (excluding error handling) is the usual "first-match" formula:    =VLOOKUP(  [payee field] , [payee+category range] , [index of category column] ,  0 )   I've seen  like this, but I get #DIV/0! errors:  =LOOKUP(2 , 1/( [payee range] = [search value] ) , [category range] )   The solution can be any formula, not necessarily VLOOKUP. I can also swap the payee/category columns around. Just no change in sorting column, please.    Bonus points for a solution that picks the most frequent value rather than the last!


$X$ and $Y$ are sets.  $X \times Y$ denotes the cartesian product of the set X and Y.  It's given that none of the sets is empty.

This is a problem from Discrete Mathematics and its Applications:   Explain why $A \times B \times C$ and $(A \times B) \times C$ are not the same.   I understand the process behind the Cartesian product of two sets:  Let $A$ and $B$ be sets. The Cartesian Product of $A$ and $B$, denoted by $A \times B$, is the set of all ordered pairs $(a,b)$, where $a \in A$ and $b \in B$. Hence, $$A \times B = \{(a,b)\mid a \in A \land b \in B\}.$$  Youre forming a set of all the possible ordered pairs where one element is a member of the first set and the other element is a member of the other set. How would you start this proof or explanation? To me these should be the same because it involves the same operation (Cartesian cross product). Usually when there are three expressions that are applied the same operation, you just go left to right, say 4 * 5 * 6. I don't understand how you would explain A x B x C is not equal to (A x B) x C. To me, using my last example, that's like explaining 4 * 5 * 6 is not equal to (4 * 5) *6.


Given a sequence of continuous functions $f_n: [a,b] \rightarrow \mathbb{R}$, $f_n \rightarrow f$ pointwise and $f$ continuous, does $f_n \rightarrow f$ uniformly? I know that this is not true if $f$ is not continuous, for example let $[a,b] = [0,1]$ and $f_n = x^n$, then $f_n \rightarrow f$, $f(x) = 0$ for $x \in [0,1)$ and $f(1) = 1$. However, given $f_n \rightarrow f$ and $f$ is continuous, this seems to be true. It seems really strong though so I am wondering if there are counterexamples.

As I was going over the definitions of pointwise and uniform convergence I came to the following problem: since the canonical example for continuous functions on $[0,1)$ which are pointwise but bot uniform convergent(wrt the constant function $f=0$) is sequence of functions $f_n(x) = x^n$ I ask myself is there such sequence of functions for the interval $[0,1]$. So far I couldn't think find any example and I am stating to believe that the answer might be negative. So what do think, is there such sequence and if not can it be proven that such sequence does not exist?


I am asked whether the function $f(x)=x\sin(\frac{1}{x})$ is uniformly continuous on $\mathbb{R}\setminus\{0\}$  My first intuition was to compute its derivative: $f'(x)=\sin(\frac{1}{x})-\frac{1}{x}\cos(\frac{1}{x})$  I found out that this function is not bounded when approaching $0$. So $f$ is not Lipschitz on $\mathbb{R}\setminus\{0\}$  I then picked sequences $x_{n}=\frac{1}{2\pi n}$ and $y_{n}=-\frac{1}{2\pi n}$ and computed $|f(x_{n})-f(y_{n})|=4\pi n\rightarrow+\infty$  So I am convinced that $f(x)$ is not uniformly continuous on $\mathbb{R}\setminus\{0\}$  Is my approach correct?

For the $f(x) = x \sin{\frac{1}{x}}$ for $x \neq 0$ and $f(0) = 0,$ my text book asks the following questions.  (b) Why is $f$ uniformly continuous on any bounded subset of $\mathbb{R}$?   (c) Is $f$ uniformly continuous on $\mathbb{R}$??  The graph for the function is this.    For the question (b), if I take subset between $[0.2,0.6]$ or the subset where the slope is steep, I don't think the function is uniformly continuous because I think for a given $\epsilon>0$, there is no unique $\delta >0$ for the bounded subset. Therefore, it also cannot be uniformly continuous on $\mathbb{R}.$ However, the questions sounds like the function is uniformly continuous and the book says that it is uniformly continuous. The answer on the book says something but I need more explanation. Thanks.


i wanna get the path of the folder so that i can see or add apps to start them from start command in cmd.

Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.


I need to pentest the vulnerability of the "SSH Server v5.3" The problem is that Ubuntu comes with the SSH Server version 7 and I don’t know how to remove the current one.  Probably: apt remove ssh-server —purge  But how can I apt install ssh-server 5.3?  Is there anyway searching in old apt repo for 5.3 version?  Thanks!

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


I want to convert a string to time using the parse method which is going to be inserted to database later. But I get: Incompatible Types: Java.util.date cannot be converted to Java.sql.Date. Any Solution?  String s = time.getText();     DateFormat sdf = new SimpleDateFormat("hh:mm:ss");     Date d = sdf.parse(s);

I am trying to use a  as input and then creating a query with it - so I need a .    I was surprised to find that it couldn't do the conversion implicitly or explicitly - but I don't even know how I would do this, as the Java API is still fairly new to me.


Can my MacBook Pro (Retina, 15-inch, Mid 2014) support 4k at 60Hz through Thunderbolt 2? If so, what adapter do I need?

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


I am currently not on a Linux machine. Would the following command produce my wanted result?  ls | grep ".pdf" | wc

If parsing the output of ls is dangerous because it can break on some funky characters (spaces, \n, ... ), what's the best way to know the number of files in a directory?  I usualy rely on find to avoid this parsing, but similarly, find mydir | wc -l will break for the same reasons.  I'm working on Solaris right now, but I'm looking for a answer as portable across different unices and different shells as possible.


I just downloaded the Windows 10 Ubuntu app. when I click on the app, it brings up a command line interface (I think interface is what it is called) but I do not know how to bring up the Ubuntu GUI. Is there a manual to tell how to start the app and open Ubuntu?

I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer.  I want to know which method is the most hassle-free (easy to install AND to use), and which one is less memory-heavy.  I just want Synaptic and CMake. Why couldn't that be a builtin feature?


I have created external database on localhost with image stored in one of the columns in BLOB format. Then I interfaced this external database using View Database Connector, created VIEW. I could display other columns like  name, phone etc easily but I could not display the image stored in BLOB format. I used Rewrite Results and wrote <img src='{{ blob_image }}'> where blob_image is the name of the column. I see small green color image icon which we generally see when image is not available. If I store image path in the column and use above Rewrite Result, it works fine. But I need to store image in BLOB format and display in drupal 8 Views. If anyone has any suggestion, please let me know. Thanking you in anticipation. Nilesh Kulakrni

I created new image database on localhost (other than Drupal original database) that has images in one column. Then I installed the Views Database Connector module; I could integrate it with Drupal to display the content of the new image database. I can easily see columns like name, email, phone number stored in this new image database as string of characters, which are all text columns. When it comes to display an image from the external database, I am stuck. I tried saving images in two formats.  As URL linked to the path of the image file As a BLOB  In the first case, I see the URL; in the second case, I see a string of characters. How do I make the Views module understand that this field is an image it should display as image and not as text?


really strange one this.  I'm calling an AJAX call which returns an array of items using JSON (should be 5).  In the success function I console.log the response which shows me the array which has 5 items.  (5) [{…}, {…}, {…}, {…}, {…}]     0: {id: "9232eef2-f66b-4a63-94dd-448271e9d4d0", title: "Dr"}     1: {id: "3d27249e-d825-4e51-8032-0ffbe8ec839d", title: "Miss"}     2: {id: "01d4f5c1-f19f-4390-9e01-7cd4cd501d07", title: "Mr"}     3: {id: "20b9bb71-fa48-4597-ab91-0028e7cb123f", title: "Mrs"}     4: {id: "89029583-6549-45a3-93fe-6ec32a73381e", title: "Ms"}     length: 5   When I perform a loop I get the following results for title:  11:50:24.320 stage-1.php:241 Dr 11:50:24.320 stage-1.php:241 Miss 11:50:24.320 stage-1.php:241 Mr 11:50:24.320 stage-1.php:241 Mrs 11:50:24.320 stage-1.php:241 Ms 11:50:24.320 stage-1.php:241 undefined   So I console log the k  11:52:10.685 stage-1.php:241 0 11:52:10.685 stage-1.php:241 1 11:52:10.685 stage-1.php:241 2 11:52:10.685 stage-1.php:241 3 11:52:10.686 stage-1.php:241 4 11:52:10.686 stage-1.php:241 clean   My code is this:  $.ajax({     type: "GET",     url: "/assets/core/php/ajaxCalls/optionFields/getData-v2.php",     dataType: "JSON",     data: {        optionFieldTypeID: "bb5ac90b-22c0-438d-8b75-d2cb23bb6df3"     },      success: function (response) {         console.log(response);         for (var k in response) {              console.log(response[k]["title"]);              console.log(k);          }     }   });   I guess I'm doing something really obviously wrong but can't see it - any ideas?

I've been told not to use for...in with arrays in JavaScript. Why not?


This company seems to keep things pretty quiet. It looks like steady accumulation whenever there is profit taking of a sell off. The past few days however, there have been some extraordinarily high transactions made between the bid ask spread right at the end of the trading day. Almost as if not to prompt anyone to copy cat.

Not related to  question, I am asking why stocks seem to be traded at very high volumes right at the start and end of the trading day. Is this because these graphs factor in all of the premarket and postmarket trades?


i'm doing some tests with the java awt event queue, posting events.  ActionEvent event = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "EVENT"); try {     Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event); } catch (SecurityException e) {     e.printStackTrace(); }   Then in my JFrame, there is a event listener:  public void actionPerformed(ActionEvent e) {     if(e.getActionCommand() == "EVENT") {             System.out.println("Event received");     } }   the trouble is the event i've posted in the queue did not get dispatched to the actionPerformed() listener.  i did further tests: in my class constructor:      long mask = 0xffffffffffffffffL;     Toolkit.getDefaultToolkit().addAWTEventListener(this, mask);   and the event listener:  private HashMap<Integer, Integer> seen = new HashMap<>();  @Override public void eventDispatched(AWTEvent event) {     if(seen.containsKey(event.getID()))                  seen.replace(event.getID(), seen.get(event.getID())+1);     else {         System.out.println(event.getID());         if(event instanceof ActionEvent)             System.out.println(((ActionEvent) event).getActionCommand());         seen.put(event.getID(), 1);     } }   i used a hashmap as the number of events received is rather overwhelming, hence i simply print the unique ones. this time round i did get a response  1001 EVENT   in the event listener eventDispatched(), but not in the action listener  actionPerformed(). and if i were to post the event from a different thread e.g.  Thread thread = new Thread(new Runnable() {      @Override     public void run() {         ActionEvent event = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "EVENT");         try {             Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);         } catch (SecurityException e) {             e.printStackTrace();         }                    } }); thread.start();   even the event listener did not receive the event.   my question is then, is there any way that i can post an ACTION_PERFORMED event to the EDT (event dispatcher thread) event queue and have it processed in actionPerformed(ActionEvent e) or some such listeners from a different thread? Thanks in advance!  edit: i did try to replace the event queue with a custom queue, that works, but is there a way to do the same with the standard event queue and EDT?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


My PC works with Ubuntu (16.04, 32-bit) and Windows (7, 64-bit) options.  My Ubuntu is broken. The only thing I can do in my user in Ubuntu is to open a terminal.  I want to try to upgrade to Ubuntu 17.10  64 bit using only the terminal.   I seek a step by step instructions that need no prerequisite knowledge.

I would like to know how to upgrade from my current version of Ubuntu to the next stable from the Command line interface?


I'm trying to understand why the Earth bulges at the equator. But before looking at the Earth, which introduces gravity, I wanted to make sure I understood the shape of some rotating objects and if/why they have a bulge.  A metal sphere: A very rigid object. If this is rotated then there is no bulge because it requires a lot of energy to deform the object.  A ball of sand: Nothing is connected. If this rotated then all the sand is simply thrown off due to inertia, leaving nothing behind after a time.  A ball of dirt: Somewhat rigid. The dirt wants to "fly off" due to inertia but tension keeps the object pulled together, as a result there is bulge at the equator - where the velocity is fastest and thus more "tension" (more bulge) is needed.   Does the "ball of dirt" situation accurately resemble Earth? If so, then does this not suffice to explain why the Earth bulges without even needing to mention gravity? Or is Earth more like the "ball of sand" which is can only be kept together (while rotating) under the force of gravity? Or is it something between or neither at all?  I'm afraid I'm terribly confused as to how the various effects come in to play and interact to create an equatorial bulge. Some sources have tried to explain in terms of an  but I'm not entirely satisfied with that as an explanation (actually that source even indicates the equilibrium approach is not so straightforward).

The earth is not a sphere, because it bulges at the equator.   I tried fiddling with centripetal force equations and gravity, but I couldn't derive why this bulge occurs.    Is there   (a) a mathematical explanation using forces (not energies) and   (b) a simple intuitive explanation to explain to others why the bulge occurs?


I have a simple question about the formula for the volume of the cone. Let $C$ a cone, which base has radius $r$ and height equal to $h$. So its volume can be compute by the formula:  $$\text{Vol}(C)=\frac{\pi r^2h}{3}; $$ so far nothing new. I know how to deduce this formula using the integral, but:   why is the volume of the cone exactly one third of the volume of a cylinder with same circle base and the same height? I'm looking for a way to see it without using integral.

The volume of a cone with height $h$ and radius $r$ is $\frac{1}{3} \pi r^2 h$, which is exactly one third the volume of the smallest cylinder that it fits inside.  This can be proved easily by considering a cone as a , but I would like to know if it can be proved or at least visual demonstrated without using calculus.


Never really got the reason, it seems that when they only have their endoskeletons they are super sluggish and can only walk... I don't see how putting flesh on that would actually help.  When did it happen: Well when Pops (in Salvation) shoots the other supposedly T-800 the one who came asking the clothes of the junkies and then started running towards Pops.

I just re-watched the first two films in the Terminator series. The T1000 (Robert Patrick) does a lot of running, and is quite fast.  I didn't see many scenes where the T800 (Arnie) ran. Is it because he's really heavy? Is he mainly designed as a heavy "stand your ground" machine?  The only scene I could see him running is in T2 in the mental hostpital where the T1000 morphs through the metal gate and his gun gets caught. Then the T800 does a little jog to get into the elevator following John and Sarah. (anybody know of any other running/jogging scenes?) (EDIT Arnie also breaks into a run while pursuing Reece and Sarah down the alley after the NOIR nightclub attack.)  If he can at least jog though, why wouldn't he do this throughout the entire film? You would think that from a "chance of survival" point of view, if he could get a John even the slightest bit faster then he'd do so.  Of course, maybe I am overthinking this... Arnie walking around slowly is a lot more badass than Arnie jogging around.  Edit: Just watched T3 again, the T800 also ran towards the end when the big hangar door was closing and he ran over to slow it down. Interested in other examples of the T800 running too.


I know that there exists an Isomorphism between sl(2,C) and  𝔰𝔲(2)⊗ℂ but could not find one on the complex basis of sl(2,C). Does anyone know it?

I'm desperatly confused by notations and formulations so if someone could clarify the following things a little Í would be deeply grateful. The Lie algebra $\mathfrak{so}(1,3)_+^{\uparrow}$ of the proper orthochronous Lorentz group $SO(1,3)_+^{\uparrow}$ is given by \begin{equation} [J_i,J_j]=i \epsilon_{ijk} J_k \end{equation} \begin{equation} [J_i,K_j]=i \epsilon_{ijk} K_k \end{equation} \begin{equation} [K_i,K_j]=- i \epsilon_{ijk} J_k \end{equation} We can now define new generators with the old ones $N^{\pm}_i= \frac{1}{2}(J_i \pm i K_i)$ which satisfy \begin{equation} [N^{+}_i,N^{+}_j] = i \epsilon_{ijk} N^{+}_k ,\end{equation} \begin{equation} [N^{-}_i,N^{-}_j] = i \epsilon_{ijk} N^{-}_k ,\end{equation} \begin{equation} [N^{+}_i,N^{-}_j] = 0. \end{equation} where we can see that $N^{+}_i$ and $N^{-}_i$ make up a copy of the Lie algebra $\mathfrak{su}(2)$ each. My problem is to get what is going one here mathematically precise. Are the following statements correct and if not why:  When we build the new operators from the old generators we complexified $\mathfrak{so}(1,3)_+^{\uparrow}$ \begin{equation}(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} = \mathfrak{so}(1,3)_+^{\uparrow}\otimes \mathbb{C} \end{equation} We saw that $\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C}$ is isomorph to two copies of the complexified Lie algebra of $\mathfrak{su(2)}$: $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq \mathfrak{su(2)}_{\mathbb{C}} \oplus \mathfrak{su(2)}_{\mathbb{C}} $. Where exactly did we need that $\mathfrak{su(2)}$ is complexified here? The Lie algebras defined by $N^{\pm}_i$ are exactly those of $\mathfrak{su(2)}$ and we never use complex linear combination of $N^{\pm}_i$ or am I wrong here? $\mathfrak{su(2)}_{\mathbb{C}}$ is isomorph to $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C}$: \begin{equation}\mathfrak{su(2)}_{\mathbb{C}} \simeq (\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C} \end{equation} Here $(\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C}$ denotes the complexified Lie algebra of $SL(2,\mathbb{C})$ Is $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{R}$ correct?  Here $(\mathfrak{sl}(2, \mathbb{C}))_\mathbb{R}$ denotes the real Lie algebra of $SL(2,\mathbb{C})$ Is $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C} \oplus (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C}$ correct?  I looked this topic up in different books and each seemed to state something different. One book even used three differrent versions of $\mathfrak{sl}(2,\mathbb{C}) $ namely: $\mathfrak{sl}(2,\mathbb{C}) $, $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C}$ and $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{R}$.  states simply that $\mathfrak{sl}(2,\mathbb{C}) $ is the complexification of $\mathfrak{su(2)}$ without making any reference to $SL(2,\mathbb{C})$ which does not help me either. Any help would be great.


Let's say that I have 3 chests, each containing one of these items:   A full set of armour (Leather, White Stained) A Named Lever A Named and Enchanted (Unbreakable) Bow.   How can I "restock" these items to the chests if someone was to remove them? I have a feeling it might involve a trapped chest and some command blocks....

I am using the following Command to spawn a new chest at the given coordinates with stuff in it at each new round:  /setblock 264 4 997 minecraft:chest 0 replace {Items:[{id:274,Count:1,Slot:0},{id:275,Count:1,Slot:1}]}   The problem with that is that when replacing the old chest all the stuff in the old chest is thrown out. And that's pretty much not what I want. I need to find a way to replace a chest which might have stuff in it without throwing those things out.  Someone else said I should replace the given position for one tick with lava, which I tried. Works in 90% of the tries (in the other 10% the items from the chest are thrown to far away - out of the spawned lava block), but the problem with that is that I can't use it in wooden areas because it might burn everything down.  So what can I do to fix that problem, because otherwise my custom made Pv.P map is not gonna work?  Thanks very much!