Is there a function which will help us to write the date using the Locale settings in Javascript.For example in my machine as per the Locale settings the format is M/D/YYYY so in my program the date should be printed in this format. If i change my the Locale settings in computer format to YYYY-MM-DD then my program should automatically print in this format without hardcoding the format. This is the expected behavior of my program. As some of the suggestions given on using toLocaleDateString method, On using toLocaleDateString it always returns in M/D/YYYY format only even then the computer Date format is changed to YYYY-MM-DD. I searched in internet i don't find any proper answer please guide me to do this. Any help is appreciated.

I want the server to always serve dates in UTC in the HTML, and have JavaScript on the client site convert it to the user's local timezone.  Bonus if I can output in the user's locale date format.


Prove that $A_{r,s}$ $=[z\in \mathbb C  : r<|z-z_0|<s ]$ is path connected.  I proved that $D_r(z_0)$ is pathh connected. But not this set of complex numbers.

Let $A = \{(x,y) \in\mathbb{R}^2: a \leq (x-c)^2+(y-d)^2 \leq b\}$ for given $a,b,c, d$ real numbers. I want to show that $A$ is path-connected.  How can I do that?  I know that every open subset of $\mathbb R^2$ that is connected is path connected. But this is obviously not open so I cannot use that. Then I thought of multiple cases. If we take arbitrary $x$ and $y$ and draw the line between them and they do not intersect with the circle centred at $(c,d)$ then we can obviously draw a line between the points which is still in the set, so we can then define the function. I am stuck on the other case.


I have a method in a program that takes an ArrayList objects:  private ArrayList<T> list;   and subsequently can use this method to take all of the items, copy them to a String Array, and then remove the items from the original list.  Here is the method:  public String[] takeAll() {     if (this.list.size() <= 0)     {         throw new NoSuchElementException("Unable to take elements from empty array list");     }//checks if list is empty      String[] targetArray;     targetArray = list.toArray(new String[list.size()]); //adds the Objects to the String[] targetArray      list.clear();      return targetArray; }   Main that tests this:      public static void main(String args[]) {     SimpleList a;     a = new SimpleList(Position.FIRST, Position.LAST);     String[] b;     a.list.add("thing1");     a.list.add("thing2");     a.list.add("thing3");     a.list.add("thing4");     b = a.takeAll();     System.out.println("The String Array b contains: " + b); }   When I run it, it returns something odd:  The String Array b contains: [Ljava.lang.String;@15db9742  What would I have to change to actually print out b where it should display {"thing1", "thing2", "thing3", "thing4"} ?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I have read normalisable eigenfunctions of the Hamiltonian operator. $$\hat{H}\phi = E\phi$$ If $\phi$ is to be normalisable we must have $E > V_{min}$ Why is this?

Suppose we have a particle of mass $m$ that is in an eigenstate $|\psi\rangle$ of the Hamiltonian $\hat{H}=\hat{T}+\hat{V}$, where $\hat{T}$ is the kinetic energy operator and $\hat{V}=V(\hat{r})$ is the potential energy operator. If the potential has lower bound $V_0$, then is it necessary for the energy eigenvalue $E$ of $|\psi\rangle$ to be greater than $V_0$? Classically this is true, since we regard negative kinetic energy as physically unrealizable/meaningless. However, I don't know if I can necessarily say the same in the quantum case. For example, what I'm tempted to do is write  $$\langle\psi | \hat{T}|\psi \rangle = \langle\psi | E-\hat{V}|\psi\rangle$$  and say "If $E<V_0$, then the RHS is necessarily negative, implying the LHS is as well, which we will regard as physically meaningless. If $E=V_0$, then $|\psi\rangle$ is trivial.", but I'm not sure if that's right.   Confused by that, I then wanted to show that, if $E< V_0$, then a non-trivial $|\psi\rangle$ is non-normalizable. However, I'm not entirely sure how to do this.


I just did a fresh install of ubuntu and I wanted to install some additional software to it. I did a 32 bit install of ubuntu desktop and I realised that skype does not support 32 bit version anymore. I tried to install manually some older versions of skype but none of them seemed to work. I just wanted to ask if is there a way to get skype up and running on a 32 bit system at the current time. Any help would be greatly appreciated!

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


So I need to create a floating layer effect (as the one shown on picture) over the display of a stock iPad image. Any suggestions, except simply applying an outer shadow effect and playing with the free transform tool?

How do I create this type of effect with an image? I'm wondering how to get the thick edges and the tilted look. Is there an online tool that will convert a flat image to look like this?


I was able to prove the theorem by contradiction, showing that if $X$ is a countable set, we can take $r_0 = min\{d(p, q) < r : \forall p, q \in X\}$ and so there exists an $N_r(p)$ such that it will not contain any point $q \in X : q \neq p$ in its neighborhood. Thus $p$ is not a limit point of $X$, nor is any other point. Then these $X$ is the union of singletons and since open, disjoint subsets of a metric are separated, so is $X$.  Is my proof entirely correct? Were there any incorrect terms used?   I was asking for proof-verification, not for an answer. I need to know if my proof is right.

That's a problem I proved (quite a while back) in tiny Rudin. However, I don't really get it. The other questions were actually useful results - I don't think I've ever come near using this result. Surely it's going to be close to apparent that you're working in an uncountable set?  For instance, examples where this result could be applied but it is hard otherwise to tell that the space is uncountable?


While upgrading to 14.04 I ran into a dependency issue gnome-settings-daemon-schemas which blocked the upgrade. After running sudo apt-get -f install I get:    Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   gnome-settings-daemon-schemas The following NEW packages will be installed:   gnome-settings-daemon-schemas 0 upgraded, 1 newly installed, 0 to remove and 530 not upgraded. 9 not fully installed or removed. Need to get 0 B/44.2 kB of archives. After this operation, 189 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 252639 files and directories currently installed.) Preparing to unpack .../gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb ... Unpacking gnome-settings-daemon-schemas (3.8.6.1-0ubuntu11) ... dpkg: error processing archive /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb (--unpack):  trying to overwrite '/usr/share/GConf/gsettings/gnome-settings-daemon.convert', which is also in package gnome-settings-daemon 3.10.2-0ubuntu1~saucy6  Processing triggers for gconf2 (3.2.6-0ubuntu2) ... Errors were encountered while processing:  /var/cache/apt/archives/gnome-settings-daemon-schemas_3.8.6.1-0ubuntu11_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)    Depends: gnome-settings-daemon-schemas (< 3.10) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   What has caused this and how do I progress to fix it?    In case it's relevant, here's the original dependency hell:  The following packages have unmet dependencies:  aptitude : Depends: aptitude-common (= 0.6.8.2-1ubuntu4) but it is not going to be installed             Depends: libboost-iostreams1.54.0 but it is not going to be installed             Depends: libcwidget3 but it is not going to be installed             Depends: libept1.4.12 but it is not going to be installed  compiz-gnome : Depends: gnome-settings-daemon-schemas (>= 3.4.2-0ubuntu9) but it is not going to be installed  unity-settings-daemon : Depends: gnome-settings-daemon-schemas (>= 3.8) but it is not going to be installed                          Depends: gnome-settings-daemon-schemas (< 3.10) but it is not going to be installed

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Is there any way to manually detect if malware, specifically a keylogger is installed? Looking for answers on XP, 7 and 8.1.  For example, is there a combination of any of these options that can positively identify the malware:  * places to look in the registry * processes running in Windows Task Manager * writing an application myself (eg. in Visual Studio) to hook WM_XXX messages   I'm looking for technical details to investigate this manually ie. NOT using something like an AV that just reports it. 3rd party tools that technically help identify and track down the presence of the malware might be useful.  UPDATE: Have discovered  which more or less covers what I was looking for. Recommend readers who find this question re-direct to that one.

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


How can I install the Ubuntu CD ISO image on to a 1 Gig Thumb drive so that it can boot to my target system?  Thanks

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


Trying to understand this relationship I came across this conversation in an email group:           I got a problem while analyzing my data using NN.      I got R-square with 0.45 with MSE around 5000.     SO I am wonder why? There must be a relation     between R-square and MSE?         R2 = 1 - SSE/SS0      SSE = N*MSE SS0 = (N-1)*VAR(Target)      VAR(T) = SS0/(N-1) = [SSE/(1-R2)]/(N-1)      = [N/N-1]*MSE/(1-R2)      ~ 5000/0.55 ~ 9091      If you had standardized your targets to unit variance you would have   obtained MSE ~ 0.55   Is that correct? What insights can we reach understanding this relationship?

For regression problem, I have seen people use "coefficient of determination" (a.k.a R squared)  to perform model selection, e.g., finding the appropriate penalty coefficient for regularization.   However, it is also common to use "mean squared error" or "root mean squared error" as a measure of regression accuracy.  So what is the main difference between these two? Could they be used interchangeably for "regularization" and "regression" tasks?  And what are the main usage of each in practice, such as in machine learning, data mining tasks?


I've recently started using blender, and was working with it just fine, when I accidentally changed how the scaling and rotating works. Now when I try to scale something, it scales as if the selector was the senter. Axis locked translations are also affected by this, as I have to find the selector to translate it.

I have a sword that currently rotates around a pivot point thats off of the actual object. Im new to blender and im not sure how i would go about changing it so that the sword rotates around the handle. Any help would be appreciated!


I have this code:  if [[ $1 = "-s" ]] && [[ $2 = 0-9 ]] then   echo "yes" fi   0-9 does not work for me.  What I really want is to type, for example, -x 3 (or any number).

I'm writing a shell script for Linux, using Bash, to translate any video-file into a MP4. For that, I'm using avconv with libvorbis for audio.   Inside my script, I have a question for the user :   read -p "- Audio Quality [scale from -2 to 10] ? "     if [ -n "$REPLY" ] ; then     ABITRATE="-aq $REPLY"     fi   My "ABITRATE" string goes into the final avconv command-line.  But I would like to give the user the opportunity to answer that question with a value in Kb (Kilobit), and translate it into the scale that libvorbis uses. The "scale from -2 to 10" is this :   Quality Kbit/s  Normalization -----------------------------  -2      ~32        y  -1      ~48        y   0      ~64        y   1      ~80        y   2      ~96        y   3     ~112        y   4     ~128        n   5     ~160        n   6     ~192        n   7     ~224        n   8     ~256        n   9     ~320        n  10     ~500        n   I would like to know how to check if my $REPLY is in a range of number. For example, I would like my script to do something like this :   if [ $REPLY is a number between 1 and 32 ] ; then   REPLY="-2" elif [ $REPLY is a number between 33 and 48 ] ; then   REPLY="-1" fi   Is this possible (I'm willing to say 'yes of course, shouldn't be hard' but I don't know the syntax to use) ?


I stumpled upon the following question in one of my exercise-sheets:     Justify that there are no minimal surfaces in $\mathbb{R}^3$ that are   diffeomorphic to the 2-sphere $S^2$   I have no idea though. Can someone elaborate?   What's the approach i am supposed to take on this?  I highly appreciate any hints! Thank you very much.

This is one of the exercises of 'Do Carmo' (Section 3.5, 12)     How do you prove that there are no compact (i.e., bounded and closed in $\mathbb{R}^3$) minimal surfaces?   Thanks!


It's not hard for a black hole to have a smaller Schwarszschild Radius than the wavelength of commonly existing electromagnetic radiation, such as a visible light, infrared, or microwave photon.   What happens if such a photon "hits' a black hole?  Is it eaten? Somehow "partially" eaten? Not eaten? Impossible to say without a theory of quantum gravity? If it isn't eaten, is it refracted at a sharp angle?

I am wondering whether a black hole can absorb photons whose wavelengths are greater than the horizon size of the black hole. I have seen different contradicting opinions on the answer. For instance , the accepted answer claims that the answer is no, without giving any justification whatsoever. While on , I think all the answers are pointing that yes, a black hole should be able to absorb photons whose wavelengths are greater than the size of the horizon of the black hole.  If the answer is yes, then black holes are perfect blackbodies, right? Or is it more complicated, because, like some answer on physicsforums claim, a black hole might have only a small probability to absorb photons whose wavelengths are greater than the horizon size (though no mathematical justification is given), thus even though it might be possible for a BH to absorb such photons, it might still not be a blackbody.  Edit: Here's what I've been told by a QFT specialist:      I think your question is not answerable. "A single photon" requires   knowing how to quantize the EM field near a black hole. That is an   open problem. And also, "single" particles don't objectively exist in   accelerated frames. See the Unruh effect.   I am not satisfied with the current two answers. They do not deal with the above comment at all. Furthermore they seem to contradict each other and they aren't crystal clear.


Given a normal subgroup $N$ of a group $G$, do there exist sufficient conditions that allow us to conclude that we have an isomorphism $$ G\cong N\times G/N?$$

Suppose you have a group isomorphism given by the first isomorphism theorem: $$G/\ker(\phi) \simeq \operatorname{im}(\phi)$$ What can we say about the group $\ker(\phi)\times \operatorname{im}(\phi)$? In particular, when does the following hold: $$G\simeq \ker(\phi)\times \operatorname{im}(\phi)?$$ I ask this question because i want to prove that $GL_n^+(\mathbb{R}) \simeq SL_n(\mathbb{R}) \times \mathbb{R}^*_{>0}$, with $GL_n^+(\mathbb{R})$ the group of matrices with positive determinant. I proved that $SL_n(\mathbb{R})$ is a normal subgroup and that $GL_n^+(\mathbb{R})/  SL_n(\mathbb{R}) \simeq \mathbb{R}^*_{>0}$, using the surjective homomorphism $\det(M)$. I tried something with semidirect products but I got stuck.


I am trying to dual-boot Ubuntu 15.04 64-bit on my laptop, a .  I have created a 241 GB partition. The other OS on the computer is Windows 8.1. The installation media was a DVD+R disk connected via USB drive. Secureboot and fast boot were disabled.  When I get to the installation page, I get this screen:  [Image in comment]  When I click continue, it loads for a few seconds and then this comes up:    When explaining what to do, please also explain why this occurs.

I am trying to install Ubuntu 14.04 on FakeRAID along Win7.  Win 7 has been already installed, and dmraid is running.  During the installation I choose to manually partition, this is the structure:  \dev\mapper\isw_gchdghhd_Volume0 \dev\mapper\isw_gchdghhd_Volume0Op1 - NTFS Win7 loader \dev\mapper\isw_gchdghhd_Volume0Op2 - NTFS Win7 partition \dev\mapper\isw_gchdghhd_Volume0Op3 - swap \dev\mapper\isw_gchdghhd_Volume0Op5 - ext4 mounted as \ \dev\mapper\isw_gchdghhd_Volume0Op6 - ext4 mounted as \home   There is another sequence similar to above marked as "linear".  I choose \dev\mapper\isw_gchdghhd_Volume0 as boot device.  When immediately after the installation begins, an error with question marks pops up, and the installation stops.


my_diamonds <- diamonds %>% mutate(log_price = log(price))  my_diamonds %>%  +   group_by(cut) %>%  +   summarise(mean_log_exp = mean(log_price) %>% exp) # A tibble: 5 x 2   cut       mean_log_exp   <ord>            <dbl> 1 Fair             3273. 2 Good             2547. 3 Very Good        2437. 4 Premium          2838. 5 Ideal            2079. > my_diamonds %>%  +   group_by(cut) %>%  +   summarise(mean_price = mean(price)) # A tibble: 5 x 2   cut       mean_price   <ord>          <dbl> 1 Fair           4359. 2 Good           3929. 3 Very Good      3982. 4 Premium        4584. 5 Ideal          3458.  Why are these two outputs different? I expected both sets of numbers to be the same. In the first block I take the mean of the log of price for each cut then back transform to original scale with exp. In the second block I skip the log transformation entirely. Since in the previous block I log and then unlog with exp, I expected the two sets of numbers to match. Where have I misunderstood? Why don't the two sets of numbers match?

So we have arithmetic mean (AM), geometric mean (GM) and harmonic mean (HM). Their mathematical formulation is also well known along with their associated stereotypical examples (e.g., Harmonic mean and it's application to 'speed' related problems).  However, a question that has always intrigued me is "how do I decide which mean is the most appropriate to use in a given context?" There must be at least some rule of thumb to help understand the applicability and yet the most common answer I've come across is: "It depends" (but on what?).  This may seem to be a rather trivial question but even high-school texts failed to explain this -- they only provide mathematical definitions!  I prefer an English explanation over a mathematical one -- simple test would be "would your mom/child understand it?"


Below I have shared the APEX code and the Test class code. I receive 100% code coverage, but I cannot grasp certain parts of it. Eg. The system.assert function - is it necessary? How do I know my test class is actually testing a code. I have only created sample records eg. acc1, con1 etc., how do I know if the test class is actually tested. Will I get messages if certain aspects of the test class is run or executed successfully? What should I add/remove here? I am new to APEX, please give me your onion.  Apex code:  global class setExams2Expired implements Schedulable {     global void execute(SchedulableContext ctx) {          List<Certification__c> objects = [         SELECT Id, Expiration_Date__c, Exam_state__c         FROM Certification__c         WHERE Exam_state__c in ('Active')];          for(Certification__c c : objects){             if(c.Expiration_Date__c < date.today()){                 c.Exam_state__c = 'Expired';              }             else if(c.Expiration_Date__c == date.today().addDays(+7)){                 c.Day7ExpiryAlert__c = True;             }         }         update objects;     } }   Test Class:  @isTest public class setExams2ExpiredTest {      @isTest     public static void ifNotExpired() {          Account acc1 = new Account(name='Test Account 1',phone='121212', Global_POD__c ='AP');         insert acc1;         Account acc2 = new Account(name='Test Account 2',phone='343434', Global_POD__c ='AP');         insert acc2;          Contact con1 = new Contact(accountid=acc1.id,lastname='Test Contact 1',email='abcd@gmail.com');         insert con1;         Contact con2 = new Contact(accountid=acc2.id,lastname='Test Contact 2',email='efgh@gmail.com');         insert con2;          Certification__c c = new Certification__c(Contact__c=con1.id, Name = 'abcd', Expiration_Date__c = Date.today().addDays(+2), Exam_state__c = 'Active');         insert c;          Test.startTest();         setExams2Expired ctx = new setExams2Expired();         ctx.execute(null);         System.assertEquals('Active','Active','ifNotExpired doesn\'t work - meaning an exam is either set to expired when it shouldn\'t have been or nothing happenend for a certain record');         Test.stopTest();     }     @isTest     public static void sendEmail(){          Account acc5 = new Account(name='Test Account 5',phone='787878', Global_POD__c ='AP');         insert acc5;         Account acc6 = new Account(name='Test Account 6',phone='898989', Global_POD__c ='AP');         insert acc6;          Contact con5 = new Contact(accountid=acc5.id,lastname='Test Contact 5',email='qrstuv@gmail.com');         insert con5;         Contact con6 = new Contact(accountid=acc6.id,lastname='Test Contact 6',email='wxyz@gmail.com');         insert con6;          Certification__c c = new Certification__c(Contact__c=con5.id, Name = 'efgh', Expiration_Date__c = Date.today().addDays(+7), Exam_state__c = 'Active', Day7ExpiryAlert__c = false);         insert c;          Test.startTest();         setExams2Expired ctx = new setExams2Expired();         ctx.execute(null);         System.assertEquals(false, false,'No alert was sent here');         Test.stopTest();     }  }   UPDATE 15th/03/2019  Test.startTest(); setExams2Expired ctx = new setExams2Expired(); ctx.execute(null); Map<Id, Certification__c> cMap = new Map<Id, Certification__c>([Select id, Exam_state__c, Day7ExpiryAlert__c FROM Certification__c]); System.assertEquals('Active', String.valueOf(cMap.get(c.Exam_state__c))); Test.stopTest();   Working Update  Test.startTest(); setExams2Expired ctx = new setExams2Expired(); ctx.execute(null); Map<Id, Certification__c> cMap = new Map<Id, Certification__c>([Select Exam_state__c FROM Certification__c]); System.assertEquals('Certification__c:{Exam_state__c=Expired, Id='+c.id+'}', String.valueOf(cMap.get(c.Id)), 'setting to expired failed'); Test.stopTest();

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


Not sure why this is not matching and not working?  It appears something is wrong with the regex such that it doesn't match even though i tested it out in the online regex tester  current_name = "bob[0]" regex_match = re.compile('%s'%current_name) if re.match(regex_match, current_name):     print "matched"

I want to use input from a user as a regex pattern for a search over some text.  It works, but how I can handle cases where user puts characters that have meaning in regex? For example, the user wants to search for Word (s): regex engine will take the (s) as a group.  I want it to treat it like a string "(s)" .  I can run replace on user input and replace the ( with \( and the ) with \) but the problem is I will need to do replace for every possible regex symbol. Do you know some better way ?


I keep seeing answers like this pop up in the Review queue:       There is another source for VoIP. You should have a look at    Seems like a clear case of Not an Answer, and it's been flagged as such. The problem is that the  sucks even more:     I am developing application which required SIP (VOIP) calling in iOS.Please suggest me about SIP server and how to implement it in iOS.   It's a terrible question, and the terribleness of the answer is a direct result of that. In context, it's hard to call this a non-answer; it does address the question, and is as close to an answer as this was ever going to get. Obviously the question needs to be closed, but what should be done with the answers it spawned? Is the Not an Answer flag valid or not?

In going through the review tool I often come across poor quality answers to poor quality questions. In particular, I will occasionally see questions that are simply asking for links to products, asking for tools, etc. Here are three examples that I've come across just this morning.        Clearly it's appropriate to go to the question and vote to close it (these are examples of not constructive) if they aren't already closed, but what should be done with the answers?    Should the answer be marked for deletion? Much of the normal reasoning for not providing link only answers is defeated if the question is simply asking for links. I'm tempted to mark them as 'looks good' for that reason, because it's the question that is flawed. Is that correct, or should I evaluate all answers as if they were responding to a quality question?


When I upgraded to Ubuntu 18.04 and rebooted I had the "Failed to start session" error. Pressing ctrl+alt+f1 I found myself in a terminal, and used sudo apt-get install --reinstall ubuntu-desktop, then rebooted.  After entering my encryption pass, I see this error:  WARNING: Failed to connect to lvmetad. Falling back to device scanning. Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg WARNING: Failed to connect to lvmetad. Falling back to device scanning. Reading all physical volumes. This may take a while... Found volume group "ubuntu-vg" using metadata type lvm2 WARNING: Failed to connect to lvmetad. Falling back to device scanning. 2 logical volume(s) in volume group "ubuntu-vg" now active /dev/mapper/ubuntu--vg-root: recovering journal /dev/mapper/ubuntu--vg-root: clean, 487053/30203904 files, 66914067/120783872 blocks WARNING: Failed to connect to lvmetad. Falling back to device scanning. Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg WARNING: Failed to connect to lvmetad. Falling back to device scanning. Reading all physical volumes. THis may take a while... Found volume group "ubuntu-vg" using metadata type lvm2 WARNING: Failed to connect to lvmetad. Falling back to device scanning. 2 logical volume(s) in volume group "ubuntu-vg" now active /dev/mapper/ubuntu--vg-root: recovering journal /dev/mapper/ubuntu--vg-root: clean, 487053/30203904 files, 66914067/120783872 blocks   This message is shown for 1-4 seconds, after that it just goes black and then it shows the same message again. Nothing happens when I press anything, except if I press alt+f3 (or similar) the login terminal can be seen briefly, before going completely black and continuing the loop.  I'm new to Ubuntu. How can I solve this?

I've followed this tutorial to install Ubuntu 15.10:    After restarting my computer I got to the grub menu and chose Ubuntu. Shortly after that I got this error:  /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning.   These messages keep adding up on a black screen every second. After a while,  I get access to the initramfs ash console.  what am I doing wrong?


Currently, I am working on a web application and wanted to create a web form to let users write emails through it. So, they would have to set their email address and the message and after clicking "Submit" my web application would send the email to recipients using their email address in the FROM header. The sending process is, of course, done using my own SMTP service because I do not have access to the email servers from my website visitors.  Now, I heard that this is probably a bad idea because those emails will most likely be rejected by the servers of the recipients. However, I do not yet fully understand why that is and how this process works. I've learned that the two most used anti-spam and -spoofing technologies used today for email is  and .  So, I'd like to understand why exactly the emails will be rejected and how DKIM/SPF will help here.  So, let's start with SPF:  As far as I understand, the server of the recipient will check the IP addresses that are allowed to send mails using the domain in the MAIL_FROM header and the DNS system. Now, with my example above, when I send emails in the web application with the FROM header set to e.g. bob@example.com (that's the address my website visitor set) this should (?) not affect the MAIL_FROM header. Because the email will be sent through my email service, the MAIL_FROM header will contain my domain and as far as I understand, it should be possible to send the mail and passing SPF.  The other anti-spam technology is DKIM:  It will sign the email and the recipient server will look in the DNS to find the right public key to verify the signature. Here, I am not sure how that's done exactly. I know that the FROM header will be part of the signature, but how does the recipient server check DKIM? Is it looking again at the DNS from the MAIL_FROM header? If yes, I could also pass DKIM with my example above, is that right? Or do have the domain in MAIL_FROM and FROM be identical? I'm kind of lost.  So after all I understand now, both DKIM and SPF should not be a problem for my web application. Why, though, is it sill said to be a bad idea and emails will most likely be rejected? Or did not I understand DKIM properly?  My overall question: How exactly will the recipient server determine if the email is rejected?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


If $r_1, ... r_{p-1}$ and $s_1, ... s_{p-1}$ are two reduced residue systems modulo an odd prime p, prove that $r_1s_1, r_2s_2, ..., r_{p-1}s_{p-1}$ is not a reduced residue system modulo p.  don't know where to start, any help appreciated!

If $a_1, a_2, ..., a_n$ is a reduced residue system $\mod p$ and $a_1', a_2', ..., a_n'$ is another reduced residue system $\mod p$ then $a_1 a_1', a_2 a_2', ..., a_n a_n'$  is not a reduced modulo system $\mod p$.  Not able to show a counter to it. Help Needed.


What are the conjugacy classes for the dihedral group $D_8$ of order 16?  What are its subgroups of order $4$, and which of them are normal subgroups?    I know that $\{e\} ,\{r^2,r^6\},\{r,r^7\},\{r^3,r^5\},\{r^4\},\{s,r^2s,r^4s,r^6s\},  \{rs,r^3s,r^5s,r^7s\}$ are the conjugacy classes, but I don't understand how they derived these in my book; they just mentioned it without explanation.

List all the conjugate classes in the dihedral group of order $2n$ and verify the class equation.  The dihedral group is generated by two elements $r$ and $s$.   The order of $r$ is two since $r^2=e$ and $s$ is $n$ since $s^n = e$. And I know all elements can be produced as either $s^k$ or $rs^k$. How can I list all the conjugacy class?


I am a high school student and I am little confused in manometers, My teacher told me that we cannot equate pressure even at same horizontal level if different liquids are there, but he doesn't give the reason, can anyone explain why we cannot equate the pressure in different liquids , if the pressure is different here, then why the liquid in not flowing? it should be the same no matter which liquids are there.

2 diffrent liquids in a u shaped tube can have height difference at equilibrium but when I try to analyse the pressure at the same level of c,on the surface of more denser liquid there is only atmospheric pressure but on the other hand the less denser liquid have both the atmospheric pressure and the pressure due to the column of liquid above it,so they are not same but they must be.where am I getting wrong?


My iPhone 4S is stuck on the "Connect to iTunes" screen after trying to install the iOS 8 update.Why is my iPhone screen stuck on the 'connect to iTunes' screen

I need help with my iPhone. It's stuck on the 'connect to iTunes' screen.   iTunes does recognize the iPhone, but when I select 'restore', it goes through a few progress bars, then errors again. I've already tried to hard reset the phone, but that doesn't work either.


Fix some algebraically closed field $k$ and let $X$ be the affine variety given by the ideal $I=(z^2-xy,xz-z)$, how can I describe the irreducible components of $I$? I know that there is a bijection between the irreducible components and the corresponding prime ideals but this doesnt help me.   Also, a variety $X$ is irreducible if $I(X)$ is a prime ideal, I tried to use this to find the irreducible varieties but I didnt manage, any hints?

Consider the algebraic set $V(X^2-YZ,X-XZ)$. Find the irreducible  components of this set and show that $I(V)=(X^2-YZ,X-XZ)$.  I reasoned that $X-XZ=0$ iff $X=0$ or $Z=1$. If $X=0$, we get $Y=0$ or $Z=0$ from the other equation. If $Z=1$ we get $X^2-Y=0$. Hence the irreducible components are $V(X,Y), V(X,Z), V(Z-1,X^2-Y)$. Is this correct?   I'm not sure how to do the next question. Of course automatically we get one inclusion, but how about the other?  Thanks


Consider the following system:  Distribution: Devuan Beowulf. DRAM Memory: 16 GB. Linux kernel version: 5.10.0. Secondary storage: One SDD and one HDD. Used as a desktop, including software development which can be taxing on system resources in itself. The SSD has a boot partition P1, a large partition P2 mounted as /. The HDD has a single large partition P3, with different paths in / symlinked to place within it (e.g. /home or /home/someuser, and perhaps some paths under /var etc.) It is in heavy use.  How important/beneficial is it for partition P3 to be ext4 rather than NTFS? Bonus question: Should another filesystem be considered for P3?

I have Win Xp on first Primary Partition.  I am leaving another 2 primaries for a future possible Win install. I am planning my Logical partitions to install a Linux Mint. I read that a separate /home gives re-usability across future Linus'es. I thought it might be clever to keep /home as NTFS, to smoothly share data across Win and Linux too. I am anxious though as most of the forums declare NTFS inferior to ext4. But some forums said that performance of file system is not as much driven by its structure, but mainly by the kernel driver and algorithms for read and write.   Questions   If Linux has good algorithms [as implemented with ext4], wont it perform same on NTFS too? May be the inferiority of NTFS is only with windows, But same NTFS performs equally well on ext4? If not, Is the peformance low enough to stay away from NTFS, and think of other ways to share data across Win and Linux? Does ways exist to read ext4 from WinXp or 7? Any other recommendations from practical experiences are welcome.


Is the problem with the picture or something else? I'm trying to put a image to Blender's viewport but its not showing. I tried pressing Ctrl and Numpad1 but it just made the default shape rounder. I'm using blender 2.78.

How do I put a backdrop behind the model that I am creating so that I can compare the picture to the model while editing?


I can use gf to go to the file with name under/after cursor, is there any command to go back to the original file without relaunch vim to open it?

I am using Vim for windows installed in Unix mode. Thanks to this site I now use the gf command to go to a file under the cursor.  I'm looking for a command to either:   return to the previous file (similar to Ctrl+T for ctags), or   remap gf to automatically launch the new file in a new window.


Ubuntu 18.04 LTS cannot be installed on Dell Inspiron 15 5000 gaming laptop with GeForce GTX 1050 Mobile. The screen goes blacklight and freezes and the installer does not run.   There are another very similar questions, but too old, In my case am trying to install Ubuntu 18.04 with release date 4/26/2018, it is too fresh, What can I do, any advice?

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:


We are a Canadian-Iranian family, residing in the UAE. We have recently attended a family event in Iran with our Iranian passports. We are planning our US trip a week after our visit in Toronto. We would be entering the US through the Canadian border (Pearson Airport). Do we need to obtain a US visa?

Under new rules, non-US citizens from Visa Waiver Program countries who have visited Iraq, Syria, Iran, Sudan, Libya, Somalia, or Yemen are required to apply for a proper visa because they are no longer eligible for the VWP.   Does the above apply to citizens of Canada also? Canada is not a Visa Waiver Program country, but instead Canadian citizens can enter the US visa-free. If a Canadian citizen has visited Iran for example, is the entry procedure to the US any different?  I have looked through  but that page does not mention Canada.


My Stack Overflow account is banned from answering questions.  I know it is due to my previous answers, which seem spam to the moderator.  However I would like to improve my answers to earn my reputation back, problem is they are not accepting my answers anymore.  So please let me know what I can do?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I have this problem when opening totem (GNOME Videos) ~$ totem Gdk-Message: 10:40:58.480: Error 71 (Protocol error) dispatching to Wayland display.  10:40:58.480  (This message has changed many times)

I have this problem while running GNOME Maps ~$ gnome-maps  (org.gnome.Maps:10414): Gjs-WARNING **: 19:43:34.553: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array). (Note that array.toString() may have been called implicitly.) 0 <TOP LEVEL> ["resource:///org/gnome/Maps/js/osmTypes.js":32] 1 <TOP LEVEL> ["resource:///org/gnome/Maps/js/osmEditDialog.js":35] 2 <TOP LEVEL> ["resource:///org/gnome/Maps/js/osmEdit.js":25] 3 <TOP LEVEL> ["resource:///org/gnome/Maps/js/contextMenu.js":33] 4 <TOP LEVEL> ["resource:///org/gnome/Maps/js/mainWindow.js":33] 5 <TOP LEVEL> ["resource:///org/gnome/Maps/js/application.js":35] 6 <TOP LEVEL> ["resource:///org/gnome/Maps/js/main.js":43] 7 start() ["resource:///org/gnome/gjs/modules/package.js":209] 8 <TOP LEVEL> ["/usr/bin/gnome-maps":2]   (org.gnome.Maps:10414): Gdk-WARNING **: 19:43:36.525: Native Windows taller than 65535 pixels are not supported Gdk-Message: 19:43:36.574: Error 71 (Protocol error) dispatching to Wayland display.  19:43:36.574 (This message has changed many times) What's this?


I've been answer-banned today because of 3 poor answers, which I admit is my fault.  I read , and  of  on Meta, and I think I understand how to get out of the answer ban.  I edited 1 of 3 poor answer which got me banned and made the deleted answer flagged, hoping someone would undelete it.  I also edited , because the questioner wants a better solution than I have.     I have also searched for alternative means for detection, but with no positive result. Perhaps some light-weight parser becomes available in the future. In the mean time, your answer at least helped solving my issue, so for now, it's accepted. Thanks. – Marten Koetsier Dec 4 '15 at 21:49   But the  was rejected by , the reason being:     This edit was intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.   Yes, maybe he is right, but I can neither comment nor answer.  Should I have to find another question and try to edit an answer, hoping someone will accept it? If not, should I try again?


Where I work we use Google Apps for your Domain for a few things, including the calendar. I am an administrator, but I cannot work out how to view a list of all the calendars we have in our domain. Is there anyway to achieve this?

I am a Google Apps administrator in the process of transferring a multitude of secondary calendars from a previous Google account. So following advice from  I did the following:  Old Account   Download calendar and save as ICS   New Administor Account   Create new calendar Select "Share Calendar With Others", "Share calendar with everyone in the organization - see all event details"    However nobody in the organization can see the new calendar under "Other Calendars" nor do they get any form of notification.   It seems everyone in the organization has to now somehow add this calendar(s) via "Add a colleague's calendar" OR I have to add each user's new Google account. This is turning into an administrative nightmare.  The behavior I want is:   Maintain a list of calendars that everyone in the organization has access to By default all users in organization have "See All Event Details" access. Certain organization users have "Make Changes To Events" and Apps Administrators have "Make Changes AND Sharing" As users are added/removed to the Google Apps domain the access to these calendars are automatically granted/revoked ie. Organization users should not have to do anything to get access to the list of calendars.   I am sure there is a simple solution to this that I am missing, so if someone can point me in the right direction I would appreciate it.


I got captcha verification about picking up certain images from list. I did so and got some text to copy and paste in a new box. I pasted it, but there is no button to submit the same. I looked everywhere, but it was not there. When I press enter, it just adds new line but nothing else happens.  Wondering if any of my extensions is blocking it, see the screenshot, I have disconnect and privacybadger installed, but it dont have anything blocked from google other than google analytics.

I'm not quite sure why, but I was stuck with a Captcha when asking a new question on Arqade.  That's normally fine, but I'm not sure how I can submit it.  I typed in the needed text, and copy-pasted the string, but I don't really see a submit button or anything.  Here's a helpful pic:    Is something supposed to happen? How do I finish this Captcha?


I have a circuit that normally runs off of a 12V power brick that I want to make somewhat mobile. As such, I plan to use a 12V battery to power the circuit but, when the battery depletes, I would like the ability to plug the circuit to a 12V DC power supply that would not only charge the battery but would also supply the circuit with power.   The circuit that I want to power is actually a 4 meter long LED strip that I used to make a lighting panel. I intend to make this panel more mobile for whenever I need it to be so I can easily move it around without worrying about the cable. However, in case the battery runs out, I still want to be able to run the panel from a wall plug and, in the mean time, also charge up the battery.  To sum it up, these are the 2 use cases for what I am after:   If the external power supply is unplugged, the lighting panel will run solely off of the battery. If the external power supply is plugged, the lighting panel will run (ideally) solely off of the external power supply which would also charge up the battery in parallel. When I don't need the panel to be mobile I would like to keep it plugged in so the battery won't discharge but still use the external supply to power the strip.   Currently, I have not looked into any specific type of battery / charger. This is all still in the design phase and I first want to have a plan set up before I think of the specifications of the parts I will be using. For now, the only specific characteristic will be the 12V for the supply and battery and also the LED strip. I am not sure how much current the 12V supply will need to provide or how much the charger and the strip will draw when running simultaneously. Once I have an appropriate circuit, I will look for the parts that suit my needs. I should mention that I will want a battery and charger combo.   Here is the first circuit that I came up with:   I tried to keep it simple and not use any transistor, just a couple of diodes.   First off, the charger will have 4 terminals and is represented by the 4 pin header. The inner 2 pins represent the power in for the charger and the outer 2 pins represent the terminals of the charger that connect to the terminals of the battery.   The D3 diode prevents the current flow from the external supply to the battery, and the second diode, D2, is used when disconnecting the power supply from the circuit to prevent any current flow from the battery to the charger. I don't think it is really necessary, especially if the charger is any good, but it's there just for good measure.    My concerns are regarding the common ground that the battery, charger and external supply share as I'm not entirely sure how it would all work, and also I'm unsure if the circuit will draw current from the battery once the external supply is connected. While it is charging, the battery will probably provide a lower voltage than the external supply so the strip will probably draw its current from the external supply but what about when the battery is fully charged? Will the strip also draw current from the battery? How will that affect the charger / battery?   I am not yet sure as to what battery I will be using but I will probably go with a LiPo battery pack and the appropriate charger (I will probably buy a combo from the same manufacturer). In the case of a LiPo there may be a third terminal between the battery and the charger.   What are your suggestions regarding my design or perhaps there is a better alternative that I have not thought of that you might be able to suggest?  Are there any safe practices that I have overlooked or is there any standard circuit that would accomplish what it is I am trying to achieve?  EDIT: I would also like to get at least 2 hours of full brightness use out of the LEDs.

I do understand that similar questions and maybe even the same question has been asked before, I've found them but unfortunately as a result of inexperience on my part I have been unable to adapt the posted solutions to my design specifically.  I am currently working to build the power side of my overall circuit that uses an 18650 (3.7v, 2600mAh) battery that is charged through an MCP73833 IC. The source power for charging will be a 5V wall wart power supply. What I am trying to accomplish now is to create a path or switch that disconnects the battery when the 5V power supply is connected, while preferably allowing the the 5V to be used to power the project and charge the battery at the same time.  Based on prior answers here on EE, I've heard that two Schottky diodes can be used with a little forward voltage drop; I've also seen recommendations for FET's. I'm trying not to add any more IC's to the project if I do not need too especially since I'm hand soldering all of this (not meaning FET's, but actual IC's).   Forward voltage drop is not critical since I'll need to step-up the battery voltage anyway after this circuit (to 5V for MAX7219). So it wouldn't be a big deal to run both power sources through the same booster.  My problem is that I have zero experience with Schottky diodes and even less with Mosfets. I've been reading and trying to understand but just when I think I do, I look at my circuit and my brain turns to mush.     Obviously if you see any errors within the circuit and wouldn't mind pointing them out, I'd appreciate that as well.


Obviously I know about pwd and readlink, but is there a command to find out the real absolute path to the current directory (ie, resolving links and dots)?

If I do pwd I notice it uses whatever symlinks I used to get into the current directory.  Can I get it to tell me the "real" directory I'm in ... i.e. the path from the root to my current directory without the use of any symlinks?


I have a document with bibliographical references at the end handled by biblatex and biber.  I need to reproduce in the core of a text a bibliographical reference exactly in the same way as it appears in the bibliographical references.   I thought of a way to handling this issue by calling successively   \noindent \autocite{a} \Citeauthor{a}. \citetitle{a}.   However, I don't have a commande for \cite-journalname and another for \cite-doi or even \cite-volume or \cite-pages, ... So my solution does not work.  Any hint?  Here is a MWE  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib}  @Article{a,   date =     {2003},   author =   {Author, Amy},   title =    {Paper title},   journaltitle = {Journal title},   volume =   10,   number =   4,   pages =    {100-141},   doi={10.1109/TAC.2016.2614910}    }   \end{filecontents*}  \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib}  \begin{document}     \nocite{*}     \section{My text}     I need to print here a complete biblio reference exactly as it appears in the References section. A trial was to cite the reference in the following way:      \noindent \autocite{a} \Citeauthor{a}. \citetitle{a}.  \section{References}     \subsection{Journals}     \newrefcontext[labelprefix=\Alph{subsection}-]     \printbibliography[]  \end{document}

I've discovered biblatex and it's great. Specially for the \fullcite option which is exactly what I want (in order to add the full citation in the text and not wait for the bibliography section).   However I was wondering if it is possible to add the numbering as well. For all intents and purposes I wish to have the same type of entry we would have in the bibliography section but in the text using a \fullcite type command.  \fullcite{toto}   should provide     [1] toto el al,  'writen by toto'   At the moment it only produces      toto el al,  'writen by toto'


Let $r>0$ be a rational number. There is a criterion for determining whether the equation $x^2+y^2=r$ has a solution in rational numbers, and if we have one solution, then there is a way to generate all solutions. However, how does one find the first solution?

Which rational numbers can be written as the sum of two rational squares?  That is, for which rational numbers $a$, are there rational numbers $x$ and $y$ such that $a = x^2 + y^2$.  It is a famous theorem that if an integer can be written as the sum of two rational squares then it can be written as the sum of two integral squares, and then the solution is the famous one by Fermat, but I didn't find anything about the general case.


If we place a point object at the focus of a concave mirror, we say that the reflected rays would be parallel and would meet at infinity to form an image.   What does this mean?  I tried to trace the reflected rays using the rules of image formation using a concave mirror and I got two rays almost parallel (negligible convergence). This could have been (and probably was) a construction error since achieving precision by hand is quite a difficult task to perform.  So, when we say that the reflected rays are parallel, do we mean that they are almost parallel and would meet at a lot of distance from the mirror? Is that also why we say that they will meet at infinity?  Thanks!

In case of a concave mirror, when the object is at the focus, my book states that the image is formed at infinity and is highly magnified, real and inverted. But the reflected rays are parallel and will never meet, so no image will ever be formed no matter the distance, right?  How can an image be formed at infinity?


I basically have a page that has a header, some main content, and a footer. I want the footer to be sticked at the bottom and the content should be vertically + horizontally centered. Here is what I have:    body {   margin: 0; }  #wrapper {   display: flex;   flex-direction: column;   min-height: 100vh; }  header {   padding: 2em 0;   background: cyan; }  main {   flex-grow: 1;   background: turquoise; }  main div {   display: flex;   justify-content: center;   align-items: center;   height: 100%; }  footer {   padding: 2em 0;   background: violet; }

       This should be centered horizontally and vertically within the turquoise box

     As you can see, the text inside the main content isn't being vertically centered. For some reason, the main div isn't taking up the full height of main even though I gave it a height: 100%;. Does anyone know what is wrong with this code?

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


Question: Let $m$ be a natural number with digits consisting entirely of $6$s and $0$s. Prove that $m$ is not the square of a natural number. Previously asked versions , so I wanted to do this using modular arithmetic with the result . First I expand $m$ in powers of $10$:  $$ m = \sum_i a_i 10^i= \sum_{i=0}^{i=1} a_i 10^i + \sum_{i=2}^{\infty} a_i 10^i$$ For some sequence of $a_i$. Now I take mod $4$ on both sides () , this leads to: $$ m \mod 4 = \sum_{i=0}^{i=1} (a_i \mod 4)(10^i \mod 4) \mod 4 + \sum_{i=2}^{\infty} (a_i \mod 4) (10^i \mod 4) \mod 4$$ I note that $10^i \mod 4 = 2^i \mod 4$, this leads to the second summation term dropping and now I have: $$ m \mod 4 = (a_o \mod 4)(1 \mod 4)  \mod 4+ (a_1 \mod 4)(2 \mod 4) \mod 4=(a_o \mod 4) \mod 4+ \left[2(a_1 \mod 4 ) \right] \mod 4$$ Now I check cases $(a_o,a_1 ) = \{ (6,0) , (6,6) , ( 0,6) , (0, 0) \}$ , it seems so that plugging $(0,0)$ gives me $ m \mod 4= 0$ which means it is a perfect square..? Where did I make a mistake? This is like saying any number ending with two zeros is a perfect square!

I proceeded using infinite descent. Let $ N =a_na_{n-1}a_{n-2}\ldots\ldots a_2a_1a_0$ be the decimal representation of the number. Then either $N$ ends in an even number of zeroes  or $a_0=6$  Now all squares are $\equiv 0 \text{ or } 1 \bmod 4 $. But  if $N$ ends in $06\text{ or }66 $, then $N\equiv 2 \bmod 4 $. Thus $ N $ does not end in $6$.  If $N$ ends in an even number of zeroes then, then $ N=10^{2n}\cdot N'$.  Applying the same argument to $ N'$ we commence an infinite descent.  Is the proof correct ? Any shorter proofs ?


Texas holdem, KKK22 full house showing on table.   Player 2 has the K2 hole cards to make the same full house, is the pot split among all players or is it player 2 pot?

In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2♣ and 3♣   Bob has 4♣ and 5♣   On the board are 6♣, 8♣, 10♣, 2♥, 5♦   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer.


I know how to use  ${parameter#word} Remove matching prefix pattern   and  ${parameter%word} Remove matching suffix pattern.   but is there a way to nest them in a single call, such as  ${${variable#foo}%bar}   ?  It looks like I should be able to use this somehow     If the first character of parameter is  an  exclamation  point  (!),  a level  of  variable  indirection is introduced.  Bash uses the value of the variable formed from the rest of parameter as the name of the variable; this variable is then expanded and that value is used in the rest of the substitution, rather than the value of parameter  itself.   but I can't figure  it out.

I'm trying to use the Bash parameter expansions to modify the output of a command substitution or another parameter expansion. The following nested expansions work quite well in Zsh; but result in a "bad substitution" error in Bash: ${${PWD##*/}//trunk/latest}  or ${$(basename $PWD)//trunk/latest}  the output should be the last folder of the $PWD, replaced by latest when my current directory is trunk so /home/user/trunk should become latest Is there a Bash equivalent allowing to chain expansions without relying on variables or pipes? Or do Bash expansions only allows the input to be a string or a plain variable?


Synology NAS's provide a multimedia server backed by a PostgreSQL database. You can connect to that database from an SSH session: sudo su - su - postgres psql mediaserver postgres  Now, I'd love to be able to connect to the database from any computer on my home network, e.g. using pgAdmin, rather than through an SSH terminal. My NAS is not exposed to the Internet and is behind my router's firewall, so I only need to open this to computers on my home network. Can anyone guide me on how to get there? I have no knowledge whatsoever on PostgreSQL, as I'm more experienced with MySQL.

I installed the latest pgAdmin 4 (v2.1) but I found out that (), for the moment, the only way to establish a connection through an SSH tunneling is using another outside process, an  says:  I setup a tunnel as follows: ssh -f dpage(at)hostname(dot)enterprisedb(dot)com -L 5999: hostname.enterprisedb.com:5432 -N  (...) I was running on Mac, but the same procedure should work on Linux. On Windows, there's a tunnelling app in Putty iirc, but I don't know how to use it offhand.  I have found a simple . The connection is established but it seems, when I try to connect through pgAdmin it fails or is refused (using 127.0.0.1:3306 or 127.0.0.1:5432 as the tunnel's destination). Why?


as you can see the flowers are not focused, I cannot focus everything, I have to chose the squirrel or the flowers, is it normal?  THANK you  D750 28-300

I am quite new to DSLRs and one of the first things I noticed was the incredible focus points and appearance of depth that you can achieve. That is great in a lot of scenarios, but not in all. When filming a landscape as a whole, I do not want to have the focus on that single tree, but on the whole skyline.  Is there a way by which you can sort-of "disable" the focus, so that the raw image is recorded without any added blur? I suppose something as simple as this is only a small function you can turn off, but I can't seem to find it in the manual of my camera.


So I'm pretty new to electronics, and I'm getting slightly hung up on the concept of ground. I'm thinking the circuit diagrams below will help me to explain this frustration, because there's not an intuitive explanation as to why these two diagrams are identical.   I'm just going to spew what I believe is correct, and hopefully I get some stuff wrong and learn along the way.    Looking at the rightmost diagram:  My intuition is that (since these are 0V reference points, not actual ground connections) if electrons flow out of the negative terminal of the battery there needs to be a connection to the right 'ground' in order to keep it at 0V relative to the left ground.   Expanding on that, does that mean every 0V reference point can be thought of as being connected by a wire. So if I had 50 more 0V reference points, throughout some complicated circuit, all of them can be thought of as being connected? Thus simplifying any circuit with multiple 0V reference points to only one 0V reference point?  Question: What is the point of doing this? Is it just to reduce the complexity of circuit diagrams later on? Because right now it definitely complicates the one below.   Secondly, say instead of 0V reference points, those ground connections are actually earth ground connections.   The reason why current would instead flow to the negative terminal of the battery is because it's more attracted to that then the neutral ground. Does any minuscule amount of current leak to ground? Also, in the same sense as before, can we think of each individual 'earth' ground in the right diagram as connected?  Thank you!

I'm a bit confused about the concept of ground, and perhaps voltage as well, particularly when trying to analyze a circuit. When I learned about Ohm's law in grade school, I learned how to apply the law to calculate current, voltage, and resistance of simple circuits.   For instance, if we were given the following circuit:    We would be could be asked to calculate the current passing through the circuit. At the time, I'd simply compute (based on the rules given) 1.5V/1Ohms=1.5A.  Later on, however, I learned that the reason the voltage of the resistor would be 1.5V is because voltage is really the difference in potential between two points, and that the difference of the voltage across the battery would be the same as that of the resistor (correct me if I'm mistaken), or 1.5V. I got confused, however, after the introduction of the concept of ground.   The first time I tried to do the current calculation for a circuit similar to the previous circuit on a simulator, the program complained about not having a ground and "floating voltage sources". After a bit of searching, I learned that circuits need ground as a reference point or for safety reasons. It was mentioned in one explanation that one can pick any node for ground, although it's customary to design circuits so there is a "easy place" to pick ground.   Thus for this circuit    I picked ground at the bottom, but would it be okay to pick ground between the 7 ohm and 2 ohm resistor - or any other place? And what would be the difference when analyzing the circuit?  I've read that there are 3 typical ground symbols with different meanings - chassis ground, earth ground, and signal ground. A lot of circuits I've seen used in exercises either use earth ground or signal ground. What purpose is there in using earth ground? What is the signal ground connected to?  Another question: since the ground is at unknown potential, wouldn't there be current flowing to or from ground to the circuit? From what I've read we treat the ground as 0V, but wouldn't there be some sort of effect because of a difference in potential of the circuit and ground? Would the effect be different depending on what ground was used?  Finally: In nodal analysis, one customarily picks a ground at the negative terminal of the battery. However, when there are multiple voltage sources, some of them are "floating". What meaning does the voltage of a floating voltage source have?


How do I interrupt a process started from C++ with the popen call — how do I send it a SIGINT?  Here is the popen call:  FILE* pipe = popen("vlc", "r");   I would like to close vlc when I want with an interrupt signal.

After opening a pipe to a process with popen, is there a way to kill the process that has been started? (Using pclose is not what I want because that will wait for the process to finish, but I need to kill it.)


Show that the double integral   $$\iint_R \frac{x-y}{(x+y)^3} \, dx \, dy$$ does not exist over $R=[0,1]\times[0,1]$.   My attempt:  I took $x+y=u$ and $x-y=v$  The jacobian I got is = $\frac{-1}{2}$  The limits according to me should be $u=0$ to $2$ and $v=-1$ to $1$.  The final integration I get is $$\int_{v=-1}^{1}\int_{u=0}^{2} \frac{-v}{2u^3} \, du \, dv$$  But upon integration and putting the limits I get a value of $0\times\infty$ form. Does this prove that the integral does not exist?   PS: I have made an edit to the intergrand. It was earlier $\frac {x-y}{(x+y)^2}$. I have changed it to $\frac {x-y}{(x+y)^3}$. I am extremely sorry to everyone who invested their precious time and effort in the question. There was a typing error in my book.

How can I change the variable in $$\int_{0}^{1}\int_{0}^{1} \frac{x-y}{(x+y)^3} dxdy$$ to computer the value  I tried to let $u=x+y$ and $v=x-y$  But I have no idea for next step   Can you give me some suggestion,thank you!!!


Is there a limit on how many questions I can ask per day? Per hour? Per other time unit?  Related Questions:

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


The question is rather simple: how to pretty print the name of a template parameter in a C++ class and assign it to a class variable at compile time ? It seems that both typeinfo (typeid) and boost::typeindex must be evaluated at runtime or as least some part of them. This apparently does not allow the compiler to completely solve a constexpr containing a call to one of this function.  template<typename T> class X {    public:       static const char * name = /* SOME C++ code transforming T in a string (either std::string or char */ };   What am I missing ? Is it only possible to generate a name at runtime ? In that case, does I really need an instantiated object ? It doesn't seem right to me, because the following perfectly work without any instance:  #include <iostream> #include <string> #include <boost/type_index.hpp>  using namespace std;  template<class T> class X {         public:                 static std::string name()                 {                         return boost::typeindex::type_id<T>().pretty_name();                 } };  struct foobar {};  int main() {         cout << X<int>::name() << endl;         cout << X<foobar>::name()<< endl; }   So instead of having name() as a class method, I'd like to have it as a class variable.

I'm currently working on some logging code that supposed to - among other things - print information about the calling function. This should be relatively easy, standard C++ has a type_info class. This contains the name of the typeid'd class/function/etc. but it's mangled. It's not very useful. I.e. typeid(std::vector<int>).name() returns St6vectorIiSaIiEE.  Is there a way to produce something useful from this? Like std::vector<int> for the above example. If it only works for non-template classes, that's fine too.  The solution should work for gcc, but it would be better if I could port it. It's for logging so it's not so important that it can't be turned off, but it should be helpful for debugging.


Can anybody help me how to export Repeater data to PDF file without using iTextSharp. I am generating PDF files from Repeater control using iTextSharp, it works properly but are there any other suggestions on how to export repeater data to a PDF document?

I want to generate a PDF by passing HTML contents to a function. I have made use of iTextSharp for this but it does not perform well when it encounters tables and the layout just gets messy.  Is there a better way?


I am reading Ahlfors' complex analysis.  He let $0<k<1$ and defined $$K=\int_{-1}^1 \frac1{\sqrt{1-t^2} \sqrt{1-k^2t^2}}dz$$ $$K'=\int_{1}^{1/k} \frac1{\sqrt{t^2-1} \sqrt{1-k^2t^2}}dz$$ An exercise requires me to prove that $K=K'$ iff $k=(\sqrt{2}-1)^2$. So these are elliptic integral and I read online that in general, they cannot be computed. And since Ahlfors did not say much about it, I don't think we can compute $K$ and $K'$. So how do we approach?


Python has some of the value-like objects capitalized: True, False, None.  >>> type(True) <type 'bool'> >>> type(None) <type 'NoneType'> >>>   As the current PEP-8 style guide recommends writing instances and variable names in lowercase, what is the history behind writing these value-like objects capitalized?  As it is answered / commented that built-ins are capitalized, but what is the rationale and inspiration behind this? In most languages built-ins are all uppercase, so one would expect Python to follow this paradigm?

All members are camel case, right? Why True/False but not true/false, which is more relaxed?


Is it possible to unload JavaScript with out a page reload?  It's easy to add a file dynamically by ajaxing a file in and appending it to the DOM.  But what about the opposite.  Is there a way to unload a file?  My understanding is that if I append a script element, the JS is loaded.  However if I dynamically remove the script element, the JS remains loaded.  Is there a way to unload a JS file.  Here is an example of a dynamic load:  script_el.src = base + 'some_path' + '?_time=' + new Date().getTime(); document.head.appendChild(script_el); script_el.onload = function () {     libHasLoaded(); };

I am including pages using Ajax but I also need to include their respective javascript files, which requires removing the previous javascript files from memory at the same time.  How can I unload the currently-loaded javascript files (as well as their code in memory) so that I can load the new page's files? They will more than likely conflict, so having multiple independent files' javascript files loaded.


How can shrinkage methods help you improve model fit?

The holiday season has given me the opportunity to curl up next to the fire with The Elements of Statistical Learning. Coming from a (frequentist) econometrics perspective, I'm having trouble grasping the uses of shrinkage methods like ridge regression, lasso, and least angle regression (LAR). Typically, I'm interested in the parameter estimates themselves and in achieving unbiasedness or at least consistency. Shrinkage methods don't do that.   It seems to me that these methods are used when the statistician is worried that the regression function becomes too responsive to the predictors, that it considers the predictors to be more important (measured by the magnitude of the coefficients) than they actually are. In other words, overfitting.  But, OLS typically provides unbiased and consistent estimates.(footnote) I've always viewed the problem of overfitting not of giving estimates that are too big, but rather confidence intervals that are too small because the selection process isn't taken into account (ESL mentions this latter point).   Unbiased/consistent coefficient estimates lead to unbiased/consistent predictions of the outcome. Shrinkage methods push predictions closer to the mean outcome than OLS would, seemingly leaving information on the table.  To reiterate, I don't see what problem the shrinkage methods are trying to solve. Am I missing something?  Footnote: We need the full column rank condition for identification of the coefficients. The exogeneity/zero conditional mean assumption for the errors and the linear conditional expectation assumption determine the interpretation that we can give to the coefficients, but we get an unbiased or consistent estimate of something even if these assumptions aren't true.


For some reason I'm getting an error with the Random object I created and I can't see any reason why. Can someone please help? I'd be very appreciative! public static void experiment(String method, String testType, int arraySize, int trials){     int[] intArray = new int[arraySize];     Random rand = new Random();     Long startTime;     Long endTime;     Long duration;     String durationStr;     String arraySizeStr = String.valueOf(arraySize);     for (int i =0; i<arraySize;i++){         intArray[i] = i;     }     if (method=="exhaustive"){         if (testType =="worst"){             for (int j = 0; j<= trials; j++){                 startTime = System.currentTimeMillis();                 exhaustive(intArray, intArray[arraySize-1]*3);                 endTime = System.currentTimeMillis();                 duration = endTime - startTime;                 durationStr = duration.toString();                 System.out.println("Exhaustive, Worst, " + durationStr + ", Array Size: " + arraySizeStr);             }         }         else{             for (int j = 0; j<= trials; j++){                 startTime = System.currentTimeMillis();                 exhaustive(intArray, rand.nextInt((arraySize -1) * 2));                 endTime = System.currentTimeMillis();                 duration = endTime - startTime;                 durationStr = duration.toString();                 System.out.println("Exhaustive, Best, " + durationStr + ", Array Size: " + arraySizeStr);             }         }     }

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?


In testing a null vs an alternative, if we don't reject the null (e.g. the p-value is very big, bigger than the significance level), what is our conclusion?  Can we say that we accept the null, can we? I remember I heard that not rejecting the null doesn't mean accepting the null, but I might be wrong.  Or should we simply say that we don't reject the null?

I'm trying to conduct a Student's t-test for a table of values while trying to follow the explanation and details found on . I understand that if the p-value is   <.01 then it's really significant >.05 it's not significant in between then we need more data   But on that page they seem to accept their null hypothesis no matter what the p-value is. So I'm really not understanding now when to accept or reject the null hypothesis.    When you do you accept or reject the null-hypothesis? Is it true that you are never supposed to accept your null hypothesis, but rather reject or fail to reject the null?


The problem is that NullPointException occurs at st = con.createStatement();      rs = st.executeQuery("select * from noit");      rs.next(); but they are declared to be null. The first code is for connection to MySQL and the second is to give a function to a button.  Here is his code:  public class database { public void con(){ Connection con = null; Statement st = null; ResultSet rs = null; String nqkuvsi = null; try{     con = (Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/userlogin","root","1234");            if(con!=null){         System.out.println("successfull");        }}catch(Exception e){     System.out.println("no connection");     e.printStackTrace(); } } }   Second code:  public void actionPerformed(ActionEvent a){ db.con();         ResultSet res = null;            int resul = 0;     Object s = a.getSource();                if(s==jbut){      Random rand = new Random();         Random rand1 = new Random();              int rnd = rand.nextInt(2)+1;                         int rnd1 = rand1.nextInt(2) + 2;          String nqkuv = null;          String nqkuv1 = null,nqkuv2 = null,nqkuv3 = null;          if(rnd==1){                               try{                             st = con.createStatement();              rs = st.executeQuery("select * from noit");              rs.next();              nqkuv = rs.getString(rnd1);          }catch(SQLException e){              e.printStackTrace();          }   Any help appreciated!

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 anyone list out any general rules how to calculate the number of homomorphism between different groups like Sn to Sm, Dn to Dm etc? I have been trying to calculate the number of homomorphism through the traditional approach but its very time consuming.

The Gallian Abstract Algebra text has a number of exercises of the form 'Determine the number of homomorphisms between two groups $G$ and $H$'. It is pointed out that, in the case of a cyclic $G$, determining the image of a generator of $G$ under a homomorphism $\phi$ suffices to specify the entire mapping, since $\phi(g^n)=\phi(g)^n$ for any $g \in G$. Hence determining the number of homomorphisms simplifies to counting generators of $H$ and applying Lagrange's Theorem. Are there any other useful properties of homomorphisms that can be used as tricks for this type of problem or just general strategies when counting maps between $\textbf{non-cyclic groups}$? Two examples I see in the text exercises are:  (1): Determine all homomorphisms from $S_3$ to $G$, where $G$ is Abelian.  (2): Determine the number of homomorphisms from $Z_p\oplus Z_p\to Z_p$, where $p$ is prime ($Z_p$ being a subgroup of the additive integers).  Thanks in advance!


I would like to put a door closer in a door. The problem is that the door is not like a normal door as the one below:   the door has no walls to its side or above it. It's like a door in the middle of a tunnel. Like this:   Because of this I can't use a normal door closer like the one in the first drawing. Do you guys know of any door closer that can be used in a door installed like this?

There are some kind of door devices which push the door back after we open the door and come out.  My problem is that the door area is not constructed in a way that such a device can be installed.  There is no space adjacent to the door anywhere.  Automatic closure of door is extremely important to me.   Please see following pictures and tell what choices do I have.


I'd like to find out (ideally via terminal) how long my operating system (Ubuntu 12.04 LTS) has been installed - either that or the date on which the installation took place. Is this possible? If so, how can it be accomplished?

is there a command which will output the date that ubuntu (or any distribution) was installed?


My question is this, $P= dW/dt.$ dW=F.dr That leads to P= F.v But how?! The book (Schaum's theoretical mechanics) stated that this formula is true. But I think it is true just in case that F is constant, otherwise we have to apply the rule of the product of derivatives for dot product! Can any one help me and illustrate the bug picture for me?

Mechanical power is normally defined as $P = \mathrm{d}W/\mathrm{d}t$, and work is normally defined as $W = \vec F \cdot \vec x$. Today an undergrad pointed out a confusion he had  from Griffiths' E&M book where he has the line $$P = \frac{\mathrm{d}W}{\mathrm{d}t} = \vec F \cdot \vec v$$ Which is a definition of power I had seen before. But the student was confused because it seems like, if you have a time dependent force $\vec F(t)$, the math should work out like: $$P = \frac{\mathrm{d}W}{\mathrm{d}t} = \frac{\mathrm{d}\vec F(t)}{\mathrm{d}t} \cdot \vec x +  \vec F \cdot \frac{\mathrm{d}\vec x(t)}{\mathrm{d}t}$$ (From the product rule.) However, I've never seen the above formula, so I'm guessing it's wrong. Also, it clashes with the $\vec F \cdot \vec v$ version that I'm pretty sure works completely fine with a time dependent force. I gave him a pretty weak answer and warned him that it's probably not correct: I told him that if you start with the differential form of work, $dW = \vec F \cdot d \vec x$, it seems to assume that the force stays the same in that tiny $d\vec x$, so it's constant there, and then dividing both by $dt$ gives you the equation we're looking for.  seems to say something similar, basically using the step of $d\vec x = \vec v \ dt$ to get $\vec F \cdot \vec v$, which also assumes that $\vec v$ is constant over $d \vec x$. So, assuming one of those are correct, I see how they get $\vec F \cdot \vec v$. But what's the flaw in the product rule thing?


I want to start coding in my assignments and lab reports in TEX (I'm not sure that's the correct software name) as they look more professional.  The only TEX knowledge I have is writing mathematical equations like:   $$ \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} $$   As for coding experience goes, I have done programming in C and C++ before.   My question is then:  What program or online editor is the best to use? and where can I find some good tutorials?   (I'm sorry that my Tag does not relate to what I'm asking, I don't know what the appropriate tag is.)

Which book (free or otherwise) was the most useful to you when you started learning LaTeX?  I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around.  Also see .


I'm trying to double arrows their X Motion and it's working great except for the part that I can't apply the scoreboard data to the entities. My system is so build that it can handle multiple arrows at once but I get stuck in the last command  execute as @e[type=arrow] store result score @s Bullet.Y run data get entity @s Motion[1] 100000  execute as @e[type=arrow] run scoreboard players operation @s Bullet.X *= 2 F.Data  execute as @e[type=arrow] run data modify entity @s Motion[0] set from **score @s Bullet.X**   This is not a thing but it would be really handy to use. I just don't know how to do this with using a valid command.

I'm trying to make whenever an arrow is shot it will fly at double the speed without falling. The no falling part was easy, simply did execute as @e[type=arrow] run data merge entity @s {NoGravity:1} and that did the trick.  The other part is the real problem. As I understand, I'd have to    execute as @e[type=arrow] store success entity @s Motion double somehow double that value run data merge entity @s {Motion: (whatever I got earlier) } on that arrow   I can store the data all right, but the problem is I am completely oblivious of how to double that, fetch, and merge value simultaneously.  I've considered creating an individual score for each values and doubling them since that's the only way I know, but I genuinely couldn't understand how the scoreboard command works.


Ok, in Web2.0, i saw many sites using action icon instead of text menu. Ex:   This is the menu bar using text menu [Product] [Search Article] [Place an Order] .....  This is the menu bar using icon [icon1] [icon2] [icon3] .....   You see web2.0 is just like Desktop app. In Desktop app (like Excel), they use icons a lot in menu bar (Ex: a Door icon is stand for open) & they did a good job that it made a standard in Desktop app.  So how does user feel if they see lot of icon in Web2.0 app?  Do they feel better?  Note:A Web 2.0 site may allow users to interact and collaborate with each other in a social media dialogue as creators of user-generated content in a virtual community, in contrast to Web sites where people are limited to the passive viewing of content. (Wiki)  Web2.0 like Gmail or Facebook where people can interact with the web site just like they did in a desktop app like Gmail.

Are there any rules on when to use icons vs. icons with text vs. just text links in a web application?  For example:    vs.   save  vs.  save    Extra question: Is  save -or- save  preferable?


I want to ask questions on how to make my social media usage more efficient.   Questions like:   Ask for tips  How to get more facebook-page fans or twitter followers Which tools are available for facebook and/or twitter users to get insights on their social media activities.   Where can I ask such questions?

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?


I have a mounted a partial disk on my Ubuntu VPS.  After a reboot the disk will be unmounted.  I can remount it manually but it keeps unmounting after rebooting the VPS and this stops the cron jobs I use for making backups.  In /etc/fstab I added the line:   https://[mylink].stackstorage.com/remote.php/webdav/ /var/stack davfs user,rw,noauto 0 0   [mylink] = my own stack storage name.  The url is correct. If I open it then it asks for my credentials and gives back an "Ok" status.  I don't use users on my VPS; I do everything as root (not sure if this could be the issue).  I have followed  to set up my partial disk (sorry it's in Dutch).

I want to mount a directory on a file server at startup. This is my /etc/fstab entry:  # mount the fileserver https://fsrv.company/ /mnt/fileserver davfs user,auto 0 0   Manually mounting it with mount /mnt/fileserver works fine. However, because of an outdated certificate this issues a prompt which I always have to answer with yes:  /sbin/mount.davfs: the server certificate does not match the server name /sbin/mount.davfs: the server certificate is not trusted [...] Accept certificate for this session? [y,N] y   This device should be mounted when starting Ubuntu (due to the auto option). However, the device is not mounted, probably because of the required input. The owner of the fileserver wont update its certificate.   How can I automate this process, such that the device is mounted at startup with the answer being always y\n?  EDIT: I did download and place the certificate in .davfs2/certs/ and edited the entry in .davfs2/davfs2.conf (as hinted below by @Oli), but the interactive input remains.


I am trying to add a WMS service to qgis but am having some problems. After adding the url and name of the service and clicking on connect, I am receiving the following error message:-  "Could not understand the response.  The wms provider said: Download of capabilities failed: Connection timed out"  Does anyone know what the issue might be?

Currently I am using a QGIS server with a Linux CentOS system. I am attempting the create a WMS in QGIS and upload it to my website. I have followed the instructions in the "Quantum GIS User Guide: version 1.7.0 Wroclaw". I am trying to call the newly created WMS in QGIS by "Add Layer(s) from a server" button. I am very certain I am entering the correct address but I always get this error below    Could not understand the response. The wms provider said: Download of capabilities failed: Error downloading  http://***************/cgi-bin/projects/qgismapserv.fcgi?SERVICE=WMS&REQUEST=GetCapabilities Server replied Internal Server Error


I am using jQuery $.GET to scrape the search results from a remote server application and I want to have the links that are returned trigger another jquery $.GET request once they are clicked.   In the example below I am simply trying to prevent the link from opening the page and even the event.preventDefault() method is failing.  The problem is that I neither the .click() or .on("click") event handlers are firing in the example page.  Granted I am having to use CORS extension to develop this locally in Chrome but I couldn't find where that would prevent the .click events.  I've also tried using $.POST as well with no successs.  I've been at this for a bit and have googled quite a bit looking for a reasonable explanation as to why this isn't happening.  search.html  <form action="search.html" method = "post" id="searchForm"> <input type="input" name="q" id="q" /> <input type="submit" value="Search K-Tube" id="submitForm" />  </form>

             ktube.js   $("document").ready(function () {   $('a [id^="tubeLink"]').on("click", function (event) {    event.preventDefault();   });    $("#searchForm").submit( function (event) {     event.preventDefault();      var q = $("#q").val();      if (q != "") {        $.get("http://ktube.kellerisd.net/education-center?search=" + q + "&global_search=true", function(data) {                  var count=0;                 var thumbs = $(data).find(".thumbDescription h5"); //Finds the Video Thumbnails Titles                   var output = "
Results

";                  $(thumbs).each(function(index, value){                  var link = $(this).find("a").attr("target", "_blank"); //Finds the links and opens them in new browser window                 link = $(link).attr("href", "http://ktube.kellerisd.net" + (link).attr("href")); // Creates an absolute URL for Video on Ktube                 link = $(link).attr("id", "tubeLink" + index);                  output += "
"+ $(this).html(); +"
";                 count++;                 });                  output += "

Total Results: " + count;                   $("#response").html(output);          });    }else {     alert("Please enter a search term");    }      });   });

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 came across this code I have no clue what it is doing  // ptr is a pointer to an int if (2[ptr] == 5){     // do something }   I did some of my tests but no matter what value I pass into ptr, 0, negatives, positives, 2[ptr] always evaluates to 0. I am surprised it actually compiles. Can someone explain what this expression is ?

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


The code:     $('.del').click(function(e){         $(this).parents('.order-item').remove();         if($('.order-item').length == 0){             $('#order-items').append(Data.order_item_clone)         }     })  What am I doing wrong? As you can see, I am trying to remove the parent element '.order-item' based on the '.del' element clicked. Nothing is happening. This is what the html looks like:

             <button class="del" style="width:100%; height:77px"> Del </button>

             <button class="print" style="width:100%; height:77px"> Print </button>

  For the most part, this html is generated dynamically with javascript/jquery. Can anyone help? Thanks in advance Edit: When I do $('.del').eq(0).parents('.order-item').remove() things work find, so there is something wrong with $(this)


Ubuntu 14.04: If I hover the mouse over the upper symbols in TEXstudio little yellow areas appear, but there is no text in them.  What to do?

I would like to use this program but I do not know how to display context-sensitive help (see figure below) without a black background. I use Ubuntu 12.10 and I don't know what other information might be helpful to solve this problem. Thus, the program behaves since installation.


I am trying to install Ubuntu 16.04 on my workstation tower. I need a dual boot for Windows and Ubuntu.   When I boot from my USB drive, and the grub list appears for Ubuntu installation, selecting either install Ubuntu or try Ubuntu without installing leads to a dark screen , throwing the error mentioned in headline.  I have tried all the solutions as listed here for this issue, however, nothing works.  I have tried:   changing UEFI to legacy and back to uefi disabled fast boot created my bootable drive as per Ubuntu instructions using Rufus turned off secure boot   I am currently running windows enterprise, as this is my office workstation.

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: