install amavisd-new failed on ubuntu20.04

This happend when I try to install amavisd-new on Ubuntu 20.04: mandi@rez-latitude:~$ sudo apt-get install -y amavisd-new Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   libberkeleydb-perl libconvert-binhex-perl libconvert-tnef-perl   libconvert-uulib-perl libio-multiplex-perl libmime-tools-perl   libnet-cidr-perl libnet-server-perl libunix-syslog-perl pax Suggested packages:   apt-listchanges arj dspam lhasa libnet-ldap-perl libsnmp-perl libzeromq-perl   lzop nomarch rpm altermime ripole liblog-log4perl-perl The following NEW packages will be installed:   amavisd-new libberkeleydb-perl libconvert-binhex-perl libconvert-tnef-perl   libconvert-uulib-perl libio-multiplex-perl libmime-tools-perl   libnet-cidr-perl libnet-server-perl libunix-syslog-perl pax 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,380 kB of archives. After this operation, 4,952 kB of additional disk space will be used. Selecting previously unselected package libberkeleydb-perl:amd64. (Reading database ... 283931 files and directories currently installed.) Preparing to unpack .../00-libberkeleydb-perl_0.62-1build1_amd64.deb ... Unpacking libberkeleydb-perl:amd64 (0.62-1build1) ... Selecting previously unselected package libconvert-binhex-perl. Preparing to unpack .../01-libconvert-binhex-perl_1.125-1_all.deb ... Unpacking libconvert-binhex-perl (1.125-1) ... Selecting previously unselected package libmime-tools-perl. Preparing to unpack .../02-libmime-tools-perl_5.509-1_all.deb ... Unpacking libmime-tools-perl (5.509-1) ... Selecting previously unselected package libconvert-tnef-perl. Preparing to unpack .../03-libconvert-tnef-perl_0.18-1_all.deb ... Unpacking libconvert-tnef-perl (0.18-1) ...  ...... Selecting previously unselected package libconvert-uulib-perl. Setting up libnet-server-perl (2.009-2) ... Setting up amavisd-new (1:2.11.0-6.1ubuntu1) ... Creating/updating amavis user account... Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details. invoke-rc.d: initscript amavis, action "start" failed. ● amavis.service - LSB: Starts amavisd-new mailfilter      Loaded: loaded (/etc/init.d/amavis; generated)      Active: failed (Result: exit-code) since Sun 2020-10-18 09:50:03 CEST; 6ms ago        Docs: man:systemd-sysv-generator(8)     Process: 412289 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)  Oct 18 09:50:03 rez-latitude amavis[412289]: Starting amavisd: Oct 18 09:50:03 rez-latitude amavis[412301]:   The value of variable $myhostname is "rez-  latitude", but should have been Oct 18 09:50:03 rez-latitude amavis[412301]:   a fully qualified domain name; perhaps  uname(3) did not provide such. Oct 18 09:50:03 rez-latitude amavis[412301]:   You must explicitly assign a FQDN of this  host to variable $myhostname Oct 18 09:50:03 rez-latitude amavis[412301]:   in /etc/amavis/conf.d/05-node_id, or fix what  uname(3) provides as a host's Oct 18 09:50:03 rez-latitude amavis[412301]:   network name! Oct 18 09:50:03 rez-latitude amavis[412289]: (failed). Oct 18 09:50:03 rez-latitude systemd[1]: amavis.service: Control process exited,  code=exited, status=1/FAILURE Oct 18 09:50:03 rez-latitude systemd[1]: amavis.service: Failed with result 'exit-code'. Oct 18 09:50:03 rez-latitude systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter. dpkg: error processing package amavisd-new (--configure):  installed amavisd-new package post-installation script subprocess returned error exit  status 1 Processing triggers for man-db (2.9.1-1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Errors were encountered while processing:  amavisd-new E: Sub-process /usr/bin/dpkg returned an error code (1)  Can somone explain why this happend?


Any way to force the Windows Task Bar to hide (if in "auto hide" mode)

I have my Win 7 taskbar set to autohide but its often pops up... and just stays visible, obscuring the bottom of all other programs (since they are behaving correctly (as if the Task Bar isn't there b/c it's supposed to autohide).  Any way to force it to HIDE again?


I often find myself doing commands like this  cd ../../../../../   Is there a shortcut I can use that will cd ../ n times?


How do I iterate and list XML node attributes?

I have an XML file that I'm loading into an XmlDocument and need to get a list of all the attributes on nodes with a specific name.     <shirts>         <product ID="123" Name="tee" Serial="5678"/>         <product ID="456" Name="crew" Serial="4566"/>      </shirts>     <pants>          <product ID="123" Name="jeans" Serial="1243" Color="blue"/>          <product ID="123" Name="dress" Serial="3455" Color="black"/>          <product ID="123" Name="shorts" Serial="6654" Color="grey"/>     </pants>   From this I need a list of all the "product" attributes.  Result looking like:  ID Name Serial Color   I don't need the values, just the attributes themselves.  I'm using C# and Winforms.  I know how to get the attribute values but not sure how it's done to get the attribute names themselves.  How do I do that?


In Breaking Bad Walt seems to always put on his hat when he gets into the Heisenberg mind set/character.  Is this the hat's sole purpose or is there a deeper meaning/connection to something else?


Can you please explain me what is electric flux. I know it is $\int\mathbf{E}\cdot\mathrm{d}\mathbf{S}$, but in many place its given flux means to flow. But how does electric field "flow"? Also if we assume its the electric field lines (can you also specify what exactly are these) are "flowing" how does $\int\mathbf{E}\cdot\mathrm{d}\mathbf{S}$ give the total electric field lines passing through that area? (can you please elaborate when you explain?)  Pls. I know it shouldn't come here but there is no page for electric flux.


how to move these red marked ticks to the inside of the box (like on the y axis)?  Thank you    \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{anysize} % Für \marginsize \marginsize{32mm}{32mm}{20mm}{24mm} % Seitenränder \renewcommand{\baselinestretch}{1.5} % Zeilenabstand  \begin{document}  \begin{tikzpicture}   \begin{axis}[     axis x line*=box,     axis y line*=box,     tick align=inside,  %%already tried this one here!!     width=14cm,     height=6.75cm,     xlabel=Platzhalter,     xticklabel style={yshift=-0.1cm},     ylabel=Platzhalter,     yticklabel style={xshift=-0.1cm},     label style={font={\small}},     tick label style={font=\scriptsize},     grid = both,     grid style={line width=0.2pt,},     legend style={         font=\scriptsize,         at={(0.5,1.03)},         anchor=south,         draw=none,     },     legend columns=5,     legend cell align = right,     ,     xmin=0,     xmax=5,     xtick={0, 1, 2, 3, 4, 5},     xticklabels={,2009, 2010, 2011, 2012, },     ymin=0,     ymax=14,     ytick={0,2,...,14},      ybar=8pt, %Abstand Säulen     bar width=12pt, %Breite Säulen   ]     \addplot[blue,fill=blue!30] plot coordinates      {(1, 6) (2, 8) (3, 5) (4, 13)};   \addplot[red,fill=red!30] plot coordinates      {(1, 5) (2, 6) (3, 12) (4, 5)};   \legend{Barplot 1, Barplot 2} \end{axis}    \end{tikzpicture}  \end{document}


How can one express frequentist p-value in terms of Bayesian concepts?

I always believed that the p value was $P(H_0|Data)$ -- which to my rude shock I recently learned was not the case -- Note: I studied traditional frequentist probability.  How can one express the p-value in terms of Bayesian concepts -- assuming one can?


Let $f:[a,b]\to \mathbb{R}$ be a continuous function and let $g:[a,b]\to \mathbb{R}$ be a function such that $g(a)=f(a)$ and $g(x)=\sup_{t\in [a,x]}f(t)$. Prove that $g$ is continuous on $[a,b]$.   I noticed that $g$ is increasing so if somehow I show that it satisfies Intermediate value property then it must be continuous.


What is the correct sentence between these two forms:     "the 10-years evolution show..."    or      "the 10-year evolution shows...".   ?   Both answers seem okay to me. Also, what about the dash between 10 and year?


Quickest way to create a color gradient texture

What is the easiest way to create a color gradient texture in blender?   Original Question:   I want to apply a color gradient texture to an object, but I cannot figure out how to do so. I have read several guides that point to a "gradient texture" texture type when using the cycles render engine, but it just does not exist in my version of blender. I have tried switching back and forth between rendering engines, restarting blender, all sorts of stuff.    I am using Blender 2.74 in manajaro (arch linux based distro).


Confused about when to use whom and whose

Which is correct:     With whom are you going to the park?   or     Who are you going to the park with?   There is also another confusing part of something similar. Example;     This note comes from Bob. He wanted to give it to you. Excuse me. I   didn't hear the name. You said the note comes from who?   or      ... the note comes from whom?


Sharing an encrypted file between a group of people

Is there any way to share an encrypted file with a group? In the other words, can I encrypt a file with a public key so that each person in a group decrypt it with his/her private key?  Is there any way that I have a public key and some different private key for it?  I want to find a way to encrypt a file with a public key, and then produce some private keys from this public key, so that whenever I wanted to share that file with some person, I gave him/her a private key from this set to decrypt my file.


Prevent World texture from reflecting on an object

I use HDRI for lighting and have a plane made from some glossy material on which my other objects are. And I just can't figure it out how I could achieve that the World doesn't reflect on the plane, only the objects on it.  Under Object > Cycles Setting I cannot find any relevant option for this, my other idea was the light path node, but there I can see no output for world either.  Do I need to use compositor maybe? And if so how?


How can a texture converted to be tileable (seamless)?

When using photos as textures they are usually not tileable and create patterns like:    Is there any method in Blender to make images tileable?


I've just tried "sudo apt-get update" but it failed

I needed to add some libraries from git but when I tried updating it showed the following error "E: Malformed line 3 in source list /etc/apt/sources.list.d/google-earth-pro.list (type) E: The list of sources could not be read." I don't know if any previous update made any change to that file or what but I cannot use "apt-get" in ubuntu 16.04.


Why objects with cloth modifier don't move after I parent them to moving empty?

I created the mast of a ship with a sail, flag and several ropes. Sail, flag and some ropes have cloth modifier.  I parent them all to empty, but when I move empty, only the mast and ropes without the cloth modifier moves. And all of the objects that have cloth modifier remain in place. It looks parent does not work with them.  I am allready using pinned vertices, it works fine. But I need to be able to move the mast with a sail, not sail separately from the mast.  Why is this happening and how to fix it?


Getting System() output to return as string in C++

I am using system() and need this in a string format. What is the best way to approach this? int main () {      system("systeminfo");     string id = std::to_string(system("whoami")); //Doesn't work     system("ipconfig");      return 0;  }


Allow linking to specific revision of revision history showing diff

Currently, the only way to link to a revision (clicking "link"), you just get  which shows what the post looked like at that revision:        Personally, I rarely use this and haven't ever found myself in a scenario (as far as I remember) where I would prefer the way it currently works to what I'm suggesting here.  Could we:   Add another link, or Change the current link   Such that it:   Displays the diff on a separate page (I'd prefer this, since the highlight and scroll thing doesn't always work properly - although perhaps it has something to do with loading images, so it might not apply here, or, if it doesn't, we could fix that instead), or          Highlights and scrolls to a diff, like what is done when you link to an answer ()


Story involving young female space travelling escapee with multiple personalities

I'm looking for a story about a youthful (late teens?) female protagonist who begins the story by making an emergency escape from an orbital habitat. The protagonist is actually host to multiple disassociated (as many as seven?) identities, of whom she is initially unaware. They are capable of holding council internally, however.      Some of the identities/personalities are more sexual than others, leading to intercourse that only some of the personalities actively consented to.   Another spoiler-free notable story piece is a race of aliens who mark their 'naturally present' personalities/identities with a glyph or character on their bodies before venturing into public spaces.  FTL in this story must be performed by a non-human pilot, while the remainder of the occupants are either put to sleep or in suspended animation (I don't recall), due to eldritch somethings in the great beyond that will drive human pilots mad.      The driving action in the story is the protagonist's flight from corrupt human government groups that brutally experimented on her as a child to deliberately induce disassociated identities in an attempt to yield a viable human FTL pilot. The experiments were in fact successful, and the climactic scene involves the protagonist, now reconciled to her multiple personhood, piloting allies through an FTL jump.   I believe it was written in either in the late nineties or early aughts.


Misaligned fancyhdr footer when using color

Strangely, using {\color{}} in \lfoot{} is causing my footer parts to misalign.  This code  \documentclass[11pt,a4paper]{article}   \usepackage{fancyhdr} \usepackage[pdftex]{color,graphicx}  \pagestyle{fancy}  \lhead{} \chead{} \rhead{}  %%% \lfoot{{\color{blue}Build}} %%%  \cfoot{\textcolor{blue}{P.\thepage}} \rfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}  \title{Yep.}  \begin{document}      \maketitle     \thispagestyle{fancy}      \section{Blarg} \end{document}   Produces...


How does this array program in C give the result 10?

I am using Ubuntu 12.04lts with the GCC compiler. This program gives the result 10. Could you anybody please describe why this program gives the result like this?   #include <stdio.h>  void main(void)  {      int arr[1] = {10};      printf("\n%d\n\n", 0[arr]);  }


Schema qualification necessary for query plan reuse?

While reading  about Plan Caching in SQL server, I came across a tidbit I was unaware of:     ... for reuse it is necessary that the objects that the batch references do not require name resolutions. For example, Sales.SalesOrderDetail does not require name resolution, whereas SalesOrderDetail does because there could be tables named SalesOrderDetail in multiple schemas. In general, two-part object names (that is, schema.object) provide more opportunities for plan reuse.   I'm looking for some clarification about how important it is to use two-part object names, since "In general, two-part object names provide more opportunities for plan reuse.", yet it starts by saying it's necessary.  More specifically, most of the stored procedures I deal with are in the dbo schema and reference only dbo objects, without specifying the dbo prefix.  Are these prevented from reusing cached query plans, even with everything using the default schema?


Prove that $\left (\frac{1}{a}+1 \right)\left (\frac{1}{b}+1 \right)\left (\frac{1}{c}+1 \right) \geq 64.$

Let $a,b,$ and $c$ be positive numbers with $a+b+c = 1$. Prove that $$\left (\dfrac{1}{a}+1 \right)\left (\dfrac{1}{b}+1 \right)\left (\dfrac{1}{c}+1 \right) \geq 64.$$   Attempt  Expanding the LHS we obtain $\left (\dfrac{1+a}{a} \right)\left (\dfrac{1+b}{b} \right)\left (\dfrac{1+c}{c} \right)$. We are given that $a+b+c = 1$, so substituting that in we get $\left (\dfrac{b+c+2a}{a} \right)\left (\dfrac{a+c+2b}{b} \right)\left (\dfrac{a+b+2c}{c} \right)$. Then do I say $\left (\dfrac{b+c+2a}{a} \right)\left (\dfrac{a+c+2b}{b} \right)\left (\dfrac{a+b+2c}{c} \right) \geq 64$ and see if I can get a true statement from this?


Expectation values of the position operator is equal to zero in case of even potentials?

Assuming the eigenvalue of position operator $\hat x$ equal to $k$, can I not write:  $$\begin{align} \langle\psi_n|x|\psi_m\rangle &= \langle x\psi_n|\psi_m\rangle \\ &=\langle k\psi_n|\psi_m\rangle \\ &=k\langle\psi_n|\psi_m\rangle \\ &=k\delta_{nm}  \end{align}$$  But I know that $\langle x \rangle =0$ in case of even potentials (I don't know how that happens) and what I have written above is wrong, at least in case of even potentials.  Taking the example of infinite 1D square well, the states are : $$ \psi_{n} \left(x\right)=A\sin\left(\frac{nx\pi}{L}\right)dx $$ then, $$ \langle\psi_n|x|\psi_m\rangle =A\int_{-\infty}^{\infty}\sin\left(\frac{mx\pi}{L}\right)x\sin\left(\frac{nx\pi}{L}\right)dx $$ If m=n=1, $$ <x>=A\int_{-\infty}^{\infty}x\sin^{2}\left(\frac{x\pi}{L}\right)dx $$ if we apply an even potential then the equation gets reduced to$$ <x>=\frac{1}{L}\int_{-L}^{L}x\sin^{2}\left(\frac{x\pi}{L}\right)dx=0 $$ while in case of a potential(neither even nor odd), the equation leads to $$<x>=\frac{2}{L}\int_{0}^{L}x\sin^{2}\left(\frac{x\pi}{L}\right)dx=L/2 ~? $$  Here $n=m=1$ but $ <x>=0 $ for even potentials, which is confusing me! It should be $k$ right?


I am using PostgreSQL and trying to write value constraints.   Is it possible to record missing data as distinct from NULL values in a numeric field without using an arbitrary numeric value?  For many fields, I want to ensure that the record is either numeric or recorded as missing, but not NULL.   A common solution is to use -9999 to indicate a missing value. However, this can lead to silent errors (e.g. calculating a mean). Is there a better solution than creating a new type that allows either a value of "Missing" or a number?


what exactly is a correlation of zero meant to be, does that mean that changes in x does not affect y, if that is the case, from the scatter plot  That is completely false, as sometimes as x increases, y decreases or increases


US citizen with my 90 days almost over - if I leave Italy and go to Croatia and back to Italy will my 90 days reset?

I've read a plethora of forums and websites on this topic. It appears that many experienced and recent travelers do this and there is no problem, especially from France, Italy, Spain and Germany. Yet, I'm in no position to take a serious chance and I do want to come back here  as a self employed person, possibly get a Visa when I go back to the States. I would love if I could go hang out in Croatia for a few days and come back here and have my visitor pass renewed another 90 days. Getting close to the deadline to change my air ticket and I need a definite answer. I have read the legit country websites and rules and...still, is this possible? I'm guessing between Schengen and Non-Schengen zones and I being an American, they will run my passport through the digital stamp? OR --> Since I'm renting an apartment here and living underground a bit...chance the stay until June (arrived Jan 1)and chance they won't notice or care about my over-stay. Not ideal, since I want to return.


What is the probability (area) of overlap of two normal distributions having EQUAL variance

Can you please provide a math formula or an Excel example (math operations and Excel functions jointly used) to compute the probability (area) of overlap of two normal distributions having EQUAL variance?  The original data are as follows:  Mean 1 = 1145  Mean 2 = 1214 Standard Error of both distributions  = 276 Variance = Standard Error^2 * square root of sample size = 276^2 * sqrt(30) = 417 233.14   There is one good example made by "wolfies" .  He gives the formula to compute C and the formula together with Excel Erf function to compute the probability (area) of overlap of two distributions but it is for UNEQUAL variance.  I wish he could see my post.


Error installing mysql server on Ubuntu 14.04

I am getting error installing mysql on ubuntu desktop 14.04 ( 64-bit)  I used following command  sudo apt-get install mysql-server   It asked me for password (and verification) and ended on following errors  Setting up mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ... initctl: Unknown job: mysql   Any suggestions would be helpful


I'm quite new to smart pointers and I encountered a problem with the code below  #include <memory> #include <vector>  using namespace std;  class A { public:     int var; };  class B : public A { public:     vector<unique_ptr<int>> vec; };  int main()  {     {         unique_ptr<B> b(new B);         b->vec.push_back(unique_ptr<int>(new int(4)));         unique_ptr<A> a = unique_ptr<A>(move(b));     }      system("pause");      return 0; }   In this example the 4 added to vector vec is not deleted when pointer a goes out of scope, but when I change it so that it doesn't cast to base class then all resources are returned as intended, how do I manage deleting variables defined in derived classes when using polymorphism and unique_ptr?


'''' What are the numbers after '='? Is it a file name like .php or .html file or its a media file like .mp4?


What really is bash? (or any linux shell)

I understand bash as a window where I can type commands to linux. Reading the wikipedia, I've learned that there were various shell applications throughout the history. First, I understood bash as something where you type a command and get a response. Every time you typed something and pressed enter, it would respond with another line of text with the response. But it's more than that. You can actually create 'applications' inside bash. For example, there are the text editors nano and vim. So it looks that you can actually control some graphs inside the window.  Another example is this window that appears in the raspi-config command of the raspberry pi. This appears inside the putty window when I type this command. What is it? How do I make colorful and rectangular things appear inside bash?  I want to understand what's happening: where does bash runs inside linux? how does it communicate with the system? I'm young and therefore I have no insight on the history of terminals on computers, I don't know how all changed when GUIs appeared.


Given $p$ a prime number such that $p \geq 5$  Show that $p^2$ is congruate to $1$ modulo $24$  This is what I tried :  We have $p^2$ congruate to 1 modulo $3$ because if $p=3k+2$ so p is congruate to -1 modulo 3 so p^2 is congruate to 1 modulo 3  And $p^2$ is congruate to $1$ modulo $8$ because $p=2k+1$ ($p\geq5$) so $p^2-1=4q(q+1)=8q'$  We have $p^2=3k+1$ and $p^2=8k'+1$  So $p^4=24kk'+3k+8k'$ and $3k=p^2-1$ and $8k'=p^2-1$ So :  $p^4-2p^2+2=24kk'$  Im stuck here ! I don't want use to use a proprietie directly


Is there a paradox lurking in Interstellar?

When Cooper (the daughter) worked out the equations which allegedly assured the survival of the human race on Earth, she threw her notes from the balcony in the space center: "EUREKA!" Now, her father sent her information to solve the puzzle she was working on. Presumably a quantum theory of gravity (quantum gravity). He got this information ("quantum data") from Tars, who found it inside the tesseract. So somewhere in the future human beings were taught how to construct quantum gravity. But where did they got the means to construct one from? Probably from the physics books in which Cooper's theory is explained. She is a famous scientist (even the temporary cylindrical space station is named after her), so for sure her theory will be published and taught to others. So, in effect, she teaches the theory to future generations. These generations put the theory inside the tesseract and father Cooper sends it back to his daughter. The paradox is clear. Where the hell did the theory come from? Out of nothing? Is there a name for such a paradox? (If it's a paradox at all; the twin paradox refers to a situation that can happen in reality, while at first sight, the situation is not about to occur. The same situation occurs in J.J. Abraham's Star Trek. Spock sends information from the future about a present puzzle in teleportation. The puzzle is solved in the present and will be part of future knowledge.


Does there exist a continuous function such that f(x) is rational for every irrational x, and f(x) is irrational for every rational x? I can think of examples where this would be true, but I'm having a lot of trouble with the continuity.


Prettify OS X console by coloring output?

OS X terminal is not using colors for highlighting output from different commands, for example ls.   When compared with other systems like Ubuntu, this is a big loss of accessibility/productivity.  What solutions do I have to improve this experience? For the moment I found only this guide for  but I am looking for a more complete solution.


Improper integral of $\frac{\sin (\pi a t) \sin (\pi b t)}{t^2}$ depends only on the smaller of $a,b$

$$\int_{-\infty }^{\infty } \frac{\sin (\pi  a t)    \sin (\pi  b t)}{t^2} \, dt = \pi ^2 b$$  if $a$ and $b$ positive and $a>b$ (from Mathematica).  How is this result only based on the smaller of the two numbers, seems a very strange result. Any guidance?


Single line calculator - problem with last number

I created a console application that will take user input of any number and + or - operator for now, and returns the result. for example user can input 1+2+3+4, and result should be 10.  My problem is that I cannot figure out how to get the last number to be summed into the total result.  that mean in my code only 1+2+3 will be calculated while 4 will be ignored.  using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks;  namespace SimpleCalculator {     public class Program     {         public static void Main()         {             int result = 0;             int number;             string numberString = "";              Console.WriteLine("Enter numbers followed by operation eg. x+y-z");             while (true)             {                 string userInput = UserInput();                 //Loop into each element of the input string                 for (int i = 0; i < userInput.Length; i++)                 {                     if((IsNumber(userInput[i])))                     {                         numberString += userInput[i];                     }                     else if (!IsNumber(userInput[i]))                     {                         number = Int32.Parse(numberString);                         numberString = "";                         result = PerformCalculation(result, number, userInput[i]);                     }                  }                 number = Int32.Parse(numberString);                 result += number;                 Console.WriteLine($"{userInput}={result}");             }         }          // check if input is number or operator         static bool IsNumber(char input)         {             if (char.IsDigit(input)){return true;}             else{return false;}         }          static string UserInput()         {             string User_input = Console.ReadLine();             return User_input;         }          static int PerformCalculation(int sum, int num, char op)         {             switch (op)             {                 case '+': return sum + num;                 case '-': return sum - num;                 default: throw new ArgumentException("Uknown operator");             }         }     } }


Validate email address for particular suffix using regex in Ruby-on-Rails

I want to validate email address with a particular suffix which should be like email. It must have .edu or must have @mypost.com. As an example, I have four email addresses as shown below:  1) john@learn.edu - valid  2) john@mypost.com - valid  3) john@gmail.com - invalid  4) john@dblist.org - invalid  I have tried to solve the problem using the below code in my user.rb model file but to no avail.  if ('xc@dblist.com' =~ /\A[\w]([^@\s,;]+)@((mypost|[\w-]+\.)+(edu|com))\z/i) != nil   return true else   return false end


I missed semicolons in some of the places in my JavaScript, but its not throwing error in any of the browsers. Is the ; at the end needed?


I'm working with a geodataframe of points and I need to create a grid of rectangular polygons.   I know how to have bounds of the geodataframe with gdf.geometry.bounds. Now using this information and with 2 variables length and width  (L, W) of rectangular polygon, how can I create a grid ?


Plots with data coming from different files

Is it possible to draw a graph with pgfplots using data from different files ?  Let say I have two data files : data.dat and error.dat and would like to plot column 1 versus column 0 from data.dat and add error bars from error.dat.  If the data all came from the same file all.dat, I would use :  \pgfplotstableread{./all.dat}\mytable  \addplot  table[x index=0,y index=1, y error index=3]{\mytable};


Schengen Visa for two stopover in Germany?

I'm a Indian Citizen staying in the US (with valid US visa) and I am Planning to travel to India with two stopovers in Germany (only connecting flight in Frankfurt & Munich). Do I need a Schengen visa for travel?


Is there a way to make bash more TAB friendly?

I use bash on both my Mac and as my cygwin shell. Overall, I'm quite pleased with it.  My one complaint however is that its TAB completion isn't as good as Windows Command Line TAB completion.   For example, if there are two files with the same prefix, then bash just beeps at me when I try to TAB complete. If I keep nailing TAB, then it will eventually show me a list of potential files.  I definately prefer how Windows will cycle through potential files right on the command line.   Is there a way to get bash to operate similar to Windows Command Line in this regard?  If there isn't (I do not want to switch shells), am I missing something about TAB completion in bash? Is there a more efficient way to use it?


I can'yt boot Windows XP after installing Ubuntu 12.04

I can't boot Windows XP after installing Ubuntu 12.04 and what is worst is that I don't have the Windows XP installation CD.  kathy@kathy-HP-Compaq:~$ sudo fdisk -l [sudo] password for kathy:   Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xc51bc51b     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *          63    41957999    20978968+   7  HPFS/NTFS/exFAT /dev/sda2        41958061   156301311    57171625+   f  W95 Ext'd (LBA) /dev/sda5        41958063   101887679    29964808+   7  HPFS/NTFS/exFAT /dev/sda6       154224640   156301311     1038336   82  Linux swap / Solaris /dev/sda7       101888000   154222591    26167296   83  Linux  Partition table entries are not in disk order  Disk /dev/mapper/cryptswap1: 1063 MB, 1063256064 bytes 255 heads, 63 sectors/track, 129 cylinders, total 2076672 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x693811c2  Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table   please teach me how to do this things cuz i got limited knowledge in computer teach me like u teach your little sister.


Is there any reason not to make a member function virtual?

Is there any real reason not to make a member function virtual in C++?  Of course, there's always the performance argument, but that doesn't seem to stick in most situations since the overhead of virtual functions is fairly low.  On the other hand, I've been bitten a couple of times with forgetting to make a function virtual that should be virtual.  And that seems to be a bigger argument than the performance one.  So is there any reason not to make member functions virtual by default?


Qualifying Exam Question On Elementary Group Theory

Question. Let $G$ be a finite group and $p$ be the smallest prime dividing $|G|$.  Let $x$ be n element of order $p$ in $G$. Assume that there exists an element $h\in G$ such that $hxh^{-1}=x^{10}$.  Show that $p=3$.    What I have done so far is use the fact that $o(hxh^{-1})=o(x)=p$ and $o(x^{10})=p/\gcd(p,10)$.  By hypothesis we have $p=p/\gcd(p,10)$, giving $\gcd(p,10)=1$.  Here I am stuck.  I have not been able to make use of the fact that $p$ is the smallest prime divisor of $|G|$.  Can somebody help?


Convergence of $\sum_{n\ge2}^{ }\ln\left(1-\frac{1}{n^{2}}\right)$

Determine the convergence of the following series: $$\sum_{n\ge2}^{ }\ln\left(1-\frac{1}{n^{2}}\right)$$  I tried several convergence test like $n$th term test,ratio test,Abel's test,Dirichlet's test,Schlömilch's Generalizatio,but neither does work. But I used the identity: $$\prod_{n\ge0}^{ }\frac{\left(n+a\right)\left(n+b\right)}{\left(n+c\right)\left(n+d\right)}\tag{$a,b,c,d \in \mathbb R$}=\frac{\Gamma(c)\Gamma(d) }{ \Gamma(a)\Gamma(b)}$$ For $a+b=c+d$. Notice that: $$\prod_{n\ge2}^{ }\left(1-\frac{1}{n^{2}}\right)=\prod_{n\ge0}^{ }\frac{\left(n+1\right)\left(n+3\right)}{\left(n+2\right)\left(n+2\right)}=\frac{1}{2}$$ The sum can be rewritten as: $$\sum_{n\ge2}^{ }\ln\left(1-\frac{1}{n^{2}}\right)=\ln\left(\prod_{n\ge2}^{ }\left(1-\frac{1}{n^{2}}\right)\right)=\ln\left(\frac{1}{2}\right)=-\ln\left(2\right)$$ Wich is between $-1$ and $0$. I have two questions: Then how prove the series is convergent without directly calculating that?


I am making the "cgboost" apple bownl tutorial. my fabric goes inside the bowls faces,not just on that.how to solve the problem?


How to multisort list of dictionaries in Python?

list have structure:  test = [{"title": title, "ratio": ratio, "delta": begin - now()}]   Need to sort by ratio ( max->min) and after sort by delta (min->max) ) ?


How to prove that pqr order group is solvable group？

Let $G$ be a group and $|G|=pqr$, where $p,q,r$ are prime numbers that are not necessarily distinct. Show that $G$ is solvable. I try to discuss the classification of groups of order $pqr$ and I also know a group of order $pq$ is solvable but I can't prove it.


What is the most efficient way to prepare (very small) fresh oregano leaves?

While making my manicotti tonight, I received a painful reminder that the stuffing isn't actually the most tedious part of the process - it's pulling all the tiny leaves off the oregano stems.  It seems as though the oregano I'm able to buy here is not fully grown; it's been like this for as long as I can remember.    Obviously the stems are stiff, and bitter, and generally no good to throw in the mix, at least not with any of the recipes I use.  So I really need to get the leaves off the stems, and with this oregano, it's a painful process.  I've tried obvious routes, like "stripping" the leaves off the stems with my hands or a knife, but it doesn't really work.  The stems are too hardy, and if I strip them hard enough to get the leaves off then I usually end up stripping the stem with it.  And laying the stems flat on a cutting board and trying to chop the leaves off directly is almost impossible; the leaves are so tiny and irregularly distributed that it ends up taking longer than just pulling the things apart with my hands.  Am I missing something obvious?  Is there a way to prepare these oregano leaves that's more fun than watching paint dry?


footmisc package - remove star from footnote symbols

I'm using footmisc package for handling footnotes. I want to remove the star (*) from the symbol list?  I tried all the combination of  \DefineFNsymbols*{}{}   and  \setfnsymbol{}   except the correct one!:)  Could someone be so kind to point me to the correct command? Thanks!


How do you compute this integral? $$\int_0^{2\pi} e^{R \cos t} \cos(\sin t+3t)dt \quad R>0.$$ My friend sent this to me the other day, but have not made much progress so far. Maybe using line integrals would be the easiest way to go about, since it looks like it will get messy very fast. He says that the answer should be $0$ which makes me think that this thing is symmetric over $\pi/2$, but not sure.


NullPointerException in time-handling code

public  class Time {      public int Minutes, Hours, TotalMin;     private String  correctedMinutes ;     public String valid, TimeofDay;     public static int error;       //-----------------------------------------------------------------     //  Sets up the time by defining its minutes and hours      //----------------------------------------------------------------- public  Time(int  hours, int minutes)     { if (minutes>59|| minutes<0|| hours>23 || hours<0)                { Hours=0;        Minutes=0;           error=1;}         else       {Minutes=minutes;       Hours=hours;           error=0;}        }  public String Time2(int hours, int minutes, String timeofday) {          if (Hours>12 || Hours<0)         return "This is not a valid number of hours";          Hours=0;           if ( minutes>59|| minutes<0)                  {Minutes=0;                  error=1;                 return "This is not a valid number of minutes";}           if (!timeofday.equals ("AM") || !timeofday.equals ("PM"))          {TimeofDay.equals("AM");          return "You incorrectly enetered AM or PM";}                 else                { Hours=hours;             Minutes=minutes;                 return "";}               }      //----------------------------------------------------------     //     //     //-----------------------------------------------------------  public int addMinutes (int hours, int minutes, int elapsedMin)     {          if (elapsedMin<0)         return error=1;              else {             TotalMin=elapsedMin+Minutes;                     return error=0;}         }{      while (TotalMin>60)             {TotalMin=TotalMin-60;             Hours=Hours+1;   if (Hours==25)              { Hours=0;}               Minutes=TotalMin;              }        }     //----------------------------------------------------------     //     //     //-----------------------------------------------------------          public String toString ()         {             String correctedMinutes = String.format("%02d", Minutes);             return (Hours+ ":" + correctedMinutes + TimeofDay);     }   The test class  public class TimeTest {      public static void main(String[] args) {         // TODO Auto-generated method stub   int minutes, hours, elapsedMin;  String timeofday, startTime;  Scanner scan=new Scanner (System.in);  System.out.println("Please enter starting hour (1-12):"); hours=scan.nextInt(); System.out.println("Please enter starting minute (0-59):"); minutes=scan.nextInt(); System.out.println("Please enter AM or PM:"); timeofday=scan.next();   Time classtime = new Time (hours, minutes);  if (Time.error!=0)     System.out.println("This is an invalid time");   System.out.print(classtime.Time2(hours, minutes, timeofday));  {     if (Time.error!=0)         System.out.println("This is an invalid time");      System.out.print("The class begins at "); System.out.println (classtime.toString());  startTime=classtime.toString();  System.out.println("Enter a time in minutes representing the class duration:"); elapsedMin=scan.nextInt();  classtime.addMinutes (hours, minutes, elapsedMin); System.out.println (classtime.toString());   System.out.print(elapsedMin + " minutes after "+ startTime + " is "); System.out.println (classtime.toString());      System.out.print("The class ends at "); System.out.println (classtime.toString());   System.out.print("The class ends at ");  System.out.print("MILITARY"); }}} import java.util.Scanner;   It is giving me the error  Exception in thread "main" java.lang.NullPointerException at Time.Time2(Time.java:39) at TimeTest.main(TimeTest.java:29)   I know this is NOT this code's only problem, so if you have any advice I'm all ears.


I can understand the reboot of the Batman Series but I couldn't understand why Hulk was rebooted. And now why do we have to reboot Spider-Man, too?  Is it they are not able to write the script in the same back-drop as the previous movies in the series? Is it because they are not able to write sequels or prequels that will not conflict with the story already told in the previous movies?


Is there a place to obtain "Visa requirements for X visa holders" or some such thing?

When looking up visa requirments, the Wikipedia pages for "Visa requirements for X citizens" and "Visa policy of Y" (where X is your country and Y is the country you want to visit) are quite useful. However, is there a place where consolidated information is provided about which countries allow certain other visa holders to enter without needing to get a separate visa? As an example, Romania is not currently part of the Schengen Area, but it does allow multiple-entry Schengen visa holders or residents of Schengen countries, regardless of nationality, to visit Romania for a limited time. Those who hold a valid US visa can also visit Mexico without an additional visa, for another example.   Edit: I've gotten another duplicate marking with the , so just to clarify: this question is more generic. It's asking for information or a place to obtain information regarding countries that allow certain visa holders to enter without an additional visa. An answer could of course refer to the answer of that question for information regarding what's available to Schengen visa holders.


How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?

I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method:  ssh 123.123.123.123 Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1   How to enable the diffie-hellman-group1-sha1 key exchange method on Debian 8.0?  I have tried (as proposed ) to    add the following lines to my /etc/ssh/ssh_config  KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr  regenerate keys with   ssh-keygen -A  restart ssh with   service ssh restart   but still get the error.


How can I define when to reward magic items and gold as characters level advance?

Recently I have been trying to set a rule of thumb as of when it's time to reward my players with that +1 magic sword or when will they find that stash of X gold in it.  Can somebody provide me a guide with what power should players have at each level from 1 to 20? For example: By level 2 they should have 50g each. By level 3 they should have found at least 1 magic item as a party. Etc...  If you need more clarity please tell me,  Thank you in advance!


Change bend angle and swap node position on arrow

I'm trying to draw an automata as follows:  \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2.8cm]   \node[initial,state] (q1)      {$1$};   \node[state]         (q2) [right of=q1]  {$2$};   \node[state] (q4) [below right of=q2] {$4$};   \node[state, accepting]         (q3) [above right of=q4] {$3$};    \path[->]          (q1)  edge                 node {a} (q2);   \path[->]          (q2)  edge   [bend left]   node {b} (q3);   \path[->]          (q3)  edge   [bend left]   node {a} (q2);   \path[->]          (q2)  edge                 node {b} (q4);   \path[->]          (q4)  edge                 node {a} (q3); \end{tikzpicture}   However, the bending seems to be "too much", and it interferes with the two arrows to/from q4. In addition, I'd like the labels on those two arrows to be on the other side of the arrow. Sadly I couldn't find how to do it online so I turned to this page.


Why is linear regression a convex optimization problem?

One can read everywhere that linear regression is a convex optimization problem and thus gradient descent will find the global optimum.  But can someone explain how to proof that it is a convex problem? Is it because of the linear regression function or is it because of the RSS cost function?


Can someone explain the difference between .bashrc and .bash_profile? Examples would be great.  Thank you.


Why the normal to a surface is given by gradient? How to see this intuitively?


Keyboard layout indicator sometimes disappears Ubuntu 18.04.1 after some update

Ubuntu 18.04.1, GNOME 3.28.2, Tweaks -> Extension: Dash to panel  After some updates 05 Jan 2019 - 08 Jan 2019 I began to see sometimes:  Unstable:   (But this is NOT permanent! For example i made screenshot from normal behavior. + Same troubles on login screen which reduces the extensions effect!)  Stable:    Simple temporary fix - is select language with mouse cursor or twice with keyboard hotkeys.


Prove or disprove:  Suppose that a and b are positive integer then φ($a^b$) = a$^{b-1}$ φ(a)  I try many positive integer and I think it is true statement but please any help how can I start to prove it if it is true statement ?!  I know that if a is prime then φ($a^b$) =$a^b$ - $a^{b-1}$ and φ(a)=a-1.


Detemine cardinality of $ \{ f: \mathbb{N} \rightarrow [0,1] \}$

Detemine cardinality of $ \{f \mid f: \mathbb{N} \rightarrow [0,1] \}$.  We can show ran$(f) \neq [0,1] $  by a diagonal argument. But I am not sure how to use this to determine the cardinality.


Do infants need to apply for a separate US visa?

I have a J1 visa and I'm staying in the USA. I am planning to bring my wife and my son (5 months old). Do they have to apply for separate visas, or can my wife include our son's details in her form?  How about fees?


Is it necessary to check isUpdatable() when process run in system mode/trigger to pass security review process

In salesforce, we have a scenario, on the trigger of the lead object we are updating some records of Campaign. But the user on the behalf of we are running the trigger does not have edit permissions on the campaign. We are not facing any issue in the update of the campaign because the trigger is running the operation in system mode. Further, we have applied for the security review and made the changes and added the check of the object isUpdatable() and after it, we are not able to update the campaign due to that check which returns false for isUpdatable().  My questions are, Can we pass the security review without applying that isUpdatable() check? if our process has the business logic to update the campaign/opportunity on the behalf of the user who doesn't have permissions on the campaign/opportunity?  If we can not pass the security review with that check then what could be an alternative for it, where one user who doesn't have permission on campaign/opportunity, performs some operation on lead/contact and we want to update the campaign/opportunity in system mode after that operation?  or is it necessary to provide the permissions of campaign/opportunity to that user?


what is the purpose of protected variable and method in java

I am new to Java, could you please tell me -  "what is the purpose of the protected variable and method in Java".  Thanks in advance. JP.


I need to create a bootable CD from an ISO. Is there free software available?  I am using Windows 7.


Recovering data on an MBR partition converted to GPT

first time poster but I've been a long time reader! Here goes...  I've just converted a WD Green, 2TB HDD (data only) NTFS - using Minitool Partition Wizard 9.1 from MBR to GPT. Drive was about 67% full.  Using Windows 10. I have a UEFI GPT boot drive. The website specifically said this does not lose data!  Using the convert mbr to gpt command only took a couple of seconds (should it have been a long process?)  It now shows up as Basic GPT - Unallocated - empty space.  Also no drive letter is assigned.  Its not a system disk so no activity should have over written any data yet.  Before I try to recover the partition, does anyone have any experience - should I:  1 - first convert the drive BACK to MBR then try and recover the data?  or  2 - Is it safer to stick with the GPT and attempt recovery from its current type?  or  3 - Assign a driveletter and reboot, maybe the system will then see the GPT?  Thanks for any help!  AP


Does a nullhomotopic loop always deforms into a point of it?

Let $f,g:S^1\rightarrow X$ be paths with $g$ constant. At the exercise 3.3 of Rotman's "Introduction to Algebraic Topology" I need to show that  $$ f\simeq g \ \  \mathrm{rel}\{1\} \Leftrightarrow f\simeq g, $$ where $1$ is the $\ e^{2\pi i 0}\in S^1 \ $ and $\ "\simeq"\ $ is the homotopic relation.  The $\ "\Rightarrow"\ $ direction seems to me trivial, the $"\mathrm{rel}\{1\}"$ element adds that,    if $F$ is the homotopy function, then $F(1,t)=f(1)=g(1)$, but the $\ "\Leftarrow " \ $ got me baffled. From the supposition $f$ and $g$ being free homotopic, ultimately, as long as I get it right, the closed loop $f$ has to deform continuously into one of its point that coicides with the constant.   Can you provide some further insight, or some indications in order to help me make progress?    Edit: In this particular exercise, $f(1)=g(1)$ is given.


Belgium tourist visa refusal, is appealing worth it or not?

My husband and I have applied for Belgium tourist visa on September 17th and we were highly confident that we provided all the necessary documents, especially proving the fact that we will leave the country on the scheduled date. Yesterday we received an email implying that our visa application was refused because the reasons and conditions were not well justified.      l'objet et les conditions du séjour envisagé n'ont pas été justifiés   We bought flight tickets in advance, but we booked hotel with free cancellation policy to not lose more money in the case of being rejected. The only doubt we had was, not providing any documents showing we are married since all the fund and bank accounts were for one of us (my husband) and I just filled out the application form stating that I am currently studying an MS in Computer Science (last semester) but I provided no evidence whatsoever. I also am a freelance translator and speak over 3 languages fluently, I know it might be unrelated but given that the translation company I work for is quite popular, will it help them understand it is only a tourist visa, being desperate to see Bruges (inspired by the movie,  (as silly as it sounds))?   I wonder if we could appeal and explain the situation more clearly for the consulate. I wouldn't risk reapplying again since the fee is quite high. As I searched their website, they provide no information on appealing, does it mean there is no such an option in their embassy in Iran? Would sending an email help?  Further information: I once applied for a schengen visa and traveled to Germany four years ago before getting married. My husband applied for a UK student visa 5 years ago (thrice) and was rejected. I wonder if we are rejected because of that.   Edit: I have read all the related questions, but I guess such questions must be answered individually, I might be wrong)   There is also another reason that could have made them skeptical. We bought our ticket online which was a fairly cheap flight, then we planned to set an appointment online via Belgium embassy website and found out the earliest available date is October 18th, two days before our planned departure date. We sent the embassy an email requesting for an appointment any time earlier than that with a print of our ticket attached. Then they set us another appointment on Sep 17th (they said the email is for urgent cases only)


Does the Federation protect pre-warp societies from contact with other species?

The Prime Directive is a Federation concept that some others do not follow (I’m thinking Romulan, Klingon, Cardassian, possibly Ferengi).  Whenever a Federation ship discovers a new pre-warp society they are prevented from establishing contact under the Prime Directive:     The Prime Directive prohibits Starfleet personnel and spacecraft from interfering in the normal development of any society   Now, that’s all fine but leaving that society open to be discovered by any of the other warp capable species out there, especially the most aggressive ones, feels like a little dodgy from the ethical point of view, since you may argue that the main spirit of the Prime Directive is void if you allow others to interfere with that development even if you don’t do it yourself.  Are there any references (in canon preferably) about whether the Federation also protects those societies from intervention in addition to just not interfering. And would a violation of that be considered an act of war?


In class today, we learned about the familiar $L^p$ martingale convergence theorem: For $p >1,$ if $X_n$ is a martingale with $\sup \mathbb{E}|X_n|^p <\infty$, then $X_n \rightarrow X$ a.s. and in $L^p$.  Comparing this result with many other convergence theorems, we find that is requires X to be a martingale instead of just a submartingale. I assume this must have some reason, i.e. this result does not hold for submartingales.  Intuitively, I would assume that this is caused by something related to a restriction to the nonnegativity of the submartingale, i.e. the result will not hold when $X_n$ is a negative submartingale. Is this true? Or does the theorem also hold for submartingales?  If it does not hold, could you give me a counterexample?


Minecraft crashes on launch with EXCEPTION_ACCESS_VIOLATION, Problematic frame: ig4dev32.dll or ig4dev64.dll or ig4icd32.dll or ig4icd64.dll

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


What is the minecraft command to kill all mobs except players and villagers?

I want to make a command block to make sure that anything that spawns in a village, dies, except players and villagers. Please help me.


I am trying to install a package from ppa:lubomir-brindza/nautilus-typeahead. I do not have sudo access on machine, so I want to install the executables locally. What is the best way to do this? I understand that the package won't be automatically updated, I just want to be able to use the executables.  To reiterate, I do not have sudo access. So I do not think I can build from source, since that would require installing the build-dependencies.


Manual/automatic line breaks and text alignment in TikZ nodes

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE).  Is there a way to make lines break automatically at some specified width?  And can I control the alignment of the text (left, right, centered, justified)?  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {First line\\second line}; \end{tikzpicture} \end{document}


How can I strikethrough code in a Code Sample. I would like to acheive this Console.WriteLine("Strikethrough");     // A Hello World! program in C#. using System; namespace HelloWorld {     class Hello      {         static void Main()          {             Console.WriteLine("Hello World!");              Console.WriteLine("Strikethrough");            }     } }


The places at which a journey begins and ends

In the nomenclature of travel and transport, what are the most common terms to describe the places at which a journey begins and ends?  I think that "destination" is likely to be the latter—but how do we describe the former?  My mathematical mind wants to say "origin" or "source", but I suspect those from a less scientific background may find those terms awkward; is there any better terminology?


I need to solve this equation:  $x^2 = 1$ in the ring $\mathbb{Z}/n \mathbb{Z}$.  I know  that  $(n - 1)(n - 1) \equiv 1 \pmod n$, in general $(n-a)^2 \equiv a^2 \pmod n$.  I also know that for $p$ prime all elements of $\mathbb{Z}_p$ are invertible and here $1$ and $p-1$ are their own inverses.  Could you tell me what other solutions there are to this equation?


How can I retrieve \thepage (or detect a page change) from Lua in LuaTeX?

I am writing (contributing to) a LuaLaTeX package where a Lua function is used to generate images that are inserted in the LaTeX document.   One piece of information we need is the current page number to determine if we're on an odd or even page (I know that this is not that trivial, and I know about some strategies beyond \thepage). We set a Lua variable when we're still in the LaTeX part, and so far this works pretty well.  However, now it turns out that the sequence of images we create may be distributed on several pages, and we would really like to reflect that because our images may behave differently on odd and even pages.  Basically what we have is a series of  tex.print('\\includegraphics{something}\\par')   statements, executed in a loop within one Lua function.  Now the question: is there any way to either directly detect a page change between two such graphics or repeatedly retrieve the current page within such a loop?  All the solutions I have found for determining current odd or even state are in LaTeX itself. I know how to use \directlua to retrieve a value for use in LaTeX, but is there a way to do the opposite - retrieve a LaTeX value from within LUa?  Edit: to respond to TeXnician's comment and answer: When I modify the example code so it produces repetitions of paragraphs it seems that the page counter won't get updated within one Lua chunk:  \documentclass{article}  \newcommand\printluapage{%     \directlua{for i = 1, 60 do tex.print(tex.count['c@page'])          tex.print([[\par]]) end} }  \begin{document} \printluapage  New command  \printluapage  New command  \printluapage \end{document}   The page number is only updated with each new call of \printluapage.


How to get Google to do a deep index of my content?

Previously Google was unable to find events on the site I'm working on because it was restricted to logged in users. We specifically added a small feature to view upcoming and past events by popularity. Each page contains X number of structured data 'event' objects (each with schema.org object properties etc.), and my goal has been to get Google to index this data.  My site has ~65k total events, 21k in the future and 44k in the past. Overall, Google only recognizes 5,293 total indexed items (as per Google Webmaster tools, adding up all the www/non-www and http:/ versus https:// and combinations etc.), and on the Structured Data tab of the same tool it shows only 1,413 items (I assume of all the indexed content, these are the only ones it is labeling as events?).  I requested a "fetch as Google and render", with a deep-index to fetch pages linked to the requested page (only 10 of these to use per month), for urls for the base /upcoming-events and /past-events, as well as upcoming & past-events?page=3, but so far I've only seen 1500 pages indexed.  Should I just wait more time?  Could the paging setup (it's not fully implemented yet) be missed by Google?  Here is the  if anyone wants to examine the content (for relevance only).


I have a directory named -H and would like to change the name of it

I am taking a class at Pluralsight and made the mistake of typing 'express -H' as instructed. Now I have a dir named -H and Ubuntu will not let me access it or otherwise deal with it. I would like to rename it - any help?


I am not an electrical engineer but I was just reading the book - The art of electronics. I am just a bit confused about how to analyze this amplifier circuit. In this case, why are R1 and R2 in parallel? I would think it makes more sense for R1 and Rc to be in parallel. Even if that is not the case, when we look into the circuit, shouldn’t there also be a large impedance due to the gain of the transistor? Thanks in advance.


For the holidays we often drive from Buffalo to Detroit via Ontario, since it saves a lot of time. However, this is the first year we will be bringing our new dog along as well. What sort of documentation do I need to bring to make sure I can get in and out of Canada without a problem?  All I've found is that a rabies vaccination is required. Does the info on the vaccination certificate need to have my name and address on it (she was vaccinated at the shelter before we got her)?


How can I better control my navigation controls?

I often find myself either zooming, rotating, or panning too slow or too fast How can I get better at this? What options can I do? So far Ive only somewhat solves zoom with Ctrl MMB = slower smoother zoom Ctrl shift MMG = faster zoom but sometimes even the slow zoom is not slow enough, and I cant hold shift for any of the navigation controls to slow it down either. Any thoughts anyone?  Update) Okay so something I noticed when you start zooming with scroll wheel and slow down thats when rotate and pan also slow down if you scroll back out then use Ctrl shift mmb or ctrl MMB to have a faster zoom then rotate and pan will be at the same relative speed i need to be able to control when that "slow zoom" is happening so I can decide "now I want slow zoom" = rotate and pan will also slow down the problem seems to be that I dont have a control of when that slow zoom happens and as a result can get unwanted speed ramps or slow downs in navigation


I need to use a priority queue in my Python code, and:   am looking for any fast implementations for priority queues optimally, I'd like the queue to be generic (i.e. work well for any object with a specified comparison operator).   Looking around for something efficient, I came upon , but:   I'm looking for something faster than heapq, which is implemented in native Python, so it's not fast. It looks good, but seems to be specified only for integers. I suppose it works with any objects that have comparison operators, but it doesn't specify what comparison operators it needs.  Update: Re comparison in heapq, I can either use a (priority, object) as Charlie Martin suggests, or just implement __cmp__ for my object.


Install Xcode 7 on Mac OS X 10.10 Yosemite

I am running Mac OS X 10.10 Yosemite and have Xcode 6.4 installed.  In order to run my Apache Cordova app on iPhone 6 with iOS 9 i need to have Xcode 7 and higher.  Is there a way to install and use Xcode 7 along with Xcode 6 on my Mac? If yes please advise with the steps.  Edit  I was able to install Xcode 7.3 beta 2, but i can't open the app. When i go to /Applications folder and do open Xcode-beta.app i get this error LSOpenURLsWithRole() failed with error -10825 for the file /Applications/Xcode-beta.app.


I am trying to have two lines in inside \fbox but is not working. Below is my code  \documentclass{beamer} \usepackage{vietnam} \begin{document} \begin{frame} \frametitle{Exhaustive Search} {\centering\fbox{ One billion searches per second $\Rightarrow 36 yrs \newline All this to recover only $10$ bits !}} \end{frame} \end{document}   Update:


Open Visual Studio Code as sudo every time?

I got an error message today when opening VS code as sudo/root,   "It is recommended not to run Code as 'root'."   THis seems so stupid, Visual Studio code is an IDE, an IDE is used to editing files is it not? Without sudo you wouldn't be able to edit, create, delete, modify, or do anything with any file, so what would the point of the IDE be without sudo? I'm struggling to understand why its a bad idea.  Am I doing something wrong, and if so what should I do? I'm a web developer, so of course I need write and edit permissions to files. Without that, it wouldn't be an IDE, the program would be useless...  I have the files in /var/www/html.


If $\sum_{i=1}^\infty a_i$ diverges, then prove that $\sum_{i=1}^\infty ia_i$ diverges.   My English is too bad to express the question clearly. Thank you for your answer.


How to fix $PATH environment on Mac OS X?

Recently, I tried to install ruby and I somewhat messed up with variable environment. As a result, I am not be able to use paths in .profile or any other path files that I set up before (I tried in .bash_profile, .zschr and etc). How can I fix this problem?


Why does knowing whether the function is odd or even make calculating the fourier series easier?

The fourier series is given by  $$f(x)=\frac12a_0+\sum_{n=1}^\infty(a_n\cos(nx)+b_n\sin(nx))$$ after doing a few examples I noticed that whenever I was evaluating an even function the $a_n$ would disappear because it always turned out to be $0$ after calculating the integral, and when I was evaluating odd functions the $b_n$ would disappear because it would always turn out to be $0$ after calculating the integral. So how come finding the fourier series of an even function causes the $a_n$ to be $0$ and vice versa for an odd function?


Geometric description of composition of two convex polygons?

The composition was defined as follow:  $(a,b)$ $\in$ $(R;S)$ $\Leftrightarrow$ $\exists c |  (a,c) \in  R \\  $&$ (c,b)  \in S$ .  Also the composition was defined as the binary product of two matrix .  $SoR$ (relation of composition)$  = R * S $ (product of matrices) where the sum is the disjunction and the product is the conjunction.  If our two relations R and S are two convex polygon  Is there a geometric interpretation of the composition of two convex polygon ? for example :     The Green polygon was the searched result .


Is this sufficient to do when your PC is infected with a virus?

My PC was infected by belombrea. I was told to reinstall OS, but I did it a different way. Is this sufficient?  Go to the search bar, type reset, click reset this PC. It'll give 3 options. On the bottom there's more recovery options with "learn how to start fresh with a clean installation of Windows PC", is that the same as reinstalling the OS? If I try click, it'll tell me that I'll need to reinstall Dell Touchpad, Realtek Card Reader & Realtek High Definition Audio Driver from the web. How can I do that?


$f|_{A_i} $is continuous, $A_i$ closed $\implies$ $f:X\to Y$ is continous

Take topological spaces $X$ and $Y$, a function $f:X \to Y$ and a family $(A_i)_{i\in I}$ os subsets of $X$ and $X= \cup A_i$. Assume that $f|_{A_i} $is continuous for each $i \in I$. Show that if I is finite and each $A_i$ is closed in $X$, then $f$ is continous.    $f$ is continous if preimage of every closed set in $Y$ is closed in $X$. I know that a union of finitely many closed sets is closed but I am not sure how to mix it.   For each $i \in I$ $f_i : A_i \to Y$ is continous, that means for each closed  $C \subset Y$, $f^{-1}(C)$ is closed in $A_i$. Can I write something like this $f^{-1}(C_i)=A_i $?


Why learn/use Python Toolboxes over Python Script Tools?

I've written a few Python Toolboxes (which are new at ArcGIS 10.1), but am yet to decide whether/when I should write them rather than Python Script Tools in a standard toolbox.  I thought the  might enlighten me when it prefaces some dot points with:     Once created, tools in a Python toolbox provide many advantages   However, the five advantages listed all seem to be over not being able to use Python to write tools, and none seem to specify an advantage of Python Toolboxes over Python Script Tools.  The two advantages that I can think of are:   I can now write a "pure" Python tool in a single Python script without having to hook it up to a separately authored dialog with its Tool Validation looking like it was tacked on but I'm happy to be pragmatic rather than pure in this regard I could now use code (Python or any language capable of writing text files) to automate the writing of Python toolboxes but I am yet to come across a requirement to do this   Am I overlooking the compelling case that led Esri to provide the Python Toolbox capability and, if so, what is it?


Term for a person who can read but cannot write

I'm looking for a term to accurately describe a person who can only read but cannot write. While I'm primarily concerned with people who have never learned to write, I would also be interested in any additional terms used to represent people who have lost the ability to write as a result of disuse.  Both illiterate and unlettered imply an inability to read as well as to write.


how to overload << operator in c++ ussing class and objects

I am trying to create a small programming language for fun and, I am using classes and objects, i implemented the code for overloading << operator as follows namespace CELL{     class INT : public DataType{         private:         protected:         public:             INT(){                 data = new int;                 data = 0;                 type = "int";             }                      ~INT(){}              bool isNAN(){                 if (data == NULL){                     return true;                 }                 return false;             }              std::ostream& operator<<(std::ostream& stream, const INT& self){                 stream << (int) self.data;                 return stream;             }     }; };  i tried with and without the second argument but the code says there is an error like this without second argument src/Cell.cpp:8:12: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘CELL::INT’) 8 |  std::cout << integer << std::endl;   |  ~~~~~~~~~ ^~~~~~~~~   |       |       |   |       |       CELL::INT   |       std::ostream {aka std::basic_ostream<char>}  and like this when the second argument is added src/../lib/CellInt.h:31:18: error: ‘std::ostream& CELL::INT::operator<<(std::ostream&, const CELL::INT&)’ must have exactly one argument    31 |    std::ostream& operator<<(std::ostream& stream, const INT& self){       |                  ^~~~~~~~  this is link for my full code, this code  is in "lib/CellInit.h" file


'./configure: no such file or directory' when I try to install firefox from tar.bz2 file

Downloaded and unpacked firefox-57.0b13.tar.bz2 into Downloads/firefox. No install or readme instructions found there. Attempted to install using   ./configure make make install   When I enter ./configure, I get no such file or directory.  What am I doing wrong?


How do I add an HDRI texture environment node?

How do I add a texture environment node in cycles?


Are there any books which explain Indian cooking in terms of science?

My attempt to make a paneer curry taste similar to restaurant is turning into a mad goose chase. I've literally tried 100s of recipes shown on Google, YouTube, etc, but I'm not getting the taste similar to the ones sold in restaurant.  I'm thinking it's poor quality ingredients I buy, especially tomatoes. But I don't think that entirely explains it. Because, a restaurant I frequently visit has two chefs, one chef makes the paneer curry taste good, the other chef makes the curry taste so bad.  So how exactly do they get the taste, could it be because, as they prepare large quantities, the flavour gets intensified?   Or is it because of sophisticated cooking techniques with knowledge of chemistry of ingredients, like a science.  What science books are chefs made to study, where can I buy them? Does it explain how to prepare, how to cook, which to cook first, and at what stage ingredients have to be added?  The recipes posted on Internet for garam masala, etc seem to be by people who don't anything about cooking, they just seem to throw ingredients haphazardly and grind.   The restaurants seem to have mastered it to the level of science, so that they get the same taste every time. Where do these learn, what books do they study, where can I buy those books?


Is plasma an intermediate stage of matter?

Can it truly be called a stable state? Fire is stable while it has fuel but isn't it really just a transition point for solid to gas?


Is there a MC PC Commands to MC Bedrock Edition Commands?

Ok so im trying to get his specific command to work:  /give @p minecraft:sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"tp @p 500 12 0\"}}",Text2:"{\"text\":\"Click Here\",\"underlined\":true,\"color\":\"yellow\"}",Text3:"{\"text\":\"For Help\",\"underlined\":true,\"color\":\"yellow\"}"},display:{Name:"Help Sign"}}  And i'm not sure how to get it to work correctly, since i used a generator to get this command.... (I'm not at all experienced in commands like this) So if you have a tried and true method to convert it, please tell me.


Profile images are pushed to next line if tags extend too far to the right

This seemed to pop up at the same time as . Suddenly, asker's profile information is being pushed to the next line if the tags take up too much room:  I can't remember how this was handled previously, but I've never seen the profile pushed to the next line like that. I think the tags used to just go over-top of the card?  Edge, Version 91.0.864.41 (Official build) (64-bit)   More examples:      Easy way to reproduce this bug: Search for some long tags.  and  are good candidates.


How do I blend a black-background fire image in Photoshop?

This fire image:    As you can see, it has a black background, which I can't delete (because it would probably destroy the smooth-looking fire effect). I want to place some fire in a photo.  However, I remember it was possible to take such images and do something in photoshop so that when you place them over a photo, the black is gone and the fire is perfectly blended there. But I can't remember what feature or option was it. Any ideas?  Photoshop CS5.


If both Android and Chrome OS are based on Linux, why is it not possible to install Chrome OS on an Android device?

I've been searching online for a way to install Chrome OS on an Android tablet and every single answer I've come across so far is "No". Why is it not a possibility? Both operating systems are based on Linux so (to my very basic knowledge and understanding) it seems like it should be possible.


How do I cross US-Canada border while my (US) passport is being renewed?

I'm getting ready to renew my US passport for the first time.  Since I got this passport the ID requirements at the US-Canada border have gotten stricter, so I've been using my passport when driving across that border.  I have no current international travel plans within the renewal window, but I have relatives in Canada and one never knows when a family emergency might occur, especially with older relatives.  Renewing the passport requires temporarily surrendering the current (still-valid) one.  A little Googling tells me that I wouldn't be able to cross this border (in both directions) with an expired passport at all, so waiting doesn't help.  How do I retain my ability to drive to Canada and back home while my passport renewal is being processed?  I don't have an "enhanced" driver's license (whatever that is).  I do have a copy of my birth certificate.  My only citizenship is US.


I am using sage a math library in python. After downloading its package, I usually have to go to the directory where I extracted it and then run the the script using   sudo ./sage   from terminal. How can I add sage to the list of installed applications, that I will be able to run the script by typing sage command from any directory in terminal?


Is there a way I can get a vertical marker line to appear at the 80th character column in notepad++?


How can we eliminate the extra space in the pdf when including two tex files such that they are continuous in page?

I had two separate tex files ( theory.tex & molecular_dynamics.tex ) for chapter 2, where i had some written text in these tex files, and are included in a single tex file named main.tex whose working directory is as shown below: On compiling this main.tex file, i get the end page of theory.tex file containing blank spaces(shown in attached screenshot) and the page of molecular_dynamics.tex file starts from new page (shown in attached screenshot) rather being continuous from the same page, not in next page, where the last page of theory.tex file ends. Is there any command that makes continuous text between these two included files? However i want the usual format when it jumps to new chapter. \documentclass[a4paper,12pt,oneside]{book} \include{packages/packages} \begin{document} \include{ch2/theory/theory/theory} \include{ch2/theory/molecular_dynamics/molecular_dynamics} \include{ch3/results1/results1} \include{ch3/results2/results2} \end{document}


Could Achievement reports be a little clearer in the dropdown?

Question:    Does any of that mean anything to you? I ask this because without knowing why the reputation was gained or lost, it's mostly useless to me. Because when I click the link that is the question, I get taken to the question, but there's no information on that question as to what may have changed (obviously)   Now, I know all I have to do is run to ?tab=reputation to see the detailed breakdown, but I'm curious as to the reason why the one word breakdown can't exist here.   I had to remind myself that the -50 was a Bounty that got collected, and that my latest +5 was due to an upvote on an older question. Accept, Upvote, Bounty, I just wonder if we can't have that status in the Achievements drop down as well.  I may be crazy though


Making a multidimensional list from a one dimensional list

I know the title is a bit confusing but I couldn't think of a better way of describing it. This is python code.  Say I have a list a=["blue","yellow", "red", "green"]. How would I split it so it looks like this: a=[["blue","yellow"],["red","green"]]?


In my 64 bit Ubuntu 16.04.1 skype crashes (disappears) after logging in and no error message is displayed. Previously this problem was not present. What could be the reason?


Referencing not working for multiple pictures

I want to reference 2 pictures, but one is always shown as ?? in the pdf. I do not know what I am doin wrong. Below you find an example that reproduces this problem. Could you please help me? Thanks in advance.                \makeatletter     \makeatother     \usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}           \usepackage{booktabs}     \usepackage{caption}       \usepackage{etoolbox}     \usepackage{fancyhdr}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage{latexsym}     \usepackage{lmodern}    % The Font Type     \usepackage{mdframed}     \usepackage{pgf}     \usepackage{tcolorbox}     \usepackage[flushleft]{threeparttable}     \usepackage{tikz}     \usepackage[absolute,overlay]{textpos}     \usepackage{xcolor}     \usepackage{xspace}                \makeatletter     \makeatother     \usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}           \usepackage{booktabs}     \usepackage{caption}       \usepackage{etoolbox}     \usepackage{fancyhdr}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage{latexsym}     \usepackage{lmodern}    % The Font Type     \usepackage{mathtools}     \usepackage{mdframed}     \usepackage{pgf}     \usepackage{tcolorbox}     \usepackage[flushleft]{threeparttable}     \usepackage{tikz}     \usepackage[absolute,overlay]{textpos}     \usepackage{xcolor}     \usepackage{xspace}           \usepackage{hyperref}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }                      \begin{document}          \begin{figure}[h]          \begin{minipage}{\textwidth}             \begin{minipage}[t]{0.5\linewidth}                 \centering                                      \begin{tikzpicture}                     \draw (0,0)--(11,0)--(11,7)--(0,7)--cycle;                      \end{tikzpicture}                  \label{fig:A}                 \caption{Some text.}             \end{minipage}             \hskip60pt             \begin{minipage}[t]{0.5\linewidth}                 \centering                      \begin{tikzpicture} %, fill=ashgrey!25                     \path[draw, line width=0.5mm] (0,0) -- (13,0) -- (13,11) -- (0,11) -- (0,0)--cycle;                     \end{tikzpicture}                  \caption{Some text.}                 \label{fig:B}             \end{minipage}         \end{minipage}     \end{figure}        Some text \ref{fig:A} \ref{fig:B}     \end{document}


How we can send ideas to the devel team?

First, I'm sorry to create a post for this question, but I'm not able to find the awser by myself. I have a idea to improve a little the modeling / sculpting work flow in blender, but I don't know how can I send the ideia to the developeres, so they can judge and do it, or not. Any help is welcome, TYVM.


Start TOC from chapter 1 and also page numbering

Problem:  Start page numbers from chapter one and also reflect this in the TOC.  Currently the code for TOC is:  \renewcommand{\contentsname}{Table of contents}  \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2} \tableofcontents   I would appreciate if I can be pointed in the right direction. So far I have understood that you can use \chapter* in order not to include a chapter in the TOC.  Questions:  1) How would you force Latex to start numbering from chapter 1 and forward?  2) How can you start page numbering from the first chapter?


I understand what a Java WeakReference is. What I want to know is on which kind of concrete problems it's used normally as a solution. Are there any patterns that include them?


I want a graphical (GUI) method to mount an ISO, is there any way to do so?


VirtualBox can't run Kali - "kernel requires an x86-64 CPU, but only detected an i686 CPU"

I upgraded Ubuntu 16.04 to Ubuntu 17.04. Now I installed VirtualBox and am trying to make a Kali Linux virtual machine, but it is showing me this message:     This kernel requires an x86-64 CPU, but only detected an i686 CPU.   Unable to boot - Please use a kernel appropriate for your CPU.   I am running Dell Optiplex 745 with 3GB Ram.


What is the magnitude of the force on a charged particle due to electromagnetic radiation?

Suppose there is an electromagnetic wave moving forward in the $\mathbf{\hat{k}}$ direction.  Its electric/magnetic field components are given by: $$\mathbf{E} = E_0 \sin(kz - \omega t) \mathbf{\hat{i}}$$ $$\mathbf{B} = B_0 \sin(kz - \omega t) \mathbf{\hat{j}}$$ If a particle of charge $q$ was lying on the wave's trajectory, the Lorentz force law says that the force is given $\mathbf{F} = q(\mathbf{E} + \mathbf{v} \times \mathbf{B})$. However, is an electromagnetic wave a combination of both E and B fields, requiring both fields to be plugged into the equation, or does the force on the electron only depend on one of the fields, and is  an EM wave only either an electric field or a magnetic field at one instant? Edit: changed x to z in expression for EM wave.


Java web : Sqlite NullPoinerException error

I'm trying to build web application that with SQLite db. I already have desktop version of this app and db works just fine, but now i want to make web version also, but for some reason i cant connect to database although code is pretty much the same.  Sqlite connector:  package DAO; import java.sql.*;  public class SQLite { Connection conn = null; public static Connection dbConnector() {      try {          Class.forName("org.sqlite.JDBC");         Connection conn = DriverManager.getConnection("jdbc:sqlite:podaci/baza_new");         System.out.println("db connected");         return conn;      }catch(Exception e){         //JOptionPane.showMessageDialog(null, e);         System.out.println("db NOT connected");         return null;     }  }   }  first you need to log in in application and that when code breaks  servlet part:  package obrada;  import java.io.IOException; import java.util.Map;  import modeli.Osoba;  import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;  import DAO.LoginDAO;   @WebServlet("/LoginServlet") public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L;  public LoginServlet() {     super();     // TODO Auto-generated constructor stub }  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     // TODO Auto-generated method stub     doPost(request,response); }   protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     // TODO Auto-generated method stub     String userName = request.getParameter("username");     String passWord = request.getParameter("password");     String type = request.getParameter("tip");     ServletContext context = getServletContext();      if (LoginDAO.validate(userName, passWord, type)) {         System.out.println("asd");     }else {         RequestDispatcher rd=request.getRequestDispatcher("Login.html");           rd.include(request,response);           System.out.println("login else");     }        try {     }catch(Exception e) {e.printStackTrace();} }   }  and dao part:  package DAO;  import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet;  public class LoginDAO {  static Connection con = null;  public static boolean validate(String username, String password) {      boolean status = false;     try {         con = SQLite.dbConnector();         System.out.println("1");         String query = "select * from kupci where korisnicko=? and lozinka=?";         PreparedStatement pst = con.prepareStatement(query);          //pst.setString(1, type);         pst.setString(1, username);         pst.setString(2, password);          ResultSet rs = pst.executeQuery();         status= rs.next();         con.close();         }catch(Exception e) {System.out.print(e);}       return status;  }   and console gives me:  bd NIJE povezana 1 java.lang.NullPointerExceptionlogin else   i tried removing and adding sqlite jar but it doesnt work  stack trace is on


If I miss someone with a spell, does that spell continue travelling indefinitely until it hits something and dissipates?  The Avada Kedavra spell for example, that's  right? Would that travel further than any other spell?


How to unload library (DLL) from the JVM

I need to unload a DLL that was loaded with System.loadLibrary(..), anyone know if this is possible?


I did IT in cycles, but since cycles isn't real time renderer its totally useless for me.  I need to do it in EEVEE or in the Shading tab, but on both I couldn't do it.  Do you guys know how to ?


What is the formula for prediction interval in a multi-variate setting?

Can someone please help me understand the above formula for prediction interval in the multi-variate context. seems to me X'X should be (X- \bar_X)'(X-\bar_X) where \bar_X is the mean vector. Since there are plenty of references for the formula when the number of "X" is "1". Also, seems like x_0 should be (x_0 -bar_X) as well. Is \hat_V_f missing an additional term "s^2/n"?


If $f$ is continuous, then $X$ and $\{(x,f(x)); x\in X\}$ (the domain and the graph of $f$) are homeomorphic

Let $X$ and $Y$ be topological spaces and $f:X\to Y$. The graph of $f$ is the subset $G=\{(x,f(x))\}\subseteq X\times Y$. Show that if $f$ is continuous, then $X$ is homeomorphic to the graph of $f$.  My attempt: Let $h:X\to G$ by $h(x)=(x,f(x))$. The fact that $h$ is a bijection is clear. Now since $g:X\to X$ by $g(x)=x$ is continuous and $f:X\to Y$ is continuous by hypothesis, the universal mapping property of products says that $h$ must be continuous. I'm having trouble showing $h^{-1}$ is continuous though... $g^{-1}:X\to X$ is continuous by the same argument as for $g$, but how would I show that $f^{-1}$ is continuous?


Is there a difference between SWAP and Cache memory?

I installed the indicator-multiload 0.2-0ubuntu1 from the software center. (It's very similar to the gnome panel indicator showing memory and CPU graphs)  When I click on the Unity panel which shows the little memory graph, it says ;  Mem :1.451 GB   Cache: 2.581.  This is also represented in the color graph.  However, when I load the System Monitor, SWAP is at a flat 0.  Is this normal, or could there be a bug in either the System Monitor or Panel Indicator?


If the  is supposed to be the particle responsible for other particles having mass. How can it itself have a mass?  Is it not then a 'who came first, the chicken or the egg' situation?


Show that matrices $A$ and $B$ commute if and only if $\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0.$

Show that the matrices    $$A=\begin{bmatrix} a & b \\ 0 & c \end{bmatrix} \text{and B = $\begin{bmatrix} d & e \\ 0 & f \end{bmatrix}$}$$    commute if and only if    $$\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0.$$     My approach:  For $AB=BA$, we must have  $AB=\begin{bmatrix} ad & ae+bf \\\ 0 & cf\end{bmatrix}$ and $BA=\begin{bmatrix} ad & bd+ce \\\ 0 & cf\end{bmatrix}$ where $ae+bf=bd+ce$. We need to show that if $ae+bf=bd+ce$ then $\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0.$   Since $\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0$, we see that: $$b(d-f)-e(a-c)=0 \iff bd-bf-ae+ce=0 \iff bd+ce=ae+bf.$$   Thus, if  $AB=BA$ then $\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0.$   (Showing the converse)  If $\begin{vmatrix} b & a-c \\ e & d-f\end{vmatrix}=0$ then we have $bd+ce=ae+bf$ and $AB=BA$ if and only if $ae+bf=bd+ce$, which we have.    Is this a proper approach am I missing something here?


A car is parked by an owner amongst 25 cars in a row not at the two extremes. On his return he find that exactly 15 places are .

A car is parked by an owner amongst 25 cars in a row not at the two extremes. On his return he find that exactly 15 places are still occupied. Find the probability that both the neighboring places are vacant .   How to approach this problem , not getting any clue. please suggest will be of great help. Thanks.


Is ARCH model an extension / generalization of ARMA model?

In ARMA model, the error term is assumed to be white noise, i.e. independent and identically distributed. In ARCH model, we relaxed the assumption and let the error term to be uncorrelated but dependent. Then, we specify a structure for the error term. Is my understanding correct? Thanks.


hi guys i am trying to use a pre tag for this code. But i am unable to get results. all i see is blank screen.  text to be added         i just did this but notehing happens

   Somehow it takes img as tag rather than a pre .. Please help.thanks.


How can we see the moon while it's between the Earth and the Sun?

I know this sounds like (and probably is) a stupid question, but I can't figure it out.  As far as I know, the crescent shape of the moon is when the moon is on the sunny side of the Earth, but that wouldn't explain how it can be seen from the night.  Horrible, not-to-scale and probably completely wrong diagram of what I think :    How is it that we can see clear to the other side of the Earth?


Auto-delete/destroy 1 rep user when their post is deleted as spam

My common workflow when I see a blatant spam post by a 1 rep user is:   flag as spam (when I'm a mod this auto-deletes) go to user profile As a mod, I destroy the user. As a regular user I spam flag the other spam posts linked from the profile   These are a bit more clicks than absolutely necessary. While it is not terribly important to optimize this, it would be nice if we could perform these steps with even less effort.  My main assumption is that a 1 rep user that has one of their posts flagged as spam until deletion is almost certainly a pure spammer. I might be wrong there, but I've never seen an example that violates this rule.  Having to go to the profile is an unnecessary step, but I always do that to determine if the user has created more spam posts. Destroying is also not necessary, but it is quicker if the user has multiple posts, and if I have to go to the profile anyway it's also only a few clicks away.  To make this quicker, I suggest that users that have never earned any reputation and that have all their posts deleted by spam flags should be auto-destroyed. Destroying accounts doesn't really slow down spammers much or at all, but it is somewhat tidier and many mods do it anyway, even for single post spammers. It would also serve as feedback that this user can't possibly have more spam posts, preventing other users from checking the user's profile without need.  When I spam flag a post from a 1 rep user as a mod, I'd like to get immediate feedback on how many other posts the user has, and maybe even a quick way to directly preview those posts and destroy the account.  This would of course not happen for posts from real, active users due to the 1 rep limitations. Excessive self-promotion and other borderline spam issues are usually not dealt with by account destruction. This restriction also severely reduces the potential for abuse of this feature.  As for leaving accounts alive to gather information about spam URLs and/or IPs, this is something that should happen behind the scenes anyway that that we mods should not have to think about. The community and mods provide enough information by spam flagging, it would just have to be collected and aggregated by SE internally (and maybe this already happens).


Boot in whatever mode won't work for 12.04

When I boot in recovery mode I get a black screen with the mousecursor and that is it. When I boot in normal mode I get the purple Ubuntu screen with the five orange/white dots and there everything stops. I have the 12.04 Ubuntu. What can I do to get to the normal screen?  The nomodeset boot option did not work. I got stuck in a Linux starting screen that stalled after "checking battery status"; I tried to get a screenshot, but I could not paste it in Windows 7, from which I am working now, due to different partitions.  I have a Dell Inspiron N7010, Intel(R) HD Graphics, on x64 based PC, Intel Pentium CPU P6100, 2.00 GHz, 1999 MHz, 2 core's 2 logical processors BIOS Dell A11 31.03.2011, SMBIOS 2.6 Mem 4 Gb, Total virtual mem 7,6 Gb  The Ubuntu / Linux versions I see in the boot screen are:  GNU-GRUB version 1.99-21ubuntu3 in the right corner below it says: debian The Universal Operating System.  The versions are:  Ubuntu, with Linux 3.2.0-24-generic-pae Ubuntu, with Linux 3.2.0-24-generic-pae (recovery mode) Memory test (memtest 86+) Memory test (memtest 86+, serial console 115200) Windows 7 (loader) (on /dev/sda2) Ubuntu, with Linux 2.6.38-10-generic (on /dev/sda5) Ubuntu, with Linux 2.6.38-10-generic (recovery mode) (on /dev/sda5) Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5) Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)  The 2.6.38-10 and 2.6.38-8 versions both work, but in those versions I can not approach my own files.  The problems started after I installed updates in the Update Manager program, but I can not remember what updates. Before that I also experienced a problem with starting a terminal. I saw the terminal window flash on the screen and then it vanished. No matter which terminal I tried to use.  Before that I also experienced a problem   with starting a terminal. I saw the terminal window flash on the screen and then   it vanished. No matter which terminal I tried to use.  Today I saw a message in a Linux boot screen: modem-manager[1598]: Could not get the systembus. Make sure the messagebus daemon is running! Failed to connect to socket /var/run/dbus/system_bus_socket: no such file or directory   I started Ubuntu in recoverymode and received a lot of new software. Thanks to that (I think) I can now approach the startmenu in which I can choose between Gnome and Ubuntu.  But now I can not start in my own account and I don't see any errormessages.  I try to use my account and then I return to the original startmenu. I can start in the guestaccount, but then I can not use my own files. Also in the guestaccount I don't have any rights to change my own account.  How can I repair that? I can get in terminalmode with Ctrl-Alt-F1. Thank you.


The company will issue (their, its) annual report next month.   In this case, should I use "its" or "their"?


On almost all keyboard layouts I have ever seen, the 0 is to the right of the 9, rather than to the left of the 1 (the  is the only exception I can think of; it has 0 between 9 and 2):  1234567890  Why is the 0 to the right of 9 rather than to the left of 1 — the latter seems more logical, as it means all digits are in increasing order?  The modern answer is, of course, because people are used to it.  So the real answer must lie in history...


If I have a creature that says "other creatures you control have indestructible" and my opponent plays a destroy all creatures. Does it kill all creatures or just my creature that says that it gives others indestructibility?


Package supervisor on Ubuntu 16.04 is missing

After reading that  I realise I need to install supervisor.  sudo apt-get install supervisor tells me:   E: Unable to locate package supervisor   sudo apt-cache search supervisor gives nothing.  Also when I look at other  it seems that it is installed by default in Ubuntu 16.04.  I am using Ubuntu 16.04 LTS.  Why can't I find this package? How can I install it?  I also looked at  but I would prefer to use the distribution package solution.


Given two matrices $A,B$ and a base $\{v_i\}$, I want to show that $A=B$. Is it sufficient to show $Av_i=Bv_i$ for all $i$?


why is `reset` so much slower than `tput reset`?

In all terminals I can think of, tput reset is much faster than reset, why? (sh, bash, xfce4-terminal, lxde-terminal, gnome-terminal, and probably others)   I know the technical reason, reset issues a nanosleep() sleep syscall, while tput reset does not, but what is the logical reason? why was/is it implemented this way?   For the record, tput reset is over 1000 times faster than reset in my xfce4-terminal:   time reset: real    0m1.002s time tput reset: real   0m0.001s   Edit: also, any reason to NOT add alias reset='tput reset' to ~/.bashrc ?