I was working on the following problem, when I ran into some trouble due to some repeated division of vectors into components.    I began by drawing the forces acting on the block.   I pretended that the incline was the positive coordinate axes.Now, since the wall could only push horizontally, I broke up the downwards-left pointing vector into two components, one that goes directly outwards and one that goes directly downwards. However, the since the block doesn't move downwards, it must be applying another perpendicular force onto the wedge. So in order to find the net normal force on the wedge, I summed up this seemingly infinite series of vectors:  $N=Mg\cos(\theta)+Mg\sin(\theta)^{2}\cos(\theta)+...$  $N=\sum_{i=0}^{\infty} Mg\cos(\theta)\sin(\theta)^{2i}$  $N=\frac{Mg\cos(\theta)}{1-\sin(\theta)^{2}}$  $N=\frac{Mg}{\cos(\theta)}$  However, this normal force exceeds Mg! What did I do wrong? Also, how should I approach this problem? Any hints would be appreciated!


Insert div after every three posts in home.php

I want to insert a div with content into my posts page after every three posts are called from the loop.   I want to use this to display banner ads / newsletter signup call to actions.  This is from home.php      /* Start the Loop */     while ( have_posts() ) : the_post();      if ($wp_query->current_post === 3) {     // your code     }          /*          * Include the Post-Format-specific template for the content.          * If you want to override this in a child theme, then include a file          * called content-___.php (where ___ is the Post Format name) and that will be used instead.          */         get_template_part( 'template-parts/content', 'single' );         endwhile;      the_posts_navigation();  else :      get_template_part( 'template-parts/content', 'none' );  endif; ?>


How does a broomstick determine which rider is in control?

In Harry Potter, how does the broomstick know who to listen to when there is more than one person on it?  Is it the person in the front? The person using hands holding it? The first person to get on? Or is it its owner?  If not, can two people control a broomstick at the same time?


I'm fairly new to C# threading, so apologies in advance for this newbie error. The aim of the following code is to evaluate the fitness of a population that is stored in an array called members. The procedure members.calculateFitness() is a black box (i.e. I can't modify it to improve performance), so I'm trying to setup threads that call the black box simultaneously, and each thread will deal with 1/THREAD_COUNT population members (so if THREAD_COUNT=4, each thread will deal with 1/4 of the population).  In the first for loop I initialise each thread. In the second for loop, I start the thread.   public void ThreadedPrintPopFitness ()     {         int THREAD_COUNT = 1;         int membersPerThread = members.Length / THREAD_COUNT;          Thread[] fitnessCalculator = new Thread[THREAD_COUNT];         int[] threadResult = new int[THREAD_COUNT];          for (int i = 0; i < THREAD_COUNT; i++) {             int start = i * membersPerThread;             int stop = (i+1) * membersPerThread;             fitnessCalculator [i] = new Thread (() => getMaxFitness (members, start, stop, ref threadResult [i]));         }          for (int i = 0; i < THREAD_COUNT; i++) {             fitnessCalculator [i].Start ();         }          for (int i = 0; i < THREAD_COUNT; i++) {             fitnessCalculator [i].Join ();         }          int maxFitness = 0;         for (int i = 0; i < THREAD_COUNT; i++) {             if (maxFitness < threadResult [i])                 maxFitness = threadResult [i];         }          Console.WriteLine ("(ThreadedCount) Fittest Population Member's Fitness: " + maxFitness);     }      private static void getMaxFitness (PopulationMember[] members, int start, int stop, ref int result)     {         int maxFitness = 0;          for (int i = start; i < stop && i < members.Length; i++) {             if (members [i].calculateFitness () > maxFitness) {                 maxFitness = members [i].lastFitness;             }         }          result = maxFitness;     }   Stepping through the code shows that it gets into the second for loop, and then jumps back to the first for loop and declares an IndexOutOfBoundsException on the integer i. I can see that i = THREAD_COUNT (I've tried with different numbers for THREAD_COUNT).  I'm completely baffled, what am I doing wrong? Thanks in advance!


Why does RJ-45 use pins 1, 2, 3 and 6 instead of 1, 2, 3 and 4 to send and receive data?

Why does TIA/EIA 568A and TIA/EIA 568B use pins 1, 2, 3 and 6 to send and receive, instead of 1, 2, 3 and 4? Is there a significant reason for this?


Can I use M1 straight away and get rid of IV in Merkle–Damgård?

In Merkle–Damgård is there any reason why we use a fixed $IV$ at the beginning? Can we use the first block ($M_1$) right away instead of $IV$ and feed it through the compression function with $M_2$.


How to combine in a sentence two verb–preposition pairs that have the same object?

Examples:        Data can be imported to and exported from the application.    Data can be imported and exported from the application.   Data can be imported to the application and exported from it.                  The manager defined the products that should be added to and removed from the store.   The manager defined the products that should be added and removed from the store.   The manager defined the products that should be added to the store and removed from it.      I assume that the third sentence is correct in my examples. My question is whether the two other sentences are correct.


I appear to have lost some hats: At the beginning I got 5 or 6 secret hats (obviously I have no idea for what) but that count suddenly went down to 4. I might have thought that I mis-remembered if I wasn't currently wearing one of the lost ones:  As you see that Disciple hat is not in the collection. Furthermore, the "You earned this hat on" list for it is empty. Thus, ... are hats sometimes denied after earning them by design or is this a glitch?


Can any integer can be written as the sum of 8 integer cubes?

Can anyone offer an elementary proof why: $$\forall n \in {\mathbb Z} \space \exists a, b, c, d, e, f, g, h \in {\mathbb Z}$$such that$$n=a^3+b^3+c^3+d^3+e^3+f^3+g^3+h^3{\rm ?}$$  In other words, why every integer is the sum of eight cubes integers.  My first thought was that since the gaps between $p^3$ and $(p+1)^3$ increase with $p,$ this would only hold for small integers.  This is wrong; can anyone tell me why?  N.B. This is different to Waring's problem because $n,a,b,c...$ dot not have to be natural numbers, so we can have $27=3^3+(-1)^3+(-1)^3+(-1)^3+(-1)^3$


I am travelling to my home country India from US. I have a change of flight in Frankfurt and my US visa has expired. Will I need transit visa? German Houston consulate told me I don't need one, but that was just verbal instruction. There is lot of conflicting views regarding this. Can anyone confirm there is not transit visa needed at Frankfurt airport?  Note: It might be thought as duplicate except that Houston German Consulate confirmed me that I don't need Transit visa unlike other answers indicate.


Can we install a package through a shell script?

I'm trying to write a shell script so that when I reinstall my Ubuntu again. I could just run script and retain all the packages. And I'm planning to pass password in form of argument.  My question here is how can i enter into sudo domain without manually entering password. As I'm also planning to design a UI where it can't access the terminal there.  Ex:  ./recover.sh password   Would appriciate the response ;)  with regards  pavan


I have been using Ubuntu Desktop for a while now, but today for some reason I am not able to start it. Here is what I see.     I have tried rebooting and starting it in recovery mode. but seems to be of no help. I am downloading fresh copy of Ubuntu so that I can play around with steps mentioned here -      Here is what I have tried.      I booted Ubuntu from USB      Saw 4 options :    1. Try Ubuntu without installing    2. Install Ubuntu    3. OEM Install    4. Check disc for defects      I went to first option. Opened terminal --> sudo fdisk -l      This gave me my actual device name --> /dev/sda1      Then I executed --> sudo fsck /dev/sda1      Rebooted again from Hard disk. Same issue persist. Anything I am   missing?   Will keep this thread updated. Meanwhile, suggestions are welcome.


Find the value of $\int_0^1 \frac{\ln(1+x)}{1+x^2}dx$

Find the value of following function's integral  with respect to x from 0 to 1  $$F(x)=\frac{\ln(1+x)}{1+x^2}$$


Humans are carbon-based cellular lifeforms, and as such we tend to leave disgusting residue on all surfaces after a while. And I'm sure someone's spilled a few bottles of synthehol at the lounge. And yet, the Enterprise always seems clean.  So who or what cleans this stuff up?  From CGPgrey via the HI podcast.


Example to the statement that $a_{n+1} - a_n \rightarrow 0$ as $n \rightarrow \infty$ does not imply that sequence $a_n$ converges.

I am looking for an example of a sequence which shows that, $a_{n+1} - a_n \to 0$ as $n \to \infty$ does not imply that sequence $a_n$ converges. I have a feeling that the sequence should be an oscillatory one but I am unable to think of an example.


Prove $\lim_{x\to0} \sqrt {4 − x} = 2$ using $ε$, $δ$-definition.

Prove $\lim_{x\to0}  \sqrt {4 − x} = 2$ using $\varepsilon$, $\delta$-definition.   Here's what I got:   Given $\varepsilon > 0$, choose a particular $\delta$.   Then whenever $0 < |x| < \delta$,   $|\sqrt {4 − x} - 2|$ has to equal $\varepsilon$ if we want to prove this limit.   I know that $4-x > 0$. How do I prove and present this question?   Thanks.


How do I use wget to download YouTube videos?

I have Ubuntu 12.04 LTS and I just found out about the wget command and was wondering if there was a way to download YouTube videos using wget?


Relation between Stirling numbers of first kind and harmonic numbers

We have the following nice relations for Striling numbers of the first kind $${n\brack 2} = \Gamma(n) H_{n-1}$$ $${n\brack 3} = \frac{\Gamma(n)}{2} \big((H_{n-1})^2-H_{n-1}^{(2)}\big)$$ Where $$H^{(p)}_n = \sum^n_{k=1} \frac{1}{k^p}, \,\,\,H^{(1)}_n \equiv H_n$$ Questions  I want an algebraic proof (not combinatorial) for the previous relations. Is there a "simple" general formula in terms of the harmonic numbers for  $${n\brack k} = {?}$$


When I start an SSH session that executes a long-running command, what happens with Ctrl+C (SIGINT) handling? I can see that the SSH session is closed, but I am not sure who gets the SIGINT first: is it...  the remote long-running command? that is, (a) the signal handler in the remote command is called and stops the remote command, (b) the shell that spawned it detects that the command stopped, and stops as well (c) the remote sshd detects the shell stopped, so it closes the connection or  the local ssh receives the signal, and closes the connection.   I think that (1) is happening, but want to make sure. I am also uncertain about what happens with shell handling of SIGINTs in this case. For example, if I ... ssh remote 'while true ; do sleep 1 ; date ; done'  and Ctrl+C, then the remote connection is dropped. Is there a way to run the remote command under a shell that will stay alive after Ctrl+C? That is, in this case, stop the loop and allow me to keep working on the remote shell?


'I did commented on your post' vs. 'I did comment on your post'

I did commented on your post.       Is this a correct sentence? As you know that we often make emphatic sentences by using "did"but when we make them we use 1st form but here 2nd form is used.  I am just confused.


Error moving uploaded file using jQuery & PHp

$(document).ready(function(){          var status;         var photo_url;         var ext;      $("#photo_file").change(function() {          photo_url = this.value.split("\\").pop();          ext = photo_url.split('.').pop().toLowerCase();          if ( (ext == "jpg" ) || ( ext == "jpeg") ||  (ext == "png") ) {             $.get('ajax/post.php', {photo_url: photo_url});         } else {               alert("incorrect file type, allowed: jpg, jpeg, png.");         }      });   this is "post.php"  <?php      $photo_url = $_GET['photo_url'];      $file_path = 'uploaded_photos/' . $photo_url;     $photo_url = 'img/' . $photo_url;      move_uploaded_file($photo_url, $file_path);  ?>   Everything works fine i get the filename of photo but i can't move it to another folder using move_uploaded_file(); function.


It my be old issue, but I can't find right solution.  How to produce GeoTIFF from layout view not from data view?  Any simple solution?


Installing mysql from source or using apt-get?

Are there any benefits to installing mysql from source, or should I just use apt-get?


Old featured meta question intermittently appearing in "Featured on Meta" box

For some reason, a Meta question on IPS has recently erroneously appeared in the sidebar "Featured on Meta" box. Not only is this question not currently featured, it's locked. The featured tag was removed February 2nd, and this is not a caching issue because it was not in the box earlier this evening. Some screenshots: The box and the entirety of the currently tagged "featured" list.    The history page that shows the featured tag being removed on February 2nd and locked.  Why must I be forced to relive out past failures??? My understanding is that this occurs from time to time. How can it be fixed? There's a similar problem on PPCG and, interestingly, that post is also locked for historical significance. I'm not sure if that's part of the bug or merely a coincidence. Can we please fix this?  It's been a month. It's March 2nd and I'm still seeing it posted in the sidebar. At the same time, I have unfeatured the "UPDATED: COMPLETED" post in the first image (which is not locked) and it is not being affected.


Is there a relationship between number of covariates and sample size in logistic regression?

Is there some definite relationship between number of covariates and the sample size in logistic regression? (e.g. larger the number of covariates, larger the sample size needed, etc.)  Thank you,


I'm using Retina Macbook Pro running OS X 10.8 Mountain Lion. Is it possible to use QuickTime to capture both audio and screen ? If not, what are the free apps that can do it?  P.S. A lot of the times I see on Youtube that it possible to capture screen + audio + have a little window of yourself in the corner - how is that achived?


How do I calculate a double integral like $\iint_\mathbf{D}e^{\frac{x-y}{x+y}}dx\,dy$?

The Problem is to integrate the following double integral $\displaystyle\iint_\mathbf{D}\exp\left(\frac{x-y}{x+y}\right) dx\, dy$ using the technique of transformation of variables ($u$ and $v$).  There is a given $D$ with $D:= \{(x,y):\ x\geq 0,\ y \geq 0,\ x+y \leq 1\}$  My Approach: wasn't quite successful at all. I am quite familar with calculus, but i am stuck at multiple integrals. I thought about the following transformation:  $u = x-y$ and $v = x+y$  But i don't know the next step.  Another suggestion: i thought about the integration of the e-Function. I have in mind that $\int e^x dx = e^x$. So maybe: $$\iint_\mathbf{D} \exp\left(\frac{x-y}{x+y}\right) dx\ dy = \exp\left(\frac{x-y}{x+y}\right) ?$$


Okay, so I understand what calculus, linear algebra, combinatorics and even topology try to answer (update: this is not the case in hindsight), but why invent category theory? In Wikipedia it says it is to formalize. As far as I can tell, it sort of generalizes a bunch of fields in mathematics, like in topology, graphs and groups we have isomorphisms and automorphisms and homomorphisms, it seems to me like it just finds a bunch of results that are true to these functions in a bunch of disciplines. But why would generalizing that be of use? I mean, wouldn't it be easier to prove them specifically in each of the important disciplines?


I have read before in one of Seiberg's articles something like, that gauge symmetry is not a symmetry but a redundancy in our description, by introducing fake degrees of freedom to facilitate calculations.  Regarding this I have a few questions:   Why is it called a symmetry if it is not a symmetry? what about Noether theorem in this case? and the gauge groups U(1)...etc? Does that mean, in principle, that one can gauge any theory (just by introducing the proper fake degrees of freedom)? Are there analogs or other examples to this idea, of introducing fake degrees of freedom to facilitate the calculations or to build interactions, in classical physics? Is it like introducing the fictitious force if one insists on using Newton's 2nd law in a noninertial frame of reference?


How to get the result of random item with different possibility?

I'm wondering if anyone can guide me with following problem... Each fruit has different chance to be called out.  Apple - 80%  Orange - 10% Banana - 10%   Each time a user click on the random image, only 1 fruit will come out with above weight. I have no idea how I can calcuate to get that result. Pseudo code example is fine for me.


Howto force ssh to use a specific private key?

With ssh -i <private key filename> you can instruct ssh to use an extra private key to try authentication.  The documentation is not clear on how to explicitly use only that key.


Dealing with 'less than optimal' data or study designs

I am a PhD student in a quantitative social science field. For the first study of my dissertation, I was given the opportunity to ask some questions that could be applied to an ongoing survey. Affiliated researchers have already used some of this data for a short commentary/descriptive article, and there is interest to apply the data in a slightly different 'modelling' study.  However, the underlying study design leaves much to be desired. Although the sample is relatively large, it is a convenience sample from only a fraction of all possible survey sites in the population. There is no opportunity to expand the data collection process. The data itself is unlikely to have measurement error, but almost any estimate produced from the dataset is highly likely to suffer from sampling bias.  Nevertheless, I realize this is a somewhat 'common' situation graduate student find themselves in. There is active interest from the affiliated partners to carry out the study, the design isn't 'ideal', and there are logistical considerations of invested time (or as I see it, sunk cost fallacy).  While I have many questions, I think the most straightforward is: should I attempt to make 'lemonade out of lemons' or 'stand my ground' that such a modelling study would be inappropriate?   Other potential information:   Supervisor is 'ardent' that such a study should be carried out I have sought out external input as to what methods would be 'most' appropriate, there are some that might be 'less' worrisome than others


What should I consider when buying a lens hood?

I have Nikon D5200 with 18-55mm kit lens, and I want to buy a lens hood. Some related questions:   Will the lens hood increase the photo quality? What are the types of lens hood? Should I be looking at a "petal" lens hood or a circular one?


How to show a $k[x]/(x^n)$ module with finite free resolution is free?    Suppose we have a exact sequence $k[x]/(x^n)^{\oplus n_1}\to k[x]/(x^n)^{\oplus n_{0}}\to M\to 0$, how do we get information to show $M$ is free?


Are they going to make a 7th Star Wars movie? Disney bought Lucasfilm for $4.05 billion dollars and they said they where thinking about making it in 2015.


How may a young scholar without tenure change their field of research?

So let me elaborate on this question a bit with an imaginary scenario: John is a young, recent Ph.D. graduate in computer science. During his Ph.D. he was mainly concentrating on network science and algorithms, but he has developed a deep interest in computational social science, a related but not that closely related field. He wants to get deeper into this and even perhaps change his primary area to computational social science, but he may not be prepared for this. He has read sufficient materials and research work about this, and the required technology/math for him is not difficult, but he hasn't done any real research on this subject. So in this scenario, what should a young scholar like John do if he/she is really dedicated to making some contributions? Please note, that we are talking about a young scientist, not a tenured professor who has much more freedom. A postdoc is certainly an option, but how likely is John getting a postdoc position since it's not his primary research area?


$\mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}$ are not equivalent as abelian group models.

I am facing a problem about showing the proposition above, where the language $\mathscr{L}$ is the language of abelian groups. I am thinking that $\mathbb{Z}$ has a generator $1$ and therefore $\mathbb{Z}\vDash \exists x \forall y (\exists n, y=nx)$, while the sentence is false in model $\mathbb{Z}^2$. However, $n$ is not in the language and I am confused if this idea make sense. Thank you all!


Contradiction in Euler’s Identity? $2i\pi = 0$

Many of us know Euler’s famous identity:     $e^{i\pi} + 1 = 0$.   But if we add -1 (subtract 1) to both sides we get:      $e^{i\pi} = -1$   then natural log of both sides and:      $i\pi = \ln(-1)$   Next we multiply both sides by 2:     $2i\pi = 2\ln(-1)$   Which by basic logarithm rules is equal to:     $2i\pi = \ln({-1}^2) = \ln(1) = 0$   so     $2i\pi = 0$   which can’t be true as either 2, i or $\pi$ would have to equal 0. My best guess is that logarithms just plainly aren’t defined for negative values, I just assumed this was just true logarithms bounded under the real numbers, though I might be wrong. If someone could help it would be great.  Thanks.


Hot key/shortcut for point, edge and face select?

Is there a default hotkey or shortcut for changing between point edge and face select in edit mode? It can be annoying to have to click the bottom every time. Thanks in advance


explorer.exe can't modify directories, cmd.exe can

I have 64-bit Windows 10 Pro, upgraded from Windows 7. My problem is that my windows explorer cannot find my directories if it would need to move or rename them. It can create directories, but they always end up having name "New Folder", and I get this:   If I use cmd.exe, I can move and rename my directories just fine.  Apparently explorer.exe always first creates them with name "New Folder" and then renames it and renaming fails.  I have three hard drives: 500GB SSD drive, and 3TB and 1TB HDD drives. The behaviour is identical with directories in all these three drives.


Cannot change resolution on my laptop, stuck at 4k on 15 inch screen - SOLVED

I'm having some problems with my 16.04.1 Ubuntu instalation. To install I had to add nomodeset in live USB Grub. Then it installed correctly, however, everything is really tiny. I want to use Ubuntu at 1080p, not 4k, but settings don't have option for anything else other than 4k. I'm currently using some Intel HD 530 drivers, but I think they aren't really good.  xrandr returns  xrandr: Failed to get size of gamma for output default Screen 0: minimum 3840 x 2160, current 3840 x 2160, maximum 3840 x 2160 default connected primary 3840x2160+0+0 0mm x 0mm    3840x2160     88.00*    1920x1080_60.00 (0x285) 173.000MHz -HSync +VSync         h: width  1920 start 2048 end 2248 total 2576 skew    0 clock  67.16KHz         v: height 1080 start 1083 end 1088 total 1120           clock  59.96Hz   (The second option appeared after trying to manually add other screen resolution)  How do I solve this?  EDIT:  I tried  and it allowed me to have an option of 1920x1080 in Displays, but if I press apply, I get an error   The selected configuration for displays could not be applied   required virtual size does not fit available size: requested = (1920, 1080), minimum=(3840, 2160), maximum=(3840, 2160)   Any ideas?   Updating:   helped ^^ I just performed those steps after installing 4.6 kernel on 16.04.1 and now I have working Nvidia drivers which let me change the resolution.


Can you help me install ubuntu alongside my windows 8.1 OS on my Toshiba Satellite P875-S7102? I can not figure out how to get my particular model of laptop to boot from a USB and install Ubuntu, or even allow me to try it out without installing. Please Help?


There is a list of polygons List<Polygon> Polygons defined by these classes.   How can I order that list, so that the polygon are ordered first by the X property of their Points and then by the Y property of their Points in an ascending order.  public class Polygon {     public List<Point2D> Points; }  public class Point2D {     public double X;     public double Y; }   Update: For example consider these polygons:  (A) (0, 0) -> (5, 1) -> (5, -3) -> (0, -3) -> (0, 0) (B) (0, -10) -> (5, -9) -> (5, -13) -> (0, -13) -> (0, -10) (C) (10, 0) -> (15, 1) -> (15, -3) -> (10, -3) -> (10, 0)   the sorted output:  (A) (0, -10) -> (5, -9) -> (5, -13) -> (0, -13) -> (0, -10) (B) (0, 0) -> (5, 1) -> (5, -3) -> (0, -3) -> (0, 0) (C) (10, 0) -> (15, 1) -> (15, -3) -> (10, -3) -> (10, 0)


When using “until”, is the time mentioned inclusive or exclusive?

Examples:  "I'm going to study until 8PM" Is he going to stop studying at 8PM sharp or 8:01PM?  "I'm not going to study until 8PM" Is he going to start studying at 8PM sharp or 8:01PM?  "I'm working until Friday" Does he stop working after his work on Thursday or Friday?  "I'm not working until Friday" Does he start working at Friday or Saturday?  "The kidnappers have given us until October 11th to deliver the documents" Do they need to deliver the documents before it hits October 10th or 11th?  From other similar posts, I learned that until is mostly exclusive but it can sometimes be inclusive but how do I tell exactly?


How to insert a list of States in Salesforce with the Metadata API

Is it possible to insert a list of States in Salesforce with the Metadata API?  How? Thank you very much.  Additional Question (02-June-2021@12:11CEST): I have retrieved the XML file containing the list of States/Countries (it is now stored in C:...\TEST1\force-app\main\default*settings*\ The file name is Address.settings-meta.xml I have copied/past this file into another sub-directory where I keep a copy of the code of the "Destination Org called DEV1: ...\DEV1\force-app\main\default*settings*\ I was expecting to be able to deploy the XML file with Visual Studio Code + SFDX CLI but, the deployment is not successful: I get an error without details. Then, I try to deploy the same xml file with Workbench. The deployment is apparently successful BUT when I go to that Org to verify if the States have been deployed... I observe they a have NOT been deployed. Any input that might help me? Thank you.


Are questions about MediaWiki syntax considered relevant on Stack Overflow?

is intended for "users of web applications", while stackoverflow.com is intended for "professional and enthusiast programmers." If I want to post a question about MediaWiki syntax (i. e., the syntax for creating templates), would it be better to post the question on  or on ?  The question can be found here:


I just want to know why we take only long type serialVersionUID variable in java  `public static final long serialVersionUID = 1L;`   I mean i know how it works + what is serialization etc.  But i am just curious to know that why we only take long primitive type ? why not int or any other type?  like this    public static final int serialVersionUID = 1;   Is java specification tell us to do that?


windows keyboard menu-key missing, alternatives?

I am trying to use my HTPC with only a keyboard. Even though my keyboard is from Microsoft, they failed basic windows certification and did not include a menu-key, the one that shows a mouse cursor and a menu, usually located on the right of the space bar, between alt and control. without that i can't do many actions. On windows XP (or maybe NT? not sure) right alt+enter used to emulate that key and i would get the context menu... but on windows 7 that ain't so. Is there any other key combination that can act as an alternative for context menu on selected items on windows 7?


Does publishing in journals known as "predatory" hurt one's reputation?

Does publishing in what is known as a "predatory" (such as OMICS) journal diminish ones reputation? Do these publications help at all when applying for grants (or do they impede ones chance)?


Proving an inequality by induction and figuring out intermediate inductive steps?

I'm working on proving the following statement using induction:  $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$  Fair enough. I'll start with the basis step:  Basis Step: (n=1) $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$ $$ \frac{1}{1^2} \le \frac{2}{1+1} $$ $$ 1 \le 1  \checkmark  $$  Inductive Step: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{(n+1)+1} $$ $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{(n+1)+1} $$ $$ \sum_{r=1}^n \frac{1}{r^2} + \frac{1}{(n+1)^2} \le \frac{2n}{n+1} + \frac{1}{(n+1)^2} $$ $$ \sum_{r=1}^{k+1} \le \frac{2n}{n+1} + \frac{1}{(n+1)^2} $$  My goal is to prove $\forall_{n\ge1} s(n) \implies s(n+1) $ or that this inequality holds true for all $n\ge1$.  I'm not quite sure to go from here on the inductive step. I understand that I need to basically work some clever substitution and manipulation into the problem to end up with: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{(n+1)+1} $$  However, I'm not quite sure what needs to done to obtain this after attempting a few times.


Does Stack Exchange offer a website to ask questions you don't know where to ask?

There are so many Stack Exchange websites and some of them are very similar (it's hard to tell them apart) that for some questions I don't know which one of them I should choose.  Consequently, I ask the same question multiple times, deleting and moving it to the next community with the hope to find the right one someday.  So my question is: is there a website where you can ask questions you don't know where to ask? Such a question could then be moved to the most appropriate website.  If not, could there be one? I don't want to make the same search trip every time and I think it's very unlikely that anybody would read all the FAQs first to be able to identify the right community.


Python: How to force a string literal as is without being interpreted as a regex pattern

I want to find all occurrences of a given phrase in a passage. The phrases are user inputs and cannot be predicted beforehand.  One solution is to use regex to search (findall, finditer) the phrase in the passage:  import re  phrase = "24C" passage = "24C with"  inds = [m.start() for m in re.finditer(phrase, passage)]   Then the result is  inds = [0]   Because the phrase matches the passage at index 0 and there is only one occurrence.  However, when the phrase contains characters that have special meanings in regex, things are trickier  import re  phrase = "24C (75F)" passage = "24C (75F) with"  inds = [m.start() for m in re.finditer(phrase, passage)]   Then the result is  inds = []   This is because the parentheses are interpreted specially as a regex pattern, but this is not desirable as I only want to have literal matches.   Is there anyway to enforce the phrase to be treated as string literal, not a regex pattern?


I have come to enjoy the Stack Exchange community as a whole over the past few weeks. Originally, I started out seeking computer help from a couple of subcommunities where I could learn and get help with my computer problems. Itself  is a great idea and there are a few forums that offer similar help resources.  What makes Stack Exchange different is that it expands across so many arenas with a single account making it a very expansive place to give and take. For example, I found myself on the English Learning site where I actually have a lot to contribute. I am actually an English teacher but I have computer problems sometimes.  One thing though, the reputation points don't carry over across subcommunities which I think is a bit detrimental and defeating the purpose in a way.  My arguments are:   If the purpose of reputation points is to build a character reference, then shouldn't it be global? For instance, I can be helpful in one community and have a ton of reputation but a complete 'weirdo' in another. Whereas a universal point system wouldn't allow this. Reputation as a whole builds your identity across multiple communities. I join a new community and I am limited to what I can post (even if my post can be useful or helpful). Specifically, I ran across this during commenting. I had a perfectly viable comment to help a person but wasn't allowed because I didn't have reputation but I had reputation in another community. I had to post it as an answer and then I got 'moderated' by the community on where I should post and was down voted for leaving a comment in the answer area. Thus, losing reputation. It doesn't seem to create a way for incentives in some cases. For example, I have computer problems and I can't say I am phenominal at solving or answering computer questions. I could ask a question that may not get answered but if I have enough reputation I could put a bounty on it as incentive to get people to answer it. BUT WAIT!! I can't really earn reputation on a computer community to put a bounty on a question because there is nothing I can really answer or be helpful with.   However, I am great at writing, editing and dealing with international students!!! But, what is the sense of me just racking up points in a community when I will hardly need to ask a question much less put a bounty on it? Sure, points are great. It's nice to have a lot of points but what if I need them elsewhere?  So, when I need computer help desperately I can use my reputation collected from another community to put incentive in trying to get a question answered. Essentially, I'm a good guy and helpful at something but I am not a computer whiz.   Everyone is good at something and thats what the community at large should be in my opinion.  Just my opinion. I used my situation personally to explain but I am sure other people have experienced a similar situation or have had a similar thought.


Is it possible to summon multiple mobs at once?

I need to summon about 16 mobs at once. But I don't want to use 16 command blocks. So I want to know: Is it possible so use /summon to summon 16 Zombies at once?


Can I create a user-specific hosts file to complement /etc/hosts?

Is it possible to add a list of hosts that are only specific to a certain user? Perhaps a user-specific hosts file?  This mechanism should also complement the entries in the /etc/hosts file.


Converting string with decimals into datetime

This question is very similar to , but my data is on the form:  '13-04-2018 14:06:26.866' '13-04-2018 14:06:27.131' '13-04-2018 14:06:27.404' '13-04-2018 14:06:27.674' ...   i.e. the seconds are given as decimals. My reading of the  suggests that it doesn't support this format, so I am not sure how to best proceed.


Is there (-alike) line-by-line mode for OpenSSH?  In the olden days, before SSH, there was telnet.  Telnet had two modes of operation: one like SSH (char-by-char mode, where each key pressed would be immediately sent to other side) and another one called "line mode" (line-by-line), where you would input whole line (and edit it if needed) and only when you pressed enter, whole line would be sent over network (usually in single TCP packet).  While char-by-char mode was generally more convenient, line-mode was extremely useful on high-latency (and/or high packet loss) links.  It however seems to be missing from OpenSSH client. Does anybody knows of other FOSS SSH implementations or openssh patches or other clever tricks which might provide something similar? What I'm not interested in is:   non-free software (closed source ssh client looks like it has it)  telnetd/SSL instead of SSH (server side must remain SSH2 compatible as there are lots of other users)  other packet-loss mitigation techniques (like tcp_westwood etc).   Any ideas?


Do villages take the Y-Axis into consideration?

I was looking at the Iron Titan, and Tango said that all the machine has to be built at least 70 blocks from any other doors. I was wondering if it would be feasible to build it at say Y=120, and still be able to place doors on the ground.


beginner doubt here! I've been staring for this hand for a long time and have no idea how I could sculpt that. Does anyone have any tips for me? I've been modeling for a really short time, so anything is helpful! Thanks a lot in advance!!!


Accessing screen areas from render handler

The code below works flawless, if e.g. triggered by a menu button in a 3D view.          for area in bpy.context.screen.areas:            if area.type == 'VIEW_3D':             for space in area.spaces:                 if space.type == 'VIEW_3D':                      space.viewport_shade = 'BOUNDBOX'   However, if I bundle it into a function and hook it to a handler, it returns a NoneType error:  @persistent def allBound(dummy):   for area in bpy.context.screen.areas:        if area.type == 'VIEW_3D':         for space in area.spaces:             if space.type == 'VIEW_3D':                  space.viewport_shade = 'BOUNDBOX'   bpy.app.handlers.render_pre.append(allBound)   Returns:  AttributeError: 'NoneType' object has no attribute 'areas'   How to solve this?


How to install older VLC 2.2 after having 3.0?

The following packages have unmet dependencies: vlc : Depends: vlc-nox (= 2.2.1-3) but 3.0.0~~git20151218+r62827+34~ubuntu15.10.1 is to be installed    Recommends: vlc-plugin-notify (= 2.2.1-3) but it is not going to be installed    Recommends: vlc-plugin-samba (= 2.2.1-3) but it is not going to be installed   What do I do?


If a book is kept on a table , will the book also apply a normal force on the table ? Then which of the two normal forces( one by book and other by table) would be considered as action force and reaction force ?  Thank you in advance.


Why some examples are using "endl" instead of "\n"? I heard that processing time of "endl" is longer than "\n" because "endl" has some flushing process. But, there are so many examples using "endl" on the internet. I wanna know why they're using "endl" which thought to be inefficient. Sorry for the awkward English...... Thanks


Hard drive physical read error, how to find out which files affected?

My HDD is starting to go bad.  So I'm cloning it to a new drive using HDDRawCopy. In the process, there are several read errors (from bad sectors?).  The question is, how do I go about to finding out which files/dir those sectors are mapped to, so I can restore those selected files from backup?  7/21/2016 12:17:07 AM   Copying...  7/21/2016 12:17:33 AM   Read Error occurred at offset 721,354,752;  LBA 1,408,896   (Data error (cyclic redundancy check)) 7/21/2016 12:20:19 AM   Read Error occurred at offset 6,383,665,152;  LBA 12,468,096   (Data error (cyclic redundancy check))


Elementary geometry question: How to calculate distance between two skew lines?

I am helping someone with highschool maths but I got stacked in a elementary geometry problem. I am given the equation of two straigh lines in the space $r\equiv \begin{cases} x=1 \\ y=1 \\z=\lambda -2 \end{cases}$ and $s\equiv\begin{cases} x=\mu \\ y=\mu -1 \\ z=-1\end{cases}$ and asked for some calculations. First I am asked the relative position of them so I get they are skew lines. After that I am asked for the distance between the two lines. In order to get the distance I have to calculate the line that is perpendicular to both of them in the "skewing" point, check the points where it touches the other two lines (sorry, not sure about the word in English) and calculate the module of this vector. Im having trouble calculating the perpendicular line. I know I can get the director vector using vectorial product, but  I'm not sure how to find a point so that I can build the line.


Need to grant db_reader permission on one database while db_writer on another for the same service account

I am looking at script that will grant db_reader & db_writer roles on a table for a service account in SQL Server 2008 R2. I am looking at granting these permissions only to specific databases. The same service account will have db_reader permissions on one table while db_writer on others


Prove that the union of two disjoint countable sets is countable

This is a question from my proofs course review list that I have had trouble understanding.   I understand the concept of disjoint sets.  I'm not sure what they mean by countable. How would one prove a set is countable and furthermore, that the union of two countable sets is countable.  Please help me get started with the question by understanding this concept.


What is the reasoning behind Gollum not harming the Hobbits in their sleep?

The first time Gollum had attempted to kill the Hobbits didn't go as plan, as the Hobbits were aware of his presence and were able to trick him into thinking that they were asleep.  However, Gollum had many other opportunities once he had agreed to take them to Mordor to have killed them in their sleep and take the ring from Frodo. This isn't the case though, and he seems to remain loyal (to an extent) and doesn't really seem to attempt anything until the final film, where he leads them into Shelob's lair.  Why is this?


I'm trying to find an automated way to mass delete picklist values. I had a look at the following ways to accomplish this but without success:   Force.com IDE: Deleting the picklist values in the metadata makes them Inactive when uploading Using a Javascript hack:  which was not working anymore due to the deprecated synchronous XMLHttpRequest. Converted to code using jQuery to async processing but didn't work. Seems like the page to replace the picklist values is stopping the deletion Destructive XML on Picklist value Changing type to Text and back to Picklist: Picklist values will be auto created based upon distinct data   Any other ideas?


Can you apply the Monk's Martial Arts feature only to your attack roll but not your damage roll?

The Monk's  feature states:     You can use Dexterity instead of Strength for the attack and damage rolls of your unarmed strikes and monk weapons...   Originally I thought this meant you had to either replace use Strength for both rolls or use Dexterity for both rolls. But the section on Finesse  states:     When making an attack with a finesse weapon, you use your choice of your Strength or Dexterity modifier for the attack and damage rolls. You must use the same modifier for both rolls.   Both features have the same "for the attack and damage rolls" bit; however, Martial Arts lacks the requirement that you must use the same modifier for both rolls. Does this mean that you are able to replace only the attack roll's (or only the damage roll's) modifier?  One reason you might want to mix up your modifiers is any time where you want to damage (and thus hit) a creature, but you don't want to deal a lot of damage to it. In a case like that you would want to use your higher modifier for the attack and your lower modifier for the damage.


Boot to command line 12.04 (grub options not working)

I installed 12.04 Desktop because I want the option to run Unity in the future, but I PREFER to work headless via SSH.  I changed the following in /etc/default/grub:  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"   changed to:   GRUB_CMDLINE_LINUX_DEFAULT="text"   Rebooted and still get the graphical Unity interface  changed the above to:  GRUB_CMDLINE_LINUX_DEFAULT=""   Rebooted and again, no love -- still get the Unity interface.  I see that /boot/grub/grub.cfg is generated automagically by grub-mkconfig using templates /etc/grub.d and /etc/default.  I saw that my first option in grub still read thusly:  menuentry 'Ubuntu, with Linux 3.5.0-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {     gfxmode $linux_gfx_mode     insmod gzio     insmod part_msdos     insmod ext2     set root='(hd0,msdos1)'     search --no-floppy --fs-uuid --set=root c40e42d6-6e01-4abf-b2e3-e46132dcfa0a    linux   /vmlinuz-3.5.0-27-generic root=UUID=3a07789f-f0b4-4123-a26a-6f245ef9054e ro   quiet splash $vt_handoffeneric     echo    'Loading Linux 3.5.0-27-generic ...'     linux   /vmlinuz-3.5.0-27-generic root=UUID=3a07789f-f0b4-4123-a26a-6f245ef9054e ro recovery nomodeset      echo    'Loading initial ramdisk ...'     initrd  /initrd.img-3.5.0-27-generic  }   Note that it still reads 'quiet splash' above (single quotes mine).  So I ran grub-mkconfig to see if that was needed to re-build grub.cfg from /etc/default/grub, but even after running that, 'quiet splash' persists.  Can anyone advise on where I'm going wrong?  I just want my bash...  Thanks.


Resetting text width in a nested tikzpicture

I'm nesting a tikzpicture inside a tikzpicture, and having problems with the 'text width' parameter leaking through from the outer tikzpicture to the inner. (The nesting is pretty much unavoidable -- in my actual use case the tikzpicture s are defined in different macros.)   MWE:  \documentclass[a4paper,11pt,landscape]{article} \usepackage{tikz,nopageno}  \begin{document}  \newcommand{\cost}{% \begin{tikzpicture}     \node[fill=red!85!black,shape=circle,inner sep=0.3mm,draw=black,text=white] {\raisebox{0pt}[\height][0pt]{\bf 1}}; \end{tikzpicture}}  \cost  \begin{tikzpicture}     \node[text width=10mm] {\cost}; \end{tikzpicture}  \end{document}     How should I modify 'cost' so that it behaves as if text width was not set?


How do I show a code snippet directly in my text? I don't want to have an extra box for it like lstlisting or verbatim provide it. My example may should look like this:     The class List.class is...   Should I make a new command for grey background and code like font? Or is there a simpler way? If not, how to write a new command for that?


I just wanted to directly calculate the value of the number $2^{3.1}$ as I was wondering how a computer would do it. I've done some higher mathematics, but I'm very unsure of what I would do to solve this algorithmically, without a simple trial and error.  I noted that   $$ 2^{3.1} = 2^{3} \times 2^{0.1} $$  So I've simplified the problem to an "integer part" (which is easy enough) :  $2^3 = 2\times 2\times 2$, but I'm still very confused about the "decimal part". I also know that :  $$ 2^{0.1} = e^{0.1\log{2}} $$  But that still presents a similar problem, because you'd need to calculate another non-integer exponent for the natural exponential. As far as I can see, the only way to do this is to let:  $$2^{0.1}=a $$   And then trial and error with some brute force approach (adjusting my guess for a as I go). Even Newton's method didn't seem to give me anything meaningful. Does anybody have any idea how we could calculate this with some working algorithm?


Show that $ E\Big[\sum_{i=1}^{n}(X_i - \bar{X_n})^2\Big] = (n-1)\sigma^2 $

$X_1, X_2, ..., X_n$ are i.i.d random variables with mean $\mu$ and variance $\sigma^2$. $\bar{X_n} = S_n/n$ where $S_n = X_1 + X_2 + ... + X_n$. Show that   $$ E\Big[\sum_{i=1}^{n}(X_i - \bar{X_n})^2\Big] = (n-1)\sigma^2 $$  Attempt:  $$ E\Big[\sum_{i=1}^{n}(X_i - X_n)^2\Big] = E\Big[\sum_{i=1}^{n}~X_i^2 - 2X_i\bar{X_n} + \bar{X_n}^2\Big] \tag{1} $$  $$ = \sum_{i=1}^{n}E\Big(X_i^2 - 2X_i\bar{X_n} + \bar{X_n}^2) \tag{2} $$  $$ = \sum_{i=1}^{n}\Big(E(X_i^2) - 2E(X_i\bar{X_n}) + E(\bar{X_n}^2)\Big) \tag{3} $$  I don't know how to proceed.


As in "it is possible to try it again". "Tryable" seems to be the one mostly used online, if you type it in Google.  only returns an entry for "tryable" from Wordnik, not from any of the major online dictionaries.  Which spelling is the correct one for this meaning?


Proving that $\sqrt{3} +\sqrt{7}$ is rational/irrational

I took $\sqrt{3}+\sqrt{7}$ and squared it.  This resulted in a new value of $10+2\sqrt{21}$.  Now, we can say that $10$ is rational because we can divide it with $1$ and as for $2\sqrt{21}$, we divide by $2$ and get $\sqrt{21}$. How do I prove $\sqrt{21}$ to be rational/irrational?  Thanks


how to use javascript test() function based on variable value

I have the following code, which i need to perform the javascript test() operation based on the var "p" value. The following sample doesn't resolve correctly. I know if i replace "p" with "hello", it will work, but i want it to resolve based on a particular value given in variable "p". How do i use variables along with the test() function? Please help.   var arr = new Array(); arr=[1,2,3,4,"hello"]; var p="hello";  if(/p/g.test(arr)) { arr=arr.join('\n'); alert(arr);  }


Where is this LED getting its timing from?

So this little board when connected to 5v and GND start blinking different colors in different orders and with different timing for colors to stay on!  There is nothing on the board other than the LED and a resistor! How on earth does the LED know when to turn on/off? and how do the colors change? Please note, this is not an RGB LED.     Please see the schematics .


Arithmetic-Geometric mean sequences limit

If $a,b$ are positive quantities such that $(a<b)$ and if   \begin{align} a_1 &= \frac{a+b}2  &  b_1 & = \sqrt{a_1 b} \\ a_2 &= \frac{a_1+b_1}2  &  b_2 &= \sqrt{a_2 b_1} \\ &\phantom{36pt} \vdots &  & \\ a_n &= \frac{a_{n-1}+b_{n-1}}2  &  b_n & = \sqrt{a_n b_{n-1}} \\ &\phantom{36pt} \vdots  &  & \end{align} then show that $\displaystyle\lim_\limits{{n\to \infty}} b_n=\frac{\sqrt{b^2-a^2}}{\arccos(\frac{a}{b})}$


I can't find SMD diode part no from Marking code,pls suggest if possible.


Fraud or not: a stranger wants to transfer a lot of money to me

I have recently received an email from a stranger that says she wants to send me a big deal of money for some specific reason and she said that she has talked to the bank (Banque Atlantique Groupe Lome Togo) and she gave me a phone number and an email address so that I contact the bank and follow the procedure that is required for the money to be transferred to me. Now after I emailed the bank, they replied with this:     To enable us process and transfer the fund to the bank account you   will be sending to us, the pdf attachment file contain copy of   Identification/Transfer Processing Form E-27. Which you have to   carefully fill and return to this bank with the required processing   fee US$1,750.00 (One Thousand, Seven Hundred & Fifty United States   Dollars).      Upon the receipt of the required fee, we shall appoint one of our bank   accredited attorney to stand as your legal representative here since   you are not here in person, so that he can help you to secure the   transfer approval from the authorized ministry here before we shall   process and transfer the fund to the bank account you will be   submitting to this bank.   How can I make sure this is not a fraud and how can I be secure?


How can I accurately focus manually on an APS-C DSLR?

My favorite portrait lens is the Nikon 50mm 1.4G.  I love the light and what it is capable of.  My problem with it is that on my D90 the AF is sometimes horribly slow, and in many cases (mainly low light) I can't auto focus at all.  I use AF lock as much as possible, but for many shots I really wish I could just use manual focus.  The problem is that I'm usually wrong about whether my subject is in focus or at least completely in focus.  So my question is...  Are there any recommendations you can make for training my eye to be sure my manual focus is accurate?  Any diopter adjustments or calibrating tools?  Any eye exercises to train myself to recognize a true focus?  I know that I would probably have better AF performance on a more expensive body, but for now I think it's good practice to train myself in manual focus anyway.  Thanks for any assistance.


Fullhouse probability for first and third person

my goal is to calculate the probability of first and third person getting a fullhouse at the start of the game (5 people and 52 cards). I understand that for the first person it would be: $$\frac{\binom{13}{1}\binom{4}{3}\binom{12}{1}\binom{4}{2}}{\binom{52}{5}}$$ But I just can't figure out how to deal with the second person in between since he can get a lot of possible combinations, so the cards to choose from for the third person will change. (for example if he also gets a fullhouse, there is one less rank for the third person fullhouse).   Am I missing something? Right now I can't come up with any sollution, so some help would be really appreciated.


How to detect if new element is added in DOM?

I am trying to make a website, in which one makes a questions and there will be options for that questions.  I have a add option button, when user clicks the add option button, new option is added by this function.  function addOption(elem) {             elem = $(elem);             let ul = $(elem.parent().children()[1]);              let addedElem = $(                 `<li class='ques-li'><input type='text' name='ques-option' class='ques-option' value='Option'><p class='remove-op'>X</p></li>`             );             addedElem.appendTo(ul);          }  let addOp = $('.ques-add'); $('.ques-add').click(function () {             addOption($(this)); });   This works well with one question, but when a user adds another question.  It is by this function.  let addQuestion = $('form button');         addQuestion.click(function () {             let quesBox = $('div.questions-box');             quesBox.html(quesBox.html() + `
                 <input type="text" name="ques-name" class="ques-name">

<input type="text" name='ques-option' class='ques-option'>
X

<input type="text" name='ques-option' class='ques-option'>
X

Add Another

`)         });   When i click the add Question button, it also works   but when i click the add option button on a newly created question, it does not create a new option.   I noticed when i create a new question, it does not get the new option button.  So, i updated my code as follows :-  let addOp = $('.ques-add');         $(document).bind('DOMNodeInserted', function(){             addOp = $('.ques-add');         });         addOp.click(function () {             addOption($(this));         });   It also does not work.  I have no idea why this code is not working.  Thanks in advance.


I am still a new user of Blender.   I am trying to map a ground polygon with dotted taxi line but the line are not in similar length. This only occur for curved mesh lines. Example are as follow:     Please guide me to solve this issue. Thanks in advance.


Calculate all possible letter combinations

I'm trying to make a JavaScript that calculate all possible letter combinations.  I've made this so far:      var input = window.prompt("What to calculate?", "");     var letters = input;     var combi = [];     var temp = "";     var letLen = Math.pow(2, letters.length);     for (var i = 0; i < letLen; i++){         temp = "";         for (var j = 0; j < letters.length; j++){             if ((i & Math.pow(2, j))){                 temp += letters[j];             }             if (temp !==""){                 combi.push(temp);             }         }     document.write(combi.join(" "));     alert(combi.length);   The result is: r g rg b rb gb rgb  However, there are more possible combinations like bgr brg br gr bg  What do I have to chance in my code to show all possible combinations and not some of them?  Thanks in advance.


How to see which directory occupy the most disk?

My disk is almost full, how can I know where takes away the most disk?  Because yesterday the disk is enough for my System.   [root@ha-node1 log]# df -lh  Filesystem      Size  Used Avail Use% Mounted on /dev/sda2        18G   18G  4.3M 100% / devtmpfs        3.9G     0  3.9G   0% /dev tmpfs           3.9G   54M  3.8G   2% /dev/shm tmpfs           3.9G  383M  3.5G  10% /run tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup /dev/sdc         20G   45M   19G   1% /mnt/sdc /dev/sdb         20G   83M   19G   1% /mnt/sdb tmpfs           781M     0  781M   0% /run/user/0


C# an object reference is required for the non-static field, method, or Property - Speech Synthesis

I tried to build a test app using this code    I define a public class as per below:   public class iSpeech  {     // Performs synthesis     public async Task<IRandomAccessStream> SynthesizeTextToSpeechAsync(string text)     {         IRandomAccessStream stream = null;         using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())         {             VoiceInformation voiceInfo =               (                 from voice in SpeechSynthesizer.AllVoices                 where voice.Gender == VoiceGender.Male                 select voice               ).FirstOrDefault() ?? SpeechSynthesizer.DefaultVoice;              synthesizer.Voice = voiceInfo;             stream = await synthesizer.SynthesizeTextToStreamAsync(text);         }         return (stream);     }      // Build audio stream     public async Task SpeakTextAsync(string text, MediaElement mediaElement)     {         IRandomAccessStream stream = await this.SynthesizeTextToSpeechAsync(text);         await mediaElement.PlayStreamAsync(stream, true);     } }   From the application main page, I then tried to call as:      public async void btnClick(object sender, RoutedEventArgs e)     {         await iSpeech.SpeakTextAsync("test speech", this.uiMediaElement);     }   I keep on getting      "an object reference is required for the non-static field, method, or Property..." error.   Could someone please let me know what I am doing incorrectly?


Let $A, B$ be two subsets of a set $X$, and let $f : X \rightarrow Y$ be a function. Show that $f(A \cup B) \subseteq f(A) \cup f(B)$, $f(A) \setminus f(B) \subseteq f(A \setminus B)$. Is it true that the $\subseteq$ relation can be improved to $=$?  I proved $f(A \cup B) \subset f(A) \cup f(B)$ and $f(A) \setminus f(B) \subset f(A \setminus B)$. But i'm not sure when we improved the $\subseteq$ by $=$. Can anyone give me some examples when the relation is $=$?


Can someone give me an initial idea of how can I group 4 plots in every quadrant of a plane just like the adjacent image?

I already have time using pgfplots and tikz but I can't figure out how to achieve something like this.


Curvilinear relationship between two Likert-Scales - is there any coefficient to measure it?

I have two Likert-scale variables, that values vary from "strongly disagree" to "strongly agree". Somehow I know, that many people who stronly disagree on the first scale, strongly agree on the second one (and the other way round). People who are moderate on one scale, they are also moderate on the other scale.  So my question is: is there any way to measure a curvilinear relationship between ordinal variables?  My data set is:    matr = matrix(c(19,21,35,19,13,                   16,28,60,24,12,                   27,39,54,53,32,                   43,52,32,46,48,                   54,48,29,45,50),               5,5)   Kendall's tau coef. is: 0.0097, which misleadingly indicates no relationship.  [UPDATE]: I'm aware that "curvilinear" in these Likert-scales case is a big word, but I see the pattern in the form "U", when I plot counts. The shoulders of "U" are those people, who "stronly disagree"/"strongly agree" with statement A and "stronly agree" with statement B. Others are moderate in both statements (the lower part of "U").


Error perl script - can't locate Net/SSH/Perl.pm in @INC

I wrote a simple Perl script try to make a connection to remote server (SSH) and run command. But came up some message I don’t what is about.  Apache Log:  Can't locate Net/SSH/Perl.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/s BEGIN failed--compilation aborted at (eval 4) line 3.   I tried find the file  find: `perl.pm': No such file or directory   I installed NET::SSH::Perl , log:    root@server:/usr/include# cpan install Net::SSH::Perl Loading internal null logger. Install Log::Log4perl for logging messages CPAN: Storable loaded ok (v2.27) Reading '/root/.cpan/Metadata'   Database was generated on Fri, 10 Feb 2017 11:17:03 GMT CPAN: Module::CoreList loaded ok (v3.07) Net::SSH::Perl is up to date (2.01).


Why does a soda bottle foam or froth when dropped?

Secondly, if I do drop a soda bottle how long do I have to keep it for it to return to its original state or condition, I.e. safe to open without froth spraying everywhere; or is there some rule of Thermodynamics which states that reversibility is impossible in this situation.


How to apt pin a future package from next version of ubuntu?

(Note: I understand I may need additional packages that have dependencies, and can work that out on my own, do not worry that I am asking about a single package).  I have Ubuntu Mate Disco Dingo (19.04) which retrieves the package version 6.0.6 for package virtualbox :   Due to a bug that affects me in 6.06 that is corrected in 6.08, ( - User interface: fix mouse click pass-through problems in multi-screen virtual machines (6.0.6 regression, bug #18567)) I require the ability to upgrade to the next version of virtualbox, that is available in Ubuntu Eoan ().  I am not able to use the repo provided by virtualbox directly, as this repo lacks another package I require due to running ubuntu under a secure boot configuration, that has been configured with certificates already to load the signed dkms module on boot. I have tested this solution path already and it renders virtualbox unusable.   As a result, I would like the ability to apt pin just the packages I need from the next version of Ubuntu (Eoan) that is not yet released and is in alpha.   I have not had to apt pin before and so would appreciate any advice on how to apt pin a future version of the repos, with just the specific packages I need (virtualbox being the example) so that I can upgrade my virtualbox to the patched version. As I mention, once I know how to do a single package, I will obviously be able to sort out any dependencies on my own.  Thanking you in advance :) Pete  (If I am not clear about anything, please let me know and I will attempt to clarify what I need to do :)


After running the command sudo apt-get update  I got the following error:  W: GPG error: https://deb.nodesource.com/node_7.x xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280 W: The repository 'https://deb.nodesource.com/node_7.x xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   How can I fix this?


Should we always accept a better answer, or also reward response speed?

Case in point . Akrun gave a great answer in ~2 minutes. Grada's answer is slightly better (because it's simpler and more generalizable), but came in a little later (but still before Akrun's answer was accepted).   Whose to accept? Should speed be rewarded, or should we always accept the better answer?


I am wondering what mistakes has been made in this pretty simple update statement using old version of PHP. If I echo the statement it says update statement is getting form submitted properly.  Here is the code:  <?php echo $q = "UPDATE notice SET FromDate = $notice_fromdate, ToDate = $notice_todate, VacType ='$notice_vactype',NoticeDetail ='$notice_detail',Status ='$notice_status' WHERE ID=$id";  if (mysql_query($link, $q)) {     echo "Record updated successfully"; } else {     echo "
Error updating record
". mysql_error($link)."-". mysql_errno($link). "\n"; }  ?>   and the output returns this   UPDATE notice SET FromDate = 2017-01-08, ToDate = 2017-01-09, VacType ='May Day',NoticeDetail ='Testing',Status ='Enabled' WHERE ID=3 Error updating record -0   I know its a pretty simple thing, I guess I have not made any mistake in the update statement but instead it is showing Error update record. I copied the output SQL statement and run at phpmyadmin, it has worked properly. It would be nice if you can help me. Thank in advance  Note: Clients website built on old version of PHP, I know that few functions got deprecated so it would be better if you do not discuss or criticize about the version.


Percentual increase when the old Value is zero

How do I compute the increase when the old value is zero? I know that usually we compute it as $$ \frac{N-V}{V} \times 100, $$ where $N$ is the new value and $V$ is the old value.  So,   going from $50$ to $500$, the increase is $900\% = \frac{500-50}{50} \times 100$ going from $50$ to $75$, the increase is $50\% = \frac{100-50}{50} \times 100$   But when going zero to $X$, where $X$ is any value greater than zero, the increase is $100\%$? (In this formula you can't divide by zero).


I guess, this is a simple one. Let's say, I have two tables: [employees] and [projects]  SELECT p.project_name, concat(e.first_name, " ", e.last_name) as employee_name     FROM project p     INNER JOIN employee e on e.project_id = p.id     ORDER by p.project_name   With that SELECT I get  JohnJane Project | John Doe  JohnJane Project | Jane Doe T Project        | Mr. T   But instead I would like to have the names comma-separated in a row:   JohnJane Project | John Doe, Jane Doe   T Project | Mr. T   How can I do that?  Thanks Bernhard


How to evalute $\int_{0}^{1}\frac{x\log x}{\log(1-x)}dx$

Evaluate $$I=\int_{0}^{1}\frac{x\log x}{\log(1-x)}dx$$   I try to change it to:$$I=\int_{0}^{1}\frac{(1-x)\log(1-x)}{\log x}dx$$ but I can't do next steps,help me ,thank you very much.


Jagged Edges of Brush in Adobe Photoshop

I have done a lot of work to resolve the issue, and have even searched for the solution, but no result.  Suddenly I struck with this problem, probably due to some unknown short key combination. Brush in Adobe Photoshop, has become rough edged. Especially when its Hardness is 0, it looks like made up of particles only.


Are we sure about the regeneration order of the Doctor?

In The Day of the Doctor, we learn about a new Doctor, aka the "War Doctor", who fit somewhere before the Ninth Doctor (Christopher Eccleston).      At the end of the episode, we also saw the War Doctor regenerating, but we don't see into which incarnation of the Doctor he regenerates.   Which raises the question, are we sure about the regeneration order of the Doctor? I saw myself the Ninth Doctor regenerating into the Tenth and the Tenth into the Eleventh, but what about the others? Could the incarnation order be rearranged in some way so the Eleventh Doctor become the Fifth or something like that?


Searching gives repetitive Questions and Answers in single result page

I am searching on StackOverflow site for SolrNet based Question/Answers relating to edismax  But it is giving me same result in single result page but as different Q: and A: prefix and votes respective to those Question and Answer.     However I believe if the resulting item are point to same question (when you hover the links will show same question id in url) then it should be not shown twice or so Because this way I am being kept far far away from probable question or answer and page 1 is populated with duplicate.  Thus also the count of 20 results (shown in screenshot) is very much incorrect.    Search Url:     Search Text: solr edismax [solrnet]    Search Screenshot:


What is the average lifespan for a wizard?

In Harry potter series we saw that Albus Dumbledore died at 116 years, nicolas flamel is more than 600 years old.  So what is the average age for a wizards?


Can a windows virus downloaded in linux be transferred to windows?

I know that linux is mostly safe from viruses, however: if you do download a windows virus (i.e., through a drive-by download), will it just sit there on your computer, and take up space? Is it unable to infect files because of the different operating system? If you transfer files between computers (by using a usb flash drive or through online file sharing), is there any risk that the virus could be transferred to windows and activate?


Asp.NET MVC : redirect to another controller with POST Action

My issue is that i want to make redirection to action in another Controller with POST DATA not a GET  RedirectToAction("GenaraleExportPDF", "ExportController", new {   screendata = json, monTitre = monTitre, file = file, block1 = block1, block2 = block2, block3 = block3, block4 = block4   });   this example exaplaine the redirection but on GET Action.


Is it legally safe to create a vector illustration of a celebrity photo for commercial use?

I want to take a photo someone else captured of a celebrity, then use illustrator to manually illustrate a vector of that celebrity, adding my own artistic touch.  The main goal is to be artistic, not technically accurate.  Is it legally safe to use that illustration commercially?   Does it help if I distort the image so it doesn't look like the original photo, (while still keeping the celebrity's face identifiable)?  I've seen many businesses do this - some even take photos outright without altering them at all. I just find it hard to believe they all got permission, or that they are all just cheating.  Thank you.


Recently my computer completely froze while playing a game. After a minute or so I did a hard-reset. However, when the pc powered up again, I got a message saying "Reboot and select proper boot device or insert boot media in selected boot device and press a key". Since I hadn't modified my boot-sequence I figured things weren't looking pretty. I suspected a HDD-crash, but didn't look into it much further. A couple of hours later I figured I'd try to boot from my Windows-DVD. However, when powering up the PC, the windows boot-sequence started before I was even able to insert the disc! Windows proceeded to power up successfully, and now everything's working fine again.  However, I figured there still had to be a problem somewhere. I looked at the windows logs, but only found 2 entries referring to an earlier "unexpected shutdown". I ran chkdsk and found no problems. Finally I ran sfc /SCANNOW. SFC identified some corrupt files but was not able to fix them. Here is the entry from the log file:  2014-08-16 00:38:55, Info                  CSI    000004ba [SR] Cannot repair member file [l:36{18}]"Amd64\CNBJ2530.DPB" of prncacla.inf, Version = 6.3.9600.16384, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch 2014-08-16 00:38:58, Info                  CSI    000004bc [SR] Cannot repair member file [l:36{18}]"Amd64\CNBJ2530.DPB" of prncacla.inf, Version = 6.3.9600.16384, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch 2014-08-16 00:38:58, Info                  CSI    000004bd [SR] This component was referenced by [l:186{93}]"Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.INF_prncacla"   I tried troubleshooting in advanced startup options, using automatic startup repair, but windows wasn't able to fix the problem.  I tried booting from my disc, but my PC somehow refuses to do so. (I remember getting the option "press any key to boot from disc" when installing windows, but this doesn't seem to happen now.) And I'm unsure of how to get into my BIOS to change the boot order. (Mashing Esc, F10 and F12 didn't do the trick)  So my questions are these:   Does anyone know what may have caused the crash, subsequent startup failure, and the following 'automagic fix'? What are the corrupt system files responsible for? How do I repair these system files?


Does there exist an infinite $S \subset \Bbb R^3$ such that any three vectors in $S$ are linearly independent?

Does there exist an infinite subset $S \subset \Bbb R^3$ such that any three vectors in $S$ are linearly independent?


tangent bundle that isn't diffeomorphic to the Cartesian product

I am studying the notion of tangent bundle $TM$ of a smooth manifold $M$,and in my textbook I am acknowledged that for most smooth manifold of dimension $n$,it's not true that $TM$ is diffeomorphic to $M \times \mathbb R^n$.I failed to give a simple example.I noticed that there is a set-theorical bijective correspondence between the to space,which makes it more difficult to understand why the diffeomorphism fails in general.Is there anyone to help?


Is there a flight search engine that combines flights from different airlines?

Is there a search engine that considers "mix&match" flight combinations?  My current problem: I need to go from FRA to YLW (Frankfurt/Germany to Kelowna/Canada) on July 29th, and arrive no later than 5pm. The search engines I checked only offer €3000+ flights.  I found a 2-stop combo through LHR and YVR for half that price. I'll probably have to check my baggage out and back in twice, but if the layover times are long enough, who cares?  A real search engine could find that for me (or something that's even better). Or, hell, give me a place to bulk-download the flight schedules from and I'll program it myself (of course I'd also need a way to check seat availability …).  Update: Please read before answering. A search engine which does this should, at minimum, show the flight combination through LHR which I found manually. Note that I need to arrive before 5pm, on the same day.  Also note that this is a generic question; I'm not looking for a specific good flight here -- but the details are useful to illustrate whether an answer is actually valid. :-/  NB: Typo, should have been July 29th.


I am using SQL Server 2016. I have setup SQL Agent for Full backup (Weekly) and Transaction Log backup (Daily). Backup transaction log into a single file using: BACKUP LOG [XXX] TO  DISK = N'E:\SQLDB\Backup\XXX_Trans_Log.bak' WITH RETAINDAYS = 28, NOFORMAT, NOINIT,  NAME = N'XXX-Transaction Log Backup', NOSKIP, NOREWIND, NOUNLOAD, STATS = 10 GO  What I expected is only 28 days transaction log backups will be kept. But now I just found All transaction log backups are kept. So the file grows to very large in size. After finding this, I change the plan to backup log in a separate file each day by: DECLARE @Ver VARCHAR(2) DECLARE @File VARCHAR(100)  SET @Ver = (SELECT RIGHT('0' + CAST((DATEPART(DAY,GETDATE())) AS VARCHAR(2)),2)) SET @File = 'E:\SQLDB\Backup\XXX_Trans_Log_' + @Ver + '.bak'  BACKUP LOG [XXX] TO DISK = @File WITH RETAINDAYS = 28, NOFORMAT, INIT, NAME = N'XXX-Transaction Log Backup', NOSKIP, NOREWIND, NOUNLOAD, STATS = 10  I am testing it on testing environment.  Basically it works but I found the log size is quite large, as nobody is using the environment.  Here are the figures: DB file size = 500MB (38% free) Log file Size = 865MB (38% free) DB Backup (Weekly) = 311MB Trans Log Backup (Daily)= 277MB Any reason why the trans log backup so large?


There was an older question about "Power output of ignition coil". The system would not let me comment on that question.  So, I'll ask here. In regards to a ignition coil (non specific).  OK,you have 60,000W output in 1ms.  Does the wattage reduce by half each time you increase the time(x) by X?   60,000   1ms   30,000   2ms 15,000   3ms 7,500    4ms   What is the formula to convert watts-miliseconds to watts-seconds or watts-hours?  Would you use the equations for a pulse transformer to design a ignition transformer?  I'm trying to understand how an CDI ignition coil is designed. Something that looks like it can handle 120watts at best, handling 60kW in 1ms.    If something is designed to run at 120watts continuously is it just inherent it will handle running at 60kW for 1ms? What is the formula to figure that out?  What is the nomenclature to research it properly?    Thanks


proving Power Set Difference $P(A-B) \neq P(A)-P(B)$

I Have to prove that $P(A-B) \neq P(A)-P(B).$ I Know how to prove that $P(A\cap B) = P(A)\cap P(B).$,but not this one. Can someone help me please?Thanks.


Possible Duplicate:          Am aware it is correct to say "I have written..." and "I am a doctor who has writen..."  I have, however, severally come across the sentence "I, Tertius, who have written...". Shouldn't it be "I, Tertius, who has written..."?


The bibliography does not appear on the pdf document

I am using the default setting on Texmaker except at quick build option I am using pdflatex + biblatex + pdflatex(2x) + view pdf. It prints the references but the bibliography section does not appear. If I use online overleaf editor I get no errors and it prints the bibliography. The online difference is that at online editor I get refernces like [numbers like 1,2,3], and when I am using Texmaker it appears [refernce name] The biblatex packages that I am using: \usepackage{csquotes} \usepackage[backend=biber,style=numeric,sorting=none]{biblatex} \BiblatexHungarianWarningOff \addbibresource{ref.bib}  The Texmaker output message: This is BibTeX, Version 0.99d (MiKTeX 21.2) The top-level auxiliary file: main.aux I found no \citation commands---while reading file main.aux I found no \bibdata command---while reading file main.aux I found no \bibstyle command---while reading file main.aux (There were 3 error messages)  bibtex: major issue: So far, you have not checked for MiKTeX updates.  Process exited with error(s)


What does it mean if a professor asks you to draft his reference letter for you?

This question is, honestly speaking, probably somewhat opinion-based, but I still want to give a shot.  A professor acceded to my invitation of writing a reference letter for me. Nevertheless, unlike the other professors who also acceded to write a reference letter for me, he asked me to draft it on my own. Originally I did not feel anything "wrong", and I just felt embarrassed to recommend myself. But yesterday a friend told me that a professor would ask you to write her reference letter for you when she does not actually think that you are "worthy" enough for her to write you one on her own.   What is the probability that such viewpoint is true? Any opinion is greatly appreciated!


iPad Air 2 restored now i need to activate it

I had restored my iPad Air 2 but now it says I need to activate it with the Apple ID used to set it up but I have forgotten my ID and password. The only way I can use it is to use the previous Apple ID and password. Is there any way I can change the Apple ID to a different new account?


Show that if $\int_0^1 f(x) v(x) dx = 0$ for every function v for which $\int_0^1 v(x) dx = 0$, then f is constant. I do not know how to do it.


Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files

Just see the following code snippet. I have came across this in one of the plugins that I am reading now.   if ( ! defined( 'ABSPATH' ) ) {   header( 'Status: 403 Forbidden' );   header( 'HTTP/1.1 403 Forbidden' );   exit; }   I understand that this script is sending an forbidden 403 header response to the browser for unauthorized access. But why two 403 headers ? Is the second one kind of fallback to the first one ?


Meta-analysis of means and medians in R?

I've been asked to review the literature for all studies that estimate the mean and median Blood Lead Level (BLL) in a certain country, and then perform a meta-analysis to come up with one overall value for the mean and median level.   Is such a thing typically done? I'm not interested in any "effect size," just a univariate measure.   I'd like to create a forest plot and do some of the standard tests of heterogeneity across studies. Is there a package and function in R that will allow me to do a meta-analysis of mean and median BLLs?  Just to clarify, this would be a separate meta-analysis for means, and a separate meta-analysis for medians.


I am not able to find out any example of non-commutative ring other than matrix ring which is easier to work on.please help


Is it true that if $A$ is an $m \times n$ matrix and $B$ is an $n \times m$ matrix, with $m > n $ then $\det(AB)=0$?


I am doing project in which I want to perform read and write operation by using a capacitive touchscreen. What I know is I can trigger capacitive touch screen by:   By using electromagnet as I heard that some of stylus works by using magnet at its point so I think electromagnet should work. By using capacitor: If I connect a capacitor's one end to vcc and other to a conductor plate then I think it will mimic the property of human finger and trigger touchscreen.   I want to use these system so I not need to make any physical changes. If I want screen to trigger then I can just charge capacitor or electromagnet. I want to know that whether my theory is correct or not and if there is any suggestion for that then let me know.


There's this wifi network which doesn't appear on my Laptop but on all other devices. It is named "DIRECT-ZKpcnameheremsKX"  But when i turn on the hotstop, this is disappears and the actual hotspot appears.  What exatcly is causing this and should I be worried? (The network is password protected)


Few site and meta site names are ending with Stack Exchange and not all the sites in the data explorer main page

In the  the Stack Exchange site and it's meta site names are displaying.  For the following site and it's meta site's names are ending with Stack Exchange but not the all others.   Software Recommendations Stack Exchange   Mathematics Educators Stack Exchange   Earth Science Stack Exchange   Arduino Stack Exchange   Joomla Stack Exchange   Expatriates Stack Exchange   Beer Stack Exchange     Why these site's names are only ending with Stack Exchange? Initially I thought these sites are recently created by Area 51 proposal. But checking in Area 51, these sites are proposed and launched in different time period.  Is it a bug?     Note: I have Noticed this issue when cross checking this


how to install skype on my ubuntu 12.04 LTS I have tried for sudo apt-get install skype but no use


nullpointerexception to file that's apparently recognized?

Very new to programming and trying to understand why I'm getting a null pointer exception to my files in the R.raw folder. Android studio recognizes the files and I'm not getting any errors in the compiler. Thanks!  public class MainActivity extends AppCompatActivity {  private SoundPool mSoundPool; private int cID; private int dID; private int eID; private int fID; private int gID; private int aID; private int bID;   i just tried redoing the programming in a new project because I'm not sure what I'm doing wrong.  public void playC(View view) {      mSoundPool.play(cID, 1.0f, 1.0f, 0, 0, 1 );   }  public void playD(View view) {      mSoundPool.play(dID, 1.0f, 1.0f, 0, 0, 1 ); }  public void playE(View view) {      mSoundPool.play(eID, 1.0f, 1.0f, 0, 0, 1 ); }  public void playF(View view) {      mSoundPool.play(fID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playG(View view) {      mSoundPool.play(gID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playA(View view) {      mSoundPool.play(aID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playB(View view) {      mSoundPool.play(bID, 1.0f, 1.0f, 0, 0, 1 );  }   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     cID = mSoundPool.load(getApplicationContext(), R.raw.note1_c, 1);     dID = mSoundPool.load(getApplicationContext(), R.raw.note2_d, 1);     eID = mSoundPool.load(getApplicationContext(), R.raw.note3_e, 1);     fID = mSoundPool.load(getApplicationContext(), R.raw.note4_f, 1);     gID = mSoundPool.load(getApplicationContext(), R.raw.note5_g, 1);     aID = mSoundPool.load(getApplicationContext(), R.raw.note6_a, 1);     bID = mSoundPool.load(getApplicationContext(), R.raw.note7_b, 1);   }   }


Why does order of String.equals() matters for comparing strings? If theres a null string, there could be a exception thrown

If I have a basic program to compare a null string, why does the location of the null string potentially blow up and give a NullPointerException?  The first 3 prints will print, false, null: null, and then null... but the last one, which should be just like the first print statement, throws an exception.  Why is this?  String teststring = null;  System.out.println("".equals(teststring)); System.out.println("null: "+null); System.out.println(teststring); System.out.println(teststring.equals(""));


For a suggested solution in another topic I tried to write my first shell script. It did not work as intended.  In order to get a quick access to the folder /opt/lampp/htdocs when using XAMPP I tried to create a desktop shell script:  gksudo nautilus /opt/lampp/htdocs   and saved it to a file named htdocs_open.sh and saved it on my desktop ("Skrivbord" in Swedish) under the folder /home/lars/Skrivbord  I also changed the permissions using:  chmod +x htdocs_open.sh   When I check the permissions it now looks like this:  -rwxrwxr-x  1 lars lars   35 jul 26 16:31 htdocs_open.sh* -rwxrwxr-x  1 lars lars   34 jul 25 23:43 htdocs_open.sh~*   When I doubbleclick the icon on my desktop it just open up the script in gedit.  Why do I get a double set of files with one having "~" in the end? Why is my shell script not running as a shell script?


Can you complete badges with Steam trading cards for a game you don't own?


How do I report a bug in Ubuntu translation?

I am familiar with reporting bugs on launchpad, but have no idea on how to report a bug in the translation.   Should I file it against the package that contains this bug, or should I report it as a but in some translation-project? How to make sure the translators team will get notified? What information should I include in such a bug report?


Consider a sequence of the form:  $x[n]=-1,-1...,1,1,...,-1,-1...,1,1... \quad n>0$  One can think of this as a square wave ($\pm1$) with a 50 % duty cycle (coming from EE).  For the simplest case of such a series i.e. $-1,+1,-1,+1,-1...$, a general equation is quite trivial ($x[n]=-1^n$).  Can we have e general equation for the other cases i.e. when there are multiple $-1$'s followed by $+1$'s ?


Let $(G,\cdot)$ be a group and $a\in G$. Define $x\ast y:=x\cdot a \cdot y$. Show $(G,\ast)$ is a group.

Let $G$ be a group with operation $\cdot$  and let $a \in G$. Define a new operation $*$ on the set $G$ by $x*y$ = $x·a·y$ for all $x,y \in G$. Show $G$ is a group under the operation $*$.  Does this group under the operation have an inverse?    I know you need to use $x*b = a^{-1}$ and $b*x = a^{-1}$. But I am not getting them to have the same result.   So far I have $b*x = bax$ so $bax = a^{-1}$ and $x*b = xab$ so $xab = a^{-1}$.


UK citizen marrying US. citizen in USA under VWP

My fiancee and I are marrying on March 3 in the USA. I'm traveling from Dublin, Ireland to USA.  I am employed in the UK, have authorised leave, return ticket to Ireland and plan to apply for UK spouse visa upon my return. I am traveling from March 1 to March 8 since we are applying for her visa before end of March and I don't want to take too much time off work.  Has anybody any experience in traveling to USA to marry a US citizen then heading back to home country? Unsure what documents to take. I plan on taking my job contract, letter of leave from my manager, last 3 pay slips to prove I'm still employed, return ticket, hotel booking for 1 week in USA, wedding venue booking.  I've been to USA about 6 times over the past 2 years to visit my fiancee. Not sure what questions will be asked, so I plan on arriving about 3 hours before my flight to JFK as not to miss it. Never had too much trouble at the border, when I say I'm visiting my fiancee they just raise an eyebrow, ask what she is employed as, ask what I do back home then usually stamp me through.   Any advice?  Thanks.  Additional info: No, I'm not planning to remain in the USA. Just want to head there, marry my fiancee, then head back.  EDIT: No they do not answer my question, unfortunately. I want to hear from people with experience doing this and what I can expect. I do not know whether to say I am visiting my fiancee or just straight to say I am getting married.


How to calculate Annual Percentage Rate (APR) given the following:  A - Loan borrowed at the beginning (USD 1000), B - Loan total costs paid at the end (USD 2000), c - Number of compounding periods per year (52 weeks), k - Number of periods to pay the loan (60 weeks)  All the formulas found in literature use nominal interest rate but here we do not have it.  By APR I mean:   I have constructed a spreadsheet where I can find APR with Excel Solver by changing nominal interest rate. Wouldn't there be more elegant solution for that?


I've been using the formula for the arithmetic mean all my life, but I'm not sure why it works.  My current intuition is this one:  The arithmetic mean is a number that when multiplied by the number of elements, gives you the sum of all the elements. Because of this fact, it can't be more than the maximum nor less than the minimum, and it should be located somewhat around the center.  But I was wondering if there are other intuitions out there? Why does this formula work? If in passing you could talk about the weighted average as well, that would be nice too.  Thanks


Had Professor Trelawney ever predicted something that turned out to be true?

Because she always talked rubbish about omens, deaths, the Grim, etc, which never happened. Even Professor McGonagall told students not to pay attention to her nonsense. I also wonder why Dumbledore kept her as a teacher.


For my current project I want a class to create random values (integers for example). I am a big fan of giving my methods a sentence-like signature and my int-generate should be called like this:  Generate.randomIntBetween(0).and(10);   A pretty simple implementation for that would be something like this:  public static UpperBound generateIntBetween(int lowerBound) {     return upperBound -> {         return (int) (Math.random()*(upperBound - lowerBound) + lowerBound);      }; }   However this solution might be dangerous when the range is really big:  Generate.randomIntBetween(Integer.MIN_VALUE).and(Integer.MAX_VALUE);   Is there a simple and safe implementation that will not break for big ranges? Could I simple use ThreadLocalRandom.nextInt(int, int)?  "Generating random integers in a specific range" has no answer for handling the int-overflow


Given three iid random variables, $X,Y,Z$  following a Uniform $(0,1)$ distribution. Then, how to find $\Pr(X>YZ)$?     Recently, I was asked this question in an interview, but I chocked there. Any hint will be appreciated.


Decomposition of Infinitely Generated Abelian Groups

I am curious if there is any structure result for an infinitely generated abelian group $G$?  In particular, is the following naive guess true?  $$G\cong \bigoplus_{i\in A}\mathbb{Z}\oplus \bigoplus_{i\in B }\mathbb{Z}_{q_i}$$  where $A$, $B$ are some infinite sets, and $\mathbb{Z}_{qi}$ are primary cyclic groups.  Or perhaps it is not a direct sum, i.e.   $$G\cong \prod_{i\in A}\mathbb{Z}\times \prod_{i\in B }\mathbb{Z}_{q_i}$$?  Thanks a lot.


Package from APT repo, dependencies installed manually (in /usr/local...); how to tell APT?

I had installed a the TeX editor kile from the official Ubuntu PPA. It came together with a bunch of dependencies, TeXlive among them. The provided TeXlive version however is from 2015 and thus quite old, buggy and outdated. I removed all texlive* components manually by means of dpkg -r --force-all and reinstalled a more recent version of texlive via the official texlive installer (install-tl). Works like a charm so far.  Other than apt, which now insists on reinstalling the old texlive because of that unsatisfied dependency. How can I tell apt to permanently ignore that missing dependency in the future and behave as if it were installed (which it actually is, just not through apt)?


Can healers get end game card for eliminations?

Overwatch usually gives you  according to your role. Like Solder gets a card for damage done, Reinhard gets a card for damage shielded, Tracer can get a card for number of recalls. I wonder if Mercy (and other healers) can get a card for gold eliminations/damage or algorithm just won't count them, since it is not her job?


Install 64-bit Chrome on 32-bit computer

Can I install 64-bit Google Chrome on 32-bit Ubuntu 16.04? My computer has 504mb RAM. The software installer is not able to install Google Chrome 64-bit version.


char *func1 = "Open file"; char *func2 = "Write to file";  printf("%s", func1); open_file(); printf("...test_passed.\n");   How can I format the printf so that the "test_passed" string is right-aligned on the same line that contains the first string?  Open file ........ test_passed. Write to file .... test_passed.


Edit: Yes, using a . However, now I'm getting crazy slope values, everything is around 90 degrees. It's a hillside vineyard, I don't think it's vertical.    I am trying to create a slope from a clipped DEM. The DEM is for a small plot of land, as you can see below. Each square is 30x30m.     The slope map is not registering values, just going from NaN to NaN.


What's the best way of accessing field in the enclosing class from the nested class?

Say if I have a dropdown in a form and I have another nested class inside of this class . Now what's the best way to access this dropdown from the nested class?


Extracting two values from the output of a command

I have a script that conducts a Whois lookup on each domain in a list and I need to extract the creation date and the expiration date.  I have the first part but can't seem to get the expiration date also.  I don't want to run the domain through whois twice...  while IFS="," read domain rdate; do                     # Domain name and received date          cdate=( $(whois $domain | grep -m 1 -i Creation| awk -F" " '{print $3}') )                 # Harvest creation date from whois record for each domain                  # expdate=??????         printf "$domain,$cdate,$expdate \n" done < "temp1.txt" 2> /dev/null # Sets the file to read in from and suppress error messages   I tried to set the whois as "whod" like so, with no luck:  whod=$(whois $domain|awk '{print $0}') expdate=( $(echo $whod |grep -m 1 -i 'Expiration Date' | awk -F" " '{print $3}') ) echo $expdate


Noun phrase converted to verb, is a hyphen needed?

When "air kiss" is treated as a verb, as in "they air kissed", should it be hyphenated to "air-kissed"?


Is it considered bad form to link to paid tutorial?

I've made a Pluralsight training course for users of my open source library, as a resource to help answer in detail lots of the most commonly asked questions. You do however need to be a Pluralsight subscriber to watch it which isn't free and I get a small royalty cut when people do watch it.  If someone asks a question on SO about a topic that I address in detail in the training course, is it considered OK for me to give a brief answer outlining the general approach to solving the issue at hand, and then point them to the Pluralsight course if they want a more detailed answer?


Is it possible to rename fonts in Windows 7?

I've accidently installed the wrong font as 'Helvetica'. I found a font called Helvetica online when I was looking at desktop customization, etc and I went and installed it. However, it's not actually Helvetica. I've now got a proper Helvetica font, but I can't seem to install it (it installs as Helvetica LT Std. Is there any way for me to delete 'Helvetica' and rename 'Helvetica LT Std' to 'Helvetica'?  Cheers, Chintan


While executing GC program i am getting NPE error, can anyone correct me please?

package com.java.gc;  public class FinalizeDemo  {     static FinalizeDemo s;  public static void main(String[] args) throws InterruptedException {     FinalizeDemo f = new FinalizeDemo();     System.out.println("f hashcode:" +f.hashCode());     f=null;     System.gc();     Thread.sleep(5000);      System.out.println("s hashcode:"+s.hashCode());     s=null;     Thread.sleep(10000);     System.out.println("ENd of main");  } public void finlaize() {     System.out.println("Finlaize method called");     s=this; }   }  Getting NPE while runnig this code , can anyone please help me?


I recently found a second-hand bike that looks interesting, but the brand is KCP, and even with a lot of search, I'm not able to find any result about it.  You can find below a picture and a link to the  mountain bike   What is "KCP"? Should I trust this supposed "brand"? Do you recommand me not to buy this and look into well-known or better known brands?


Which emulator for the Game Boy Advance is recommended for Linux (Lubuntu) that doesn't run too slowly such as VBA-M in my case and that supports the same kind of features like VBA nowadays (2017)?


free / top difference. Does free show virtual memory?

free -m shows me the following in my system:               total       used       free     shared    buffers     cached Mem:          3954       3842        111          0        248       2585 -/+ buffers/cache:       1008       2945 Swap:         3811          4       3807   So memory looks pretty used up, but top sorted by memory shows the following top-processes:    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                8891 minecraf  20   0 2374m 277m 9.9m S    1  7.0   0:12.21 java                                                                                8704 root      39  19 2802m 272m  11m S    0  6.9   0:28.73 java         The virtual memory used by java seems to be huge, but i learned on the internet that that's not a problem. So i guess my question is: Why does free show the virtual memory, if it's not that meaningful?


How to solve this alignment?    I wrote \[a^2+...\] but I couldn't align it in my document. What's the best way to center a long equation like this one?  I use LaTeX