Is it possible with one of the template suggestion hooks to also specify a new template location?

In a custom module I'm adding a custom page template suggestion per multi-site like following which would then search for page--MYSITE.html.twig in the current theme's /templates folder.  /**  * Implements hook_theme_suggestions_HOOK_alter().  */ function MYMODULE_theme_suggestions_page_alter(array &$suggestions, array $variables) {    $site_path = \Drupal::service('site.path');   $site_path = explode('/', $site_path);   $site_name = $site_path[1];    $suggestions[] = 'page__' . $site_name; }   Question: Is it possible to also specify a new location for this template. Like let's say inside my custom module's /templates folder?  Why: It would let me use a core theme but with my custom template (without the need to add something custom to core or to create a new sub-theme, lazy as I am).  There are 3 suggestion hooks that come into my mind but with none if them it seems possible to also specify a custom location. Is this right? Or is there a way? Is it bad practice to do so?


git-upload-pack not found when deploying

When I'm trying to deploy my react app to github pages, I ran npm run deploy. It managed to build but has the following errors when deploying:  git-upload-pack '.': git-upload-pack: command not found fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists.   My git remote -v returns:  origin  https://github.com/helplah/shopping-cart.git (fetch) origin  https://github.com/helplah/shopping-cart.git (push)


Ubuntu 20.04 stuck at dev/sdb6 clean during boot

I recently upgraded from Uhuntu 18.04 to Ubuntu 20.04. I was facing some issue about held broken packages when trying to install vim. Turned out there was some problem with the existing Python installation. So I uninstalled and reinstalled python3.8 but after that when I boot up I am stuck at the following screen.  Could someone please instruct how to proceed from here? EDIT : I managed to log in to tty1 in recovery mode. Although I am able to run most terminal commands there, I am not able to get to the GUI. echo $? returns 1 which means gdm3 is not running. sudo systemctl start gdm3 also does not work.


Tried to boot Ubuntu, but the GRUB rescue prompt shows up instead

Tried to boot Ubuntu, but this shows up instead:  grub rescue>


Simple way to draw Hadamard matrices (black/white grids) from external input

I want to draw Hadamard matrices of different sizes. This are matrices which have entries +1 and -1 (plus some other properties). Hadamard matrices are often pictured as black/white grids like    I'm looking for a simple way to draw them with LaTeX. That means there is an input file consisting of +/-1's (or other values, if this is more helpful). LaTeX should convert it to a b/w grid. And it would be nice if I could enter a size for the whole grid and it does automatic resizing. Like in the pictures above.


I am trying to execute a MySQL query from within a function being called by a search form, giving in 2 values, $Search & $dropdown.  To prevent MySQL injection I am trying to bind the values as below:  $database->query('SELECT * FROM equipment WHERE :dropdown like :Search'); $database->bind(dropdown, $dropdown); $database->bind(Search,$Search); $getServers = $database->fetchall();   In the MariaDB logs I found the query was executed as below:  SELECT * FROM equipment WHERE 'rackid' like '5';   The problem is that the column name:('rackid'), is executed with quotes which  give 0 output, if I manually execute the same code without the quotes as below I get the desired ouput.  SELECT * FROM equipment WHERE rackid like '5';   Is there a way to prevent the code from adding the single quotes to the variables in the mysql statement?


Bash prompt execute command every time a new prompt is displayed

I have the following prompt in bash which shows the current git branch:  PS1+="$(git_prompt)" #git_prompt is a function in my .bashrc   which works when I source the .bashrc, but not when I change the branch, so the PS1 var gets only evaluated when I source the .bashrc, but it should be evaluated every time a new prompt is displayed. How can this be accomplished with bash 4.3 ?


What was Emperor's plan after seducing Luke to the dark side?

Provided there was  in place, was Sidious going to replace Vader with Luke? Or, was there something else in his mind (like what he did with Darth Maul in Star Wars: The Clone Wars)?


What would be the associated wavelength of the particle if its velocity is zero?

What will be the wavelength of a particle whose velocity is zero?   According to de Broglie's hypothesis, then the wavelength would become infinite as the momentum is zero. But, I think for a stand still particle, its particle nature should be more dominant, as at that moment it is highly localized.


latex interpretation of selected German and Latin as well as mathematics-physics characters via matlab-prettifier

I want to append some matlab code to a tex document and I use the matlab-prettifier package for that. I updated my miktex installation yesterday and I am now forced to use the \UseRawInputEncoding code line. Everything works fine for the German and Latin symbols I have in my matlab code, except for the degree sign, which comes out as an r with an inverted hat above, regardless of whether I use the literate substitution approach or not. Any suggestions on how to solve this elegantly would be welcome. Here is my MWE: \documentclass{article}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[framed,numbered]{matlab-prettifier} \usepackage{textcomp}   \UseRawInputEncoding  \begin{document}  \lstset{   language=Matlab,   style=Matlab-editor,   basicstyle=\mlttfamily\footnotesize,   literate=%     {°}{\textdegree{}}1% }  \lstinputlisting[]{matlab_code.m}  \end{document}  and my matlab_code.m file reads as: % ----------------------------     % Rö and Mé (T = 23°C) var_1 = 10;  Obviously, I can write degree instead of ° in the matlab file and substitute that by \textdegree, but I would like to bring changes to the matlab code to a minimum and actually use the degree symbol, whose use comes much more naturally than that of the corresponding text. Is it possible to directly read in tex and via matlab-prettifier a ° symbol written on a matlab file, rather than "going around" by substituting the corresponding degree text by the actual symbol?


I am looking for various ways of explaining to my students (in an elementary statistics course) what is a two tailed test, and how its P value is calculated.  How do you explain to your students the two- vs one- tailed test?


The fonts on the interface are too small, how can I make them bigger?

I just downloaded Blender to my Surface Pro 4 tablet, but I cannot read the menu bars, the fonts are too small. How can I make the menu fonts bigger?


Show that there is no solution to the congruence $x^2\equiv3\bmod5$.   I'm not sure if the fact that the only numbers divisible by $5$ are those ending in $0$ or $5$ will help…


When testing can I not use existing Data?

I am currently programming a trigger on Opportunities.   I created a test class for this and in my Sandbox I created an account, contact and opportunity. When I try to reference them   Opportunity Opp = [SELECT id from Opportunity where name = 'Test1'];    and then start my   Test.startTest();         Opp.StageName = 'PO in (100%)';          update Opp;         Test.stopTest();   It just errors and shows that Opp returns 0 rows. However when I paste my first bit of code in 'Execute Anonymous' it returns a row and the correct info.   Does this mean I have to create an account, contact, quote and all necessary fields in my test class?


What will happen if I upgrade the laboratory while upgrading a spell or unit?

While playing Clash of Clans, I am upgrading my lightning spell then decided to upgrade my laboratory, then I did. What will happen to the lightning spell I am upgrading? I assume it is still upgrading cause they don't refund my elixir.


How to move the elements in cross axis with align-items in flex?

container in cross axis but align-items didnt work here are html and css code tanks for your answers :)   .banner .black .content {   display: flex;   flex-flow: column;   text-align: center;   align-items: center; }

شرکت بازرگانی قطعات آسانسور
       <button>تماس با ما</button>


URLs are linked despite being inside a code span

Markdown source:  `http://google.com`  - `http://google.com`     - `http://google.com`   Rendered result:  http://google.com   http://google.com   http://google.com    Note that the third code span is a link. Adding a newline before the list item makes the link disappear.


Why can’t Voyager crew beam in new lungs for neelix?

In Episode 4, Season 1 of Voyager, Neelix gets attacked by a species that beams out his lungs.  As a hot fix, the holographic doctor creates a hologram of his lungs, based on a recent Transporter log.  If the transporter logs are detailed enough to create holographic lungs, why couldn’t the crew use the transporter to materialize a second pair of lungs for neelix?  From my understanding of beaming, the information can be materialized independent of the dematerialiazation. The second Riker from TNG is an example of the materialization process being independent from the dematerialization process.


How to check if a TCP socket is still connected in C?

I am building a Distributed File system using TCP Sockets in C. I have to distribute a file and send it to four servers from the client code I have written. I was wondering if there is a systematic way to check if the connection to a specific server is still alive.  Some additional information: 1.) Both the server and client codes in C are written by me. 2.) I issued a connect() call for all the servers at the start of my client code (and it was successful). 3.) I don't wish to attempt to read or write data on that socket to check its status. I intend to handle that situation where a server is suddenly shut down.


The concept: A library is placed in my public_html folder, it's purpose to decode a string. But if that library is NOT present, to stop with an error. The way that was suggested before was:  eval("require x.pm");  if ($@) {     print "The library is missing"; } else{      BEGIN{         eval{"use x"};     }      1123131323fsdfsfsdfsfgdfgdfgghfghfghfgheterterter ...     no x; }   If the library is present, the decode works fine, and everything is "Hunky Dory". IN THEORY ... if the file is NOT present, the top loop should print an error ... except all that happens is I get an Error 500 as the script sees the encrypted string, and decides it's not a valid program.  Wondered if it was the "$@" so I tried it with flags  $set=0; $set=1 if eval("require x.pm");  if ($set eq 0){ ... ..   Same thing. Tried putting the code into a string:  $_="1123131323fsdfsfsdfsfgdfgdfgghfghfghfgheterterter ..."   That didn't help. So can anyone throw any light on what I'm doing wrong?


Let $G=GL(2,\mathbb R)\oplus GL(2,\mathbb R)$ and let $H=\{(A,B)\in G\mid \det(A)=\det(B)\}$. Prove that $G/H \simeq (\mathbb R^*,\times)$.   I'm guessing I should use: "Let $G$ be a group and let $H$ be a normal subgroup of $G$. The set $G/H = \{aH\mid a \in G\}$ is a group under the operation $(aH)(bH)=abH$."


Consider $x^2+3=0$.  If we add $x$ to both sides to construct a new statement $x^2+x+3=x$, what type of reasoning / logic is this? Another example would be completing the square.  New students might say that the added term when completing the square "comes out of nowhere."  Surely it can be done because (and forgive my elementary language) "whatever is done to one side can (and must) be done to the other," but what type of logic is the action of doing so? Are there recommended ways of explaining this concept to K-12 math students?


How do i get the first line of a txt file and set it as a %variable% in Batch?

I would like to send a number to file.txt as a temporary storage for another variable, which can easily be done. I just can't work out what to use to extract the first line of file.txt (which is a number ranging 1-100000) and set it as a %variable% in my running batch script.  So by the end of it I should be able to do echo %first-line-of-file.txt% and it'll print x  Any ideas on how to make this work is much appreciated


Environment aligned doesn't output first part in bracket

\begin{equation}     \begin{aligned}         [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}]=&c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v}',\mathbf{w}],\\         [\mathbf{v},c\mathbf{w}+c'\mathbf{w}']=&c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v},\mathbf{w}'],     \end{aligned} \end{equation}   In this code, [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}] is not shown in the equation. Is it because of the aligned environment? How to fix it?


Proof by induction that $1^2 + 2^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6}$

How would I go about solving this question?  Use induction to prove that for all integers $n ≥ 1$, $$1^2 + 2^2 + 3^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6}$$


Im Overlaying/ Over Dropping my face onto a video i want. im a beginner so i dont know if ive just done something wrong in the process but ill try to be precise.  ok, so the frames and resolution for both files are different so i set in the properties bar to the gameplays resolution/positioning at 1280px720p at 29.97fps  what ive done is ive added the first file witch is the game im playing (1280px720p, 29fps)  ive then add my face (1920x1080p at 29fps), I split all the vid and audio files so that they are all at the same length, i then transformed the vid of my face, scale it down, position it where i want and over drop it over the game.   sounded right to me right??... I dont know, but after i did all the processes it played horridly, then id let it play through and on the second round play at 30 fps for about 10 sec then drop down to 20 or less.   I cant figure out why it does this...


Moving windows on Windows like on Gnome (Alt+DnD)?

Is there a hidden setting or an external utility that would enable moving windows on Windows like on GNOME?  I'm particularly thinking of moving windows using Alt + Drag and drop (which can be changed to Win + drag and drop).  I have machine with Windows (7) and two big monitors at work, and I tend to use multiple smaller windows.  Moving them quickly around is essential, so I'm always missing this GNOME feature.


In AC, there are $R$, $C$, & $L$ or $R$, $X_C$, & $X_L$. $$ X_C = \frac{1}{\omega C} $$ where $\omega=2\pi f$.  But sometime we're using the $X_C = \frac{1}{j\omega C}$. I understand the $j$ is the imaginary unit and it's current lead voltage in capacitance circuit. But why does the equation sometimes have $j$ and sometimes don't?


Book about time portals inside an asteroid in Earth orbit

I read this book many years ago and it had a nice plot. For the life of me I can't remember the name or author so I need help.  Story: one asteroid shaped object appears close to Earth orbit or in the Sol system.  People get on board and start exploring. They find machines/computers that can teach them anything in a very short time (languages, crafts etc).  Towards the end, something happens and one of the characters goes into a long tunnel where he/she opens a portal in time with the help of a device he/she has.  In the epilogue it states that he has been transported back in time to Egypt.  I think there were no pyramids.  Sorry for being brief but this is all I remember. Any help would be appreciated. Thanks.


Using 'a' or 'an' before a word that started with 'H'

What should we use before a word that started with 'H'?   'A' or 'An'? and why?  Sometime using 'a' seems right, sometimes using 'an' seems right, I am confused


Double-click bash file -> pwd outputs my home directory instead of the current directory

In my Downloads directory, I have an executable bash script :  #!/bin/bash pwd   when I double-click on it, pwd outputs my home directory. But I want my script to run from the current directory from where it was clicked.


I can't log into any Minecraft servers at all, not even locally hosted ones.   The error code I get is: java.net.UnknownHostException: session.minecraft.net. A tweet from a worker at Mojang told people that you could just flush your DNS, which I did. That didn't quite work, so I'm wondering if there are any other solutions out there?   I'm not quite sure what other information I have to give. I know that it's not just something with me because I know a lot of my friends also get this error once they try to log into a server, so it would be weird if all of our ISPs just cut us off.


Black screen following me whenever I zoom out in blender

Whenever I zoom out there would be a black screen constantly following me.  The more it zooms out the more I cant see my model


Explaining and deducing the average maximum of an r-element subset of {1,2,...,n}

I need to deduce and explain this statement:  Consider all r-element subsets of the set $\left\{1,2,...,n\right\}$. Each of them has a maximum. Deduce that the average maximum of an r-element subset of $\left\{1,2,...,n\right\}$ is precisely $\frac{r}{r+1}(n+1)$  I don't know how to deduce this. Please, help me.


I use legend style={legend columns=*} to create columns in my pgfplots legends. However, this options only changes the way legend entries are displayed. What I often need is to display various data for each plot, like in a table. Here is an example of the (ugly) work-around I use so far:  \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title={$y=a \cdot x + b$}, xlabel=$x$, ylabel=$y$, legend pos=south east, legend style={legend columns=2}, ]  \addlegendimage{empty legend} \addlegendimage{empty legend} \addlegendentry{$\quad a \quad$} % \quad are just here to make columns wider... I suppose there's a better way \addlegendentry{$\quad b \quad$}  \addplot+[domain=-1:2, samples=10] {3*x+1}; \addlegendimage{empty legend} \addplot+[domain=-1:2, samples=10] {2*x+2}; \addlegendimage{empty legend} \addplot+[domain=-1:2, samples=10] {1*x+3}; \addlegendimage{empty legend}  \addlegendentry{3}  % first data for the first graph \addlegendentry{1}  % second data for the first graph \addlegendentry{2}  % first data for the second graph \addlegendentry{2}  % you've got it... \addlegendentry{1} \addlegendentry{3}  \end{axis}  \end{tikzpicture} \end{document}     I'd be grateful for any ideas to make the syntax cleaner and, above all, robust!


Why is the normalization necesary in Bayesian inference?

In  it reads that:       normalization can be intractable when applying Bayes’ Theorem     And in  it says that:       it does not depend on the parameters since these have been integrated out.    ...  is nothing but a normalising constant   And in  the normalising constant is dropped.    But it seems very necessary to work out the denominator Pr(data) of the right hand side of the Bayes' Theorem in Variational Bayes:     $\Pr(\textrm{params} \mid \textrm{data}) = \frac{\Pr(\textrm{data} \mid \textrm{params}) \Pr(\textrm{params})}{\Pr(\textrm{data})}$       To be specific, in  it provides two answers but I don't get the question. That's I don't understand the problem setup section. How can I relate the left hand side P(Z|X) to what is being approximated P(X)? To be more straightforward, in what problems should I consider the normalization and then need to calculate the lower bound of the Pr(data) and when it is not necessary? And why? Could anyone please exemplify it simply.


CODE:   let name = 'bam';  doc.name = req.body[x].value;      PROBLEM:   I want it to return doc.bam value but actually it get doc.name value while I set name='bam'.


Is the product of two non-holomorphic function always non-holomorphic?

Suppose $h(z)$ is a complex function. I have noticed that $h(z) = f(z)\cdot g(z)$, where $f(z)$ and $g(z)$ are non-holomorphic. Can $h(z)$ be holomorphic?   Can a similar statement be made, if $f(z)$ is holomorphic, but $g(z)$ is not?


Prove $\|x\|\le\sum_{i=1}^n|x_i|\le\sqrt{n}\|x\|$ for all $x\in\mathbb{R}^n$.  I'm stumped, can't find any intuition here or where to begin. Any suggestions?


Curl with SSL not working on ubuntu server

When I try to Curl a SSL page on my ubuntu 12.04 TLS server, it won't work:  not ssl page:  $ curl https://evernote.com/ -vv [the entire webpage]   ssl page:  $ curl https://evernote.com/ -vv * About to connect() to evernote.com port 443 (#0) *   Trying 204.154.94.73... connected * successfully set certificate verify locations: *   CAfile: none   CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * Unknown SSL protocol error in connection to evernote.com:443  * Closing connection #0 curl: (35) Unknown SSL protocol error in connection to evernote.com:443    This does work on my own machine (OS X).  When I try it via openSSL:  $ openssl s_client -connect evernote.com:433 connect: Connection timed out connect:errno=110   openSSL version:  $ openssl version OpenSSL 1.0.1c 10 May 2012


I have an ASUS X401A laptop.  I attempt to install Windows 7 Home Premium 32 bit and all went fine, but i couldn't change the language, so i decided to reinstall it again. But this time i used Windows 7 Ultimate 32 bit, and an error occurred after clicking the install now button, asking for a CD/DVD driver..  Im using an USB stick to install windows.. This pc only has 2 usb ports, one 2.0 and one 3.0 and no CD/DVD drive.  So why i was able to install the home premium but not the ultimate? I already tried to change usb slot while installing but nothing, still the same issue. It's 2 days im trying to fix this, i hope someone can help, have a nice day!


What equipment/ Which settings required for a 400 person group photo?

I received a request to work at a corporate party with a special request  for a group photo of +- 400 people. So far the largest I've had was aprox. 35 people. I work with a Canon Eos 550 and a 35mm or 18-200mm lens.  I would be a shot at the beginning of March between 17:00-18:00 in the Netherlands (meaning relatively little light & prob no direct sunlight). What approach would you recommend?  Thank you for your time,  Simone


Consider:  You should do it. You have to do it.  Does should show suggestion and have to show compulsion or motivation?


Hey Guys I have a Lenovo laptop which came pre installed with a copy of windows 10 Home. For some reasons I need to install Linux in my system, so my doubt is will the windows will be activated if in the future I reinstall the windows? I don't want use dual boot.


Why does the co-efficent of kinetic friction of a block on an inclined plane not change when you increase the angle of the plane?

The coefficient of kinetic friction can be calculated using $\mu_k = F_k/F_n$. A change in angle does not affect the normal force, but doesn't a change in angle affect the friction? As in if the angle is steeper, wouldn't the object have a greater propensity to move down the slope, thus there will be less friction?


What happens to Dragon after Donkey & Shrek drank the Happily Ever After potion?

Every time after watching Shrek 2, I'm disappointed that we don't get to see Dragon while Donkey is transformed into a steed. Is there any information as to what happens to her or what she looks like during that period?


Can't move a file into my /opt folder because I don't have permissions

When I try to move my files into /opt with the command mv, bash says that I don't have permission.


Why $\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)g(nt)\ dt$ goes to $\hat{f}(0)\hat{g}(0)$ as $n \to \infty$

Let $f: \mathbb{R} \to \mathbb{C}$ be a trigonometric polynomial with degree $N > 0$ and $g \in L^1(\mathbb{T})$. I'd like to show that $$\lim_{n \to \infty}\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)g(nt)\ dt = \hat{f}(0)\hat{g}(0).$$ I have learned that, $$f(x) = \sum_{m = -N}^N\hat{f}(m)e^{imx}$$ and if $g_n(t):= g(nt)$, then \begin{equation}\hat{g}_n(m) = \begin{cases} \hat{g}(m/n),\ \ \ \text{if $n$ divides $m$}\\ 0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{otherwise}. \end{cases}\end{equation} So, we have then \begin{align*} \frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)g(nt)\ dt = \frac{1}{2\pi}\sum_{m = -N}^N\hat{f}(m)\int_{-\pi}^{\pi}g(nt)e^{imt}\ dt. \end{align*} I thought I should be able to use $\hat{g}_n(m)$ but I don't have $e^{-imt}$. Is there a trick that I haven't use? Putting $e^{-imt}e^{imt}$ inside the integral doesn't seem to help as well.


Why can't Naruto transform into the Nine Tails?

Killer B is able to transform into the 8 tails at will and be in control as he befriended the 8 tails.  .   Naruto has befriended the 9 tails too, but we never saw him transform into the Nine Tails like he did when he was fighting Pain and lost control of the Nine Tails (made of bones and muscles).     Now all we get to see him transform into is a kind of Susanoo like Nine Tails cloak.     Why doesn't he transform into the actual Nine Tails(made of flesh and bones like in picture below)?


How can I extract sprites from a SNES games?

Planning to use some sprites for a fan project but the sprites I want haven't been ripped yet; how can I extract them in a usable form?


Prove that in a no trivial ring, the set of all prime ideal has minimal elements (ordered by subset inclusion).  I have thought that we can take as a lower bound of the set the ideal (0)={0} because it's the lower bound of any chain and applying Zorn's lemma we know there's a mininmal element.  I don't know if Zorn's lemma can be used in this way. Thanks.


I want to place a limit under a word, as done  except with an arbitrary text rather than an existing math operator like lim or max. \mathop{avg}\limits_{y\in U(x)} gives me the following, but I would like "avg" to be in non-italicized.  I have also tried to define \def\avg{\text{avg}} and \newcommand{\avg}{\text{avg}} but then the subscript is no longer underneath the text, even with \avg\limits_{y\in U(x)}:


MacBook Air/Pro: run script upon lid close?

How can one configure MacOS (10.8 or higher) to automatically and immediately call a user-designated script (probably a bash script) upon the user closing the display lid of a MacBook Air or Pro?  Details.  I want to do this because in some scenarios my MacBook Air 2013 running 10.8.5 does not immediately sleep/lock the screen upon lid close (possibly because a VPN client is trying to open a connection).  As such, I want the system to immediately execute a script which calls  upon lid close.  However, I don't know how to call scripts upon display-lid closing.


How I can invest in Stack Exchange Inc. and in the idea behind the Stack Exchange? Maybe in form of shares?


After logging in on terminal with user name and password, how do I start the GUI?

I am new to Ubuntu, and I am working on a Mac. The Ubuntu installation was done by someone else. I logged in with the user name and password, but I'm not sure what next to do in the terminal to get to the graphical interface. Could someone assist or point me in a direction where I can get useful guidelines? I have done research, but nothing I found helped me.   When I tried to start the lightdm greeter, I got the following message:  lightdm.service not found     Update: My understanding is that Ubuntu Server is installed.


I can't install sublime text2 using the command "sudo apt-get install sublime-text". This command produse an error  "E: Unable to locate package sublime-text". How can I install this? plz hlp me.....


I need to create an array with numbers given by the user, it works but keeps giving me 0

System.out.println("Please enter a coefficients of a polynomial’s terms:");     String coefficents = keyboard.nextLine();     String[] three = coefficents.split(" ");     int[] intArray1 = new int[three.length];  for (int i = 0; i < intArray1.length; i++) {  System.out.print(intArray1[i]); }   //Does anyone know how i can make this work because right not it builds but when i run it, it gives me 0  //if someone could show me or explain to me what's wrong that would help


View count and vote count are not matching on a question

The screenshots speak for itself. How is it possible to have 2 upvotes but only 1 view (which should be anyway my view)?      . I tried to refresh and hard refresh but the view count is still stuck at 1.  I don't think that this is a cache problem (although I have to say that I know really little on the subject) because this never happened to me on other SE sites before. Moreover, I observe the same as the screenshots on 3 different browsers and after closing/reopening the browsers.


No way to improve edit after initially choosing accept/reject

I like the addition of the "Improve" button in the review edits page. However, sometimes I only think of improving a post after choosing to accept/reject. Currently there is no way to do this other than waiting for the edit to be accepted/rejected and when there are <5 edits in the queue this can take a while.  Is there a workaround for this, or can this be added?


maximum area of a rectangle inscribed in a semi - circle with radius r.

A rectangle is inscribed in a semi circle with radius $r$ with one of its sides at the diameter of the semi circle. Find the dimensions of the rectangle so that its area is a maximum.    My Try:   Let length of the side be $x$, Then the length of the other side is $2\sqrt{r^2 -x^2}$, as shown in the image.    Then the area function is   $$A(x) = 2x\sqrt{r^2-x^2}$$  $$\begin{align}A'(x) &= 2\sqrt{r^2-x^2}-\frac{4x}{\sqrt{r^2-x^2}}\\ &=\frac{2}{\sqrt{r^2-x^2}} (r^2 - 2x -x^2)\end{align}$$  setting $A'(x) = 0$,  $$\implies x^2 +2x -r^2 = 0$$  Solving, I obtained:  $$x = -1 \pm \sqrt{1+r^2}$$  That however is not the correct answer, I cannot see where I've gone wrong? Can someone point out any errors and guide me the correct direction. I have a feeling that I have erred in the differentiation.   Also how do I show that area obtained is a maximum, because the double derivative test here is long and tedious.   Thanks!


Can I travel to Germany from a country different from the one I got the visa from?

I am currently in the process of applying for a Schengen Visa to Germany for the month of August. I live in Egypt while my parents live in Saudi Arabia. I finish my Exams at the end of June and was hoping to stay in Saudi Arabia for the month of July and then travel to Germany from there. Is it possible to travel from Saudi Arabia to Germany if I got my visa from Egypt?


Dualboot Windows 8 and Ubuntu 13.4 no sign of GRUB

I have installed Ubuntu several times now, but I am never able to boot in that partition. My UEFI/BIOS does not recognize it, and every boot option I have chosen leads to Windows booting. There is no sign that GRUB has even installed; Ubuntu is just sitting there unable to be used. I have an Asus M5A99FX Pro R2.0 mobo if that helps. Additionally Windows is installed to a 120gb SSD and Ubuntu to a ~60gb partition on a 1tb HDD (I could not install it to my SSD).


Closing Etiquette: Why Do Some Answer *and* Close?

I've noticed quite a few cases () where people not only vote to close a question, but then also answer said question. At best this is just silly, and at worst it is totally hypocritical and seems almost like rep whoring (since often the closers answers are the only ones that remain to be voted on since no new answers can be given).  If you want to close a question, it makes more sense to simply add a comment if you feel the need to say something. This also leaves the option open for the author of the question to delete it if they want to. If the author realizes they've asked a duplicate, or they want to avoid the onslaught of downvotes that can often accompany a closed question, they should be allowed to delete it. However, if any answers to the question have upvotes, the author can't delete it.  So why do people answer and close? Should we try to crack down on this sort of thing, via either new features, clearly stating it in the FAQs, or just getting the word out through commenting when we see it?  EDIT: Just to clarify, I'm asking this in relation to SO, not MetaSO.


How does quantization solve the ultraviolet catastrophe?

I understand how classical physics leads to the . But I cannot understand how quantization solves it.    How can quantization prevent the body from radiating a lot of energy?   I know this question is similar to many other questions but I need a layman's explanation (without too much mathematical details).    Finally why does the peak reach zero intensity after a certain frequency?     Image source:- Wikipedia


I recently purchased a gaming laptop (Lenovo Ideapad Y700) with a quad-core 64-bit i5 6300HQ CPU (2.2-3.2 GHz, 6MB cache) with an integrated Intel HD Graphics 530 GPU, 8GB 2133MHz DDR4 RAM, and a discrete nVidia Geforce GTX 680M GPU with 4GB DDR5 VRAM.  But whenever I start blender it's ridiculously sluggish... both UI responsiveness and rotating the camera in the viewport (even though it's just a non-shaded cube). I've tried starting Blender by right-clicking it and picking "Run with graphics processor > nVidia high performance graphics", I've tried going to "Preference > System" and changing it from CPU to CUDA (GTX 680M), I've tried changing the draw to full, overlap, overlap flip, triple buffer, etc... but all to no avail.  Has anyone here had similar problems? If so, how did you overcome it?  And does anyone have any suggestions as to what to try next? All my drivers are up to date.  Thank you in advance for any replies.


I just realized I didn't really have a definitive answer to this subtlety of the offside rule.  When a player is in offside position at the time of the pass but not affecting the play, no offside will be called. At what point is this player allowed to return to the play?  Some possibilities.   He must "tag up" at the original position of the offside line. He must "tag up" with the current position of the ball He can't enter play until a turnover has occurred. He should just lie on the pitch and contemplate life until a stoppage in play or the ball returns across half.


How to recover a dropped stash in azure devops?

I was trying to commit my code. Then it asked my to first pull the other developer's code. So I stashed my code. Now I successfully pulled the other's code. Now when I tried to stash pop, I got error and only some files got back.  I thought by clicking on Drop Stash, I will get my stashed code back. Now due to drop I am not able to see my code. Is there a way to recover my dropped stash ?  I saw a code to recover dropped stash in Git, but don't know how to make it work for Azure devops.  Reference :


Install a package which is not in a repository

I want to install teamviewer which offers a .deb package. I read I can use dpkg and then do apt-get install -f to fix the dependencies. Or use gdebi.  Are those the best solutions?  Also I understand that in both cases, the package will not be automatically updated.


Text jumps into the middle of the page because of a graph that follows

I'm writing the "results" section where I have small descriptions and graphs. I want to have a \section(blabla) followed by a small text and then the graph. Right now I do have a \section(blabla), then a huge space(automatically generated), then the text (approx. in the middle) and on the bottom the graph. How can I have the text right beneath the section title? It looks really weird with such a huge space...Thank you! Code: \section{Comparison of graphs} In figure \ref{fig:gnorm_levels}, \ref{fig:shear_levels} and \ref{fig:compression_levels} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris varius magna ipsum. Curabitur vel tortor nec ipsum pulvinar lobortis ut eu tortor. Phasellus rhoncus dolor nunc, eget pellentesque magna egestas in. Donec convallis finibus molestie. Nulla iaculis orci sit amet vehicula porttitor. Praesent mattis vehicula purus id ultrices. Vestibulum ex orci, imperdiet at fermentum vel, maximus sed diam.   \begin{figure}[H] \centering \includegraphics[height=8cm]{graphics/levels.png} \caption{Comparison} \label{fig:gnorm_levels} \end{figure}


Copying selected (targeted) features to new shapefile using ArcPy?

I am trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field GDP_TOP10 = 1.   I am using this at the moment:  #Grab rows using Search Cursor with WHERE clause rows = arcpy.SearchCursor("C:/CGDP.shp", "GDP_TOP10 = 1") for row in rows:     arcpy.CopyFeatures_management("CGDP.shp", "New.shp") del row del rows   However, this just copies the entire shapefile, not the rows I want to select with the cursor. If I execute a print statement under my for loop instead, it works and prints only the relevant fields, but the copy to new shapefile command does not seem to copy specifically.   Is there a different ArcPy command to only copy rows that match a query?


Minimum sample size for PCA or FA when the main goal is to estimate only few components?

If I have a dataset with $n$ observations and $p$ variables (dimensions), and generally $n$ is small ($n=12-16$), and $p$ may range from small ($p = 4-10$) to perhaps much larger ($p= 30-50$).  I remember learning that $n$ should be much larger than $p$ in order to run principal component analysis (PCA) or factor analysis (FA), but it seems like this may not be so in my data. Note that for my purposes I am rarely interested in any principal components past PC2.   Questions:   What are the rules of thumb for minimum sample size when PCA is OK to use, and when it is not? Is it ever OK to use the first few PCs even if $n=p$ or $n<p$?  Are there any references on this? Does it matter if your main goal is to use PC1 and possibly PC2 either:    simply graphically, or  as synthetic variable then used in regression?


How to take screenshot of indicator menus?

If I hover over to the setting menu or any of the indicator menus, Prnt Scrnbutton won't work.  If I want to take the snapshot of these menus, how do I do that?


How to calculate the time between two DateTimes?

I know that you can use daysBetween() for two Date objects, but what would I use to calculate the elapse time in seconds between two DateTime objects?


How to calculate the integration $\int_{0}^{\pi}\frac{dx}{(2-\cos{x})^2}$

Given that  $$ \int_{0}^{\pi}\frac{dx}{2-\cos{x}}=\frac{\pi}{\sqrt{a^2-1}} $$  How to calculate the integral $$ \int_{0}^{\pi}\frac{dx}{(2-\cos{x})^2} $$


Python: avoid new line with print command

I've started programming today and have this issue with Python. It's pretty dumb but I can't figure out how to do it. When I use the print command, it prints whatever I want and then goes to a different line. For example:   print "this should be"; print "on the same line"   Should return:      this should be on the same line   but instead returns:      this should be   on the same line   More precisely I was trying to create a program with if that told me whether a number was a 2 or not  def test2(x):     if x == 2:         print "Yeah bro, that's tottaly a two"     else:         print "Nope, that is not a two. That is a (x)"   But it doesn't recognise the last (x) as the value entered, and rather prints exactly: "(x)" (the letter with the brackets). To make it work I have to write:  print "Nope, that is not a two. That is a"; print (x)   And if e.g. I enter test2(3) that gives:     Nope, that is not a two, that is a   3   So either i need to make Python recognise my (x) inside a print line as the number; or to print two separate things but on the same line.  Thanks in advance and sorry for such a stupid question.  IMPORTANT NOTE: I am using version 2.5.4  Another note: If i put print "Thing" , print "Thing2" it says "Syntax error" on the 2nd print.


Automatically change ownership using WinSCP?

I saw several threads about having issues with unexpected file permissions after file upload. I tried their solutions with no luck, I have to raise the problem in my way.   I run Nginx as nobody:nogroup on Debian 6. I changed the root web folder /usr/share/nginx/html to nobody:nogroup. Now I use WinSCP to upload file to the machine , but I use root account. If I create a new directory or update a new file, the ownership would be root:root. I am new to Linux world, I currently open a shell to change ownership of wwwroot after I have uploaded something to my server.   What is the best practice to upload file as root, but keep files and directories nobody:nogroup? Shall I set a password to account nobody and use this account to upload files?


What could be causing my plane with glass shader to act like a lens?  I want normal glass, and already have tried 2 different node setups, but it still acts like a lens.  Render:   Glass node setup 1:   Glass node setup 2:


unicode-math/expl3 error: Support package l3kernel too old

Consider the following LaTeX code:  \documentclass{article} \usepackage{unicode-math} \begin{document} Hello, world! \end{document}   When this code is run with lualatex, it aborts with the following error message:  LaTeX Warning: You have requested, on input line 26, version                `2018/02/21' of package expl3,                but only version                `2017/12/16 L3 programming layer (loader) '                is available.   ! Package xparse Error: Support package l3kernel too old.  See the xparse package documentation for explanation.   If the 2nd line (\usepackage{unicode-math}) is deleted, lualatex compiles the file successfully.  Adding the command \listfiles at the beginning of the file and recompiling, the lines starting with Package: inside the log file are:  Package: expl3 2017/12/16 L3 programming layer (loader)  Package: unicode-math 2018/02/02 vv0.8l Unicode maths in XeLaTeX and LuaLaTeX   My TeX Live Utility does not list any updates to these two packages.


How do I change mirrors in Ubuntu Server from regional to main?

I have a Lucid Server (10.04) set up and I would like to change the mirror from US (or any other country) to the Main Ubuntu Mirror.  For example my two first entries in sources.list are:  deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted   In a Desktop environment I would select the main mirror like this:    But how do I do that from the terminal as I don't have a graphical environment installed!


How do I stop the Invalid Name Error in minecraft pocket edition, even with an appropriate name?

I've been playing minecraft pocket edition for a while and got the new update recently. How do I stop the Invalid Name error when I join my little brothers server? I've already seen the no spaces or special characters in your name answers on this website, but they do not work for me.


I'm being asked to prove $ 2 \cdot 3^0 + 2 \cdot 3^1 + 2 \cdot 3^2 + \ldots + 2 \cdot 3^{n-1} = 3^n - 1. $ combinatorially using the question "How many length-$n$ lists can we form using the elements in $\{0, 1, 2\}$ in which the elements are not all 0?" Frankly, I'm not even sure where to start and not entirely sure what a combinatorial proof is, to be honest. How would I go about approaching this problem? I assume that the right side is $3^n-1$ because it represents the number of lists of length n minus the list of all 0's.


I've encountered a headache problem.  I want to execute mulitple commands in background, so I want to start them in bash one by one. It's easy to start one command in linux shell in background, just like this:  myCommand &   It's also easy to start multiple commands, just like this:  myCommand1 && myCommand2   or  myCommand1 ; myCommand2   But if I want to run multiple commands in background, I tried the following command format, but failed:  myCommand1 & && myCommand2 &   or   myCommand1 & ; myCommand2 &   Both formats fail. How can I run multiple commands which have & in one command line?


Typewriter text without spaces not wrapping in LyX

I'm using typewriter text to highlight program code within my writing, however, long method names without spaces don't seem to wrap to the next line (see Figure 1).  It is possible to make typewriter text automatically wrap when reaching the edge of a page?  Thanks  % Preview source code for paragraph 1  This is a long method name which does not wrap: \texttt{void ThisIsAnExmpleOfALongMethodNameWhichDoesNotWrap()} Normal text wraps as expected, though.


How to share files between regular account and work account?

I've researched and I cant find anything. What I am missing?


Emails from server going to junk/spam in Outlook and Gmail

Althought I have setup my rDNS correctly and have SPF and DomainKeys setup on my cPanel server I'm still getting all emails sent from our mailserver to spam, unless the domain is whitelisted by the receiver.  Any place I can go for them to whitelist my IP or how could I go about finding a solution?


How to check if a column exists in a SQL Server table?

I need to add a specific column if it does not exist. I have something like the following, but it always returns false:  IF EXISTS(SELECT *           FROM   INFORMATION_SCHEMA.COLUMNS           WHERE  TABLE_NAME = 'myTableName'                  AND COLUMN_NAME = 'myColumnName')    How can I check if a column exists in a table of the SQL Server database?


Calculate $\frac{\sum_{n=1}^{99} \sqrt{10+\sqrt{n}}}{\sum_{n=1}^{99} \sqrt{10-\sqrt{n}}}$  I have to solve this question for a math class I'm taking, but I'm not making much headway. I tried to let $\sqrt{10+\sqrt{n}}=\sqrt{a}+\sqrt{b}$ in an attempt to make things cancel out, and got that:  $a+b=10$  $4ab=n$  But I don't think it helps me much.


What is the minimal polynomial of $\sqrt{3} + \sqrt[3] {2}$ over $\mathbb{Q}$?

What is the minimal polynomial of $\sqrt{3} + \sqrt[3]{2}$ over  $\mathbb{Q}$?  I know the basic idea of what a minimal polynomial is--it is the lowest degree monic polynomial in $\mathbb{Q}[x]$ that has the above as a root. But how do you go about calculating it? How do you know intuitively if it does or doesn't exist?


download only first few bytes of a source page

I am downloading the HTML source page of a website using cURL command. The problem is, I do not want most of the contents in the page. I just need the first 100 lines of the source page. Is there a way to stop the download of the page after first few lines?  Currently, I have the below command working but it does not seem to be time effective.   curl -r[0-1] "http://www.freebase.com/m/045c7b" > foo.txt   I tried changing the value from 1 to .5 and .05 and still the entire web page is getting downloaded.   I am looking at time less than a second to execute the above command.    EDIT  From the man page of cURL, I see that "You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole document." So if the server is not supporting the range querying, is there some other command in nix environment which will help me accomplishing what am trying to do?


Why was I asked to create a password in order to disable secure boot on initial installation of Ubuntu 16.04?

On initial installation of Ubuntu 16.04, I checked off "Install third-party software" and, underneath it, I was prompted to check off another option which would allow the OS package to automatically disable secure boot on its own, a prerequisite of which was creating a password that would somehow allow this whole process to occur.  After continuing with the installation, I was never given any indication that this disabling of secure boot had occurred, nor was I ever prompted to enter the password that I had created.  Upon successful installation of the OS, I restarted my computer and checked out the BIOS. In BIOS, secure boot was still enabled. However, back in Ubuntu, I am able to seamlessly play MP3 and Flash files, which I assume indicates that the installation of third-party software was successful.  I haven't run into any problems as of yet (other than the fact that the UI has been a bit finicky and buggy at times), but I would like to know what on Earth I actually accomplished by creating that password.  What happened to the password I created? Will I need to remember it for any reason? It's not the same as my login/sudo password.  Has Ubuntu permanently edited my BIOS in order to make an exception for itself? If so, how can I view these changes and potentially undo them? Is that where the password would come in?  Why does Ubuntu need to disable/bypass secure boot to install the ubuntu-restricted-extras package anyway? Is my installation okay? Have I set myself up for future problems? Should I try reinstalling with secure boot manually disabled as not to receive that prompt in the first place?  Additional information: I am running a UEFI system, and I am dual-booting Ubuntu 16.04 alongside Windows 10.   Unlike this user, I do not receive a warning about "booting in insecure mode," but I would also like to know whether Ubuntu has created an exception for itself and how I could manage such exceptions. Unlike myself, this user has not mentioned anything about having to create a password.


What is the difference between estimation and prediction?

For example, I have historical loss data and I am calculating extreme quantiles (Value-at-Risk or Probable Maximum Loss). The results obtained is for estimating the loss or predicting them? Where can one draw the line? I am confused.


WSL - A Bash line to show when a folder's contents update

I'm looking for a bash script that will detect when a file enters a specific folder. Basically I want to eventually make a script that will detect when a file enters a certain folder on my desktop (using windows with wsl), add .png to the end of the file name (long story, just need that to happen), and then move to another file on my desktop. I have something to rename the files, as a friend made it and we worked together to troubleshoot it   for i in /[directory here] ; do mv "$i" "$i.png" ; done   Now I just need to automate it. I don't want to bother him more, since he has already done so much, and I am too new to Ubuntu to understand exactly what to do


Client's SQL Server farm DBs are backed up by third-party tool that does not use VSS. About half of the instances show backups being made by some tool that is using VSS. I can disable SQL Server VSS Writer to stop these errant backups, but how do I track down what is running the VSS backups?  keywords: Volume Shadow Copy Service, volume-shadow-service [I don't have rep to create tags]


I got array list of strings, how could I reduce them to hash map  Input: [a, b, a, a, c, x]  Output: {(a: 3), (b: 1), (c: 1), (x: 1)}  PS. I searched for this. I need to do that with reduce not with frequency counting as in other questions, because my question is a simplified real task.


Is there a workaround for testing criteria based sharing rules?

From the , you cannot directly test criteria based sharing rules. I'm just thinking about if there is a work around for this limitation - possibly by creating __share records in test context, though not sure how I would be able to take the sharing criteria and apply that logically in code, as would want to do this dynamically to ensure that if the sharing rule criteria changed, that my test code would still run. What have other people done to test criteria based sharing rules?


What are the prerequisites to studying general relativity?

This question recently appeared :     Slashdot posts a fair number of physics stories. Many of us, myself included, don't have the background to understand them. So I'd like to ask the Slashdot math/physics community to construct a curriculum that gets me, an average college grad with two semesters of chemistry, one of calculus, and maybe 2-3 applied statistics courses, all the way to understanding the mathematics of general relativity. What would I need to learn, in what order, and what texts should I use? Before I get killed here, I know this isn't a weekend project, but it seems like it could be fun to do in my spare time for the next ... decade.   It seems like something that would be a good addition to this site: I think it's specific enough to be answerable but still generally useful. The textbook aspect is covered pretty well by , but beyond that: What college-level subjects in physics and math are prerequisites to studying general relativity in mathematical detail?


What will be the effect on the water level?

I came upon this question recently while studying about buoyancy. It goes like this:     If an iron block is covered with ice and floats in a tub of water, what will be the change to the water level when the ice melts and the iron submerges completely?   According to me the the water level should go up because the iron block will displace more water when it submerges. But, the answer is that the level will remain the same. I did not get the  reasoning nor the logic behind it. Please explain why the level will remain the same. This question is driving me crazy.


I saw  which explains that when running a command in parentheses it actually runs the command in a subshell, which is a child process of the original shell. Running the following experiment: // one shell with PID 5344 ~$ (find /)  // another shell ~$ ps l F   UID     PID    PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND ... 0  1000    5344    5333  20   0  10888  5220 do_wai Ss   pts/0      0:00 bash 0  1000    5384    5333  20   0  10888  5140 do_wai Ss   pts/1      0:00 bash 0  1000    7239    5344  20   0  10860  3444 -      R+   pts/0      0:00 find / 4  1000    7240    5384  20   0  11400  3224 -      R+   pts/1      0:00 ps l   We can see that find / is a child of 5344, with no other shell in between. Wheres running: // one shell with PID 5344 (cd /; find /)  // second shell ~$ ps l F   UID     PID    PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND ... 0  1000    5344    5333  20   0  10888  5220 do_wai Ss   pts/0      0:00 bash 0  1000    5384    5333  20   0  10888  5140 do_wai Ss   pts/1      0:00 bash 1  1000    7379    5344  20   0  10888  3036 do_wai S+   pts/0      0:00 bash 4  1000    7380    7379  20   0  10864  3536 -      R+   pts/0      0:01 find / 4  1000    7381    5384  20   0  11400  3184 -      R+   pts/1      0:00 ps l     Now we can see that other shell in between. My guess is that it is some optimization of bash: In the first case, it doesn't really have to spawn another shell, so it just doesn't do it. In the second case, since the commands include cd /, which will have affect on the current shell, it has to spawn another process. Is that so?


How to insert if not existing and update if existing (upsert)?

I am currently having a confusion with:  var post = {ip: host, status: info}; var sql = con.query('INSERT OR IGNORE INTO ipaddress SET ?', post,  function(err, result){});   I have already set the IP address to primary key.


$PROBLEM$ :If $G$ is finite of odd order. And $H$ subgroup of $ G$ with $[G:H]=3$ then $H$ is normal.  $Proof$:     I know that that there exists a homomorphism $\phi : G \rightarrow S_3 $ Such that $ker(\phi)<H$.I know that cause of i found it in the notes calling it Poincare's Trick.But i havent found a proof.(Id love to see a proof). Now that granted.  I know $\phi(G)<S_3$  and since $\phi$ not an isomorphism since $|G|=odd$ and $|S_3|=even$.  So   $|\phi(G)|\mid |S_3|$ so $|\phi(G)|=2$ or $3$.  Now i know $$G/ker\phi \simeq \phi(G) $$ meaning  $|G/ker\phi |= |\phi(G)| $ And that must be an $odd$ since it is the $index$   of $ker\phi $  in $G$. So $$|\phi(G)|=|G/ker\phi|=3$$  Now  i know $$|G|=[G:H]|H|$$ and $$|G|=[G:Ker\phi]|Ker\phi|$$ substituting with $3$. I get  $$|H|=|Ker\phi| $$ and since $Ker\phi < H$ $\Rightarrow$ $Ker\phi=H$ .And i know  $Ker\phi \lhd G$ So its $H$ too.  Am i wrong?Afraid of some sort of circular reasoning.Also id love to see a proof of why there is such homomorphism.  Im asking if my  proof is correct and it is not a duplicate of the same problem.Since Im not asking for a proof but for a proof verification and a proof of a Trick mentioned!!


Writing USB Joystick for PIC18F using MikroC

I'm using PIC18F2458 as USB Joystick HID. The program works, but I have few problems. Right now, The USB is not detected If I write less than 5 values ( Throttle, X,Y, 4 buttons). The current problem is If I'm using an analog sensor for the throttle, other axis x,y getting read too, because they are going to be read from analog input and of course there is noise, so whenever I use a rotary resistor on the throttle usb input, I get other axis written too. How can I fix that issue ? second issue how would I add two throttle for the usb descriptor ? Here is the current code: unsigned int average(int channel) {  int samples = 16;  unsigned int sum = 0;  int i;  for (i = 0; i < samples; i++)  {        sum+=(Adc_Read(channel)>>2)-128;  }  sum = sum/16;  return sum; }  void analogo() {      usb[0] = average(1);   // Get 10-bit results of AD conversion     usb[1] = average(9);     usb[2] = average(8); }  void main(void){                               // Disable comparators   ADCON1  = 0x05;                         // Configure all ports with analog function as digital  TRISA.RA1 =1;  TRISB.RB2=1;  TRISB.RB3 =1;    HID_Enable(&readbuff,&writebuff);       // Enable HID communication   //vl6180x_configure();    while(1){   analogo();   USB_Polling_Proc();      writebuff[0]=usb[0];         // throttle     writebuff[1]=usb[1];        // X axis     writebuff[2]=usb[2];        // Y  axis     writebuff[3]=0xFF;        //button  0xFF     writebuff[4]=0xFF;        //button POV 0xFF        HID_Write(&writebuff,5);      }  }  and the Descriptor const struct {   char report[USB_HID_RPT_SIZE]; } hid_rpt_desc =       {0x05, 0x01, // USAGE_PAGE (Generic Desktop)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x09, 0x04, // USAGE (Joystick)      0xA1, 0x01, // COLLECTION (Application)      0x05, 0x02, // USAGE_PAGE (Simulation Controls)      0x09, 0xBB, // USAGE (Throttle)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM (255)      0x75, 0x08, // REPORT_SIZE (8)      0x95, 0x01, // REPORT_COUNT (1)      0x81, 0x02, // INPUT (Data Var Abs)      0x05, 0x01, // USAGE_PAGE (Generic Desktop)      0x09, 0x01, // USAGE (Pointer)      0xA1, 0x00, // COLLECTION (Physical)      0x09, 0x30, // USAGE (X)      0x09, 0x31, // USAGE (Y)      0x95, 0x02, // REPORT_COUNT (2)      0x81, 0x02, // INPUT (Data Var Abs)}      0xC0, // END_COLLECTION      0x09, 0x39, // USAGE (Hat switch)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x25, 0x03, // LOGICAL_MAXIMUM (3)      0x35, 0x00, // PHYSICAL_MINIMUM (0)      0x46, 0x0E, 0x01, // PHYSICAL_MAXIMUM (270)      0x65, 0x14, // UNIT (Eng Rot:Angular Pos)      0x75, 0x04, // REPORT_SIZE (4)      0x95, 0x01, // REPORT_COUNT (1)      0x81, 0x02, // INPUT (Data Var Abs)      0x05, 0x09, // USAGE_PAGE (Button)      0x19, 0x01, // USAGE_MINIMUM (Button 1)      0x29, 0x0A, // USAGE_MAXIMUM (Button 10)       0x15, 0x00, // LOGICAL_MINIMUM (0)       0x25, 0x01, // LOGICAL_MAXIMUM (1)       0x75, 0x01, // REPORT_SIZE (1)       0x95, 0x0C, // REPORT_COUNT (12) 2 bits added to switch report count                   // so bytes are even. Bytes must be even.       0x55, 0x00, // UNIT_EXPONENT (0)       0x65, 0x00, // UNIT (None)       0x81, 0x02, // INPUT (Data Var Abs) 0xC0 // END_COLLECTION   };


Does a player win Catan if they forget to count their points?

If player A reaches 10 victory points on his turn but forgets to count, and immediately after his turn, the following player, player B, also reaches 10 victory points and claims victory, does player A have any grounds to be considered a winner?   It recently happened when a player reached 10 victory points but forgot to count and claim victory. The player whose turn is immediately after also reached 10 victory on her turn and claimed victory. Only after player B counted her victory points it was also determined that player A had already reached 10 victory points.  Who is the rightful winner in that situation? Can the true winner be objectively determined based on anything in the rules?


I know this has likely been asked before but I've not been able to find any solutions.  Let me explain my "issue"  I have a custom windows 7 visual style which makes all of my explorer windows dark and simple, pic related:    I love this theme I've created, and I'd like for these darker windows 7 frames to be used as a replacement to the Chromium/Chrome windows.  I think chromium is great, I love using it and I've tried alternatives (Opera, IE) both of these browsers have their own issues   (stuttering & slow in comparison to chromium OR limited to zero customization without sacrificing some modern functionality.)   Opera 12 is the best solution I found and I guess it does exactly what I want boy does it lag... hard.   However, both of those browsers DO extend the basic windows 7 frames. (the frames that every other explorer application uses, excluding things like Microsoft Office, Photoshop or Visual Studio which use their own custom frames)  I was wondering if there was ANY WAY AT ALL to somehow disable the Chromium/Chrome custom frames in favor of the default Windows 7 frames used by all other applications.  Also, bonus question, is there any way to get H.2XX video (HTML 5) to work with Chromium?  Not a duplicate since the issue hasn't been resolved.


Partition sizing - Ubuntu 20.04 64GiB USB stick (Full Install)?

Forgive the rookie question but still fairly new to Linux land. I'm trying to create a "self contained" Ubuntu 20.04 installation on a 64GB USB Stick. Summary Below:  All of the bare metal that I will be using has capacity 16gig RAM, My understanding is I don't need the Swap partition? FAT32 Partition? (What size to allocate & why) EXT4  Partition? (What size to allocate & why) I've been trying to install the full Ubuntu 20.04 on the same USB as I'm running Ubuntu Live (demo) without success. I presume this can't be done as it is mounted at the time? i.e you need 2 USB sticks, one with live running (to access G-Parted) the other the target (new full install)? I don't want to see any of the storage media on the host machine when booting from USB (20.04) i.e. OS and storage all contained on the USB. A fully isolated system.  Thanks in advance Cheers NewB


enforce "reset all subsites to inherit this site master page" using CSOM

I am able to change the master page using the below code  var web = ctx.Web;     var masterPageUrl = String.Format( "{0}/_catalogs/masterpage/filename.master", ctx.Web.ServerRelativeUrl );     web.MasterUrl = masterPageUrl;     web.CustomMasterUrl = masterPageUrl;     web.Update();     ctx.Load( web );     ctx.ExecuteQuery();   This works fine and it changes the master page to desired file.  But the problem is after doing that i have to manually goto      "site settings" -> "goto the top level settings" -> "master page"   and then check the "Reset all subsites to inherit this site master page setting"   Is there  a way to avoid this manual step and achieve this using CSOM?


How does OneBox decide which image to pull out of Wikipedia article?

I posted a  in chat, and the image picked was seemingly a random image from the article.  It wasn't the first image in source HTML it wasn't the first image in rendered HTML it wasn't the first image alphabetically.  The link was to main article, NOT to an anchor tag inside. So, what is the algorithm for picking the image to use in Wikipedia's onebox?


What's the difference between CCD and CMOS image sensors?

I keep reading articles about CCD vs CMOS image sensors. What is the difference between these two types? What exactly do these sensors do in terms of photography?  Is a CCD-based camera going to be able to compete in the future? If I buy one, can I count on using it for some years or would it be better to upgrade to a camera with a CMOS based sensor?


I know the set of rational numbers can be well ordered since there exists a bijection from the set of natural numbers and then set of rational numbers by ordering $ℚ$ in this way  my question is, in this case, is $ℚ$  well ordered by the usual $<$? Same thing with the set of integers If you order them in this way: 0, 1, -1, 2, -2.. in this case the set is well ordered by the relation $<$ right? (Since there exists a bijection with the set of natural numbers)


Allow users to edit their post while an image is being uploaded, instead of forcing them to wait until the image is fully uploaded

Since , it would be convenient to allow users to edit their post while uploading an image. I.e. do the upload + image processing in the background. Currently one has to wait until the image is included in the post before being able to edit the post:


SSMS 2008 not remembering connection login credentials

When connecting to a server on SQL Server Management Studio 2008, I'm entering the Server Name, and using SQL Server Authentication, entering Login & Password, and ticking Remember password.  However, next time I open SSMS, the server name has been remembered in the drop down, but the login and password have been forgotten.  Why is this?


Is Bezout's lemma enough to confirm the GCD of a number.

Is Bezout's lemma enough to confirm the GCD of a number?  So suppose we have $$ax+by=z$$ does this mean $$\gcd(a,b)=z$$


I found this  by the creator of PythonTeX himself. However, running the below code doesn't work for me; I get an error "Something's wrong--perhaps a missing \item. \end{pyblock}". I'm not convinced that the \pyc command is actually having the macro expanded. Where am I going wrong? I'm trying to use package keyval to provide a nice interface to some TeX commands which pass the values on to Python, but in order to do that I need to be able to expand the TeX macros which are the key-values so that Python may consume them. \documentclass{standalone} \usepackage{pythontex} \usepackage{lipsum}  \begin{document}     \pyc{mytext = """\lipsum[4]"""}          \begin{pyblock}     print(mytext)     \end{pyblock} \end{document}  I've created an even simpler example below. \documentclass{standalone} \usepackage{pythontex} \def\x{2} \begin{document}     \pyc{print(\x)} \end{document}  * PythonTeX stderr - error on line 8:     File "C:\Users\aosborne\AppData\Local\Temp\<outputdir>\py_default_default.py", line 50       print(\x)   SyntaxError: unexpected character after line continuation character


Why do initialized array objects revert back to null?

I want to figure out why my array that is declared outside of a for loop refuses to be properly initialized by a for loop in order to be used by another for loop. Googling "array null pointer exception" and "null arrays" kept bringing me to errors about not initializing the array. Hopefully that's not what's happening here. (I don't think it is.)  public static void main(String[] args)     {         Student[] students = new Student[25];               for(Student student : students)         {             int grade=(int)(Math.random()*4 +1);             student = new Student("bob",grade);             System.out.println(student); //debug 1         }         for(Student student : students)         {             // if (student.getGPA() == 0){             //     System.out.println("No data entered for student.");             // }             System.out.println(student); //debug 2         }     }   This block is just main, and it's in another valid class named after the file. Student is a class that I excluded because it has nothing to do with the question being asked, but for reference it takes a String name and an int gradeLevel as parameters and has toString() and getGPA() methods (among others).  What I want from debug 2 and get from debug 1: something along the lines of  bob: Freshman; GPA: 0.00 bob: Senior; GPA: 0.00 bob: Freshman; GPA: 0.00 bob: Sophomore; GPA: 0.00 bob: Senior; GPA: 0.00   What I have from debug 2:  null null null null null   I want the print statement marked "debug 2" to print the same thing as what "debug 1" does, which is a column of the toString values of the students. Instead, I'm just getting a column of null for debug 2 but the correct output for debug 1.   The commented-out code was the source of null pointer exceptions because null objects do not have getGPA() methods. I have no idea why the array remains full of nulls, though. The fact that there aren't nulls from debug 1 tells me that the array is indeed being initialized, but that the values aren't staying in the array.  I probably completely misunderstand something or the use of something here.


How do I improve workflow when switching between programming on Ubuntu and Adobe apps on Windows?

I constantly reboot between Adobe and Ubuntu when I need to so dome graphic design and UI work. Or should I just switch to a Mac? Is it possible to have Adobe on Linux?


I want to cd into /var/named but it gives me a permission denied error, and when I want to use sudo to do this I am not permitted. What is the technical reason for this, and is it possible to do this some other way?


Proving there is no smallest rational number greater than 1

I know I am supposed to prove this using contradiction, but I am not sure how to proceed.  Here's what I have thus far:  Assume that there exists a smallest rational number $x$ such that $x > 1$.  $X = \dfrac{a}{b}$ where $a$ and $b$ are integers.


I started working on this model you can see below. I noticed there are these weird flickering shadows. So I tried googling it, but I didn't find anything (I googled "Blender Flickering shadows on model") I also tried to switch my render engine to Eevee or Cycles but that didnt help either, they are still there, just less visible. Other than that I did not try anything else, so any help would be appreciated. I am using Blender 2.92 Thank you for any answer


I'm studying measure theory and two question came to my mind:        If $f:\mathbb{R}\to\mathbb{R}$ is monotone and $B\subseteq\mathbb{R}$ is borel, is the image $f(B)$ borel?   If $f:\mathbb{R}\to\mathbb{R}$ is a monotone function (say, non-decreasing), does there exist a sequence of continuous functions $f_n:\mathbb{R}\to\mathbb{R}$ converging pointwise to $f$?      Here's the motivation for those questions: Let $(X,M)$ and $(Y,N)$ be measure spaces.   It's known that if $\mu$ is a measure on $(X,M)$ and $f:X\to Y$ is measure, then we have the pushforward measure $f_*\mu(A)=\mu(f^{-1}(A))$ on $(Y,N)$. What if we were to define a "pullback measure"? Given a function $f:X\to Y$ such that $f(M)\subseteq N$ (i.e. $f$ maps measurable sets to measurable sets) and a measure $\nu$ on $N$, the natural formula would be $f^*\nu(A)=\nu(f(A))$. So we ask if is there a good amount of functions which map measurable sets to measurable sets in $\mathbb{R}$, and monotone functions seem like good candidates (for strictly monotone, continuous functions, the result is valid and there are several answers on the web). If this were true, maybe we could use some convergence argument to solve the problem above.


How to calculate inter-rater reliability with multiple raters and multiple categories per item?

I have a data set for which I would like to calculate the inter-rater reliability. However, this data set does not seem to fit the typical models that conventional algorithms allow for.  My data set has $r$ raters, $n$ subjects, and $q$ categories. Raters can give each subject anywhere from $0$ to $q$ of the categories.  My understanding is that this means that Fleiss' kappa and Krippendorff's alpha cannot be applied here because they assume that raters give each subject just 1 category. Does anyone have a suggestion for an algorithm that I can use for this data?


My unity dash button somehow wouldn't show up applications for some no reason. I also tried the applications ( middle-down ) But it still wouldn't show up applications. I currently use 15.04.


How can I use SMTP in my simple c# project so i can send emails to myself?

I'm trying to implement SMTP in my app. The code should work but it does not. the user and pass are valid and for testing purposes only.  I've tried everything. Set the port to 25, 465 everything..  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Net; using System.Net.Mail;   namespace Email {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void Label2_Click(object sender, EventArgs e)         {          }          private void Form1_Load(object sender, EventArgs e)         {          }          private void Button1_Click(object sender, EventArgs e)         {              var smtp = new SmtpClient             {                 Host = "smtp.gmail.com",                 Port = 587,                 EnableSsl = true,                 DeliveryMethod = SmtpDeliveryMethod.Network,                 UseDefaultCredentials = false,                 Credentials = new NetworkCredential("test1020dassf5@gmail.com", "KDO30VMjkd03JM0j")             };             MailMessage msg = new MailMessage("test1020dassf5@gmail.com", "test1020dassf5@gmail.com", textBox1.Text, textBox2.Text);             {                 smtp.Send(msg);             }         }     } }    It gives me the error:   System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at    at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)    at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode)    at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception)    at System.Net.Mail.SmtpClient.Send(MailMessage message)


Where should I ask software architecture / design questions?

I often look for feedback about the design/software architecture for a given problem. Should I ask it on Stack Overflow, or is there a separate site that is dedicated for such things?


Do light novel author/illustrator make a design for every single character?

Is is optional for the author/illustrator to make character designs for all side characters?  Like in the case of anime adaptations, are some designs purely anime original


A single photon travelling within a single wavelength contains a dual nature, in that it can behave as a particle or a wave depending upon the chosen experiment or measure.  When the duality behaves as a particle, is it true to say that at the point of measurement or detection that the wave-form of the duality has collapsed, that the energy within the wave is now confined to a particle?  Or is it the case that the wave and particle form of the duality remain in tact and that the measurement is simply confined to either form?  Two examples I am thinking of are the photoelectric effect and the detection of photons within the double slit experiment.


bash if not multiple conditions without subshell?

I want to combine multiple conditions in a shell if statement, and negate the combination.  I have the following working code for a simple combination of conditions:  if [ -f file1 ] && [ -f file2 ] && [ -f file3 ] ; then   # do stuff with the files fi   This works fine.  If I want to negate it, I can use the following working code:  if ! ( [ -f file1 ] && [ -f file2 ] && [ -f file3 ] ) ; then   echo "Error: You done goofed."   exit 1 fi # do stuff with the files   This also works as expected.  However, it occurs to me that I don't know what the parentheses are actually doing there.  I want to use them just for grouping, but is it actually spawning a subshell?  (How can I tell?)  If so, is there a way to group the conditions without spawning a subshell?


How exactly to texture coordinates work?  I know they are represented by vectors, but how does a vector store texture mapping information?  How does each type of texture coordinates work and what are their respective advantages and disadvantages?


Unifying quantum mechanics and general relativity

I am very new to physics and I want to pursue Unified Field theory now when I read about how to unify quantum mechanics with relativity as they are essentially the same thing and a relation must be found I read that this can be done by unifying to he forces now I have not studied the math so if someone could explain to me why is this necessary?


In Avengers Endgame how does Colonel Rhodes Get a working suit after the Avengers tower is attacked

I was again watching the good old Endgame and noticed this, when the Avengers facility is struck by Thanos's missiles, Rhodes is found struggling to move even in his War-Machine suit to save Rocket and has to get out of this suit to help him. But when the portals are opening and Ant-Man becomes big and helps Hulk, Rocket and Rhodes out of debris, Rhodes has a brand new suit (or maybe just the old one). How is this possible?


Can an object move faster than the speed of light in a medium?

In water the speed of light changes to $2.25 \cdot 10^8m/s$.   Can a electron travel faster/travel at the same speed   in water. I don't see any violation of SR. So   shouldn't it  be possible for an electron to travel at say $2.5 \cdot 10^8m/s $. Water is just an example.In other mediums like hydrogen electrons in excited states should travel at higher speeds than that of light in the same medium.


How much will a bad grade in a relevant Master's class hurt my chances for a statistics PhD?

I'm currently doing a master's in statistics, and I'd like to do a PhD in statistics and focus on machine learning.  However, I am almost certain that I will receive a C+ in my (calculus-based) probability theory class. A C+ would be an outlier for me; I never got lower than an A- in undergrad and an A in grad school (this includes real analysis classes). If it makes any difference, I will have a published article in machine learning by the time I apply to statistics PhD programs.  Also, I don't think this is a duplicate question. I didn't have a serious medical emergency this semester, but I felt ill during the final and a poor grade there would sink my grade. Also, other questions ask about non-relevant classes, but I think that this grade is relevant.  Is there any way to make up for this? For example, if I did well in a class that depended on the probability class, would admissions officers be willing to look past this blunder?


Series convergence proof and determining limit value

I want to show that the following series is convergent and determine the corresponding limit value. $$ a(n):=\sum_{k=1}^n \frac{k}{n^2}$$ To show the series converges I used the ratio test: $$\left|\frac{k}{(n+1)^2}\right|\cdot\left|\frac{n}{k}\right|=\frac{n}{(n+1)^2}<1$$ So the series converges. But how can I go on now and calculate the limit value?


Would someone advise if there's any Expression or term which means 'to argue illogically only to argue'


How do I make a sentence vertical in the middle of a horizontal sentence?

\documentclass{amsart}  \begin{document}  \title{Title 1} \maketitle  Here is a sentence. Here is another sentence                                     that will be                                     vertical.                                     Nice. \end{document}   I'm not sure if the formatting will show on the post exactly as how I see it (different browsers and such), but basically in this example sentence, it will be normally horizontal as usual, but in the second sentence, the words "sentence," "that will be," "vertical," and "Nice" will be aligned vertically instead of continuing horizontally as usual. How can this be achieved?


Studying the scalar field and Klein-Gordon equation in quantum field theory I came across this definition for the inner product in the space of the solutions of the K.G. equation:  $$\langle \Phi_1 | \Phi_2 \rangle = i\int \mathrm{d}\vec{x}(\Phi_1 ^* \overleftrightarrow{\partial_0}\Phi_2) = i\int \mathrm{d}\vec{x} (\Phi_1 ^* \partial_0\Phi_2 -  \Phi_2 \partial_0\Phi_1^*).  $$  I see that this definition should be invariant under Poincaré transformations, but I couldn't prove it.    Moreover I couldn't find the reason why such a scalar product is introduced. Aren't there other possible scalar products? Why choose this one?


How to get String url contains or start with 'www'?

i know how to get url regex of Url with 'http'. but what if i dont have 'http' and the url start with 'www'? How can i get the regex?  String urlRegex = "((https?):((//)|(\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\\\.&]*)";


Unable to query DKIM because of DNS timeout

I run dkimproxy to sign outbound email and verify inbound email.  Since a while, I am experiencing the following permanent problem. The dkimproxy service is unable to query the DNS. Each and every message I receive gets the following header set (in my example I am example.org and sender example.biz)  Authentication-Results: mail.example.org; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) header.i=@example.biz; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) header.i=@example.biz   The error is permanent. If I log in via SSH and try to use nslookup to get the TXT record from the remote DNS I can successfully read it.  How can I fix the above problem?  [Edit] my problem doesn't fall into this , because in that question the DKIM check seems to be done by SpamAssassin. I check DKIM with dkimproxy


Interpolation between derivatives on bounded interval

Let $f$ be twice continuously differentiable on $[0,2]$, and $|f(x)|\leq 1$, $|f''(x)|\leq 1$.   Prove that $|f'(x)|\leq 2$.  If I use Lagrange intermediate value theorem, then  $$|f'(\xi)|=\frac{|f(2)-f(0)|}{|2-0|}\leq 1$$ for some $\xi$. Using  $$|f'(x)|=|f'(\xi)+f''(\eta)(x-\xi)|\leq 2$$ if and only if $|x-\xi|\leq 1$. But this does not cover all of $[0,2]$....


What's the maximum length of the meta keywords tag?

Could you please tell me that what is the maximum length for meta keywords?


Replace a word after a significant line and white spaces (inline) using sed?

I have the following text:    A   Hello   world   B   Hello   world   C   Hello   world   I know that I can replace Hello by Hi using sed:  sed 's/Hello/Hi/g' -i test   but this replace each Hello with Hi:    A   Hi   world   B   Hi   world   C   Hi   world   what I really want is to replace only the Hello after B:    A   Hello   world   B   Hi   world   C   Hello   world   so I have tried this:  sed 's/"B\nHello"/"B\nHi"/g' -i test   but nothing happened, How can I do this?  Note: There are some white-spaces on the beginning of each line of the file.


ConcurrentModificationException: Exception in thread

I'm trying to understand occurrence of ConcurrentModificationExceptionin below program.  import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap;  public class ConcurentHashMapExample {      public static void main(String[] args) {          Map<String,String> myMap = new ConcurrentHashMap<String,String>();         myMap.put("1", "1");         myMap.put("2", "1");         myMap.put("3", "1");         myMap.put("4", "1");         myMap.put("5", "1");         myMap.put("6", "1");         System.out.println("ConcurrentHashMap before iterator: "+myMap);         Iterator<String> it = myMap.keySet().iterator();          while(it.hasNext()){             String key = it.next();             if(key.equals("3")) myMap.put(key+"new", "new3");         }         System.out.println("ConcurrentHashMap after iterator: "+myMap);          myMap = new HashMap<String,String>();         myMap.put("1", "1");         myMap.put("2", "1");         myMap.put("3", "1");         myMap.put("4", "1");         myMap.put("5", "1");         myMap.put("6", "1");         System.out.println("HashMap before iterator: "+myMap);         Iterator<String> it1 = myMap.keySet().iterator();          while(it1.hasNext()){             String key = it1.next();             if(key.equals("3")) myMap.put(key+"new", "new3");         }         System.out.println("HashMap after iterator: "+myMap);     }  }   Exception:  ConcurrentHashMap before iterator: {1=1, 2=1, 3=1, 4=1, 5=1, 6=1} ConcurrentHashMap after iterator: {1=1, 2=1, 3=1, 4=1, 5=1, 3new=new3, 6=1} HashMap before iterator: {1=1, 2=1, 3=1, 4=1, 5=1, 6=1} Exception in thread "main" java.util.ConcurrentModificationException     at java.util.HashMap$HashIterator.nextNode(Unknown Source)     at java.util.HashMap$KeyIterator.next(Unknown Source)     at ConcurentHashMapExample.main(ConcurentHashMapExample.java:39)   My doubt is why ConcurrentHashMap takes care of any new entry in the map at runtime whereas HashMap throws ConcurrentModificationException ?  I'm not able to understand this reason "Iterator on Collection objects are fail-fast i.e any modification in the structure or the number of entry in the collection object will trigger this exception thrown by iterator.  My understanding says, myMap is pointing to two different objects sequentially, then how this error could happen ? Am I wrong ?  Please help to understand why its happening and reason for that. What is fail-fast as well ?  Thanks


Short story about a place where lost things are?

I have a customer looking for a short story from around the 1970's(?) about a young man who is transported to a place where all the lost things like socks are. Possibly called "Someplace Else" (though I haven't had much luck looking with that title)? His uncle may show up there after going missing?  Sorry I don't have more to go on but that's all she remembers.


Why Object not true if checking consumer == true?    let consumer = {   "checked": true,   "ID": "680e543457-999fc-11e6",   "fio": "John Doe",   "office": {     "ID": "fgh4d"   },   "phone": "" };  console.log('consumer  == true', consumer == true); // false console.log('consumer  === true', consumer === true); // false console.log('Boolean(consumer)', Boolean(consumer));  // true console.log('!consumer', !consumer); // false if (consumer) console.log('1') // 1


Is there a word for a person who gives out too many extraneous details?

I'm looking for a single-word term that describes a personality that wants to give out too many unnecessary details in a conversation.  [EDIT] Let me give you guys an example. Suppose you ask your friend, at what time will he reach your place? Instead of saying it directly, he wanders off track by regurgitating unnecessary details like "I'd be catching the bus at 10, then I'll reach place X by this time, then I'll take another bus to your place, and maybe I'll arrive by 12". Is it circumlocution?


Prediction interval for binomial random variable

What is the formula (approximate or exact) for a prediction interval for a Binomial random variable?  Assume $Y \sim \mathsf{Binom}(n, p)$, and we observe $y$ (drawn from $Y$). The $n$ is known.  Our goal is to obtain a 95% prediction interval for a new draw from $Y$.   The point estimate is $n\hat{p}$, where $\hat{p}=\frac{y}{n}$. A confidence interval for $\hat{p}$ is straightforward, but I cannot find a formula for a prediction interval for $Y$. If we knew $p$ (rather than $\hat{p}$), then a 95% prediction interval just involves finding the quantiles of a binomial. Is there something obvious I'm overlooking?


In Bernoulli principle we say that as velocity increases the pressure of fluid decreases but it contradicts kinetic theory of gas which says that as velocity increase-pressure increases. And this seems intuitive also. Please explain


Class NameError: name 'var' is not defined

class Gui():     var = None     def refreshStats(args):         print(str(var)) clas = Gui() clas.refreshStats()   Trace  File "sample.py", line 5, in refreshStats     print(str(var)) NameError: name 'var' is not defined.   Why?


How is a potential difference created between two points?

I would like to know how potential difference is created between two points?Is potential difference created by adding more electrons at one side?If that's the case how to add more electrons at one side?  I'm really looking to know what really constitutes potential difference?


I am attending a conference in Canada in September. My employer is sponsoring the trip for everything (Hotel, Cash, Airline tickets etc.) Do i need to make available the bank statement of my employer or is it enough to have a letter from my employer detailing that they would be responsible for the payment for the trip etc.  Because I am from Nigeria I expect it's important to have all my documentation perfect.


Excel: Copy value of cell according to previous cell

I have an issue with achieving a certain functionality with excel, below you will find the initial state of the table and the final state. I would like to know if it's possible to reach the final state using a formula without a manual intervention at all.  Initial state:   Final state:


I'm already at the limit of 9 and most of them are 5km eggs. Is there any way to get rid of them? I want to make space for 10km eggs because I hope they contain rarer Pokémon.


siunitx tabular numbers with separated uncertainty

I would like to format the space reserved for a number shown in a table with separated uncertainty. It seems that when I use the table-format option the brackets around the mantissa disappear. This is illustrated in the example below:  \documentclass{article}     \usepackage{siunitx}  \begin{document}     \begin{table}   \begin{tabular}{                   S[separate-uncertainty = true]                   S[table-format=1.1(1)e1,                   separate-uncertainty = true]                   }     {Header} & {Header}\\     1.0(2)e2 & 1.0(2)e2\\   \end{tabular} \end{table}     \end{document}     I have also tried to use the bracket-numbers and multi-part-units = brackets without solving this issue. Is there any workaround to center the number and keep the brackets like in the first column of the example?


Constrain mouse to guest in VMWare Workstation 15 Player

With VMWare Tools installed, the mouse cursor can freely enter and exit the guest OS. Is there a setting to disable this? I would like the cursor to be constrained to the guest like it typically is when VMWare Tools is not installed. Also, can I assign a hotkey to this setting?  Host and guest are both running Windows 10. I am using VMWare Workstation 15 Player.


Proof of the inequality $e^x \le x+ e^{x^2}$

$e^x \le x+ e^{x^2}$ for $x\in \mathbb{R}$.   I'm struggling to show this inequality. I've tried differentiation but to no avail. How can I show this? I would greatly appreciate some help.


I was looking  and appears everything but crc. Is there a good Ubuntu way around there to do this?


Let X,Y be bivariate normal , what is E[X|Z] where Z = X + Y?

I am trying to understand how does expectation and variance looks when Let X,Y be bivariate normal I want understand E[X|Z] and Var[X|Z] when Z = X + Y


In FTL Advanced Edition, what can be gained from manning sensor or door subsystems?

The Advanced Edition of FTL includes the ability to man your sensors and door subsystems. Why? What does it accomplish?


$R$ is commutative ring with unity, prove $I,J\trianglelefteq R \wedge I+J=R \Rightarrow IJ=I\cap J$

Let $R$ a commutative ring with unity, and let $I,J\trianglelefteq R$ ideals such that $I+J=R$. Prove that $IJ=I\cap J$. Recall $IJ=\{\sum_{k=1}^n i_kj_k:i_k\in I,j_k\in J, k\in \mathbb{N} \}$.    I have shown that $IJ\subseteq I\cap J$. The rest of the solution does not use the commutativity of $R$ so my question is where is the mistake:  Let $a\in I\cap J$. $a=a\cdot 1\in IJ$ thus $I\cap J=IJ$.


I made a skin by using Skincraft and I exported it to minecraft.net. I chose my skin and uploaded it. At the top it says,      "Your skin has been changed! Please wait a few seconds for it to   update."   I went to Minecraft, clicked singleplayer and chose a random world at the top. I looked at my character, but it's still default. Multiplayer won't load for some reason. I don't know what I've done wrong!


Raise an auto-flag on duplicate comments

I am using  from Meta.SO for reference (I could not find a Meta.SE equivalent post).  I believe an auto-flag should be raised when duplicate comments are posted.  I mean, how constructive can something like this be?


Should a gas water heater be shut down if the water main has to be turned off?

I have a brand new AO Smith 50gal gas water heater. Today there was a burst pipe from the cold spell we're having currently, so I had to turn off the water main to the house until the plumbers get here tomorrow.  With that, nobody had used any hot water all day so it should be full, but do I need to turn the water heater off until the water can be turned back on tomorrow to avoid any damage etc?


Internet Explorer is not being installed, and getting stopped in between?

I recently tried to install Internet Explorer in Ubuntu 12.04 with the help of Wine. I did the following:   I downloaded IE 8 for Vista. It installed, but did not work properly.   I could not figure out how to exactly uninstall it, so I deleted the IE folder. Then I downloaded IE 7 for XP. However it did not install completely.   But now I figured out how to uninstall a Wine software. So I removed Internet Explore through Wine. Then I tried to install IE 10 for 8.    It now gives me an error message: Internet explorer did not finish installing. What should I do now?


Can I use Italy Business Visa to travel to Sweden for tourism purpose

I have a valid Schengen Business Visa for Italy. I have already used this visa to travel to Italy for 31 days for business purpose. Total validity is 75 days with multiple entry.  Can I use the same visa to travel for tourism purpose to Sweden for 30 -35 days?


Difference between Integer.parseInt(“10“); and Integer.valueOf(“10“);

What's in Java the difference between      Integer i = Integer.parseInt(“myString“);    and      Integer i = Integer.valueOf(“myString“);   Thank you very much!!!


Equation of a sphere as the determinant of its variables and sampled points

Searching for an equation to find the center of a sphere given 4 points, one finds that taking the determinant of the four (non-coplanar) points together with the variables $x$, $y$, and $z$ arranged like so:  $\left|\begin{array}{ccccc} x^2+y^2+z^2 & x & y&z&1\\ x_1^2 + y_1^2 + z_1^2 & x_1 & y_1 & z_1 & 1\\ x_2^2 + y_2^2 + z_2^2 & x_2 & y_2 & z_2 & 1\\ x_3^2 + y_3^2 + z_3^2 & x_3 & y_3 & z_3 & 1\\ x_4^2 + y_4^2 + z_4^2 & x_4 & y_4 & z_4 & 1\\ \end{array}\right| = 0$   yields the equation for the sphere.  Then one need only re-arrange terms into the more familiar form to find the center and radius.  This works fine.  My question is why.    This same approach also works for one or two dimensions.  I'm guessing it also works for finding hyperspheres in higher-dimensional spaces as long as you have a corresponding number of points.  But where did that determinant form come from?  Is there an intuitive meaning for what that relationship is saying?


Is there a name for this type of construction?

2-part question:  (1) Is there a name for this type of construction in English?  Examples:  "We can't go, can we?"  "I am here, aren't I?"  "We mustn't get ahead of ourselves, must we?"  "You are going, aren't you?"  The basic construction involves making a statement, and then asking the negation. So is there a name for this?  (2) Is this construction unique to English?


Transit visa requirement for UK or Ireland

I am Indian citizen travelling from Delhi to Toronto. I am having visa for both Canada and USA. My flight is via London and Dublin. Do I need transit visa for UK or Ireland.


Use the axioms of ZFC to prove the cartesian product A x B is a set

I'm given that x, y, and A, B are sets, and must prove that the Cartesian product   A x B := {(x, y) | x $\in$ A and y $\in$ B} is a set.  I'm certain that I need to use AC somehow, but I'm having trouble understanding what exactly it would even mean for me to apply it, or how I should go about it.   Here is what believe to understand about AC: if I have a set, say Z = {a, b, c} then applying AC means that I have a function:  f:Z $\mapsto$ $\cup$Z, i.e., f:{a, b, c} $\mapsto$ {{a}, {b}, {c}}   And we have that $\forall$z $\in$ Z (f(z) $\in$ z)  Unfortunately I'm having trouble seeing the consequences of this and how I can extend it to prove that the Cartesian product between A and B is indeed a set. But it could be as well that I've totally misinterpreted the axiom and so obviously can't draw any meaningful conclusions. I would really appreciate if someone could clear the air for me and hopefully set me in the right direction.


When I should use var function and when function

I know what the difference between these two are:  var myFunction = function(a) { ... } function myFunction2(a) { ... }   I just can't figure out when I should use the first one and when the second one.  I saw this  but as I said, I know what the difference between these two are.


Upgraded to 18.04 and it is incredibly slow

I'm running an i7 quad core with 16gb ram and an SSD. My proc maxes out at 100% routinely, and sometimes my ram goes into swap.  This happens with Gnome or Unity. My laptop runs arch, and I'm seriously thinking of jumping ship, even if installing arch is a massive pita.  The 'top' command shows a process called "Web Content". That and systemd-resolve, and occasionally dnsmasq are gunking up my CPU resources.  What do I do?


How do i delete the inner side of this shirt

How can i select only the inner side of the shirt and delete it so that i only have the outside faces of the shirt?


What time do buses and marshrutkas leave from Tbilisi for the Azerbaijan border?

I am planning to travel from Tbilisi to Baku via the Red Bridge border crossing.  Could you advise me what time buses and marshrutkas leave from Tbilisi's railway station bound for the Red Bridge border crossing?


Continuous Version of Coupon-Collector Problem

Suppose I get in an elevator every morning and am in it for exactly one minute. A continuous loop of music plays in the elevator and is 10 minutes long.   If my daily arrival time is uniform in the time frame from 8:00 to 8:10, what is the expected number of days until I have heard the entire 10 minutes of the loop? Assume I take the stairs down at the end of the day and so am only in the elevator for one minute per day.


I have already install RVM. Now I have download RubyMine-6.3.2.tar.gz From here  , But still I am confuse How can I install it on my system. I am using Ubuntu 12.10. Please help me to do this.  Thanks