Variable can only be null at this location Resultset

So im new to coding, just wanted to create a login validation using Resultset interface but keep getting NullPointerException.  public static void main(String[] args) {     Connection con = null;     PreparedStatement pstmt=null;     ResultSet rs=null;     int id;     String name;      String qry="select name from jejw5.test where id=? and name=?";     Scanner sc=new Scanner(System.in);     System.out.println("Enter your id");     id=sc.nextInt();     System.out.println("Enter your name");     name=sc.next();     try {         Class.forName("com.mysql.jdbc.Driver");         con=DriverManager.getConnection("jdbc:mysql://localhost:3306?user=root&password=Eagle");         System.out.println("connection established");         pstmt=con.prepareStatement(qry);         pstmt.setInt(1, id);         pstmt.setString(2, name);         if(rs.next()) {             int skill=rs.getInt(1);             System.out.println(skill);         }         else{             System.out.println("invalid user/PW");         }      } catch (ClassNotFoundException | SQLException e) {         e.printStackTrace();     }     finally {         if (rs != null) {             try {                 rs.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }         if (pstmt != null) {             try {                 pstmt.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }         if (con != null) {             try {                 con.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }     }  }   }  Exception- Exception in thread "main" java.lang.NullPointerException     at org.rjn.Login.main(Login.java:32)  warning- variable rs can only be null at this location.


Did Obi-wan ever try to contact Anakin after Episode III?

In Return of The Jedi, when Luke tries to stir the emotions of his father on the forest moon of Endor, Vader states:     Obi-Wan once thought as you do...   Does this imply that, at some point between Episode III and IV, Obi-Wan tried to contact Anakin?


$x^2+y^2=z^n$: Find solutions without Pythagoras!

I was presented with the following problem:      Prove that there exist solutions to $x^2+y^2=z^n$ for all $n$, with $x,y,z, n \in \mathbb{N}$   I showed that by taking any Pythagorean triple $x^2+y^2=z^2$ and multiplying by $z^{2(n-1)}$ we get $(z^{n-1}x)^2+(z^{n-1}y)^2=(z^2)^n$, which allows me to generate solutions easily for any value of $n$. I managed to find several similar questions on this site, such as  concerning the specific case $n=3$. I notice that all of these questions take a similar approach and start with a Pythagorean triple and use it to generate general solutions.  Is there a way to prove the statement (or better yet provide solutions to the equation) without first relying on Pythagoras?


How to show a difference between the usage of '*' , '+' and '?' in grep?

I understand that  '*' : The preceding item will be matched zero or more times. '?' : The preceding item is optional and will be matched, at most, once. '+' : The preceding item will be matched one or more items   Can anyone give me an example of when there would be a difference while using grep? I was using egrep, but I tried to check if I could generate different outputs for these operators.


OK, I hope this question is not that stupid, but this question has been haunting me for more than a short time. I did not see any ads on the Stack Exchange network, is it because I missed something or are there actually no ads on SE?


How to install Ubuntu 16.04 from winrar file

I have downloaded an Ubuntu winrar file. How do I install it?


Can I install Ubuntu on a partition formatted as ntfs instead of ext4?

Can I install Ubuntu on a partition formatted as NTFS, instead of EXT4?  After installing Ubuntu 11.10 using ext4, I keep on getting disk errors at boot up.  But on this same harddrive, I have Windows 7, and I don't get these errors.  So I wanted to try NTFS, instead of EXT4, and see if it makes any difference.  The harddrive is about 5 years old.  So if it is failing, I would think it would be giving trouble in Windows just as well.


What is the job of a Hogwarts Headmaster/Headmistress?

As I understand, after Prof. Dippet retired it was the transfiguaration teacher Prof. Dumbledore who became Headmaster of Hogwarts. During the course of the Harry Potter books we see that Prof. McGonagall is the deputy headmistress and the transfiguration teacher. This would mean that Prof. Dumbledore now doesn't hold that teaching position anymore.  So what exactly does a Hogwarts Headmaster/Headmistress do?  Naturally they would appoint teachers and have some amount of administration work including the sending out of letters of acceptance to Hogwarts but what (if anything) else? Don't they have to teach?  EDIT : I get that Dumbledore had many duties being chief Warlock of the Wizemgamot etc., but is there any evidence that all previous Heads had similar duties? I was asking about a Head of Hogwarts in general, not just Dumbledore.


My servers are overloaded with random GET requests. Why?

I'm getting a huge amount of traffic to web servers looking for bittorrent type queries:  110.152.78.14 - - [27/Jan/2015:01:45:22 +0000] "GET /announce.php?info_hash=%3E%F3%0B%907%7F%9D%E1%C1%CB%BAiF%D8C%DE%27vG%A9&peer_id=%2DSD0100%2DA%3EFp%DB%CB%8C%87%3F%B8%CEw&ip=192.168.10.104&port=12606&uploaded=4689970239&downloaded=4689970239&left=0&numwant=200&key=22692&compact=1 HTTP/1.0" 302 562 "-" "Bittorrent"`  36.36.12.121 - - [27/Jan/2015:01:45:22 +0000] "GET /announce.php?info_hash=%9c%7f%18%11hr%d0%5dN%ac%8b%d7%91%dbe%c8%93ttt&peer_id=-QD1900-0selUZY3.7Qj&port=4385&uploaded=0&downloaded=423012352&left=746990326&key=d20abe93&compact=1&numwant=200&no_peer_id=1 HTTP/1.0" 302 535 "-" "qqdownload/1.9.273.0"  140.206.125.62 - - [27/Jan/2015:02:15:17 +0000] "GET /banners/289288/289288_20150125123826_300_250.jpg HTTP/1.1" 302 335 "http://syndication.exoclick.com/ads-iframe-display.php?type=300x250&login=alexsemuel&cat=97&search=&ad_title_color=0000cc&bgcolor=FFFFFF&border=0&border_color=000000&font=&block_keywords=&ad_text_color=000000&ad_durl_color=008000&adult=0&sub=&text_only=0&show_thumb=&idzone=534211&idsite=193595&p=http%3A//privatehomeclips.com/tags/doutzen-kroes-leaked/2/&dt=1422324901966" "Mozilla/4.0 (compatible; MSIE 8.0; Wind   It's getting to the point where its taking down our small educational content provider. AFAIK, none of these are actually getting a 200, so it's extremely baffling why this is happening at all.   Edit: All of the IPs are from china. I recall our security guy warning about China DNS poisoning BT and porn sites. The responses are 302 because the vhost is configured to redirect anything not using the 'official' domain name. After reading , I set up a default vhost and see about more permanent solutions in the morning that don't involve blocking all of china.


Can older wallpapers be used in newer releases?

is there a way to get the old wallpaper (for instance from 13.10(?  I really liked one of them and 14.04 does not have it


Impacts of not using RSA exponent of 65537

This .  Why is that number recommended and what are the theoretical and practical impacts & risks of making that number higher or lower?   What are the impacts of making that value a non-Fermat number, or simply non prime?


Consider this:     I like to eat here.   vs     I would eat here.   It appears to me that "to" has nothing to do with the infinitive form of the verb that follows. It is, in this example,  an integral part of like to, not of to eat.  Is my thinking flawed? If you think it is, could you please explain which form of the verb "eat" is used in the second example, if not the infinitive?


Find what packages are installed from a repository

I'm trying to find what packages I have installed from a repository using terminal commands.  I found a post somewhere saying I could use aptitude search "?origin (<repository>) ?installed", but I couldn't get it working. I tried searching for a packages that came from ppa:ubuntu-wine/ppa and got nothing with these:  aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/) ?installed" aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/) ?installed" aptitude search "?origin (http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ raring/main) ?installed"   It would be nice if I could get something that works with PPAs.


I have an Object with many properties and i need to create a copy of that object in each iteration such that all properties copied in new born object with their last set value. (I can't Copy all properties and their values one by one, because my object is actually a custom user control which has many properties and I don't know all of them!)


Why do answers to good questions always get a higher score than the question itself?

This is always the case and I am so curious to know why. Here are examples (the highest voted questions from various sites):   Stack Overflow:  Super User:  Ask Ubuntu:  Ask Different:  Server Fault:


If $Y|X \sim \mathcal{N}(0,1)$ then is $Y^2|X \sim \chi^2(1)$?

Suppose we have random variables $X$ and $Y$ such that $Y|X \sim \mathcal{N}(0,1)$. Can we then say that $Y^2|X \sim \chi^2(1)$? If we can, then what about when $Y|X \sim \mathcal{N}(0,\sigma^2/4)$, can we use the results of  to say that $Y^2|X \sim \frac{\sigma^2}{4}\chi^2(1)$? Essentially I want to know if the results of squaring a normal distribution can be applied to the case where a random variable is conditionally normally distributed?


I have around 1000 files where on each of them if the first field matches a specific number , i need to print the corresponding 3rd element . Since the number 7 below, is not constant and it based upon the output of previous script , when I am trying to pass a variable , it fails .  $cat ${i} | head -14 | awk '$1 == "7" {print $3}' $Supervisor $blah=7 $cat ${i} | head -14 | awk '$1 == "${blah}" {print $8}'   I have tried looking around with other combinations to escape/expand the variable inside the comparison , none of them seem to be able to expand the variable blah.


how to obtain vertical and horizontal gray bars in a matrix?

I need your help to obtain the grey bars in this matrix:


So this lady hit me up on Instagram and asked if I’d maybe be interested in being her sugar baby. We talked a bit but she wants my bank login and password. I asked for picture proof and she sent a picture but I still don’t know if I should believe it. I understand that “she” can take out my money but I only have $15 so there’s not that much of a risk. If I give her my info, what’s the worst that can happen?


Short story of a race who discovered primitive but subtle interstellar travel

Many years (20+?) ago in Analog SF magazine I read a short story where a culture discovered interstellar travel shortly after the start of their iron age. They could construct air-tight ships and travel essentially as far as their oxygen supply lasted. Before they met us, the most technologically advanced culture they came across had discovered balloon flight. Needless to say they thought our jets were merely improved balloons.


If I type  cat > file.txt 2>&1   then file.txt is created with the content of cat's standard input.  But if I do  cat > file.txt 1>&2   then file.txt is created, but the file is empty.  What is the issue between above two commands?


Install new version of Ubuntu on a dual boot XP /Ubuntu 11.04 system

My computer does not support a USB boot. It is an HP Pavilion dz6000 laptop. How can I install version 12.04 on my system? The computer has a little less than 1GB memory. Is that enough? version 11.04 works well.


In M. Ram Murty's paper Artin's Conjecture on Primitive Roots I am not able to understand a statement.  Let $k$ be the order of $a \bmod p$ where $p$ is a prime and also we have $a^{p-1} \equiv 1 \mod p$ then $k \mid (p-1)$ if $k \neq p-1$ then $k\mid(p-1)/q$ for some prime divisor $q$ of $p-1$.  I am not able to understand how the author was able to make the second claim i.e if $k \neq p-1$ then $k\mid(p-1)/q$ for some prime divisor $q$ of $p-1$.


What is the fastest way to get from Courmayeur/Aosta to Milan?

We will be crossing the Italian/French border through Mont Blanc via cable cars, which we heard through Rick Steve's article: .  We will be starting off in Chamonix and arriving in Courmayeur. What's the fastest (and relatively cost-effective) way to get to Milan from Courmayeur?


What is the function of the  sorting option on the Questions tab?


jQuery 'on' not binding event to element

I have the following function, which is invoked immediately and binds a click event to elements.  (function (window, $, undefined) {     var methods     = {},     selector = $('.selector');      methods.init = function () {          selector.find('> .section').on('click', function (e) {           alert('hey');         }     }      if (selector.length > 0) {         methods.init();     }  }(window, jQuery));   I needed it to also bind elements that had been added dynamically, so I changed to this:  var modules = modules || {}; modules.stuff = (function (window, $, undefined) {     var methods     = {},     selector = $('.selector');      methods.init = function () {         selector.find('> .section').on('click', function (e) {           alert('hey');         }     }      if (selector.length > 0) {         methods.init();     }       return methods;  }(window, jQuery));   And then added dynamic elements, then called modules.stuff.init(); I can see that the init function is ran but the click events don't fire?


Ubuntu 16.04 LTS Virtualbox 5.0.40 ubuntu r 115130  Today after upgrading to kernel 4.13.0-26 guest vbox machines started to crash whole ubuntu. just hard poweroff is working.  If I startup with kernel 4.10.0-42 everything works fine.  what may be the problem ?


Unable to get into the GUI after installing a NVIDIA driver via apt - still can't get in after the driver uninstalled

My laptop has an Intel and a NVIDIA video card, when I installed I chose to use a NVIDIA close-sourced driver, and it works. Today, after I installed nvidia-driver-390 with apt, I can not get in the GUI after reboot. After booting, the Ubuntu logo can be seen, but then the monitor went all-black, with an _ underscore jumping at the left-top. After several seconds the monitor refreshes, the _ disappeared, then the monitor refreshes again, then _ comes back, then after several seconds the same procedure loops. It is possible to get in to the terminal with Ctrl+Alt+Fn, but after several seconds I will be transferred back to the not-working GUI with that _ jumping, so it is not possible to work on the terminal in init mode 5. However, it is possible to work in the terminal in init mode 3. I apt remove --purged everything starts with nvidia, rebooted, but everything is the same. I tried to startx in the virtual terminal, but X just shut down immediately - maybe it is because I am in init mode 3? I checked the Xorg log, there are several error lines: (EE) open /dev/fb0: Permisssion denied  ... (EE) modeset(GO): eglGetDisplay() failed (EE) modeset(GO): glamor initialization failed  I removed the quiet grub option, and found that the system stuck at: Starting Show Plymouth Boot Screen...  There are another three maybe relevant operations:  After I installed the driver, I opened a 3D game to test before reboot, but the game complains that there are some OpenGL problem so it won't start.  Before installing from apt, I installed the .run driver released by NVIDIA co., but the installation failed for that nvidia-drm kernel module not found. I just tried run the .run with --uninstall, and it says there are no NVIDIA drivers currently installed.


I want to perform a split() on a string using a regex in Java, but would like to keep the delimited tokens in the array

How can I format my regex to allow this?  Here's the regular expression:  "\\b[(\\w'\\-)&&[^0-9]]{4,}\\b"  It's looking for any word that is 4 letters or greater.  If I want to split, say, an article, I want an array that includes all the delimited values, plus all the values between them, all in the order that they originally appeared in. So, for example, if I want to split the following sentence: "I need to purchase a new vehicle. I would prefer a BMW.", my desired result from the split would be the following, where the italicized values are the delimiters.  "I ", "need", " to ", "purchase", " a new ", "vehicle", ". I ", "would", " ", "prefer", "a BMW."    So, all words with >4 characters are one token, while everything in between each delimited value is also a single token (even if it is multiple words with whitespace). I will only be modifying the delimited values and would like to keep everything else the same, including whitespace, new lines, etc.  I read in  that I could use a lookaround to get this to work, but I can't seem to format it correctly. Is it even possible to get this to work the way I'd like?


Copy file name (without path) to clipboard

I would like to have a keyboard shortcut to write a filename to my clipboard. Currently, I have to hit F2 to start the rename process, followed by CTRL+A to select the whole name and finally CTRL+C to copy the name.  Is there an easier way of doing this? Do I need to create an AutoHotkey script to accomplish this?


Completely unable to install python2.7-dev

Am totally stuck!  Am unable completely to install python2.7-dev on my Ubuntu13.04. I have tried all the tricks mentioned on this site (askubuntu.com) and many other sites on the web but still nothing!  Am running Ubuntu 13.04 64bit on a virtualbox, but every time I run sudo apt-get install python2.7-dev, I get the following error;  python2.7-dev : Depends: python2.7 (= 2.7.3-0ubuntu3.5) but 2.7.4-2ubuntu3 is to be installed                  Depends: libpython2.7 (= 2.7.3-0ubuntu3.5) but 2.7.4-2ubuntu3 is to be installed                  Depends: libexpat1-dev but it is not going to be installed                  Depends: libssl-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I've tried to do apt-get update, but still nothing! I've even tried installing Python2.7 from sources, but still nothing doing!  Is there a single package with all the dependencies I can download, that can just install everything (Python2.7-dev) or is there another trick I can use to get the Python-dev headers installed on my machine.  Hint: I've noticed when I run sudo apt-get update , somewhere along the updates I've seen some errors;  ... Get:1 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B] Ign http://us.archive.ubuntu.com raring Release       Ign http://us.archive.ubuntu.com raring-updates Release Ign http://us.archive.ubuntu.com raring-backports Release Ign http://us.archive.ubuntu.com raring-security Release Get:2 http://us.archive.ubuntu.com precise-updates Release [98.7 kB] Err http://extras.ubuntu.com raring/main Sources            404  Not Found Err http://extras.ubuntu.com raring/main amd64 Packages     404  Not Found Err http://extras.ubuntu.com raring/main i386 Packages   404  Not Found Ign http://extras.ubuntu.com raring/main Translation-en_US Ign http://extras.ubuntu.com raring/main Translation-en ...   On my precise-updates.list file is a single entry;  deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted   I don't know if that might help  Help!  Paul


How do I get to terminal after upgrading to 13.10

I upgraded from 13.04 to 13.10 and now when system starts it goes to a black screen.  I believe that the problem is related to the drivers for the NVidia graphics cards.  How can I get to a terminal so as to disable the updated driver??  Thanks


Unix separation of specific numbers from Column

How can I separate specific numbers from a column and add it to a new file? For example, take all numbers that are "134" from column 3, I tried using   awk '$3 == 134" file.txt   but it didn't work, also tried using   awk -F, '{print $3 == 134 }' file.txt    didn't work.  Pink          132           134 Blue          189           167 Yellow        2000          134 Green         678           145 Black         789           145 White         780           135   So the new file will contain just the following   Pink          132           134 Yellow        2000          134


I have given all the blue “eyes” but it will not give me the star. Why?

I have collected all the blue eyes and given them to the creature to grow proper eyes but it will not give me the star ring.


How to make virtual functions of a super class overrideable for grandchildren in C++?

Hey guys here is some code I am going to run, issue is it doesn't work the way I intend to. I am unable to figure out what's wrong with it. I am c++ noob please help.  #include <iostream> #include <cmath> #include <stdexcept> using namespace std;  /**  * Super class  */ class Shape { protected:     int _dimensions; public:     Shape() : _dimensions{0}     {};     Shape(int dims) : _dimensions{dims}     {};      virtual double getArea() {};     // Because some shapes have no volume.       virtual double getVolume() {};        void setDimensions(int dim)     {         this->_dimensions = dim;     };     int getDimensions()     {         return this->_dimensions;     }; };   /**   * Extended classes  */ class TwoDimensionalShape : public Shape { public:      TwoDimensionalShape() : Shape{2}     {};     // This should throw an error     double getVolume() {         throw logic_error("This shape ain't got area!");     };   };  class ThreeDimensionalShape : public Shape { public:      ThreeDimensionalShape() : Shape{3} {}; };   /**  * Final Concrete classes extending extended classes  */ class Circle : public TwoDimensionalShape { protected:     double _radius; public:     Circle(double r) : _radius{r}     {};     double getArea()     {         // pi*r^2         return M_PI * pow(_radius, 2);     } };  class Square : public TwoDimensionalShape { protected:     double _side; public:     Square(double s) : _side{s}     {}     double getArea()     {         // s^2         return pow(_side, 2);     } };  class Triangle : public TwoDimensionalShape { protected:     double _base, _height; public:     Triangle(double b, double h) : _base{b}, _height{h}     {};     double getArea()     {         // b*h/2         return _base * _height / 2;     } };  class Sphere : public ThreeDimensionalShape { protected:     double _radius; public:     Sphere(double r) : _radius{r}     {}     double getArea()     {         cout << 4 * M_PI * pow(_radius, 2) << endl;         return 4 * M_PI * pow(_radius, 2);     }     double getVolume()     {         return (4/3) * M_PI * pow(_radius, 3);     } };  class Cube : public ThreeDimensionalShape { protected:     double _side; public:     Cube(double s) : _side{s}     {};     double getArea()     {         // surface area = 6*a^2         return 6 * pow(_side, 2);     }     double getVolume()     {         // a^3         return pow(_side, 3);     } };  class Tetrahedron : public ThreeDimensionalShape { protected:     double _side; public:     Tetrahedron(double s) : _side{s}     {};     double getArea()     {         // sqrt(3)*a^2         return sqrt(3) * pow(_side, 2);     }     double getVolume()     {         // a^3/6sqrt(2)         return pow(_side, 3) / (6 * sqrt(2));     } };  int main() {     Shape arr[2];     arr[0] = Circle{10};     arr[1] = Sphere{10};      // This one is accessing the right method.     cout << "Area of circle: " << arr[0].getArea() << endl;      // This one should access the parent, but accesses the grand parent!     // even if it is overridden in parent.     cout << "Volume of circle: " << arr[0].getVolume() << endl;       // Both of these are accessing methods on grand parent rather than their own!!     cout << "Area of sphere: " << arr[1].getArea() << endl;     cout << "Volume of sphere: " << arr[1].getVolume() << endl;       return 0; }   I don't know why the array methods keep accessing the grand parent functions in the last three lines, but the right method on the first.


Copy the contents of a folder to all subfolders

I can't find a way to copy the contents of one folder to all sub-folders of another folder in linux: in one folder I have X files to copy to all subfolders of another folder (A1/dir, B2/dir, C3/dir, D4/dir, ...)


lost duplicate marking on question after editing some answers

I am sure I found this 3 times at . Someone marks my question as below:       This question may already have an answer here:      Why is return needed even after System.exit(0); 8 answers   I got about 7 answers on it and updated answers by answerers again and again. I have noticed that after an answer is edited, my question lost the above marking for duplicate. I think "..Ah they have remove the duplicate mark!". But after refreshing my browser, my question becomes as you see now. So, I describe it as a bug here.


Run program if connected to specific wifi?

Is it possible to have a program starting automatically when I connect to a specific router, and having it stop when I disconnect from this router?  Basically I want a program to run while I'm at work (flexible hours, so I can't just have some sort of timer function) but not when I'm at home - or somewhere else.  I'm running: Macbook air OS X Version 10.9.4


Sci-Fi - House gets transported to space with brothers (possibly older sister) in it

From what little I remember of the movie and book, there was essentially a pair of brothers (one short and fat, the other taller and leaner) whose house gets transported to space (somehow.) They survive until an astronaut comes and saves them. In the movie adaption, there was also an older sister who gets frozen at one point, and the brothers thaw her with a hairdryer or a lighter (using a blowtorch was shot down, as the younger brother kindly states that "You're gonna cook her." ) I distinctly remember a scene from the book where the fatter brother was, for whatever reason, expanding sideways and shrinking down, so the other brother had to do something to stop it. They also might have had something to do with a board game (little brother was holding a board game while he was bloating, or maybe playing a board game during that time.)


Given $(G,*)$ a group. Show the function $f: G \to   G$ defined as $f(a)=a^{-1}$ is an isomorphism if and only if G is abelian.  I am having troubles showing both ways of the proof. I know I have to show that $a*b=b*a$ for the first part, but do I have to suppose that the function is bijective or just use that $f(a*b)=f(a)*f(b)$?   For the second part, knowing that G is abelian, do I have to show that the function is bijective and $f(a*b)=f(a)*f(b)$ is true?


Why are the authors of comments on very old meta posts not clickable?

Houston, we (The ers) faced a problem today,  this post on meta.SO:  The accounts of none of the posters has been removed. Yet . . .  Yes, there should be room, but since the 404 is an image, it would be somewhat difficult to convey whitespace :) – Mark Rushakoff   (There should be a link to @Mark's profile page, but there isn't) This doesn't happen on meta.SO only. The comments on  on meta.SU aren't clickable either. However,   (On meta.SE) doesn't suffer the same symptom. The only thing the former two posts have in common is they're both very, very old, but the third post is also old. This could be the cause, but how? What has happened? Can it be fixed, please?


Beginner here with an issue on a simple presentation using beamer  \documentclass{beamer}  \begin{document} \begin{frame}   \tau \epsilon \chi \end{frame} \end{document}   The above fails with the message "! Missing $ inserted." and waits for me to do something when converting to pdf. I have tried adding the instruction \usepackage[utf8]{inputenc} and also \usepackage[greek]{babel}. I have not seen references either to needing to use any other package. What is exactly I am missing?


I purchased a system 76 laptop, stock with Ubuntu 13.10 (BEAUTIFUL machine) but I can no longer operate Amazon videos, and nothing I try seems to fix it!  Since I've gone through all the threads to try to get hal, install .debs, etc.   I just get one dead end after another, and an older version of adobe flash player won't seem to install.


I am greping a string from multiple files, but the one undesired side effect, is the filename prefacing the output. How can I suppress the filename outputs using only grep?      $ grep -i lp lpNet*      lpNet:This was printed via the internet using the lp command.     lpNet:I believe lp doesnt care what the device is.      lpNet1:This was printed via the internet using the lp command.     lpNet1:I believe lp doesnt care what the device is.      lpNet2:This was printed via the internet using the lp command.     lpNet2:I believe lp doesnt care what the device is.      lpNet3:This was printed via the internet using the lp command.     lpNet3:I believe lp doesnt care what the device is.    I have solved the issue for now using cat lpNet* | grep lp  I am just wondering if there is a more efficient path to have the same effect


Ubuntu-gnome now alone on harddrive, how to remove multiboot menu

I want to remove all trace of multi-boot now and make Ubuntu boot up without grub that was installed when Windows 7 was there. Now Windows 7 is gone but not the boot menu.   How do I remove this?


How to add desktop shortcut for URL, ignoring web app manifest?

Goal:  Have a desktop shortcut that opens  , ignoring the contained web app manifest that otherwise "overrides" the saved shortcut to  and with "display": "standalone".  I had this working previously on an older Android phone before a replacement / upgrade.  Prior to the upgrade, I was able to long-press and open individual articles in new tabs - as well as copy link shortcuts to specific articles, as well as all of the other features and functionality that Chrome has to offer.  Here is just a partial selection of references of other users complaining about the same:       Using  provides a temporary successful work-around.  However, I can't find a successful way to add a link for this to my home screen.  The "Add to Home screen" option within Chrome instead saves a link to  - and in such a way that it opens as a web application instead of a web page within Chrome:       On a desktop operating system, this would be a non-issue.  (Create shortcut, enter desired URL, done.)  Attempt 1: Provide my own Manifest  So I created my own manifest - editing  to change the start_url attribute to https://news.google.com/news/i#0, and the display attribute from standalone to browser.  I then created my own HTML page that simply contained the below - then self-hosted both on a local web server:  <html>         <head>                 <Title>Google News</Title>                 <link rel="manifest" href="/news/manifest.json"/>         </head>         <body>                 Test         </body> </html>   However, this doesn't work:  Despite the shortcut being saved with the desired name and icon, it links back to my self-hosted HTML page, and not the indicated start_url.  Unfortunately, it appears that cross-domain URLs are not allowed per the manifest intent - as per  and  .  Attempt 1b: MITM website  Within the confines of my own local network, I figured I could try to  (MITM) the website to temporarily provide a desired manfiest to use for addition to the home screen.  Unfortunately, the website uses  here, which appropriately blocks the attempt.  Regardless - this is way too much work for what should be a simple effort.  Attempt 2: Widget Bookmark  Unfortunately, it looks like the 1x1 bookmark widget was removed in Chrome 48, as per  .  The suggested work-around is to use the "Add to Home screen" feature within Chrome.  Goto 10 / see beginning.  Attempt 3: Use the default-provided "Internet" browser  Unfortunately, using "Add shortcut on Home screen" in the default-provided "Internet" browser produces the same result as Chrome.  Consideration 4: Use a custom app / widget  Could probably write and install a custom application or widget that could be added to the home screen to meet the goal.  Or don't re-invent the wheel, and use an existing one.  Some possibilities:   "More Shortcuts":  "Shortcut Customizer":    Conclusion  How can someone create a desktop shortcut to an arbitrary URL, ignoring a provided web app manifest?


$\mathbf{A_4}\oplus\mathbf{Z_3}$ has no subgroup of order $18$.

Show that:  $\mathbf{A_4}\oplus\mathbf{Z_3}$ has no subgroup of order $18$  $|\mathbf{A_4}\oplus\mathbf{Z_3}|=36$ so subgroup $\mathbf{H}$ has index $2$  and must be normal.   Thus the quotient group $\frac{\mathbf{A_4}\oplus\mathbf{Z_3}}{H}$ exsists and has only two elements.  Now if $\alpha\in\mathbf{A_4}\oplus\mathbf{Z_3}$ then ${\alpha}^2\mathbf{H}={(\alpha\mathbf{H})}^2=\mathbf{H}$  Thus ${\alpha}^2\in \mathbf{H}$  How can I now show there more than $18$ elements for which ${\alpha}^2$ doesnot belong to H   I know there are six elements of order $2$ in  $\mathbf{A_4}\oplus\mathbf{Z_3}$.  THANKS.


What challenge ratings can my party handle?

I play D&D 3.5. I have a party of 6 players and myself as a DM. In my "career" as a DM, I seem to have no to little difficulty with adding monsters and encounters. But I have never understood how the Encounter Level system works. What encounter level can my party handle, and what makes that level? (How many monsters of what CR?)


Tikz : Draw a double bicolor line on a partial rectiligne path

I try to draw a bicolor line (only a part of a rectiligne path).  It works for horizontal lines, but obviously what I did can't work for oblique or verticale line.  Is it possible ? As a tikzstyle would be great.    \documentclass[tikz,margin=5pt]{standalone}  \usetikzlibrary{calc}  \begin{document}  \begin{tikzpicture}  \coordinate (A) at (-1,0) ; \coordinate (B) at (1,0) ; \coordinate (C) at ($(A)!.55!(B)$) ;  \draw[thick,red,transform canvas={yshift=.5\pgflinewidth}] (A)--(C) ; \draw[thick,blue,transform canvas={yshift=-.5\pgflinewidth}] (A)--(B) ;  \coordinate (B) at (1,2) ; \coordinate (C) at ($(A)!.55!(B)$) ;  \draw[thick,red,transform canvas={yshift=.5\pgflinewidth}] (A)--(C) ; \draw[thick,blue,transform canvas={yshift=-.5\pgflinewidth}] (A)--(B) ;  \end{tikzpicture} \end{document}


NullPointerException issue, abrupt flow constructor not getting executed

My code is as follows. After the creation of MyThread object the control is going directly to line 1 ( commented in code ) and then throwing NullPointerException. What is the reason of this behavior ? i want to know why s is not initialized, i am using the constructor and passing the value while creating the object for it ?   public class ClassOne {      public static void main(String[] args) {         MyThread t = new MyThread("name");         Thread tone = new Thread(t);         tone.start();         for (int i =0; i<=10;i++) {             System.out.println(i);         }     } }  class MyThread implements Runnable {     String s;     MyThread (String s) {         this.s=s;         System.out.println("Constructor");     }      char[] ch = s.toCharArray();             // line 1     public void run() {         for (char c : ch) {             System.out.println(c);         }     } }


On terminal apt shows upgradable while Software Updater says "The software on this computer is up to date."

I ran Software Updater it showed "The software on this computer is up to date" then on terminal I ran sudo apt list --upgradable which shows eight up-gradable packages.  So I ran sudo apt upgrade and eight packages were updated  On Terminal:  $ sudo apt list --upgradable Listing... Done gir1.2-packagekitglib-1.0/bionic-updates 1.1.9-1ubuntu2.18.04.4 amd64 [upgradable from: 1.1.9-1ubuntu2.18.04.3] gstreamer1.0-packagekit/bionic-updates 1.1.9-1ubuntu2.18.04.4 amd64 [upgradable from: 1.1.9-1ubuntu2.18.04.3] libpackagekit-glib2-18/bionic-updates 1.1.9-1ubuntu2.18.04.4 amd64 [upgradable from: 1.1.9-1ubuntu2.18.04.3] packagekit/bionic-updates 1.1.9-1ubuntu2.18.04.4 amd64 [upgradable from: 1.1.9-1ubuntu2.18.04.3] packagekit-tools/bionic-updates 1.1.9-1ubuntu2.18.04.4 amd64 [upgradable from: 1.1.9-1ubuntu2.18.04.3] python3-update-manager/bionic-updates,bionic-updates 1:18.04.11.7 all [upgradable from: 1:18.04.11.6] update-manager/bionic-updates,bionic-updates 1:18.04.11.7 all [upgradable from: 1:18.04.11.6] update-manager-core/bionic-updates,bionic-updates 1:18.04.11.7 all [upgradable from: 1:18.04.11.6] $   Both   Why this difference in Software Updater (update-manager) and Apt outputs?


Expectation of conditional uniform variates

I have two random variables $X_{1}, X{2}$ following $U(0,1)$. I need to compute $E(X_{1}|X_{1} > X_{2})$. I am thinking that since the random variables are independent, so $X_{1}|X_{1} > X_{2}$ should just be $X_{1}$ and its expectation should be $\frac{1}{2}$. I don't have answer of this problem. I just want to check whether my approach is correct.


Trying to move an object moves the texture on the object instead

So I have somehow turned this on and I dont know how to turn it off again, the gizmo that usually moves an object is now moving a bigger version of itself, and I dont know how to change it back


How can I browse photos on iPhone in Mac OSX?

Previously, on Windows, iPhone was recognized as a camera and I could browse image folder with Explorer without a need to import/download/tranfer photo files to the computer.  Is there a way to do the same on Mac OSX? I mean, all approaches I have ever read are somehow connected to import procedure (iPhoto, Preview, iTunes, etc.) or to hacking the iPhone and installing some apps that will allow to mount the phone as storage drive work.   What is the easiest and most straightforward way to view that files without transferring them to a computer?


Can't make maths equation - possibly Calligraphy?

I have included a picture of a maths equation that I need to convert to LaTeX. However I just can't figure out how to convert the first two symbols or figure out what they are/stand for.   The picture is blurry but it looks like calligraphy      \mathitcal   but I know it's not.


python - check at the end of the loop if need to run again

It's a really basic question but i can't think at the second. How do i set up a loop that asks each time the function inside runs whether to do it again. So it runs it then says something like;  "loop again? y/n"


Not a year goes by where we don't see at least one person Sorted into each House, and it's usually a fairly even distribution.  The Sorting Hat doesn't get a chance to study the mind of each child before Sorting, so it can't Sort them relative to each other (top X in smarts go to Ravenclaw, 4 bravest to Gryffindor, etc)  What would happen if a Sorting occurred where all the witches/wizards were extremely intelligent?  Would they all get Sorted to Ravenclaw?  What if they were all extremely brave?  What if none of them were particularly smart or courageous, but they all wanted power?  We see that there's a fairly small number of beds per room in each dorm, would the Hat stop Sorting people into a House if it knew the House had no more beds?  If so, could Harry Potter have ended up in Hufflepuff if his last name had been 'Zimmers'?


Reusing marinade JUST used for raw chicken

Can I take raw chicken out of a mainade that consist of soy sauce, vinegar and other things and put ribs into it to marinade as well?  Its a couple days old and been in the fridge the whole time.


YA novel - kid finds some kind of time traveling creature

I have a very, very vague recollection of this book that I read around 1999-2001.  A kid or tweenager finds some kind of creature -- the visual image in my mind is of something like a horseshoe crab but that's hardly reliable -- that I think can time travel, or allows him to time travel. Unfortunately that's about all I remember of it, but it was such a distinctively weird concept that hopefully someone else remembers it as well.  The overall vibe seemed "dark" to me, as a young person. There might have been another kid involved later on.


Removed points are listed twice in rep summaries

I had a  (10k+).  On the rep page, it shows correct totals on the left hand side (should be +5/-2 and -3) but says 2 events and lists 3, so the removed is listed twice.  To be clear, the actual rep change was correct - this is merely an issue of it being displayed incorrectly...  Either: The removed should be omitted from the first list (and the totals updated to +5/-5, 3 events) or the omitted from the first list. I'm guessing that the latter is what was intended


How do you address a person's name using tellraw in Minecraft 1.3?

Just to clarify, I know how to use tellraw proplerly.  How do you address a player's name using tellraw? I want to make it like this:     [YOU] My name is CatsAreMeow   I want it so the CatsAreMeow part can change into anyone's name. How do you do it?


I was thinking "What is before addition", and came up with this. This analogy describes it: Addition is to multiplication as [operation] is to addition. On  it says it is just "1+b". I came up with an alterantive; the symbol that I'll use for it will be $@$.  $b@b=b+2$  $b@b@b=b+3$  $b@b@b@b=b+4$...  For example:  $3@3=5$  If you try to compute it you run into problems. For example:  $3@2=(0@0@0)@(0@0)$ but it also equals $(-1@-1@-1@-1)@(-1@-1@-1)$  $(0@0@0)@(0@0)=(-1@-1@-1@-1)@(-1@-1@-1)$  $0@0@0@0@0=-1@-1@-1@-1@-1@-1@-1$  $0+5=-1+7$  $5\neq6$  So, you can't take away or add parentheses.  1)Is this new?  2)How do you compute it?


How to take a macro photo, but with the subject completely in focus

I love macro photography, it gives an insight in the small world around is. Unfortunately, I'm really not good at it. When I came across an artificial beehive, I took a chance to get into the bees and try to snap some bee portraits. Out of the hundreds of pictures, only one or two are to my liking. The main thing that throws me off, is focus.  I shoot with a Canon 700D paired with an EF 100mm f/2.8 Macro. Whenever I try to photograph insects from up close, I try to get as close as my lens lets me (so it can still autofocus) and take a bunch of pictures. However, time and time again the subject is only partially in focus. Below are some examples.        As you can see in these examples, it's often the case that a strip, or "band", of the environment is in focus, as one would expect, but this also causes the part of the creature that is a bit further back to be out of focus. I'd rather get rid of that band, and focus solely on the insect. Oftentimes it's things like hind lags or antennae, or the back part of the body that is out of focus but I'd want to be able to have the whole insect into focus. I'm not sure how to approach this.  Two things that I have considered, but I'm not sure if they make sense:   take a step back, and take a picture from further away and then crop. But this, in turn, would cause more of surroundings to be 'in focus' and I'd like to have this blur in the environment to single out the insect. post-processing to sharpen the out-of-focus areas (I'd rather not do this) focus manually, but I'm not sure this would have a better result   Any other tips regarding capturing insects are welcome!


How to extract and install .deb without the command dpkg?

I am running Debian jessie stable in order to understand how the .deb package interacts with the system. What is the correct way to extract and install a packge_name.deb without the command dpkg?


Can anybody tell me when Application_End is triggered in a lifecycle of an application? When all sessions are ended, will Application_End be triggered automatically? + Are there any other reasons why Application_End could be triggered?


Applying color to multiple objects in Photoshop CC

I have multiple objects that I would like to all have the same color. That way, when I change the color of the 'master' object, all the rest would also change.  I am sure this is straightforward, but I am struggling to find the answer.


In Outlook, How can I list cancelled/declined meetings?   I happen to use Outlook 2010 at the moment.


I have the following \input{mytable.tex} in my thesis document.   %% LaTeX2e file `mytable.tex' %% generated by the `filecontents' environment %% from source `thesiss' on 2016/10/11. %% \begin{table} \centering \bgroup \def\arraystretch{2.0} \begin{tabular}{|c|c|c|} \hline  $\mu \in X$& Condition applied on $\delta_{\mu}$  & Implication upon lifting \\ \hline $-4$ & $\bigg(\dfrac{13\cdot1789}{q}=-1\bigg)$  & $n \not\equiv k-4 \pmod{2k}$  \\ \hline $-3$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-3 \pmod{2k}$  \\ \hline  $-2$ & - & - \\ \hline $-1$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-1 \pmod{2k}$  \\ \hline $0$ & $\bigg(\dfrac{2}{q}=-1\bigg)$  & $n \not\equiv k \pmod{2k}$  \\ \hline $3$ & $\bigg(\dfrac{5333\cdot97324757}{q}=-1\bigg)$  & $n \not\equiv k+3 \pmod{2k}$  \\ \hline \end{tabular} \egroup \caption{Conditions following from pushing up modulus.\label{condition}} \end{table}   and in my thesis :  \documentclass[12pt,a4paper,twoside]{report} \usepackage{amsmath} \usepackage{amsthm} \usepackage{tabularx,ragged2e,booktabs,caption} \usepackage{tabu} \usepackage{amssymb,bm} \begin{document} \noindent Thus, the four conditions in the table above given by $\bigg(\dfrac{\delta_\mu}{q}\bigg)=-1$, with $\delta_\mu=\{2, 5 \cdot 29, 13 \cdot 1789, 5333 \cdot 97324757\}$  implies that $n \not\equiv k+\mu \pmod{2k}$. \qed  \input{mytable.tex} \qed \end{document}   And this table appears not at the right position where I have placed it in my thesis. Is there anything that can fix it. For example, maybe I can use something like \begin{XXX}[htpb!]


Minimize $\frac{1}{2}\sum_{i=1}^p (y_i-x_i)^2$ such that $\sum_{i=1}^p y_i - 1=0$ and $\forall i \in [\![ p ]\!]: -y_i \le 0$ by KKT method

I asked how to solve this optimization . I found this approach by combining @Royi's idea in his  with KKT's conditions. Personally, I feel my formulation is clearer and easier to understand.  Could you please verify if my proof is correct or contains logical mistake? Thank you so much!     Let $[\![ p ]\!]:=\{1,\ldots,p\}$ and $(x_1,\ldots,x_p) \in \mathbb R^p$. Solve the constrained optimization problem $$\begin{align*} \text{min} &\quad \frac{1}{2}\sum_{i=1}^p (y_i-x_i)^2 \\ \text{s.t} &\quad \sum_{i=1}^p y_i - 1 &&=0\\            &\quad\forall  i \in [\![ p ]\!]: -y_i &&\le 0  \end{align*}$$   $\textbf{My attempt}$ Define $$\begin{aligned} f(y) &= \frac{1}{2}\sum_{i=1}^p (y_i-x_i)^2 \\ h(y) &= \sum_{i=1}^p y_i - 1 \\ \forall i \in [\![ p ]\!]: g_i(y) &= -y_i  \end{aligned}$$ We have $f,g_i$ are convex and $h$ is linear. Let $a =(1/p, \ldots, 1/p)$. Then $h(a)=0$ and $g(a) <0$ for all $i \in [\![ p ]\!]$. It follows that Slater's condition is qualified. By Karush-Kuhn-Tucker conditions, we have $$\begin{aligned} \begin{cases} \forall i \in [\![ p ]\!]:\mu_i &\ge 0 \\ \forall i \in [\![ p ]\!]: g_i(y) &\le 0\\ h(y) &=0 \\ \forall i \in [\![ p ]\!]:\mu_i g_i(y)&=0 \\ \nabla f (y)- \lambda\nabla h (y)+ \mu_i \nabla g_i (y) &=0 \end{cases} &\iff \begin{cases} \forall i \in [\![ p ]\!]:\mu_i &\ge 0 \\ \forall i \in [\![ p ]\!]:-y_i &\le 0\\ \sum_{i=1}^p y_i - 1&=0 \\ \forall i \in [\![ p ]\!]: -\mu_i y_i &=0 \\ \forall i \in [\![ p ]\!]: (y_i - x_i) -\lambda - \mu_i &= 0 \end{cases} \end{aligned}$$  If $x_i+\lambda = 0$ then $y_i=\mu_i =0$ and thus $y_i = (x_i+\lambda)_+$. If $x_i+\lambda > 0$ then $y_i>0$ and thus $\mu_i=0$. Then $y_i = (x_i+\lambda)_+$. If $x_i+\lambda < 0$ then $\mu_i>0$ and thus $y_i=0$. Then $y_i = (x_i+\lambda)_+$. As such, we always have $y_i = (x_i+\lambda)_+$.  Then $\sum_{i=1}^p y_i - 1=0 \iff \sum_{i=1}^p (x_i+\lambda)_+ - 1=0$. Notice that $(x_i+\lambda)_+ = \max \{x_i+\lambda,0\}$ is continuous in $\lambda$ for all $i \in [\![ p ]\!]$. Hence $\psi(\lambda) = \sum_{i=1}^p (x_i+\lambda)_+ - 1$ is continuous in $\lambda$. Let $\alpha = -\max_{i \in [\![ p ]\!]}|x_i|$ and $\beta =1+ \max_{i \in [\![ p ]\!]}|x_i|$. It follows that $\psi(\alpha)<0<\psi(\beta)$. By Intermediate Value Theorem, the equation $\psi(\lambda)=0$ has a solution. Notice that $\psi$ is strictly increasing, so such solution is unique. We can also solve that equation by applying Intermediate Value Theorem on the interval $[\alpha , \beta]$.


I am running window7 and Ubuntu 13.10 together.  I'd like to also have Kali linux installed.Despite I did the installation of both OS , I am not a veteran in this subject , I dont know where to start on and if it is possible with a total HD of 250gb  Many thanks in advance


How to initialize a SimpleNamespace from a dict

I'm sure this must be simple, but I could not find the answer.  I have a dictionary like:  d = {'a': 1, 'b':2}   I'd like to access that via dot notation, like: d.a  The  is designed for this, but I cannot just pass the dict into the SimpleNamespace constructor.  I get the error: TypeError: no positional arguments expected  How do I initialize the SimpleNamespace from a dictionary?


How can I make just one page of a Word document horizontal?

I'm using Microsoft Word 2010. How do I set only the last page of my document to be horizontal? All other pages have to remain vertical.


How do I map a network drive to the root of a server (\\server)?

In Windows XP I can very easily map a network drive to the root of my NAS server. I browse to it in Explorer (\\192.168.1.70), choose "Map Network Drive", then choose the drive letter.  In Windows Vista, mapping the root of a server doesn't seem possible. I have to go "Map Network Drive" from 'Computer', then enter the address, but it will only let me map to specific shares (sub-folders off of the server root) and NOT to the server root share.   Since my NAS has built-in shares (music, photo, video, etc.) then I would have to have drive letters for all of these, which I absolutely don't want.  Why can I easily map a network drive to the server root in Windows XP, but not in Vista? Is there something fundamentally different in the networking across the two OS's? Or do I need to do things a different way?


I have a maybe silly question. Let's take the example below. class Myclass():      def __init__(self):         pass      def function_1(self):         print("1")      def function_2(self):         print("2")  variable = "1"  if variable == "1":     Myclass().function_1() if variable == "2":     Myclass().function_2()  Would it be possible to replace the "if" conditions with something like: Myclass().function_{0}().format(variable)  If yes, how ?


This is an exercise from Terry Tao's blog.    If $U$ and $V$ are unitary $n \times n$ matrices, show that the commutator $[U,V] := UVU^{-1} V^{-1}$ obeys the inequality $$ \|[U,V]-I\|_{op} \leq 2 \|U-I\|_{op} \|V - I \|_{op} $$  We are provided the hint: (first control $\|UV - VU\|_{op}$.)


I need to make a script that checks if all h1 tags in a page are of a certain hex color. If they are not, test fails. What are the available options for doing this?  I'm using selenium with java


Baselineskip not interpreted in a tabularx keyvalue environment

I'm trying to write a key:value environment which would allow me to create a dual columns tables where the columns are separated by colons.  Typically, I've implemented this using parbox in my own class file:  \makeatletter \newenvironment{keylist}{\global\setlength{\parindent}{0pt}}{} \newlength{\@keyvalueXposition} \setlength{\@keyvalueXposition}{0.5\textwidth} \newcommand{\keyvalue}[2]{     \parbox[t]{\@keyvalueXposition}{#1}     :     \parbox[t]{\@keyvalueXposition}{#2}     \\ } \makeatother   Which is typically used like this on the user-side:  \begin{keylist}     \keyvalue{Foo que lorem ipsum          } {Foofoo                           }     \keyvalue{Bar foobar                   } {Bar bar ipsum                    }\\     \keyvalue{Baz norf                     } {Bazbaz                           }     \keyvalue{Qux lorem ipsum              } {Qux lorem qux                    } \end{keylist}   Soon I realized my implementation was lacking this use case: allow lines to have only one element without printing the colon. Also, I began to use, in my class file, tabularx with booktabs to have great spaced lines in my tables.  \begin{tabularx}{\textwidth}{ X@{ : }X }\toprule     Foo que lorem ipsum & Foofoo\\\midrule     Bar foobar & Bar bar ipsum\\[\baselineskip]     Baz norf & Bazbaz\\     Qux lorem ipsum & Qux lorem qux\\\bottomrule \end{tabularx}   * where [\baselineskip] is used to simulate linebreaks, implemented simply using \\ in the previous implementation using parbox.  While this was working nice up to now, this was quite a hassle to use. I decided to replace the above solution by an environment alias, defined like this:  \newenvironment{keylisting} {\tabularx{\textwidth}{ X@{ : }X }} {\endtabularx}   which would give me  \begin{keylisting}\toprule     Foo que lorem ipsum & Foofoo\\\midrule     Bar foobar & Bar bar ipsum\\[\baselineskip]     Baz norf & Bazbaz\\     Qux lorem ipsum & Qux lorem qux\\\bottomrule \end{keylisting}   In the case where a line has only one item, we need to create an empty item for the second column, like this  Foo bar &\\   However, a colon is printed between both columns. According to what I found in the documentation, using  \multicolumn{2}{l}{Foo bar}\\ is the solution. However, for a reason I don't know when we prefix that statement by [\baselineskip], the latter isn't interpreted by the LaTeX kernel. If you use the following example, you will see the differences between the two lines with [\baselineskip]]: the first one is not interpreted. I prefixed the statement by 10 to clearly see it isn't interpreted.      \documentclass{report}     \usepackage[margin=2cm]{geometry}     \linespread{1.2}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{float}     \newenvironment{keyval}     { \tabularx{\textwidth}{ X@{ : }X } }     { \endtabularx }     \begin{document}     \begin{keyvalue}         Foo bar lorem ipsum           & Lorem ipusm que \\         Some number                   & 12 3456 789  8  \\         \multicolumn{2}{l}{This is some comment}  \\[10\baselineskip]         Yet some number               & 987 65432 1     \\         Foo bar                       & 163883495778    \\[\baselineskip]         Bar lorem ipsum               & 2013-04-12      \\     \end{keyvalue}     \end{document}   Thanks for your help.


What is the reason for the existence of gravitational force between two bodies? Why do we say it as an attractive force? What makes any two objects to attract each other?


Why are the Ringwraiths fearful of coming into contact with water?

At least twice in The Lord of the Rings: The Fellowship of the Ring, Ringwraiths cower away from bodies of water.  The second time (the ford of Bruinen) can be explained away by their fear of some Elvish magical trap through the enchantment of the water; but what about the first time, at the ferry? One of the Nazgûl could have easily made the jump onto the barge and quickly dispatched those pesky Hobbitsses.


How can I get Stack Exchange to send me to a conference?

I read , which states,  Depending on the circumstances and location, we can also sponsor community leaders to attend an event on behalf of their site. We will subsidize your costs to attend, within reason, and provide you with a bunch of swag to use as an ice-breaker when introducing yourself.  This sounds great. But the blog is sparse on the details. What do I actually have to do to get in on this?


How to associate a file type in Firemonkey OSX?

My Delphi Firemonkey MacOS app makes documents with a .4MD extension.  How can I get my app to launch when the user double clicks on Finder documents with a .4MD extension?  The seemingly duplicate question on Stackoverflow has an answer with a dead link to Apple's documentation.   This article has answers for Delphi XE2:


We live in a moderately sunny place. We do get some cloudy days frequently. I have seen the output to go above 24V(like25V) on a fully sunny day middle of the day which means lots of days the solar output might not be enough to charge the 24Volt battery pack. My solar panel setup has (2  * 12V 100W in series  and 2 * 24V 100W in parallel). And both connected in parallel) to produce that output(400W). Is there a solution to generate more consistently 24V in a moderately sunny place? The issue I have is that with 22-24V output lots of the the days, it is not good enough to drive charge into my battery pack/inverter(minimum requires 24V). What will the right solution for making sure that I can generate more than 24V even on cloudy days?


Let there be a function $f:R→R$. Let $A$ & $B$  be two subsets of $R$. From my experience, I know that $f(A∩B)⊆f(A)∩f(B)$.  I don't know how to prove it. Also, are there certain conditions that the function $f$ or the sets $A$ & $B$ should follow for the above condition to be true?


I know that php has md5(), sha1(), and the hash() functions, but I want to create a hash using the MySQL PASSWORD() function.  So far, the only way I can think of is to just query the server, but I want a function (preferably in php or Perl) that will do the same thing without querying MySQL at all.  For example:  MySQL hash -> 464bb2cb3cf18b66  MySQL5 hash -> *01D01F5CA7CA8BA771E03F4AC55EC73C11EFA229  Thanks!


I heard this sentence in an American film a while ago as I was watching it on DVD (the part after but is verbatim):  "I'm doing my best but I mustn't be doing it right."  This is something I occasionally hear in American films: phrases like "he mustn't have done it" or "she mustn't be studying now", where a logical conclusion is expressed. So far I've thought that the normal thing to say is "he can't have done it" or "she can't be studying now".  My question is: Can mustn't be used to express a logical conclusion when the speaker is certain that something didn't happen or isn't happening, at least in informal speech? Is this an American usage? (I've never heard this usage in British English, but this doesn't mean it doesn't exist.) Is there a change going on in the usage of the particular modal verb?  Note: All the references I've checked don't even mention this use of mustn't. Google books aren't of help either.   EDIT: I should clarify that I'm asking this question because if I wanted to express that I'm certain I'm not doing something right (as in the sentence quoted from the film) I'd say "I'm doing my best but I can't be doing it right". I would think that the use of mustn't/must not wouldn't be standard usage (although the meaning is perfectly clear to me; I never mistook it for an injuction).


I want to add a formula to a cell via VBA, but for some reason fail to get it done.   I've tried  ws.Range("O2").Formula = "=DATEDIF($N$2;C1+1;""m"")/3+1"   Error message is 1004 ("Application-defined or object-defined error")  ws.Range("O2").Formula = "=DATEDIF($N$2;C1+1;" & Char(34) & "m" & Char(34) & ")/3+1"   Error message here is "Sub or function not defined"   How do I do this?


Show that $x^3 + 3x+2$ is irreducible in $\mathbb{Z}[5]$

I am reading Fraleigh in which Fraleigh proves that $f(x) = x^3 + 3x+ 2$ is irreducible over $\mathbb{Z}[5]$. He explains that the if $f(x) = x^3 + 3x+ 2$ were reducible over $\mathbb{Z}[5]$, then there would exist ar least one linear factor of $f(x)$ of the form $x-a$ for some $a \in \mathbb{Z}[5]$. Then, $f(a)$ would be $0$. However, $f(0) = 2, f(1) = 1, f(2) = 1, f(-1) = -2,f(-2) = -2$.   I don't understand why Fraleigh didn't analyze $f(4)$ and $f(3)$ instead of $f(-1)$ and $f(-2)$ respectively. Can someone please explain? Thanks!


I want to earn Unicoins for free but I can't seem to find the best way mine coins faster. There are also sometimes when I get 20-30 Unicoins at one time, and I think that there is some clue so that we can know which rocks contain lots of Unicoins.. So do you have any idea you can share?


Let $A$ and $B$ be $n$ x $n$ matrices over reals. Show that $I - BA$ is invertible if $I - AB$ is invertible. Deduce that $AB$ and $BA$ have the same eigenvalues.  I know how to prove that $AB$ and $BA$ have same eigen values, when either $A$ or $B$ is non-singular.   But here, that condition is not mentioned.   Please help me.


Given $S \hookrightarrow T$ construct $U ≈ T$ disjoint from $S$ in Z set theory?

I was recently thinking about the fact (in ZFC) that, given a (first-order) structure $A$ that embeds into another structure $B$, there is some structure $C$ isomorphic to $B$ such that the domain of $A$ is a subset of the domain of $C$. This is trivial if we can prove the following:     Given any injection from $S$ into $T$, there is some set $U$ disjoint from $S$ that bijects with $T$.   I can prove this within either ZC (using AC) or ZF (using Foundation). My ZC proof uses transfinite induction to pick $U$ out from $(P(T)×2)∖S$. My ZF proof constructs $U = \{ \{S,x\} : x∈T \}$. But I don't see a way to prove it within just Z. In one attempt, I tried to use one of $k$ disjoint copies of $T$ where $k$ is a well-ordered set that does not inject into $S$, but if every copy intersects $S$ then I seem to need a choice function on $S$ to obtain a contradiction. At least this means that I can prove it for countable $S$, but what about uncountable $S$?  I may be missing something easy, because intuitively it cannot be possible that every set that bijects with $T$ has a non-empty intersection with $S$, even in the absence of choice...


Prove that $ \frac{n(n-1)(n-k+1)}{k(k-1)\cdots1} = \frac{n!}{(n-1)!k!}$.   Proof:  This is what I have tried:  $\frac{n!}{k!(n-k)!} \times (n-k)!  = \frac{n(n-1)\cdots(n-k+1)(n-k)!}{k(k-1)\cdots1(n-k)!}$  $\frac{n!}{k!} = \frac{n(n-1)(n-2)\cdots(n-k+1)}{k(k-1)\cdots1}$  This is where my attempt ends.   Are my steps correct? If not how can I improve them?  New Questions:  How is it that n-k magically appears on the right side? I get that n-k and 3 times times 2 times 1 cancels out in the numerator and the denominator which leaves   $\frac{n(n-1)(n-2)...(n-k+1)}{k(k-1)....1}$ which is equivalent to ${n \choose k}$ or \frac{n!}{(n-k)!k!}....is that correct?


In methods when is it necessary to use notation like self.variable_name? For instance, I know that in the constructor method it needs to be like  class A(object):      def __init__(self, name):      self.name = name   in order to give it an instance variable. However, what about in other methods? When do I need to put self in front of a variable name and when is it okay to just use a variable name?


automatically split \begin{align*} content in two pages

I have a section containing something similar to:  \begin{align*}    ...some long content... \end{align*}   The content is long and should be split in two pages, however, the whole block is moved to the second page leaving an empty space.  Why is this happening?


Early 20th century texts on calculus of variations use a very strongly slanted Delta. A sample is below. It is much more slanted than the  \mathit{\Delta} discussed in , and more slanted than in    The specific difference is that I want the upper vertex farther to the right than the bottom right one.  How can I match this in LaTeX?


What is the meaning of 'should have' in the following sentences:   I should have let her know what was happening but I forgot. They should have remembered that their guests don't eat meat meat. I should have sent everybody a reminded by email. He should have told them the truth but he didn't. I don't think you should have done it.   I'm confused here because I know that 'should have' is used to imply 'regret' for example:    I got really wet today while going to market. I should have taken an umbrella. She wept so badly. I shouldn't have scolded her.   do the first five examples imply 'regret'? Or, do 'should have' implies both 'obligation and regreats' in all those 5 examples? Or, Do 'should have' implies both 'obligation and regreats' in all those 5 examples?


Question about how to prove $x^5\equiv x \pmod {10}$

I was trying to prove why $x^5\equiv x \pmod {10}$ for all natural numbers $x$. I saw a proof where they applied Euler's theorem to show this. They said that the totient function for $10$ is $4$. ($φ(10) = 4$). Therefore,  $x^5 ≡ 1^4 \cdot x^1 ≡ x\ \pmod { 10}$  However my question is: This isn't a correct proof is it? Because it requires $x$ to be relatively prime with $10$ for this to work. So it's a partial proof only (it would prove for $1$, $3$, $7$, and $9$ but not for the other $x$'s)?  If this is true, is there a way to generalize using Euler's Theorem to prove for all $x$? Or is there another way to go about doing this proof?


I need to make a call to a soap webservice in an android device. I have been reading a lot of articles in stackoverflow and on other pages, watching videos... But I've tried everythin and I can't make it work in my android device, and I can't test in on an emulator, because my computer can't handle any of them, so I don't know if the error is on the code or if it's a problem of my android device.  The layout xml are only an EditText, a Button, and a TextView.  In this link you can see the request xml I need to send to the webservice (should I use SOAP 1.1 or SOAP 1.2 ?)   This is my actual code, and I have tried many other ways, and none of them have worked for me. Any help? (url, namespace, soap_action and method_name values are okey, aren't they?)  package com.example.doazdoas.webservice_prueba;       import android.app.Activity;     import android.os.Bundle;     import android.util.Log;     import android.view.View;     import android.widget.Button;     import android.widget.TextView;      import org.ksoap2.SoapEnvelope;     import org.ksoap2.serialization.SoapObject;     import org.ksoap2.serialization.SoapSerializationEnvelope;     import org.ksoap2.transport.HttpTransportSE;      import android.os.AsyncTask;     import android.widget.Toast;      import static android.content.ContentValues.TAG;     public class MainActivity extends Activity{     private TextView textResult;     private Button buttonSend;      String NAMESPACE = "http://www.webserviceX.NET/";     String METHOD_NAME = "GetCitiesByCountry";     String SOAP_ACTION = NAMESPACE + METHOD_NAME;     String URL = "http://www.webservicex.net/globalweather.asmx?WSDL";      private Object resultsRequestSOAP = null;      HttpTransportSE androidHttpTransport;      @Override     public void onCreate(Bundle savedInstanceState)     {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          textResult = (TextView)findViewById(R.id.textResultado);         buttonSend = (Button)findViewById(R.id.buttonEnviar);         //setContentView(tv);     }      public void onClickEnviar(View view){         AsyncCallWS task = new AsyncCallWS();         task.execute();     }      private class AsyncCallWS extends AsyncTask<Void, Void, Void> {          @Override         protected void onPreExecute() {             Log.i(TAG, "onPreExecute");         }          @Override         protected Void doInBackground(Void... params) {             Log.i(TAG, "doInBackground");             sendRequest();             return null;         }          @Override         protected void onPostExecute(Void result) {             Log.i(TAG, "onPostExecute");             Log.d("dump Request: " ,androidHttpTransport.requestDump);             Log.d("dump response: " ,androidHttpTransport.responseDump);         }      }       public void sendRequest(){         SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);           //SoapObject         request.addProperty("@CountryName", "SPAIN");         SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);         envelope.setOutputSoapObject(request);           androidHttpTransport = new HttpTransportSE(URL);         try         {             androidHttpTransport.call(SOAP_ACTION, envelope);             resultsRequestSOAP =  envelope.getResponse();             String[] results = (String[])  resultsRequestSOAP;             textResult.setText( results[0]);         }         catch (Exception aE)         {             aE.printStackTrace ();         }     } }


Why are usually 4x4 gamma matrices used?

As far as I understand  are a representation of the Dirac algebra and there is a representation of the Lorentz group that can be expressed as  $$S^{\mu \nu} = \frac{1}{4} \left[ \gamma^\mu, \gamma^\nu \right]$$  Usually the representations used for them are the , the  or the .  All of these are 4x4 matrices. I would like to know what the physical reason is that we always use 4x4, since surely higher dimensional representations exist.  My guess is that these are the smallest possible representation and give spin half fermions as the physical particles, which are common in nature. Would higher dimensional representations give higher spin particles?


Open nonempty subset of irreducible variety over $k$ has the same Krull dimension as the whole variety?

Let $V$ be an irreducible variety of finite type over a field $k$, $V_{0}\subseteq V$ open and nonempty (or at least dense). Why is \begin{equation*}\operatorname{dim}_{\operatorname{Krull}}(V_{0})=\operatorname{dim}_{\operatorname{Krull}}(V)\text{?}\end{equation*}  My professor uses this result (without mentioning a proof) as if it were somehow self-evident. I have tried to prove it, but I am at a loss. Who can help?  The general statement is NOT true for arbitrary irreducible topological spaces, not even for varieties of finite type over an arbitrary integral domain, see   for instance.


Binary to hexadecimal and decimal in a shell script

I have a context where I need to convert binary to hexadecimal and decimal and viceversa in a shell script. Can someone suggest me a tool for this?


How can I get two pictures perfectly align alongside. My code is given below.   \begin{figure}[t!] \centering \begin{minipage}{3.3cm}     \centering     \subtop[]{\includegraphics[height=0.25\textheight]{figa/ParameterSpace}\label{figa}} \end{minipage} \hspace{0.5cm} \begin{minipage}{3.3cm}     \centering     \subtop[]{\includegraphics[height=0.25\textheight]{figa/StringMotion}\label{figb}} \end{minipage} \mycaption[Motion of open string in spacetime.]{%   (a) Parameter space for open strings.   (b) Open string worlsheet in target space.} \label{figA} \end{figure}


Meta SE account is shown 3 times in accounts

Earlier today I asked my first question on this site. So Meta SE was added to my accounts. But this account is shown three times:        One of them also has a badge while the other two don't.   The network profile doesn't show MSE at all:        Also I have got this long wierd user name and  I am not able to change it. In the edit- display name this long name is not there.My user name on other sites is shown there.   After all this happened Meta SE questions are not getting loaded in my SE app.    Edit: the issue of name is solved now. I changed the profile picture and saved changes and it worked.


I've been on StackOverflow for sometime now and haven't found any Easter Eggs. If you aren't familiar with what an "Easter Egg" is in this context, here is how  defines it: An Easter egg is an intentional joke, hidden message, or feature in a work.   Anyway after some research, I found a pretty funny one on the Stack Exchange About page . Stack Exchange is a pretty robust network and I know that google and youtube are chock-full of these things, so I'd expect Stack Overflow to have a few.  Know about any that are funny/cool? Have any personal favorites?  Edit: Chat has some Easter eggs that you can find in  question.


Is there any equations in physics or laws that say time can flow backwards instead of forward?


Among the descendants of the Sage of Six Paths only the Uchiha clan seems to be alive. Where is the Senju clan (except Tsunade)? Were they eradicated during the wars? Or are they still alive?


I'm so new to Ubuntu, I just started playing with it 19 hours ago. I'm really not 100% sure what I'm doing, so please excuse the mistakes in terminology and general processes.  As I was attempting to make my Samsung 740U3M able to dual boot, I had no extra USB drives except my external hard drive. I used etcher to put the ISO on the drive, but the website said it wouldn't delete everything.  It did delete everything when I put the ISO on there.   So, I powered down the machine and bought a second 32GB USB drive to install from. I now have the latest Ubuntu and updates installed on the internal HDD.  Is there any way to save the stuff from my external hard drive? I haven't used it, so I don't believe it's been overwritten. Please help!? I'm an undergrad and all of my work was on there!  EDIT It's not a duplicate of that question because he was trying to make an image of his HDD, whereas I was trying to put the ISO "next to" my files on my external HDD. Etcher "flashed" my HDD when it put the ISO on the HDD. I'm currently running a quick search in TestDisk. Instructions called for me to check the "Intel" option for the search.


Javascript, Uncaught ReferenceError: variable is not defined

I'm new to Javascript, and I am trying to pass two parameters to a function which then submits them via a form, but I get an ReferenceError when I click the image that acts as a function caller. These are my inputs, a text area and three radio buttons:     <input type="text" id="searchString" name="searchString" maxlength="20">

    <input type="radio" id="Title" name="searchMode" value="Title"/>    Title    <input type="radio" id="Author" name="searchMode" value="Author"/>    Author    <input type="radio" id="Number" name="searchMode" value="Number"/>    Number
  And this is the search function:

  The error message I am seeing is:  Uncaught ReferenceError: opt is not defined  I've tried declaring the two variables without let or var but that doesn't seem to work, how can I fix my code so I don't get this error?  EDIT: I think the issue might be that I can't properly pass my parameters from my form to the controller; the search function gets called and I get no error but they are received as undefined. Here are the form and the function: <form name="searchForm" method="post" action="Dispatcher">    <input type="hidden" name="searchString"/>    <input type="hidden" name="searchMode"/>    <input type="hidden" name="controllerAction" value="ProductsManagement.view"/> </form>  function search(s,opt){    const f = document.searchForm;    f.searchString.value = s;    f.searchMode.value = opt;    f.submit(); }


Term for being unable to see glaring errors after working for some time on a task?

Back in the day, I used to do a lot of CAD drafting.   There is a well known phenomena whereby your ability to see mistakes, errors, omissions or plain nonsense in your drawing diminishes sharply after working more than a couple of hours on the same drawing or draft.   Our engineering department even had a policy, that required every drawing, no matter how simple, had to be reviewed or "Redlined" (used a red marker on a printout to circle mistakes) by at least one peer drafter before submitting it to your supervisor, This saved a lot of embarrassment to everyone, especially the company (it saved a lot of money too) since simple mistakes were caught even before hitting version control or structural assessment, even production line assembly, let alone the final customer.  Most of the errors caught by peer re are simple, basic omissions like a missing dimension, missing notes boilerplate required by specification, etc. Sometimes glaring errors are caught like personal work-notes or calculations making it to the final document, duplicating sections of the drawing, etc... however the drafter that had been working on the drawing was simply "blind" to the error until someone else pointed it out.  Also, incidence of this is noticeably higher when working on a computer (v. gr. CAD Drafting) vs doing "old school technical drafting" by hand on paper using a drawing board.  Quite frequently, simply printing or plotting your CAD draft to paper, will make you see and catch some errors, invisible to you on-screen, but a "fresh pair of eyes" will catch some that you yourself can't see even on paper.  This also known to happen in other professions that require working for extended periods on a computer document, for example, Software programmers, lawyers, technical writers, etc.   In spanish we call this phenomena "Ceguera de taller" literally "Workshop blindness" however my research (below) shows it does not translate well to english.  I thought of "Mental fatigue" however I don't think it conveys the same meaning, since mental fatigue reduces your overall awareness and acuity, and you would be blind to other's mistakes on a similar drawing or document, however (surprisingly) if you look at a document that you didn't work on yourself, you'll notice immediately any mistakes even if you have just committed them on your own work.  I came up with 3 alternatives for a literal translation (Workshop Blindness, Drafter's Blindness, and Drafter's fatigue) and , but none of them yielded any results, so they are probably meaningless or nonsense. Ceguera de taller, however,  which matches the time period when PCs became affordable.  so, in short:  What would be a well understood term or idiom for the inability to see your own mistakes or omissions after working for some time on the same document.    Many thanks to everyone for all the wonderful and enlightening anwers! I tried several in actual conversation and tunnel vision required the least explanations, although several ideas here work in different situations. Like "Im having tunnel vision issues with this document” when explaining I am having the condition, or the very friendly, funny and kinda ice-breaker captain obvious!  Again, thank you to this wanderful community


How to use iMac (27-inch, Late 2013) as a second monitor for Macbook Pro (13-inch, 2020)?

I bought Thunderbolt 3 (USB-c) to Thunderbolt 2 by Apple and Thunderbolt Cable (0,5m). Cmd+F2 doesn't work for me. I guess it's just because Apple now prevents to use old iMacs as monitor with new Macbooks. So my question mainly is there any other non-conventional way to use my iMac as a monitor with my new Macbook? What if I run Windows in my old iMac? Would it be easier to connect it as a monitor to new Macbook?


A quick search for currency regex brings up . The problem I have in choosing one is that regex is difficult to verify without testing all the edge cases. Does anyone have a regex for U.S. currency that has been thoroughly tested? My only requirement is that the matched string is U.S. currency and parses to System.Decimal:  [ws][sign][digits,]digits[.fractional-digits][ws]   Elements in square brackets ([ and ]) are optional.  The following table describes each element.   ELEMENT             DESCRIPTION ws                  Optional white space. sign                An optional sign. digits              A sequence of digits ranging from 0 to 9. ,                   A culture-specific thousands separator symbol. .                   A culture-specific decimal point symbol. fractional-digits   A sequence of digits ranging from 0 to 9.


Strange string operator= behaviour in C++

While debugging a program that other people wrote I encountered a strange string assignment. At first I was surprised that it even compiles. Here is an example, which compiles without warnings on Linux (Ubuntu, CentOS).  #include <string> #include <stdio.h> #include <string.h>  using namespace std;  int main () {   string a;   char b[40];    a = "Constant value", strncpy (b, a.c_str (), sizeof (b));   printf ("a = %s\n", a.c_str ());   printf ("b = %s\n", b);     a = "Constant value";   strncpy (b, a.c_str (), sizeof (b));   printf ("a = %s\n", a.c_str ());   printf ("b = %s\n", b); }   Can someone explain, what exactly does the first string assignment in the example, and where can I find any reference describing this behaviour? As you can see a is assigned a constant string, but after that there is a comma (,) and strncpy function call, which returns char *. Why is comma accepted there? According to output it does not make a difference if I use ; or ,.


how to prove that $abc$ and $cba$ do not necessarily have the same order?

Let $a$, $b$ and $c$ be elements of a group $G$, how can I prove that $abc$ and $cba$ do not necessarily have the same order?  I know that this cannot hold for abelian groups, but unsure how to start otherwise.  Also, it is impossible to find a counterexample if we change the order to $cab$, see here: .


How to count how many times a letter appears in all of the strings of an array?

public static int countLetter(String[] x, String y){     int count = 0;     for(int i = 0; i < x.length; i++){         for(int h = 0; h < x[i].length(); h++){             String yo = new String(x[i].substring(h,h+1));             if(yo==y){                 count++;}             }         }         return count;     } }   My method should return an integer that counts how many times total the letter appears in all strings of the array. (Assuming the string is one letter and I can't use charAt()).


How do I twist a curve (by rotating a segment)?

I have already searched everywhere but those threads are about making rope-like objects.  I am trying to animate start and end values of a curve's geometry. But I want it to twist midway. I am trying  to rotate it's segment on Y axis as in the image but it is not working.    Here on the left is what I want to achieve and right is what I have. I tried rotating the segment/vertex on Y axis but its not working.


Way to compute Stirling numbers of the second kind from a multiset

I was wondering what algorithm would compute    S(n, k {occurences of each element})     Where  S(6, 3, {1, 2, 3} )   would give the total number of ways a set with 6 elements in which 3 are the same element and a different 2 are another element (and 1 is its unique element) could be split into 3 non-empty sets, ignoring permutations.    This is basically the extension of Stirling numbers of the second kind to deal with multisets.


The Gaussian and Mean Curvatures of a Parallel Surface

This is a homework problem from do Carmo. Given a regular parametrized surface $X(u,v)$ we define the parallel surface $Y(u,v)$ by $$Y(u,v)=X(u,v) + aN(u,v)$$ where $N(u,v)$ is the unit normal on $X$ and $a$ is a constant. I have been asked to compute the Gaussian and mean curvatures $\overline{K}$ and $\overline{H}$ of $Y(u,v)$ in terms of those of X, $K$ and $H$. Now, I know how to do this by brute force: calculate the coefficients of the first and second fundamental forms of $Y$ in terms of those of $X$. However, this is a lengthy and messy calculation. do Carmo says that $$\overline{K}=\frac{K}{1-2Ha+Ka^2}$$ and $$\overline{H}=\frac{H-Ka}{1-2Ha+Ka^2}.$$ The denominator of these fractions is actually something that arose earlier in the problem; I calculated $$Y_u\times Y_v=(1-2Ha+Ka^2)(X_u\times X_v).$$ So, it seems like I should be able to calcuate $\overline{K}$ and $\overline{H}$ from this initial step. Is there something I'm missing? Or, is it actually just a brute force calculation?  Thanks.


Distribution of sine of uniform random variable on $[0, 2\pi]$

Let $X$ be a continuous random variable having uniform distribution on $[0, 2\pi]$. What distribution has the random variable $Y=\sin X$ ? I think, it is also uniform. Am I right?


Could somebody please clarify on which one to use under what conditions?  Apologies for asking question at a very broad level but I just want to know from people who handles large data, what is the approach you use?


I'm struggling to create a compound INDEX MATCH in Excel based on two criteria.  My data set looks like this:  RANGE       SITE    TYPE   2711260     LOB     LBO  2711260     MYP     WAN  2711266     GCT     LBO  2711516     EEP     WAN  2711516     EFC     WAN  2711516     LOB     WAN  2711516     MWP     LBO   I would like to use an INDEX/MATCH as follows:  - Given a RANGE, return SITE, on condition that TYPE ="LBO".  In my instance, a of TYPE "LBO" is unique for every RANGE.  So for example, if my input data is 2711516, I'd like "MWP" returned, not "EEP", "EFC"or "LOB".  I'm not sure if this is a nested INDEX MATCH statement.  Please can someone assist.


Just before I say anything, I have tried this code:  @echo off  setlocal enableextensions enabledelayedexpansion for /f %%a in ('copy /Z "%~dpf0" nul') do set "ASCII_13=%%a"  set /p "=Example 1" <NUL  set /p "=!ASCII_13!Example 2" <NUL   My Source:  (The verified answer from it)  And that didn't work for me. It just outputted as Example 1Example 2 when I tried it.   So I just need a way to overwrite the same line in a batch file (eg. It said "Example 1" before, but after that line will say "Example 2" instead).   Thanks!


Are amounts of money singular or plural?

Are the two sentences correct or is one of them incorrect?     1) Five billion dollars is earmarked for the project.   2) Five billion dollars has been earmarked for the project.   I know dollars are countable. So I think both 'is' and 'has been' are correct here.   Also, do they differ in meaning?


Don't display the voting buttons after an election

It seems like the voting buttons got redesigned or something but they are still visible and clickable even after an election. Example :


Can the Room of Requirement, so to speak, "be" more than one room at once?

I'm pretty sure Ginny was still in the Room of Requirement the time Harry and Co. went into the the Room of Hidden things. Or had her rebellious nature overcome her already and had she already began to battle before that?   Can the Come and Go Room be two Things at once?


In the Star Wars prequel trilogy (and in the Clone Wars TV show) we see that Darth Sidious fooled the galaxy gradually. The Republic was reorganized into the Galactic Empire with the people's consent, Palpatine having convinced them that the Jedi were traitors. Aside from a small group of perceptive individuals (like Padme, Bail Organa, and Mon Mothma), we get the impression that during the reign of the Empire the average person (citizen or officer) might believe that the Empire was in the right. Consider the fact that:  the Emperor   the Emperor kept the Imperial Senate intact for a while  Tarkin seemed to discourage Vader from choking imperial officers   It seems as though the Emperor needed to keep up appearances of being good and wanted the imperials to believe that as well. However the Empire has some really evil names like Death Star and Star Destroyer that would likely tip people off that the Empire was evil. I realize that the construction (as well as probably the name) of the Death Star was  before it's completion. Star Destroyers, however, were plentiful before that. Did the average imperials (such as stormtroopers, officers, or admirals) know that they were the "bad guys"? If they don't consider the Empire to be evil, then how can they justify the Empire's action to themselves?


Why does Stack Exchange sometimes display a notification to refresh the page?

When I go to a Stack Exchange page (especially Stack Overflow), sometimes it will display a notification bar on top saying: 'click on "xxxxx" user id, and refresh the page'. Once the user clicks that link, we have then logged in again.    I am a little bit confused. Since the page had already shown my user id on the notification bar, I assume the Stack Exchange server has probably found my session. Why does it require me to refresh it again?   My little guess is the Stack Exchange server did find my session, but my session is almost expired, so it gives me a notification to prolong the session again.


How to convert text within a textarea into a URL like Facebook does?

I am providing users with a textarea into which to input descriptions of their products. I am also allowing people to comment on the products like on Facebook.  Sometimes these posts include a URL to further information and I would like to be able to detect that part of the text as a URL and wrap it in an anchor <a> element once it is published to the page.  The text is being submitted by a form and goes to the server as plain text. I use a REReplace() regex replace function on the server-side to convert carriage returns into <br> tags so that it looks correct on the page.  However I don't know how to parse out the URL parts and wrap them in an anchor tag. Should it be done on the server-side or should I use jQuery on the client-side to wrap URLs on the fly? If I do it on the fly and there's hundreds of comments on the page with URLs - wouldn't this affect the page's performance?  If its on the server-side whats the best way to do it? I have jSoup on the server but couldn't work this one out because no HTML gets submitted from the textarea - only plain text e.g.     This new TV features 4K HDR technology. Read more at    UPDATE: This is not a duplicate question of others. I am not asking how to convert plain links on a webpage into working ones (I can use linkify for that).   I am asking how to linkify on the server-side using jSoup or something similar. The textarea does not pass any HTML code to the server and neither can I wrap the text in anchor element because its a textarea and the inserted text doesn't appear in the DOM from what I can tell using Firebug.


Would you please give some examples on Bias-Variance Trade off?

I am a new learner for Machine Learning and are confused about the idea of bias-variance trade-off. Would you please offer some specific examples or situations that a bias-variance trade-off occurs? Thank you!


Sharpness and bokeh comparison of Nikon 50mm f/1.2, f/1.4G and f/1.8G

The contestants are Nikon 50mm ,  and . The list prices are 38,550 INR, 27,990 INR and 18,000 INR respectively.  Bokeh: As with any portrait lens, I want a creamy bokeh performance when used wide open. Theoretically, as the maximum aperture increases, the bokeh effect should be more pronounced, too, if used wide open. But, how about the quality of bokeh? Is the difference at all perceivable in bare eyes? While searching for the image produced by all three lenses, I couldn't find any comparative review putting the shots taken by these lenses, side by side.  Sharpness: How do these three lenses perform in producing sharp images when used wide open? According to  review, f/1.4G performs worse than f/1.8G at least till f/5.6.


What is the origin for the name "partition function" given to $Z = \sum e^{-\beta E_i}$?

Does anyone know why is the function  $Z  = \sum e^{-\beta E_i}$ called ?  For example, does it have a connection to the mathematical term "partition of $A$" which is a representation of the set $A$ as a disjoint union of it's subsets  (and defines an equivalence relation over $A$)?  EDIT: The explanation below and the explanation  indeed almost give me a full answer. I just want to be sure: We are divding the whole quantity be it's energy states and not by it's particles. This means that a class in a partition can have lots of particles and can be related to one energy state exactly. And we have to know the distribution function of the particles in the system. Am I right? or mayby every particle has it's own distribution?


Hi.. I used a landscape table in my thesis and need some help

As my landscape give the page numbering in left side but i need to show in buttom of the page as to show the continuous numbers. I past here the pic      %% pjhus extracted contours and volume  \begin{landscape} \begin{table}[tbp]\centering     \caption{Expert evaluation of cardiac function and oedema volume}     \label{Tab:pj1}        \begin{tabular}{c c c c c c c c c c}\hline          \textbf{Patient ID} & \textbf{Pathology} & \textbf{Gander} & \textbf{Age} &\multicolumn{2}{c}{\textbf {Generated-Contours }} &\multicolumn{4}{c}{\textbf{Ground-Truth Volume}}\\\cline{5-10}         & & & &\textbf{Outer (\%)}&\textbf{Inner (\%)}&\textbf{EDV (ml)}&\textbf{ESV (ml)}&\textbf{EF (\%)}&\textbf{oedema (\%)}\\\hline         Patient-A001&   A001&   Male &  57& 83.23&  96.30&  106&    72& 32& 43\\         Patient-A002&   A002    &Male&  46& 87.68&  97.00&  111&    51& 54& 17\\         Patient-A003&   A003&   Male&   58& 82.00&  96.87&  177&97& 45& 30\\         Patient-A004&   A004    &Male&  48& 82.56&  98.00&  173&    98& 43&     29\\\hline         \textbf{Mean Average}   &-&-&-&         84.6&96.4&144.8&80.3&45.3&36.7\\             \textbf{SD}&-&-&-&    2.63&1.42&34.28&27.63&8.38&10.79\\          \hline       \end{tabular} \end{table} \end{landscape}


During the movie, we learned that Ego tried to reproduce the Celestial gene by having a lot of children and then having them delivered to him. I am not sure if Yondu was contracted for all of them but he definitely delivered at least a few of them since he broke the ravager code and got banned for dealing in kids.  My question is: why did he stop with Peter? Was Peter the last one on the contract or did he keep on delivering some but just not Peter?  Also, why didn't Ego seek out Yondu to get his kid back?  I don't think this was touched on in the movie. This was slightly mentioned here () but that is not answering my question.  I think Yondu said it was because he could get to places where the Ravagers could not since he was a kid but that would have been true with all the others kids he abducted for Ego.


Wouldn't multiple filters in a convolutional layer learn the same parameter during training?

Based from what I have learned, we use multiple filters in a Conv Layer of a CNN to learn different feature detectors. But since these filters are applied similarly (i.e. slided and multiplied to regions of the input), wouldn't they just learn the same parameters during training? Hence the use of multiple filters would be redundant?


I am trying to understand a multicast code, and I don't understand the utilities of a little part :  int fd_socket = socket(AF_INET, SOCK_DGRAM, 0); u_int yes = 1;  setsockopt(fd_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));   I don't understand the utilities of the setsockopt function. I understand that this function permits to modify the socket in the kernel, and SOL_SOCKET is because my modification is about the level of the socket and not of the level of a protocol. I don't understand SO_REUSEADDR.


How To Show Node Comment Count in node.tpl?

I have had the bright idea of changing my user permissions so as guests cannot see the comments on a node. I have no problems with Views around my site, as they can clearly see there are comments on nodes, and they will be more inclined to register. The problem seems to be when they arrive on my site directly to a node, they don't see any comment, and think "that's a bit crap; let's go."  Is there a way I could show the amount of comments below a node?


"Incorrect permissions on /usr/lib/policykit-1/polkit-agent-helper-1 (needs to be setuid root)" while trying to install or uninstall software

I was using Ubuntu 18.04 LTS before, but today when I erased and reinstalled the system. Now when I try to install or uninstall software, or change something, I get an error message:   "Incorrect permissions on /usr/lib/policykit-1/polkit-agent-helper-1 (needs to be setuid root)"    It does not allow me to enter the password as usual. I'm using Ubuntu 18.04 LTS


Strange GPG error. apt-get doesn't work anymore

If I run anything apt-get related, I get this error:  W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D6B6DB186A68F637   Please how can I fix this?


How to set the default value of an exposed filter rather than -Any-?

I have a view with exposed filters in Drupal 7 and I need to set the default value of a filter to current year. I also need to unset/remove the - Any - option from the select list.


How to understand dot product is the angle's cosine?

How can one see that a dot product gives the angle's cosine between two vectors. (assuming they are normalized)  Thinking about how to prove this in the most intuitive way resulted in proving a trigonometric identity: $\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$.  But even after proving this successfully, the connection between and cosine and dot product does not immediately stick out and instead I rely on remembering that this is valid while taking comfort in the fact that I've seen the proof in the past.  My questions are:   How do you see this connection? How do you extend the notion of dot product vs. angle to higher dimensions - 4 and higher?


usb flash size decreased from 32 Gb to 5 Mb (after trying ubuntu)

I've used my 32 Gb USB flash to try ubuntu. Now I don't want ubuntu anymore so I formated my USB flash. But size of it now 5 Mb instead of 32 Gb (likely this is because ubuntu uses two partitions and first one is very small)  In Windows I've found that the rest of the USB just "Unallocated" but I can't "Shrink".    How can I have entire flash back? "Format" doesn't help.


let’s say I make over $500k, the income tax in US is 37% I was just wondering, does that mean the 37% (which is $185k) is just lost?  So a person would give almost half their income to the government and that’s it,  it’s gone?  I’m a bit new to income tax especially in US and Google brings up information not relevant to my question.  Thanks.  EDIT: Okay I got what you’re saying, I’ve got enough information on this.


I'm considering taking a loan on my 401k in order to pay off and close 2 credit cards.  I have approximately 30 years until I consider retiring.  The amount of the loan will be $1700 which is less then 20% of my current 401k balance.  I will continue to put 9% of my paycheck into a Roth 401k, and my employer matches 9%.  The loan will be paid back at 3.25% (to myself) and does have $183 in fees.  There are 2 cards I will pay off and close if I follow through with this plan.  One card is 17.9% interest with roughly a $650 balance.  The other is 23% (ish) with roughly a $1,025 balance.  Both of these cards do have an annual fee associated with them, I used them to rebuild my credit and have a newer, lower interest, no fee card that I will keep active for emergencies.  Would it be advantageous for me to pay off these two credit cards and cancel them with a 401k loan?


I have downloaded the Ubuntu 14.04 ISO through Firefox, do I have to save it to a disk? Or how do I get it to just run? I have changed the repositories to [...]old-release[...] but I still can't get any update. When I run /etc/apt/sources.list I get a permission denied error.


There (is/are) usually a green channel and a red channel at the customs

Just wondering which of the following sentences are correct and why?     There is usually a green channel and a red channel at the customs.      There are usually a green channel and a red channel at the customs.   I saw the first sentence in a book, but not sure why using is is correct.