I am having a nice argument with my buddy about multiclassing. I am new to the game so there is a lot of things I don't know, he is quite versed though. Our argument is centered in the amount of LvL 1, LvL 2 and LvL 3 Spells I can have. As my character is LvL 4 Cleric and LvL 1 Warlock, I assume he is LvL 5 in total. So checking the Multiclass Spellcasting Table, it says he has access to:  4 LvL 1 spells, 3 LvL 2 Spells and 2 LvL 3 Spells.  Counting that Warlock Pact Magic allows the character to use the Warlock spell slots as Warlock Spells or Cleric Spells, he says that the LvL I have from the Warlock doesn't allows me to have the amount of spells I quoted above, because I am still a LvL 4 Cleric, so I can't use LvL 3 Spells, neither use a LvL 2 Spell as a LvL 3. So the amount of spells I have according to the multiclass table is the one of a LvL 4:  4 LvL 1 spells and 3 LvL 2 Spells  Our main problem is related to how we mix Warlock to the Multiclass table.

So I'm a new DM and one of my PC's who's a 1st-level warlock wants to multi-class into cleric. So he would essentially be a warlock 1/cleric 1.  Since the Warlock only has one 1st-level spell slot at 1st level while clerics have two at 1st level, do they stack, or do you just have two 1st-level spell slots? How exactly does this work?  Also, how would the number of cantrips change?


I'm trying to sort the /etc/passwd numerically by user id numbersb(third field) in ascending order and then send it to s4.  What command would I uses to do that? I'm on this for a while now.

Lets say I got two files with a common field.  I want to sort the first one based on a field (eg. a numeric field) found in this file... but I want this re-ordering to apply to the other file as well - through the common field.  To take an example -- completely grabbed out of thin air ;-) -- lets take the /etc/passwd and /etc/shadow:   /etc/passwd: (...) sshd:x:124:65534::/var/run/sshd:/usr/sbin/nologin sndiod:x:999:29::/var/lib/sndiod:/usr/sbin/nologin dictd:x:125:135:Dictd Server,,,:/var/lib/dictd:/bin/false postgres:x:126:136:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash (...)    /etc/shadow: (...) sshd:*:17055:0:99999:7::: sndiod:!:17055:::::: dictd:*:17055:0:99999:7::: postgres:*:17055:0:99999:7::: (...)   Sorting /etc/passwd numerically on UID is easy enough:  sort -n -t: -k3 /etc/passwd > pw  Which with the lines above yields:   /etc/passwd: (...) sshd:x:124:65534::/var/run/sshd:/usr/sbin/nologin dictd:x:125:135:Dictd Server,,,:/var/lib/dictd:/bin/false postgres:x:126:136:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash sndiod:x:999:29::/var/lib/sndiod:/usr/sbin/nologin (...)   However, /etc/shadow does not have a numeric UID-field I can sort after... It does however -- like /etc/passwd -- got a username-field...    So is there a way to re-order the lines in /etc/shadow so that the username-field had the same order as the username-field in the numerically sorted /etc/passwd?   Is there a command -- sort or something similar -- which can sort file A after some key in that file, and simultaneously sort file B on a common field shared by both files? Alternatively, is there a suitable two-step-process -- a command, a sed/AWK/Perl-script, or something -- that can use the sorted file A to re-order file B after their common field?


My \headmark looks as follow:     Chapter Chapternumber. Chapter-title   How can I replace the . with a - ?  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Masters/Doctoral Thesis  % LaTeX Template % Version 2.5 (27/8/17) % % This template was downloaded from: % http://www.LaTeXTemplates.com % % Version 2.x major modifications by: % Vel (vel@latextemplates.com) % % This template is based on a template by: % Steve Gunn (http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/) % Sunil Patel (http://www.sunilpatel.co.uk/thesis-template/) % % Template license: % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[ english, % ngerman for German ]{MastersDoctoralThesis} % The class file specifying the document structure \usepackage{blindtext} \begin{document} \chapter{Wombat} \blindtext[10] \end{document}

By default, the headings with scrrept, scrlayer-scrpage, and scrheadings are of the form "«number» «title»" in the headings for numbered chapters. I am wishing to change it to "Chapter «number». «title»" (i.e., add "Chapter" and the period). Moreover, the unnumbered chapters should have just "«title»" in the headings.  I read through several tex.se Q&A-pages and finally arrived at a bulky solution which goes great lengths to achieve that:  \documentclass[twoside=false]{scrreprt} \usepackage[automark,headsepline,footsepline,plainheadsepline,plainfootsepline]{scrlayer-scrpage} \usepackage{lipsum} \pagestyle{scrheadings} \lehead{}  \lohead{} \cehead{} \cohead{} \rehead{\normalfont\headmark} \rohead{\normalfont\headmark} \begin{document}  \addchap{Introduction} \lipsum[1-20]  \clearpage \let\oldchaptermark\chaptermark \let\oldaddchapmark\addchapmark \renewcommand{\chaptermark}[1]{\markboth{\chapapp\ \thechapter\autodot}{#1}} \renewcommand{\addchapmark}[1]{\markboth{#1}{#1}} \rehead{\normalfont\leftmark. \rightmark} \rohead{\normalfont\leftmark. \rightmark}  \chapter{The rise of the house of Usher} \lipsum[1-20]  \chapter{The fall of the house of Usher} \lipsum[1-20]  \clearpage \renewcommand{\chaptermark}{\oldchaptermark} \renewcommand{\addchapmark}{\oldaddchapmark} \rehead{\normalfont\leftmark} \rohead{\normalfont\leftmark}  \appendix \addchap{Bibliography} \lipsum[1-20] \end{document}   Is there some more automatic way in which all the additional commands could be issued in the preamble rather than inserted between \begin{document} and \end{document}?  An aside: In the main text, there should be no periods after chapter numbers or section numbers.


1. If I instantiate objects like this, no error occurs.  class A {};  int main () {     A a = A ();     A &b = a;     return 0; }    2. If I instantiate object this way, compiler reports error C2440: 'initializing' : cannot convert from 'A (__cdecl \*)(void)' to 'A &' when a's reference is copied to b.  class A { };  int main () {     A a();     A &b = a;     return 0; }   3. But if I add a constructor with parameters and pass in some argument(s) to this ctor during instantiation in the second way, there is no error!   class A { public:     A (int a) {} };  int main () {     A a(5);     A &b = a;     return 0; }   Can anyone please explain this?

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I'm trying to create a simple Space Invaders game in JavaFX. This is my first time so I have no idea how you properly do this. I'm trying to add collision detection, to remove a sprite if it's hit by a bullet.  All my sprites are rectangles with an imagePattern.  The enemies are 60 x 43, the bullet is 4 x 8. My idea was to just check if the bullet is within the translateX of a sprite, and if its the same Translate Y - its height. But for some reason this code doesn't work. It causes an Exception in thread "JavaFX Application Thread" java.lang.NullPointerException when a bullet hits a sprite.  if (game.lookup("#bullet") != null) {     for (Sprite sprite : enemies) {         if (game.lookup("#bullet").getTranslateX() >= sprite.getTranslateX() && game.lookup("#bullet").getTranslateX() <= sprite.getTranslateX() + 60 && game.lookup("#bullet").getTranslateY() == sprite.getTranslateY() - 43) {             System.out.println("HIT!");         }     } }   Some help would be much appreciated.  Note: I am sure this is not the most efficient way to go about it, but its the only idea I have.  The stack trace:  Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at Main$1.handle(Main.java:131) at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56) at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357) at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:514) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175) at java.base/java.lang.Thread.run(Thread.java:844)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


In the Star Trek: The Next Generation Episode The Best of Both Worlds Captain Picard is abducted by the Borg and altered to serve as Locutus. As a part of this, they attach a red laser to one of his implants. What is the point of this? It is never mentioned in the show and, similarly, it never appears to have been used as a weapon by Picard.   Does this laser serve a purpose?

I never saw a drone fire a weapon or anything where this laser guidance might have helped them. Out-of-universe it makes for a nice menacing effect when several drones step through fog, but I really see no point in these things in-universe. The laser doesn't seem to have any effect on humanoids, so it's definitively not a weapon.  So, what is it good for? Also, why do some drones lack one?


I'm working on some lyrics here, and I'm not sure what would be correct/best:     After the sun has shined its shine        After the sun has shone its shine   Google returns more results for the latter, but still I'm not completely sure. Seems like both are in fact correct?

Recently, I overhead a former professor of mine use the word shined, a word that makes me grammatically uncomfortable.  She used it as following: "Then, after we shined a light on the other ball, what happened?..."  My first question is: Is using shined mainstream, over what sounds better to my ear, shone?  If so, is there any historical flip-flopping between the two usages?  Secondly, if shined is in fact legit, can it be used transitively?  Saying something like,      The light shined all throughout the night.   while odd, doesn't sound as bad to my ear as,     He shined the light on the ball throughout the night.   The latter sounds quite bad to my ear.  Indeed, à propos the original question, can shone — the better sounding alternative to my ear — be used transitively?


I tried factory resetting a Samsung Galaxy S6.  To my surprise, it left Android 7.0 on it, and didn't reset it to Android 5, which is what was originally installed from the factory.  Is this normal?  Is there a way to make factory reset force the phone to return to the original factory ROM?  UPDATE  For those curious as to why I would want to return to the original factory ROM, it's because when I take photos (even after a Factory Reset), I sometimes get a "Server Error".  I'm thinking that perhaps a bad ROM update is causing this issue, as I've already had the camera replaced by Samsung.  So I was interested in returning to the original factory ROM, and then upgrading it again to the latest version.

I have upgraded my phone to Android 2.1. I need to reset my phone but I don't want to lose the upgrade. Is it possible to do this? How?


I'm running Kubuntu 14.04 and my trash folder won't accept any files larger than a text document. Yes, the trash is empty.  I've checked all the related threads here, as well as played with the size settings for the Trash folder in Dolphin, and I've spent a couple of hours on Google trying to find alternative solutions. All I've come up with so far is that this seems to be a somewhat Kubuntu-specific problem, and it's a real pain to resolve. Any ideas or should I just upgrade to v15.10 and hope for the best?

I'm on Kubuntu 11.04, and deleting in Krusader I get "Thrash has reached maximum size" even when I have 10M in ~/.local/share/Trash/files. So my question is why is that? How do I set the allowed size of the trash bin?


I've got no wifi with my newly installed Ubuntu dual booted with Windows.  I'm new to Linux, and so I'm looking for a straightforward way to fix it. Please guide me through steps needed to find and solve the problem. Thanks.  sudo lshw -class network  sudo lshw -class network  *-network                   description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: enp2s0    version: 10    serial: 08:62:66:dc:91:94    size: 10Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s    resources: irq:47 ioport:e000(size=256) memory:f7204000-f7204fff memory:f7200000-f7203fff *-network UNCLAIMED    description: Network controller    product: BCM43142 802.11b/g/n    vendor: Broadcom Corporation    physical id: 0    bus info: pci@0000:03:00.0    version: 01    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list    configuration: latency=0    resources: memory:f7100000-f7107fff   rfkill list all  rfkill list all 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Recently, I have been trying to learn about PHP and using/storing passwords securely.    I came across this post:   Which is marked as a duplicate of:    But that post has been closed due to reasons of moderation.  Shouldn't there be some kind of check in place to make sure this doesn't happen?  Or at least, should the post  still be marked as a duplicate since the question is supposedly a duplicate of a question that no longer exists?

Some questions are getting closed as duplicates - good, the system is working. Unfortunately, some are getting closed as duplicates of other questions which are already deleted. This leaves all 1-9,999 reputation users left scratching their heads when they try to view the duplicate. Even worse, imagine being the author of the question and having your question closed as a duplicate when the original question isn't accessible.  I think something is wrong. Today I undeleted a question (left it closed) since it was referenced in the close-reason for another question. Comments indicated that people were clearly irritated that they could not access the duplicate     [Comment] Ok, who thought it was a good idea to close this as duplicate of a deleted question, which most people cannot even see? For the record, I'm reopening - clearly there's enough interest in this question. – Kobi 14 hours ago   ---   [Comment] The PosibleDuplicate link is broken. Voting to reopen. – Rahul G 7 hours ago   ---   [Flag] Closed as duplicate of a deleted question, fail. Thanks for moderating. – {username removed} 14 hours ago   My undelete-action was short-lived, as a few users returned to delete the post again.  It certainly cannot be desirable to reference posts that the vast majority of users cannot even see, especially when the author of the redundant question cannot see (at the time of writing this, the author has a reputation of 18).  I'm not sure what the solution is to this, but I'd like to hear some ideas.  Questions  Question:  Duplicate of:


Guys when I attended a C quiz online, I came across a statement while(s++,6); where s is initialized to zero. I don't know what the while loop will exactly do when there is a comma operator in between. When I ran it on my gcc compiler it ran with no output. But when I changed the while condition as while(1,s++) it returned s value as 1. Can anyone tell me what is happening at that while.


I figured the matrix would look like this,   $$ A = \begin{bmatrix}      1 & 2 & 3 & \dots &  n \\     2 & 2 & 3 & \dots & n \\     3 & 3 & 3 & \dots & n \\     \vdots & \vdots & \vdots & \ddots &\vdots \\     n-1 & n-1 & n-1 & \dots & n \\     n & n & n & \dots & n      \end{bmatrix} $$  but I do not know how to tackle it. Reduced row echelon row doesn't seem to work here.

If $A$ is an $n \times n$ real matrix and       $$a_{ij}=\max(i,j)$$       for $i,j = 1,2,\dots,n$, calculate the determinant of $A$.   So, we know that   $$A=\begin{pmatrix} 1 & 2 & 3 & \dots & n\\  2 & 2 & 3 & \dots & n\\  3 & 3 & 3 & \dots & n\\  \vdots & \vdots & \vdots & \ddots  & \vdots\\   n& n & n & \dots & n \end{pmatrix}$$  but what do I do after?


When I trying to use vector iterator to template specialized class, in the template, I get an error C2146 in MSVS2012. Is it a compiler issue or something wrong with my code?  template <typename T> struct A { };  typedef A< int > Ai;  std::vector<   Ai   >::iterator;            // ok std::vector< A<int> >::iterator;            // ok  struct B {     std::vector<   Ai   >::iterator it1;    // ok     std::vector< A<int> >::iterator it2;    // ok };  template <typename T> struct C {     std::vector<  Ai  >::iterator it1;      // ok     std::vector< A<int> >::iterator it2;    // ok     std::vector< A<T> >::iterator it3;      // fail };

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Hope y'all doing great? I have a couple of questions   I got a 6-month visit visa in November (Expires May). I am using 2 months on my first visit which ends in January and will be back home shortly.   I would like to come back to the UK in April-June (Another 2 months) for basically the same purpose I got the 6months visit visa for (to visit family), would also like to attend events relating to my business industry/personal growth as well. (Remember my 6months visa would have expired by May so I have to renew to be able to travel April-June)  Is it advisable to apply for a 2-year visa or should I stick to renewal for 6 months?? (Remember I only used 2 months from my 6 months and never overstayed).  Secondly, does anyone know about the category called ''FAMILY OF A SETTLED PERSON VISA''? My parents are UK citizens but I am not and I am above age 18, is there any type of visa that allows me to join them long term that is not a visit visa? I have been seeing stuff about it online but the UK GOV website is a bit ambiguous about people over 18 so I wanted to ask if anyone knows about or has experienced it and how they went about it.  I await your response. Thanks

My friend and his wife visited UK during the year 2015. And they came back on time we want to know one information as they same couple want to visit UK again  For how many years or months can multiple entry visa can be given for a couple who have already visited UK?


If there are two 2D lines with rational slopes that intersect, must the intersection point have rational co-ordinates?  I'm having a hard time wrapping my head around this and not sure how you prove it?


Currently, I have accounts on a few different SE sites. Which is great- But I realized that I use one for work, and I want it separated from my personal accounts.  Is there a way that I can disassociate my Stack Overflow account from my other accounts? I understand if I do, I may lose my 100 point association bonus from Arqade, but that doesn't bother me all that much. I use Stack Overflow for learning purposes, not to have the most rep ever.

I want to disassociate an account from the rest of my associated accounts. How can I do that?  The information in  doesn't seem to be relevant anymore, since I can't find this thing     Click the "Clear All Associations" button on the bottom of the Accounts page on your profile.   Every time I add or remove an email or OpenID from one site it propagates to the entire network.


I have created a proof that$ 1 = -1$ but I know that this is impossible. Could someone help me find the flaw in this proof...  $i = \sqrt{-1}$    Given  $i^2 = -1$       Given  $i^4 =  1$       Given $i^8 =  1$       Given --------------------------All Common Knowledge Above  $i^4= i^8$  Take sqrt of both sides...  $i^2=i^4$  Take sqrt of both sides...  $i= i^2$  $i=-1$  $i^2= -1$ (sub for $i$)  $-1 \times -1$ (sub for $i^2$)  = $1$  $1=-1$  Thankyou all for helping me. I looked at the other questions and this question is not a duplicate. However, we all have one common error; we forgot +- when taking the square root of i^4 = i^2

Possible Duplicate:          I'm trying to understand the exact point of failure in the following reasoning:  \begin{equation*} 1 = \sqrt{1} = \sqrt{(-1)(-1)} = \sqrt{\sqrt{-1}^2\sqrt{-1}^2} = \sqrt{(\sqrt{-1}\sqrt{-1})^2} = \sqrt{-1}\sqrt{-1} = \sqrt{-1}^2 = -1. \end{equation*}  I've been previously told that the problem is due to square root not being a function in C; which I found totally unhelpful. Could someone please explain the problem here in simpler terms.  Edit:  Thank you all for your comments in trying to help me understand this. I finally do. Following is the explanation on my problems in understanding this, in case it'll be of any help to anyone else.  My problem was really due to using an incorrect definition of i: $i = \sqrt{-1}$. While the correct definition would be: $i^2 = -1$.  My incorrect definition led me reasoning, such as (which superficially seemed to give expected results. I see now that this is incorrect, too):  \begin{equation*} \sqrt{-9} = \sqrt{9 * (-1)} = \sqrt{\sqrt{9}^2 \sqrt{-1}^2} = \sqrt{(\sqrt{9} \sqrt{-1})^2} = \sqrt{9} \sqrt{-1} = 3i. \end{equation*}  Instead, had I used the correct definition of i:  \begin{equation*} {(xi)}^2 = x^2i^2 = -x^2 = -9, \\ x^2 = 9, \\ x = +- 3. \end{equation*}  Now, analyzing the equations in the original problem, I can see at least the following two errors:  1) In the third =, I'm relying on $-1 = {\sqrt{-1}}^2$, while I should be relying on: $-1 = (+-\sqrt{-1})^2$ which would of course give two different branches. Hmm.. on the second reading, this isn't really a problem, as even with the two separate branches, both of them will lead to the result in the next step.  2) In the fifth =, I'm relying on $\sqrt{i^4} = i^2$, which would be correct, if i was a non-negative number in R. But as i is the imaginary unit and in C: $\sqrt{i^4} = \sqrt{i} = +-(1/\sqrt{2})(1 + i)$.


I am using the following logic, I have two buttons in my activity 1 button sets flag to F and the other to C, the SOP statement in the below code prints correct if the value of flag each if its F it prints F else it prints C. But the If else statements I dont know what goes wrong, In each of the if else state I am trying the setText for TextView depending upon the condition if its F or C but everytime C is being called. Dont know why.     Bundle extras = getIntent().getExtras();     if (extras != null) {       flag = extras.getString("Flag");       System.out.println(flag);       if(flag == "F"){         do F       }       else{         do C       }     else{       do F + C     }

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


After trying to update my current edition through the terminal, I get these results among others: Ign:11 http://us.archive.ubuntu.com/ubuntu artful-updates InRelease Err:13 http://us.archive.ubuntu.com/ubuntu artful-updates Release 404 Not Found [IP: 91.189.91.39 80] E: The repository 'http://us.archive.ubuntu.com/ubuntu artful-updates Release' does not have a Release file.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I am a novice with software issues and so am asking for what may seem very basic help. I have Ubuntu 14.04 LTS on 32-bit. I managed to get a list of all that is on my boot, and each time I start my laptop, I get the message that I need to empty disk space in boot as I have 0 bytes space.  So, here is what I have:  $ ls /boot/ abi-3.13.0-40-generic     initrd.img-3.13.0-52-generic abi-3.13.0-43-generic         initrd.img-3.13.0-53-generic abi-3.13.0-44-generic         lost+found abi-3.13.0-45-generic         memtest86+.bin abi-3.13.0-48-generic         memtest86+.elf abi-3.13.0-49-generic         memtest86+_multiboot.bin abi-3.13.0-52-generic         System.map-3.13.0-40-generic abi-3.13.0-53-generic         System.map-3.13.0-43-generic config-3.13.0-40-generic      System.map-3.13.0-44-generic config-3.13.0-43-generic      System.map-3.13.0-45-generic config-3.13.0-44-generic      System.map-3.13.0-48-generic config-3.13.0-45-generic      System.map-3.13.0-49-generic config-3.13.0-48-generic      System.map-3.13.0-52-generic config-3.13.0-49-generic      System.map-3.13.0-53-generic config-3.13.0-52-generic      vmlinuz-3.13.0-40-generic config-3.13.0-53-generic      vmlinuz-3.13.0-43-generic grub                          vmlinuz-3.13.0-44-generic initrd.img-3.13.0-40-generic  vmlinuz-3.13.0-45-generic initrd.img-3.13.0-43-generic  vmlinuz-3.13.0-48-generic initrd.img-3.13.0-44-generic  vmlinuz-3.13.0-49-generic initrd.img-3.13.0-45-generic  vmlinuz-3.13.0-52-generic initrd.img-3.13.0-48-generic  vmlinuz-3.13.0-53-generic initrd.img-3.13.0-49-generic   What can be done next?

My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error:  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f.   I tried running apt-get install -f and this was the output(after saying yes on prompt)  (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device  No apport report written because the error message indicates a disk full error                                                                           dpkg-deb:    error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic   /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried running apt-get autoremove and it gives me the same error as apt-get upgrade.  When I run df, I get this for /boot:  /dev/sda1                    233191     230297         0 100% /boot   So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with:  $ dpkg -l linux-image-\* | grep ^ii ii  linux-image-2.6.38-13-server  2.6.38-13.52  Linux kernel image for version 2.6.38 on x86_64 ii  linux-image-3.0.0-13-server   3.0.0-13.22   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-14-server   3.0.0-14.23   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-15-server   3.0.0-15.26   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-16-server   3.0.0-16.29   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-17-server   3.0.0-17.30   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.2.0-24-generic  3.2.0-24.39   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-25-generic  3.2.0-25.40   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-26-generic  3.2.0-26.41   Linux kernel image for version 3.2.0  on 64 bit x86 SMP   When I try to remove the oldest with this:  $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be     installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   How can I free up or extend boot without messing up my installation?


I am having a lot of difficulty figuring out why I cannot calculate a 95% CI by hand with one set of data; but I can using the same process with a different set of data.  Drawing on OLS results; I am doing the following calculation:  beta ± 1.96 * standard error   Here are two sets of data in Python if you wanted to execute it yourself.  rng = np.random.RandomState(42) x = 10 * rng.rand(50) x2 = 10 * rng.rand(50) y = 2 * x - 1 + rng.randn(50)  X_1 = np.column_stack((np.repeat(1, len(x)), x, x2)) y_1 = np.vstack(y)  model = sm.OLS(y_1, X_1) res = model.fit() print(res.summary())  model result for x1: coef: 1.86, std err: 0.043, lower ci: 1.78, upper ci: 1.954   Calculate 95% CI by hand to replicate the result above:  lower: 1.86 - 1.96*0.043 = 1.77 ; correct upper: 1.86 + 1.96*0.043 = 1.94 ; correct   Now, do the same thing with different data.  y = np.array([10, 7, 2, 8, 10, 6, 2, 10, 8, 5]) x1 = np.array([2, 1, 2, 0, 1, 3, 11, 0, 5, 0]) x2 = np.array([5, 1, 0, 2, 0, 0, 0, 0, 12, 2])  y = np.vstack(y) X = np.column_stack((np.repeat(1, len(x1)), x1, x2))  model = sm.OLS(y, X) res = model.fit() print(res.summary())  model result for x1: coef: -0.52, std err: 0.265, lower ci: -1.15, upper ci: 0.10   Calculate 95% CI by hand to replicate the result above:  lower: -0.52 - 1.96*0.265 # -1.03 - not correct upper: -0.52 + 1.96*0.265 # 0 - not correct

I want to be able to calculate the confidence interval from the estimated coefficient and respective standard errors.  I have a linear regression model which can be summarized (in R):  summary(fit1)  Call: lm(formula = bwt ~ height + weight + parity, data = data)  Residuals:     Min      1Q  Median      3Q     Max  -66.913 -10.624   0.991  10.979  55.621   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 31.19217   13.56879   2.299   0.0217 *   height       1.24964    0.23083   5.414 7.48e-08 *** weight       0.06781    0.02823   2.402   0.0164 *   parity1     -1.83309    1.19838  -1.530   0.1264     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 17.9 on 1170 degrees of freedom Multiple R-squared:  0.04898,   Adjusted R-squared:  0.04654  F-statistic: 20.08 on 3 and 1170 DF,  p-value: 1.071e-12   With this model I can calculate the respective confidence intervals:  > confint(fit1)                   2.5 %     97.5 % (Intercept)  4.57029503 57.8140351 height       0.79676227  1.7025207 weight       0.01243198  0.1231932 parity1     -4.18429933  0.5181151   I would expect the intervals of the predictor height to be given by  $$ 1.24964 \pm (1.96*0.23083) = [0.7972132,1.702067] $$  where 1.24964 is the estimated value for the coefficient and 0.23083 is the standard error for this coefficient. The numbers are close but not quite the same.  What am I doing wrong?


Sherry:Q◇Q♧  Loren:7♡8◇  Board:10♤9♤2♤A♤3♤  Is this a split or does Sherry win and why?  Thanks Tammy

The table cards were A,K,K,8,3. All four suits were on the board. Player one had A,8. Player two had A,3.   Is this a split pot?


Is it possible to take incremental backup in MongoDB? if yes then how please guide me?

I was given the task to set up incremental backups for MongoDB replicaset, as start point, of course, I googled it and could not find anything on MongoDB docs, I did find however this  on Stack Overflow, which encouraged to develop my own solution as didn't find Tayra very active. I read about oplog and realized it was very easy to develop something to replay the log, but it turns out that I didn't have to as mongorestore does that for me. Now I have a working solution with bash scripts and it was quite easy, that's the reason I am asking here if there is any flaw in my logic, or maybe something that will bite me in the future. Below how I implemented that: Full backup procedure  lock writes on a secondary member db.fsyncLock()  Take snapshot  Record last position from oplog db.oplog.rs.find().sort({$natural:-1}).limit(1).next().ts   Unlock writes db.fsyncUnlock()   Incremental backup procedure  lock writes on a secondary member  Dump oplog from the recorded oplog position on full (or latest incremental ) backup: mongodump --host <secondary> -d local -c oplog.rs -o /mnt/mongo-test_backup/1      --query '{ "ts" : { $gt :  Timestamp(1437725201, 50) } }'   Record latest oplog position (same way as for full backups)  Unlock writes   Full backup restore procedure  stop all instances of mongod copy snapshot to data dir of the box which will be the primary, but make sure to exclude all local* and mongod.lock  this restore technique is called  Start primary reconfigure replicaset start secondaries without any data, let them perform the initial sync. Or copy the data from the new primary with fresh local database  Restore incremental backup When we created incremental backup it stored it like this: /mnt/mongo-test_backup/1/local/oplog.rs.bson /mnt/mongo-test_backup/1/local/oplog.rs.metadata.json  We're instered on oplog.rs.bson but we will have to rename it, so here are the steps:  change directory to the backup: cd /mnt/mongo-test_backup/1/local  delete the json file rm *.json  rename the bson file mv oplog.rs.bson oplog.bson  restore it:  mongorestore -h <primary> --port <port> --oplogReplay /mnt/mongo-test_backup/1/local    I have it all scripted, I may commit it on GitHub later. The question is if there is any flaw in the logic? I am a bit suspicious as the procedure is quite straight forward and still I couldn't find it documented anywhere.


String str = 'hellotest'; String qry = 'select id,Products__c from Account where End_Date__c > :system.today() and Start_Date__c < :system.today() and IsValid__c = true and Approved__c =' + '\'' + 'Yes' + '\'';         //order by createddate desc         if(!str.equals('NoPromo')){             qry = qry + ' and teststr__c = :str' ;             qry = qry + ' and Offer_Type__c ='  + '\'' + 'Promo Code Campaign' + '\'';         }             qry = qry + ' order by createddate desc';             system.debug(qry);                 for(Account pc: Database.Query(qry)){}   When i am trying to execute the above logic it is throwing the error      System.QueryException: unexpected token: '('   Can someone please help me where i am doing wrong here

As mentioned in , it's possible to use bind variables in dynamic SOQL queries.  This seems like a great way to avoid SOQL-injection, and to build a query string once but use it multiple times with different values in the variables.  I'm working on a method that returns a list of objects.  It accepts a class with multiple properties as its only parameter.  The properties of this class are used to filter the results to just the required records.  It will eventually be driven by a Visualforce component, which will be configured by querystring parameters in the URL.  I just ran into an issue where the query fails when I use dotted bind variables.  If I copy the constructed dynamic SOQL into a static query, it works fine.  This may be a bug, because in doing tests I found that :foo.bar would actually try to use local variable bar.  Here's one of my queries, which uses related custom objects.  I've stripped it down to just the part that's failing (wrapped for legibility):  result = Database.query('SELECT Name, Another_Object__r.Name,      Another_Object__r.Custom_Field__c      FROM Custom_Object__c       WHERE Another_Object__r.Custom_Field__c = :filter.deviceType');   The error reported is System.QueryException: Variable does not exist: filter.deviceType.  As mentioned above, the query works fine as static SOQL, just not dynamic:  result = [SELECT Name, Another_Object__r.Name, Another_Object__r.Custom_Field__c FROM Custom_Object__c WHERE Another_Object__r.Custom_Field__c = :filter.deviceType];   It also works in this case:  String deviceType = filter.deviceType; Database.query('SELECT Name, Another_Object__r.Name, Another_Object__r.Custom_Field__c FROM Custom_Object__c WHERE Another_Object__r.Custom_Field__c = :deviceType');   I haven't read about this being a known limitation.  I don't know if I should be using some other syntax/notation in the query -- the dotted notation appears correct.  Time to report a bug?  Thoughts on workarounds other than creating local variables to stand in for each member of the class?


I have a bunch of symlinks pointing to various directories. Each of the target directories happen to have a space in them, I have not created them like that, but they are being received as such via zip files.   This boils down to the following command not working, due to the spaces:  ll $(readlink <symlink name>)   And in general, I am looking for a way to more, tree, ls, and similar commands, using the symlink names such that these bash commands will operate on the target directory of the symlinks. It sounds odd but I failed finding existing answers so I'm not sure this is actually supported in bash.  Is there any elegant way to refer to symlinks in a way that bash would always simply dereference them to their targets, without relying on command-specific flags?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


When I pass vector to a function by address (vector &A) ,will I be able to use all the stl functions like lower_bound ,upper_bound on A . If yes , how to use them ?

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


whenever I try to run my program it is saying java.lang.NullPointerException         at largeNo.main(largeNo.java:15) which is the array push function. How do I fix this?      import java.util.*;     class chutes{     public Stack<Integer> chute  = new Stack<Integer>();     }       class largeNo{     public static void main(String[] args) {     Scanner s = new Scanner(System.in);     int m = s.nextInt();     int n = s.nextInt();     int largest =0;     String result = new String();     chutes[] c = new chutes[m];     for (int i= 0; i<m; i++ ) {         for (int j =0; j<n; j++ ) {                 c[i].chute.push(s.nextInt());         }     }      while(largest>=0){         largest = -1;         for (int i= 0;i<m ;i++ ) {             if(largest<c[i].chute.peek()){                 largest  = c[i].chute.peek();             }         }         for (int i= 0;i<m ;i++ ) {             if(largest==c[i].chute.peek()){                 result += Integer.toString(c[i].chute.pop());             }         }     }     System.out.println(result);    }   }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Can Microsoft Office 365 be installed on Ubuntu 16.04? if it can be installed, how is it done?  I appreciate any help I can get on this.

My school needs me to use office 365 but the online version is broken. Is it possible that I can get office 365 on ubuntu?   Leave a answer below.


In English, we have    7 days → a week 14/15 days → a fortnight 30/31 days → a month 365 days → a year   Is there any word for six months? Not half a year, or biannually (which is linked to a main event). I need a specific term that can be used without a ‘crutch’ word.   The closest I've found is the word semester. But that's not right either.   Like a concrete fact or a universal truth, e.g. the sun rises in the east. The expression half a year ago could refer to any time, in respect to the specified event.  What I would like is a term that fills this gap.     Every year has two _____   Half a year (in a sentence, e.g. either make a random sentence with half a year that is a present perfect, or consider any similar ones, such as biannually) is not a single-word and it is ambiguous.  Also, if that word doesn't exist in the English vocabulary, I would like to know if any other language has such a word.

Is there a word that means "a span of six months"? That is, I want to connote a stretch of time that lasts half a year, not an event that happens every six months.


This reads "Home" on esSO, ptSO, ruSO and rus. Strangely enough, the text on jaSO is in Japanese and it's the only site with translation.

Why does it say "Stack Overflow" instead of the site name?


I often read that salt is added 'to taste' - and I try to keep adding salt until my curries taste right.   However, on occasion my fingers are too big for my pallete, and the dish becomes overly salty. Is there a way to save a salty curry?

I made a mistake with my lastest batch of chicken soup, and it's too salty to eat. Is there any way to save it?


Recently we moved a post to meta that was on main. While on main it garnered several upvotes, including one from me. When it appeared the UV button didn't have the pressed look... so I pressed it and the count went up. Other users confirmed the behavior. This allows users to double upvote a post

was created on Server Fault, answered on Server Fault, I upvoted some of those answers on Server Fault, and then moved by consensus to Super User.  Now that the question is on Super User, I can upvote the same answers I previously upvoted on Server Fault.


I want to generate a list of basic monomial from x^0 to x^n (in particular, n=9) using Sympy. My quick solution is a simple list comprehension combined with Python's lambda function syntax:  import sympy as sym x = sym.symbols('x')  monomials = [lambda x: x**n for n in range(10)]   However, when I verify that monomials is constructed as expected, I find that:  print([f(x) for f in monomials]) >>> [x**9, x**9, x**9, x**9, x**9, x**9, x**9, x**9, x**9, x**9]   If I redefine monomials without using the lambda syntax, I get what I would otherwise expect:  monomials = [x**n for n in range(10)] print(monomials) >>> [1, x, x**2, x**3, x**4, x**5, x**6, x**7, x**8, x**9]   Why do I get this behavior?    Specs:   Python 3.5.1 Sympy 1.0   I am using the Anaconda 2.5.0 (64-bit) package manager.

I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question:


import java.sql.*;  public class MyClass {     public Connection LetConnect(){         Connection conn=null;         String url,username=null ,password=null;         url="jdbc:sqlserver://localhost\\SQLExpress;databaseName=Test";         username="sa";         password="******";           try {             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");             conn=DriverManager.getConnection(url,username,password);             System.out.println("Connected");         } catch (SQLException | ClassNotFoundException e){             e.printStackTrace();         }       return conn;     }      public static  void FetchData(){         Connection conn= LetConnect();         String sql = "select * from employee";         try {             Statement st=conn.createStatement();             ResultSet rs=st.executeQuery(sql);             while(rs.next()){                 System.out.println(rs.getString(1)+" "+rs.getString(2));             }         } catch (SQLException e){                 e.printStackTrace();         }     }      public static void main(String[] args){         MyClass.LetConnect();         MyClass.FetchData();     } }  I have the code above I keep getting this error error: non-static method LetConnect() cannot be referenced from a static context Connection conn= LetConnect(); not sure what it means

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


In vertical circular motion of a bob attached with a string, we say that the bob leaves the circular path when tension in the string becomes zero.    But even when tension becomes zero there's always a component of the bob's weight along the centre, then why does it leave the circular trajectory?

If a bob attached to a string is swinging in vertical circular motion, we say that the bob leaves the circular path when the tension in the string becomes zero, but even when tension becomes zero, there's always a component of the bob's weight towards the center of the circle. Why then does the bob leave the circular trajectory?


There are many questions regarding what it means to accelerate the constituents of an  atom towards to the speed of light, but I am not able to find any cogent article as to what the dynamics of the atom as a whole is.    For example, we know from relativity how a mass or body (made up of atoms) behaves as we approach light speed but that is not the question being asked.  The question is how is the individual atom's behavioural model (e.g. wave equation) changed when accelerated towards the speed of light.

My knowledge of atomic dynamics is a little superficial. But to my understanding an electron travels an orbital path around a nucleus of an atom. "correct?" So let's say that if a hydrogen atom were to travel "extremely close to" the speed of light (relative to some laboratory system). With the electron circling the proton approximately already traveling "extremely close to" the speed of light, how is it that the electron can circle the proton without exceeding light speed? (or does it continue to orbit at all?)


The first operation, addition, is abelian and so is multiplication. However, the next operation, exponentiation is not! Why is this? I understand that $2^3$ and $3^2$ are not equal but why do we suddenly lose this property after adding one other operation? Is there a property that we lose for tetration? Or Pentration (the next operation)? If so what property is lost at the nth operation?   Edit: I there anything lost when going from addition to multiplication?

We know that the addition and multiplication operators are both commutative, and the exponentiation operator is not.  My question is why.  As background there are plenty of mathematical schemes that can be used to define these operators. One of these is   where $H_0(a,b) = b+1$   (successor op) $H_1(a,b) = a+b$   (addition op) $H_2(a,b) = ab $   (multiplication op) $H_3(a,b) = a^b$   (exponentiation op) $H_4(a,b) = a\uparrow \uparrow b$   (tetration op: $a^{(a^{(...a)})}$ nested $b$ times ) etc.    Here it is not obvious to me why $H_1(a,b)=H_1(b,a)$ and $H_2(a,b)=H_2(b,a)$ but not $H_3(a,b)=H_3(b,a)$  Can anyone explain why this symmetry breaks, in a reasonably intuitive fashion?  Thanks.


Input:  Key1: value1 value2 value3 Key2: value1 value2 value3       value4 value5 Key3: value1 value2 value3       value4 value5 value6       value7 value8 Key4:  Key5: value1    Output:  Key1: value1 value2 value3 Key2: value1 value2 value3 value4 value5 Key3: value1 value2 value3 value4 value5 value6 value7 value8 Key4:  Key5: value1    How can I move indented lines to the end of the previous line?   The number of the spaces are constant in the indented lines. There are dozens of keys, each might have value indented in the next line. Values for a key might placed in multiple line

I need join 2 lines into one in stdout - replace new line AND 4x space with one space but new line without space don't touch  tcpdump -vvv ... -l | xyz   this is output:  2014-06-06 AAA     BBB 2014-06-06 CCC     DDD   but I need:   2014-06-06 AAA BBB 2014-06-06 CCC DDD


I am a newbie on Stack Overflow, trying to learn as much as possible, but this time I am stuck with a situation. I answered a question, where I got 25 reputation points, but the question is now removed by the author and those 25 points were also managed from my account. Why?

Today I lost 25 reputation points and I'm just curious why? Apparently it was an upvoted and accepted answer and I thought that questions with answers can't be deleted easily. Talking about the general case, when a question gets removed by a Moderator, I'd think it'd be unfair to lose the points, because one still took the time to answer the question and probably invested a significant amount of work.   Unfortunately I don't have a link to the question. All I have is this:        but the "link" to the question is not clickable.  A syntax error question is a bad example for "probably invested a significant amount of work", I know, but again, I'm just curious what happened and want to know, why one does loose the reputation points ?


I just installed Ubuntu for the first time and have no experience with linux. buntu@ubuntu:~$ sudo apt install gnome-tweaks Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package gnome-tweaks  I am trying to set up a bootable usb and I can't figure out why E: Unable to locate package gnome-tweaks keeps happening.

How do I get to the Universe Repository in supported versions of Ubuntu?


currently i'm making an attendence software but getting an runtime error here is my code:-  public class gui015 extends JFrame {  private JTextField[] tf; private JRadioButton a; private JRadioButton b; private JTextField t2; private JOptionPane op; private JButton c; public gui015() {     super("Attenedence");     setLayout(new FlowLayout());     t2 = new JTextField("Enter no. of students");     add(t2);     String s = t2.getText();     int a = Integer.parseInt(s);     tf = new JTextField[a];     while(a>0)     {         tf[a] = new JTextField();         add(tf[a]);     } }   and i'm getting an bunch of errors like this:-  Exception in thread "main" java.lang.NumberFormatException: For input string: "Enter no. of students"     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)     at java.lang.Integer.parseInt(Integer.java:580)     at java.lang.Integer.parseInt(Integer.java:615)     at tutorial.gui015.<init>(gui015.java:26)     at tutorial.gui016.main(gui016.java:7)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Why is the set of Rational numbers ,$\mathbb Q$, a countably finite set?  I think that - if we assign $n$ to a rational number, and $n+1$ to another rational number, Then I can surely find a rational number in between these two, which is not accounted for.  I using the definition - If a set is countably infinite, then each element of the set can be mapped to the set of natural numbers.  Another question - Is the cardinal product of countably infinite set of countably infinite sets uncountable or countable?

Can any one tell me how to prove that the set of rational numbers are countable? Prove give me a prove?  Thanks.


I have an object called Student, and it has studentName, studentId, studentAddress, etc. For the studentId, I have to generate random string consist of seven numeric charaters, eg.  studentId = getRandomId(); studentId = "1234567" <-- from the random generator.   And I have to make sure that there is no duplicate id.

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


I'm trying to generalise the number of spanning trees of a complete graph after deletion of any edge. That is, I'm trying to find $$ \tau (K_n - e)$$ For $n$ number of vertices and we are deleting one edge $e$.  So far, I know that $\tau(K_1) = 1$, $\tau(K_2) = 1$, $\tau(K_3) = 3$, $\tau(K_4) = 16$, and $\tau(K_5) = 125$.  My intuition is that it is equal to $\frac{\tau(K_n)}{2}$, because I tried this on $K_n$, and found $8$ spanning trees.

I need to know how many different spanning trees of $K_n \setminus e$ are there. $K_n \setminus e$ is a graph created by removing one of the edges of a full graph $K_n$.  Well as we all know the number of spanning trees of a full graph is $n^{n-2}$. But graphs fulfill the deletion-contraction rule, meaning that $\tau$ being the number of spanning trees fulfills the following equality.  $\tau(K_n)-\tau(K_n / e)=\tau(K_n \setminus e)$, where $K_n / e$ is a graph made by joining two vertices at the end of edge $e$ and connecting it to all neigbours of edges that lie on $e$. But $K_n / e$ is $K_{n-1}$, right? It has $n-1$ vertices and each an every one of them connects to each other. Therefore $\tau(K_n \setminus e)=n^{n-2}-(n-1)^{n-3}$, right?   Or does deletion contraction rule not apply to simple graphs?


I was using Ubuntu 12.04 perfectly on my desktop until last kernel update (3.2.0-51). After the update process and reboot of the system, the Unity interface didn't start. The only way to login in the system is by tty.  I have tried the last kernel versions available in the computer, but I can't use the graphical interface.  Until the text terminals is impossible to access the unity interface.  If I don't find a solution I will re-install the whole system.

I've  and rebooted my machine and now I get a black or blank screen.   How can I fix this?


From  on Meta SO I understand that the change in the value of question upvotes from +5 to +10 led to a bug resulting in some users not receiving the association bonuses. That question is now marked as .  But, I came across  who has over 200 reputation on SO but who has not been given the association bonuses on their other accounts.  So, I suppose this means that this bug has still not been resolved completely?

Is it still a thing? I don’t think I’ve ever seen it.   Ask Ubuntu: 264 Meta SE: 81 Linguistics: 56 Area 51: 51 (spooky!) Super User: 33 Unix & Linux: 3 Stack Overflow | User Experience | Bicyles | Video Production | Music: Theory & Practice | Retrocomputing | Genealogy & Family History | Joomla: 1


How can I find $f(0)$, $f'(0)$, and $f'(x)$ given that  $f(x+y)=f(x)+f(y)+x^2y+xy^2$  and  $\lim_{x\to0}\frac{f(x)}{x}=1$.


I was unsatisfied with how the # symbol looked in my document and had a look at . I tried to create a simple macro to replace   #   with  \texttt{\#}   I thought that a simple   \renewcommand{\#}{\texttt{\#}}   would do the trick. Instead, I'm getting a fatal (!) error.  [25] [26] [27] [28] [29] (c:/texlive/2017/texmf-dist/tex/latex/base/t1cmtt.fd) ! TeX capacity exceeded, sorry [grouping levels=255]. \hmode@bgroup ->\leavevmode \bgroup    !  ==> Fatal error occurred, no output PDF file produced! Transcript written on Thesis.log.   What is going wrong and why? How can I succesfully create the macro I need?

I'd like to "add to" an existing command by writing something like  \renewcommand{\somecommand}{\begin{something}\somecommand\end{something}}   but (not surprisingly) I get errors about being "too deeply nested".  Is there a way to take an existing command, add to it (by appending or prepending additional commands or text), and then have that "augmented" command replace the existing command?


I am reading the inputstream using readline() method and then trying to compare it.  The code is as follows:  //socket is defined before this InputStream is = socket.getInputStream();  br = new BufferedReader(new InputStreamReader(is));  Line = br.readLine();      if (Line  == "hey") {         Log.d("watsapp client tag", "message pushed !!");         Log.d("watsapp client tag", "" + Line);       }    else {          Log.d("watsapp client tag", "message not pushed");         Log.d("watsapp client tag", "" + Line);      }   The above code always executes the else part. although first value of the input stream is "hey" and second is not. So I am expecting in the logcat "message pushed !!" and "message not pushed" instead I get both "message not pushed"  05-31 14:46:14.309    6138-6151/? D/watsapp client tag﹕ message not pushed 05-31 14:46:14.309    6138-6151/? D/watsapp client tag﹕ hey 05-31 14:46:14.339    6138-6151/? D/watsapp client tag﹕ message not pushed 05-31 14:46:14.339    6138-6151/? D/watsapp client tag﹕ <Messageadded:1112/>   Please can tell what is going wrong at line if (Line  == "hey"). Thanks!

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


The explosion how it is orange on the inside then on the edge it fades to reddish orange

Ok so I got as far as getting the colors I want, and making them gradient. Now my question is how do I get the colors to wrap around a circle mesh like the rings around a planet? Im guessing it has something to do with mapping?


Does anyone know of a bash or similar script that will pull stats from a Linux server and display them on a centralized web page or send a report via email every "x" hours?  I've found services that offer something close but they are cost prohibitive and missing some of the stats I'd want and some functions just don't work, etc.  The idea would be to pull: - CPU load - RAM and SWAP - Disk used / free - TX and RX for a given time period (year to date, month, week and day) - Active processes - IPs attempting login (failures from secure log on my CentOS boxes)  I'd like to pull the reports to a central server and display them on a web page but having the reports emailed on a timed basis would be better than nothing.

So, who remembers the whole "Pakistan kills YouTube" debacle from February last year? Here's an article on the topic to refresh your memory:    The gist of the story is that Pakistan intended to block YouTube for their national network. They tried to accomplish this by advertising routing information with a higher priority than YouTube's own information, and which mapped YouTube's IP addresses into their network. This route advertisement propagated onto the internet, causing every server in the world to think that the way to get to YouTube was through Pakistan.  My question is: if something like that can happen accidentally through incompetence, could a malicious party do this deliberately? What safeguards are in place to prevent an attack like this? If Pakistan can do this to YouTube by accident, why can't Iran do this to Twitter on purpose?


I am trying to do a live search from database using jquery, ajax and php. After getting result I want to set value of input field with selected option from result. Code returns live search result but did not set value of selected option to input field.      <input type="text" id="search" placeholder="Search" />

               <?php   $q = $_POST['search'];   $con = mysqli_connect("localhost", "root", "", "testing");   $query = "select name from test where name like '%$q%';";   $result = mysqli_query($con, $query);    while($row = mysqli_fetch_array($result, MYSQLI_ASSOC))   {     $name = $row['name'];     echo '
'.$name.'
';   } ?>

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


I have this code:  length = 0; count = 0;      wchar_t *pEnd;     float grade = 0.0;     FILE *file4 = fopen("Grades.txt", "r");     if (file4 == NULL) throw MyExceptions();     fseek(file4, 0 ,SEEK_END);     size = ftell(file4);     fseek(file4, 0, SEEK_SET);          wchar_t wCharField4[size];     while(fgetws(wCharField4, size, file4))     {          wchar_t *tmpCharField1 = wCharField4;                                 pwc = wcstok (tmpCharField1,L",\n");                 length = wcslen(pwc);         CustomString *tmpStudentCode = new CustomString(pwc, length);         if (!(this->FindStudentOnVector(*tmpStudentCode))) throw MyExceptions();         studentCode = tmpStudentCode;         while (true)         {                          pwc = wcstok (NULL,L",\n");            if (pwc == NULL) break;             length = wcslen(pwc);            if (count == 0){                CustomString *tmpCourseCode = new CustomString(pwc, length);                courseCode = tmpCourseCode;            }            else if (count == 1){                grade = wcstof(pwc, &pEnd);                                     }                         count++;                        }       /*  if (!(this->FindStudentOnVector(*studentCode))) throw MyExceptions();         else if (!(this->FindCourseOnVector(*courseCode))) throw MyExceptions();         auto course = this->GetCourseFromVector(*courseCode);         auto student = this->GetStudentFromVector(*studentCode);           // map<Student, map<Course, float>> &StudentMap;         //map<Course, grade> tmpMap;         //tmpMap[course] = grade;         //this->StudentMap[student] = tmpMap;         course->setGrade(grade);           */         count = 0;         length = 0;     }      The file I am reading is something like this   SR000001,ICE1-4001,4.7 SR000001,ICE1-5001,4.7 SR000001,P1-1030,0.4   When it comes to the first line it reads everything ok, but when it goes to 4.7 it reads it right, which means the intruction pwc = wcstok (NULL,L",\n"); has the right value(pwc = L"4.7") and then I am trying to make it float with the grade = wcstof(pwc, &pEnd);  instruction. Although grade = 4.699991 instead of 4.7. Everything I tried I can't get the 4.7 and always I get 4.66691.Any suggestion?  Netbeans, MINGW-64,Windows 10 prof

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have some 70,000 files (basically duplicates) most of which match a name pattern like name(1).ext, name(2).ext .... name(10).ext. However among these files there are others named name (xwz).ext.   Now what I want to do is finding all the first type files and move all of them to a destination folder; I looked to several answers on superuser and I manage to do the following:  first I used the find command to find the files this way:  find ~/sourcedir -name "*([0-9]).*" -o -name "*([0-9][0-9]).*"   which retrieve all the files I want (I printed them on a file and got more than 73,000 files); then I tried to pass them to the Move command this way:  find ~/sourcedir -name "*([0-9]).*" -o -name "*([0-9][0-9]).*" -type f -exec mv {} ~/destinationdir \;   however doing that, just one file is moved to destination (the last one in the list) or none ; what's wrong here? why can't I move all the files in destination dir ?  yet, if I use only one option in the find command, say:  find ~/sourcedir -name "*([0-9]).*"    and then do the -execmv it works, but not if use both options;   indeed it looks like it's processing just the second option (as the only moved file is the one which match the second option); how can I pass all the files matching either the first or the second option to 'move'?

Why in Linux (Debian 8)  touch 1.cpp 1.h find . -name "*.cpp" -o -name "*.h" -exec echo {} \;   outputs only 1.h while  find . -name "*.cpp" -o -name "*.h"   outputs both? Is it a bug or feature?


How can I prove that the set of all vector spaces doesn't exist? (In other words, if I gather all vector spaces, then it cannot be a set)

According to ,  The collection of all algebraic objects of a given type will usually be a proper class. Examples include the class of all groups, the class of all vector spaces, and many others. In category theory, a category whose collection of objects forms a proper class (or whose collection of morphisms forms a proper class) is called a large category.  I am aware of Russell's Paradox, which explains why not everything is a set, but how can we show the collection of all groups is a proper class?


I purchased a new hard drive and I want to install Ubuntu 16 on it. I do not want to dual boot with windows I just want to install Ubuntu. I already have a boot CD with Ubuntu on it. When I tried to use the boot disk and install Ubuntu on my new hard drive it didn't work. I hooked up the new hard drive to my windows computer and I can see that all the space is still unallocated. I thought the install would partition the drive as needed. Do I need to partition the new drive myself for an Ubuntu install and if so how? I have installed Ubuntu before on an old Windows drive and it worked fine. It just erased everything and did the install.   Also, I have an Intel i7 processor and the iso says it's for AMD. I thought that it should still work but maybe that's a factor.   I know that there are similar question but they don't seem to address the particular issue I am having:        And i have already read .  If that had solved my issue i wouldn't be asking the question.  NOTE: When I tried to intall ubuntu I used the boot CD and selected install. Then it displayed the image attached and was stuck there for over 24 hours. I ended up just shutting it of.

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


One of the most powerful productivity tools I use on Chrome is . However, I was wondering how I can do the same thing on Chrome for Android? I went through the settings on Chrome for Android, but understandably it doesn't have that feature. Ideas?

Call me dumb, but, I don't see an obvious way to do this.   I want to add duckduckgo.com as the main search engine in Google Chrome for Android (beta, stable...)


A dilettante question here.  Let's say we have N points and distances between them. All distances are non-zero and are defined for all pairs.  What should be the dimensionality of space where all points can be properly placed, given the distances between them?  I think there are two subquestions here: (1) what should be the dimensionality in a general case, i.e. given arbitrary distances? and (2) how can dimensionality be reduced in specific cases, i.e. with specific constant distances? I'm more interested in (1). So:  For 2 points the 1-dimensional space is sufficient.  For 3 points it would be a triangle in the 2-dimensional space.  However the 4-point case already seems complicated to me, since (intuitively) the 3-dimensional space is not sufficient for placing 4 points. We can form 2 triangles with a shared side, meaning that the distance between the two "free-hanging" vertices can not have an arbitrary distance between them. If this is correct, does it mean the 4-dimensional space would be sufficient?  And finally, what about N number of points with arbitrary distances between them?

Suppose you're given $N$ points along with an $N\times N$ matrix $D$ with entries $d_{ij}$ giving the distances between the points (assume that the $d_{ij}$ satisfy the usual requirements of a distance, i.e., $d_{ii}=0$, $d_{ij}=d_{ji}$, and $d_{ij} \leq d_{ik} + d_{jk}$).  From this information alone, can you determine what's the minimum dimension of an Euclidean space (i.e., what's the minimum $n$ in $\mathbb{R}^n$) that can hold these points?  In other words, what's the minimum $n$ such that there exist $N$ points in $\mathbb{R}^n$ with distances as given in the matrix $D$?


Lest say I mount a usb drive to /mnt and next I run this...  mount --bind /mnt /tmp/test.d   It's a successful bind, but now when I run lsblk only the bind point shows.  How can I get all bound and original mount points listed?  When I use findmnt, it shows both, but it doesn't tell me which one is the original mount point. How can I learn this?

Rather than using mount | grep, I'd like to use mount -l -t bind, but that doesn't work, and -t none shows all mounts.


I have an android phone running android 10 and i want to set ADM as default downloader to download files from chrome or any other browser is there a way to do the same , by android settings or adm settings My device is rooted using Magisk

I have installed  (ADM), but when I try downloading a file from Chrome, it downloads the file with its Chrome download manager.  How to set-up ADM to intercept the download link on Chrome?


I have tried uunetbootin and mkusb, to try to install Ubuntu 18.0.3 onto a usb, as an OS, not as an install disk.  With uunetbootin, it just over-writes the Ubuntu on my laptop, and installs an 'install' disk onto the usb, even when i select only the usb.  With mkusb, it just freezes when I choose the usb as the target disk to install to, with persistence, and choose the live install dvd of 18.04.3 in the dvd drive as the source disk.  The only way I have been able to do it, is by locking the hard-drive in the bios (intentionally entering the wrong password on start-up), and then F12 booting from the Install DVD. Then when Ubuntu loads, clicking on install, and choosing the usb as the target device.  Ubuntu gives an error message of being unable to write/close the hard-drive, which I just click 'ignore', and after 3 times of this message, it installs a perfect OS with persistence onto the usb.  Works for me on a Dell laptop, but surely there must be a easier,simpler way ??  Thanks,  vedaal

I executed a "complete" Ubuntu installation on my USB stick - not burning a persistent LiveCD onto it, but instead using 2 USB sticks, one containing the LiveCD and the other as the destination (the bootloader was also installed on the destination stick).  Now, during the installation, I noticed that the wizard configures some hardware-related elements. Does this mean that such installations are limited to run on the same machine as where the install wizard is executed? If yes, 1) what will happen if I take this stick elsewhere and try booting it on another hardware, and 2) is there a way to overcome that, so I can both avoid LiveCD+persistent (because persistent space is limited), and have a universal installation?


Is it possible to modify the version of Android installed on my Galaxy Tab S5e SM-T727U? Currently it is running android 10 Baseband no. t727uueu1ctl2, but I would really prefer it to be running say the Galaxy 10 or 11 version of Android 11. I would prefer this because the UI on a number of apps I use frequently on my tablet are absolutely horrendous because the way the software is designed to adjust or adapt to use on a tablet.

I own a MicroMax A100. I want to install the latest version of a different ROM (Samsung or Nexus).  Is it possible? If so, can you tell me how?  If not, can I install a ROM made for a different device, but from the same manufacturer? For example, could I install a ROM for the MicroMax A110, which is the successor of A100?


I've learned that I should use Object(instance) for using instance field in static method.  For example:  INSTANCE FIELD(==speed)   that is declared in public class Car, should be used through Object in static method (ex. 'public static void main(String[] args) )  like this.   Car myCar = new Car();  myCar.speed = 60;    So, the reason I should use object is because static method is located in CLASS and for being shared to objects, but on the other hand, instance field is just Frame that is not substance?  For using this instance field in static method, do I have to make the instance that is called 'object'?  In other words, is this process right?:  instance field -> OBJECT( substantialization)  -> static method.    I'm wondering what I understood

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


I am using auto-py-to-exe to convert my code to exe When a program(~~~.exe) is already executed as shown below, is there a way to prevent duplicate execution of the program? I want to prevent the .exe file from being executed again. -----code example------ import time  a = 0 while a < 10:     a += 1     time.sleep(10)     print('wait') print('cmpl')

Is there a Pythonic way to have only one instance of a program running?   The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?    (Take into consideration that program is expected to fail sometimes, i.e. segfault - so things like "lock file" won't work)


Windows 8.1 on a tablet with 1 GB RAM and a total of 16 GB memory!  Windows OS and a recovery partition occupies about 13-14 GB. So the space remaining for apps, downloads etc. is very limited.  So my question is: Is it possible to wipe the entire memory and install Ubuntu on this tablet? It has a Intel Atom Z3735G processor.  Regards  Miniisar

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


String s1 = new String("anil");     String s2 = s1.toUpperCase();     String s3 = s1.toLowerCase();     System.out.println(s1 == s2);     System.out.println(s1 == s3);   if string object created in heap then both are false.But it gives false,true.

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


I am looking for a Mathematica package that can manipulate tensors for supergravity, string theory or M-theory. I am particularly looking for a package that can do spinor and Clifford algebra computations. Also, I would like this package to be able to do wedge and hodge dual, and other computation relating to forms. Can anyone suggest a specific one? I looked for atlas2, but it seems I have to pay to use it without a trial version.

Already the early papers on supergravity were written using computer algebra software to do some calculations. What modern packages do people normally use for doing such calculations? Of course Mathematica and presumable a lot of other programs can be made to do such calculations, I am wondering if there are special packages or tutorials how to do such calculations in them.


I've just come across Krasinsky and Brumberg's  that claims, from an analysis of radiometric measurements,  that the astronomical unit (earth-sun distance) is increasing at the rate:  $$\frac{d}{dt}AU = 15 \pm 4 \ m/yr.$$  If one assumes that the Solar system is expanding with the Universe then the Earth-Sun distance is given by:  $$R = R_0 \ a(t),$$  where $R_0$ is the present Earth-Sun distance and $a(t)$ is the scale factor.  From the definition of the Hubble parameter we have:  $$\frac{da/dt}{a} = H.$$  Therefore  $$dR = R_0 da$$  $$dR = R_0 \ a \ H \ dt$$  At the present time $H=H_0$ and $a=1$ so that:  $$dR/dt = R_0 H_0.$$  If I use $R_0=1.49\times10^{11}m$, $H_0=1/13.77\times10^9 yr^{-1}$ and $dt=1yr$ I find:  $$dR/dt = 1.49\times10^{11} \cdot (1/13.77\times10^9)$$  $$dR/dt = 10.8 \ m/yr.$$  Thus the rate of increase of the AU unit might well be explained if the Solar system is expanding like the Universe.  PS Krasinsky seems to dismiss the possibility that his results are explained by cosmic expansion because he somehow derives the rate $dR/dt = 1 \ km/yr$ under such an hypothesis. I can't see how he got that result.

The Hubble constant, which roughly gauges the extent to which space is being stretched, can be determined from astronomical measurements of galactic velocities (via redshifts) and positions (via standard candles) relative to us. Recently a value of 67.80 ± 0.77 (km/s)/Mpc was published. On the scale of 1 A.U. the value is small, but not infinitesimal by any means (I did the calculation a few months ago, and I think it came out to about 10 meters / year / A.U.). So, can you conceive of a measurement of the Hubble constant that does not rely on any extra-galactic observations?  I ask because, whatever the nature of the expansion described by the Hubble constant, it seems to be completely absent from sub-galactic scales. It is as though the energy of gravitational binding (planets), or for that matter electromagnetic binding (atoms) makes matter completely immune from the expansion of space. The basis for this claim is that if space were also pulling atoms apart, I would naively assume we should be able to measure this effect through modern spectroscopy. Given that we are told the majority of the universe is dark energy, responsible for accelerating the expansion, I wonder, how does this expansion manifest itself locally?   Any thoughts would be appreciated.


I am using the maven assembly plugin to build a single JAR but I'm getting this error after running the following  java -jar target/pdfbox-printing-1.0-SNAPSHOT-jar-with-dependencies.jar   the error is   Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider   this is how i compile the JAR  mvn clean compile assembly:single   here is my pom.xml  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">   <modelVersion>4.0.0</modelVersion>   <groupId>com.company.printing</groupId>   <artifactId>pdfbox-printing</artifactId>   <packaging>jar</packaging>   <version>1.0-SNAPSHOT</version>   <name>pdfbox-printing</name>   <url>http://maven.apache.org</url>   <dependencies>     <dependency>       <groupId>junit</groupId>       <artifactId>junit</artifactId>       <version>3.8.1</version>       <scope>test</scope>     </dependency>     <dependency>       <groupId>org.apache.pdfbox</groupId>       <artifactId>pdfbox</artifactId>       <version>2.0.0</version>     </dependency>   </dependencies>   <build>     <plugins>       <plugin>         <artifactId>maven-assembly-plugin</artifactId>         <executions>           <execution>             <phase>package</phase>             <goals>               <goal>single</goal>             </goals>           </execution>         </executions>         <configuration>           <archive>             <manifest>               <mainClass>com.company.printing.App</mainClass>             </manifest>           </archive>           <descriptorRefs>             <descriptorRef>jar-with-dependencies</descriptorRef>           </descriptorRefs>         </configuration>       </plugin>     </plugins>   </build> </project>   i am actually trying to build a project that uses apache pdfbox. and i thought the maven assembly plugin will bundle all the dependencies in one JAR but why am i getting this error if its true.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


EDIT about duplicate This question is not a duplicate of  as suggested. Contrary to this question, compilation does not fail. Furthermore, in the indicated post, the accepted answer states "I also don't know why it doesn't work." which is actually the question I would like an answer to. Why does the MWE does not plot the first point? EDIT: Removing the line restrict y to domain=1E-5:1E4 solves the problem but I would like to understand why. MWE \documentclass[border=5pt]{standalone}  \usepackage{pgfplots} % To produce graphs within tikz \pgfplotsset{compat=newest}  \begin{document}          \begin{tikzpicture}                  \begin{axis}[             xmin=-0,             xmax=7,             ymode=log,             restrict y to domain=1E-5:1E4,             ymin=1E-5,             ymax=1E4]                          \addplot coordinates {(0,1E-5) (3,1E1) (7,1E4)};                              \end{axis}              \end{tikzpicture}  \end{document}

I'm trying to plot data with a logarithmic y-axis and restricting the y-data to a specified domain, but compilation fails for a reason I don't understand. This is the code:  \documentclass{standalone} \usepackage{pgfplots} \begin{document}% \begin{tikzpicture} \begin{axis}[ymode=log, restrict y to domain=1:6] \addplot coordinates {(0, 1.1e1) (1, 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)}; \end{axis} \end{tikzpicture} \end{document}   Running it results in an error message:  ! Missing number, treated as zero. <to be read again>                     i l.6 ..., 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)};   According to the pgfplots manual for version 1.5.1 (29 December 2011), page 272 (about restrict x/y/z to domain), For logarithmic axes, min and max are logs of the respective values. If I disable either the logarithmic y-axis or the domain-restriction, the code runs successfully and output is as expected (but not as desired).  Software versions:   pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2012.5.30) pgfplots 2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f )  tikz 2010/10/13 v2.10 (rcs-revision 1.76).   What's going on? What am I doing wrong? Or is this a bug?


If someone has come up to you, and just asks you directly to compute  $$ \frac{1}{0} $$  Would we say that no solution exists or that it equals infinity?

I came up some definitions I have sort of difficulty to distinguish. In parentheses are my questions.   $\dfrac {x}{0}$ is Impossible (  If it's impossible it can't have neither infinite solutions or even one. Nevertheless, both $1.$ and $2.$ are divided by zero, but only $2. $ has infinite solutions so as $1.$ has none solution, how and why ?) $\dfrac {0}{0}$ is Undefined and has infinite solutions. (How come one be Undefined and yet has infinite solutions ?) $\dfrac {0}{x}$ and $x \ne 0$, it's okay for me, no problem, but if someone else wants to add something about it, feel free to do it.


I try to change ip_forward from 0 to 1 but fail, even with root permission in Xubuntu 11.10. I don't have such similar problem while using Ubuntu 11.10  chiaki@chiaki:~$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward  bash: /proc/sys/net/ipv4/ip_forward: Permission denied   any idea?

I have a small question regarding using sudo with output redirect >. To enable IP forwrding, someone can use the command:  echo 1 > /proc/sys/net/ipv4/ip_forward   Executing this command will give permission denied as it requires root privileges. However, executing the same command with sudo gives also permission denied error! It seems that output redirect > does not inherit the permissions of the preceding command echo. Is this right?  As a workaround I do:  echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward   Is this the best way to do it? Am I missing something?  Please, note that this is an example and it applies to all commands that use output redirect.


I recently purchased a cloud VPS service - CENTOS 7.  I've configured my website everything on that front is fine and well, however I noticed email isn't always being received.  I believe the emails are being sent out using PHP mail function - which defaults to using sendmail.  In the /var/log/maillog I can see the following:  Sep 10 21:59:01 mail sendmail[2615]: u8AKx0ZK002614: to=root, ctladdr=<apache@mywebsitedomain.co.uk> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=41036, dsn=2.0.0, stat=Sent Sep 10 22:03:16 mail sendmail[2656]: u8AL3G7U002656: from=apache, size=10690, class=0, nrcpts=1, msgid=<015be58bc4d8990a25ba7895538ea4db@mywebsitedomain.co.uk>, relay=apache@localhost Sep 10 22:03:16 mail sendmail[2657]: u8AL3G7h002657: from=<apache@mywebsitedomain.co.uk>, size=10783, class=0, nrcpts=1, msgid=<015be58bc4d8990a25ba7895538ea4db@mywebsitedomain.co.uk>, proto=ESMTP, daemon=MTA, relay=mywebsitedomain.co.uk [127.0.0.1] Sep 10 22:03:16 mail sendmail[2656]: u8AL3G7U002656: to=info@mywebsitedomain.co.uk, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=40690, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u8AL3G7h002657 Message accepted for delivery) Sep 10 22:03:16 mail sendmail[2658]: u8AL3G7h002657: to=root, ctladdr=<apache@mywebsitedomain.co.uk> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=40996, dsn=2.0.0, stat=Sent Sep 10 22:03:16 mail sendmail[2660]: u8AL3GQp002660: from=apache, size=10914, class=0, nrcpts=1, msgid=<d148a9c441d201d8a24c64c517050ede@mywebsitedomain.co.uk>, relay=apache@localhost Sep 10 22:03:16 mail sendmail[2661]: u8AL3GB4002661: from=<apache@mywebsitedomain.co.uk>, size=11007, class=0, nrcpts=1, msgid=<d148a9c441d201d8a24c64c517050ede@mywebsitedomain.co.uk>, proto=ESMTP, daemon=MTA, relay=mywebsitedomain.co.uk [127.0.0.1] Sep 10 22:03:16 mail sendmail[2660]: u8AL3GQp002660: to=mypersonalemail@googlemail.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=40914, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u8AL3GB4002661 Message accepted for delivery) Sep 10 22:03:16 mail sendmail[2663]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128 Sep 10 22:03:17 mail sendmail[2663]: u8AL3GB4002661: to=<mypersonalemail@googlemail.com>, ctladdr=<apache@mywebsitedomain.co.uk> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=131007, relay=gmail-smtp-in.l.google.com. [64.233.166.26], dsn=2.0.0, stat=Sent (OK 1473541397 f23si8646501wmh.115 - gsmtp)   The email is successfully received on my personal Google email address, but the other order confirmation isn't received on the business email side (which is hosted by Google Apps).  I can see that in the email source (using a spam tester website).  The following looks wrong:  envelope-from=apache@mywebsitedomain.co.uk; Return-Path: apache@mywebsitedomain.co.uk   Could the above be the reason I am not receiving emails or am I missing the plot here?  Edit  I must also add, the website has not had its DNS record updated yet to point to the new server. I am currently testing using a hosts file and have updated the SPF record to allow the new server to send emails by using the include ip4 markup.

This is a  about avoiding outgoing mail being classified as spam.   Also related:                    I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail.  I'm trying to send emails through my ruby-on-rails application. The mails are all written in swedish (if that does make a difference?). I don't know why they keep getting marked as spam.  Are there any things that I can do to minimize the risk?


I want to launch applications like the web browser using the terminal. What commands do I use?

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?


I am new to python and pyqqis.  I do not have the methods defined in initGUI  how do I do?  layers = self.iface.legendInterface().layers() layer_list = [] for layer in layers:     layer_list.append(layer.name()) self.dlg.comboBox.addItems(layer_list)  selectedLayerIndex = self.dlg.comboBox.currentIndex() selectedLayer = layers[selectedLayerIndex] fields = selectedLayer.pendingFields() fieldnames = [field.name() for field in fields] self.dlg.comboBox_2.addItems(fieldnames)   The problem is, that in second combobox there are fields from first on layerlist layer, not the selected one.

I'm new to pyqgis and I'm tryig to make a combobox with list of fields (from layer also selected in combobox).      layers = self.iface.legendInterface().layers()     layer_list = []     for layer in layers:         layer_list.append(layer.name())     self.dlg.comboBox.addItems(layer_list)       selectedLayerIndex = self.dlg.comboBox.currentIndex()     selectedLayer = layers[selectedLayerIndex]     fields = selectedLayer.pendingFields()     fieldnames = [field.name() for field in fields]     self.dlg.comboBox_2.addItems(fieldnames)   The problem is, that in second combobox there are fields from first on layerlist layer, not the selected one.


I have installed the , which features external map layers in QGIS. Quoting the official page:     OpenStreetMap, Google Maps, Bing Maps layers and more   In QGIS, it seems that the plugin is well installed:    However, no new items were added to the plugin menu:    Any idea how to start the plugin? I have tried restarting QGIS and reinstalling the plugin several times, with no success.

Although I have installed the OpenLayers plugin in QGIS 2.4, I cannot see it in the list when I click on Plugins.    Does anyone else have this issue?


First of all I am a BIG noob at blender but not at python. I want to maker some python games so I thought that blender would be great for this.   I am half way through making my simple game where you move a block around and now I want to make it so when you press the E key, a block appears in front of the cube.  Here is my code so far which I found on-line:  import bpy  bpy.ops.object.add(type='MESH') ob = bpy.context.object me = ob.data   me.from_pydata(verts, [], faces) me.update()   It inserts a mesh at some random coordinates. Does anyonee know how to make it insert a cube at some set coordinates or just simplify my code?  I apologise if my terminology isn't correct but I am new to all of this.

I plan on building a game where enemies are randomly generated throughout the game. I plan on using an empty to run a Python script where it will add a predefined object at a given position (using random.randint to place them randomly around the map).  Is there a specific Python command where I can say something like "Create this object at this given x,y,z position"?  If so, can you please tell me what it is and how to use it?  Also, what is the difference between a Module and a Script in the Python controller?  Thanks so much for your help!  Alternatively, is there a Python function that sets an object's X,Y,Z coordinates?  If so, the empty can jump around randomly dropping enemies off at it's position.


Is there a difference in meaning between these two sentences below?  All of them do not like cheese. None of them like cheese.  I've been told that (1) would "open up" for the discussion that all of them do not like cheese, but some of them like cheese. All these years I have understood that both sentences mean the same thing, the only difference being the emphasis on "do not like" or "like". Thanks in advance for clarifying, I would not like to be caught in another situation where I use the wrong sentence again :)

I guess I've been in mathematics for far too long, and I tend to use the phrase "Not all is lost" as the negative of "All is lost".  To me the phrase "All is not lost" suggests that nothing is lost. It doesn't send the message I'm trying to give which is that "at least one thing is not lost".  What's your interpretation of the two phrases?


I am trying to write multiple lines underneath my minimisation problem in an align* environment. This can be achieved by using the command \min_{\substack{x_{j} \\ j=1,...,70}}, which produces the following output  I would like to write minimisation, as opposed to min. However, the command \textnormal{minimise}_{\substack{x_{j} \\ j=1,...,70}} does not produce the required output. How can this be achieved?

How can you get the argmin or argmax in Latex? Two solutions I found are:  \underset{x}{\operatorname{argmax}}   \DeclareMathOperator*{\argmin}{arg\,min}   Any other ideas?  [1]   [2]


I have went from left to right, up to down and my world only has jungle, beach, crimpson, and snowy biomes. I had that world since 2019 and worked so hard on it, i really don't want to make a new world and probably have the same problem. Is it possible to bring those orbs with you into another world, if so please help me.

I've made a Terraria world and I explored most of the map on Xbox 360, but I can't find Corruption Biomes. I only find Crimson Biomes, but I wanted to kill the Eater of Worlds. How can I find corruption?  According to the wiki, the loading screen hints if the corruption is added. I see the same text the wiki says needs to be seen in order to correctly guess if there's a corruption, but there's none. Need help.


if x ,y ∈ Z. and x|y,y|x,then x does NOT equal to y. Can anyone give me a counter example please?

Form the assumption, we can say $b=ak$ ,$k$ integer, $a=bm$, $m$ integer.  Intuitively, this conjecture makes sense. But I can't make further step.


I'm struggling with masking the entered names. I did this with RegEx in Javascript. But I have a problem. If there is a non-ASCII characters in the entered name, it does not detect it. My codes are like this:   var name ="Román Ærelto"; var regex =/\b(\w{0,1})(\w{0,}?)(\w{0,0}?)\b/g; console.log(name.replace(regex,(_, first, middle, last) => `${first}${'*'.repeat(middle.length)}${last}`));    Expected Result: R**** Æ****  How can i solve this problem. Or do you have another solution for masking name? I don't want to use for-loop Thank you for your help.

How can I use Unicode-aware regular expressions in JavaScript?  For example, there should be something akin to \w that can match any code-point in Letters or Marks category (not just the ASCII ones), and hopefully have filters like [[P*]] for punctuation, etc.