recently, I read codes from   In lib/fast-rcnn/models.py, there are lots of tuple-under-function style code. for example, _vgg_fc()  def _vgg_fc(self):     (self.feed('conv_out', 'rois')     .roi_pool(7, 7, 1.0/16, name='pool5')     .fc(4096, name='fc6')     .dropout(self.keep_prob, name='drop6')     .fc(4096, name='fc7')     .dropout(self.keep_prob, name='vgg_out'))   I wonder what is the different from the code below?  def _vgg_fc(self):     self.feed('conv_out', 'rois')     .roi_pool(7, 7, 1.0/16, name='pool5')     .fc(4096, name='fc6')     .dropout(self.keep_prob, name='drop6')     .fc(4096, name='fc7')     .dropout(self.keep_prob, name='vgg_out')

I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax?  For example, adding a bunch of strings,  e = 'a' + 'b' + 'c' + 'd'   and have it in two lines like this:  e = 'a' + 'b' +     'c' + 'd'


I'm clustering a set of data but I don't have truth document that allow me to evaluate the result of clustering (I have unlabelled data), so I can not use an external evaluation measure. In this case, is there any efficient evaluation measures - internal cluster validity measures, that will allow me to incrementally evaluate the clustering result each time I cluster some new data to the current clustering?

One of the biggest issue with cluster analysis is that we may happen to have to derive different conclusion when base on different clustering methods used  (including different linkage methods in hierarchical clustering).  I would like to know your opinion on this - which method will you select, and how. One might say "the best method of clustering is which gives you the right answer"; but I may question in response that cluster analysis is supposed to be an unsupervised technique - so how do I know which method or linkage is the right answer?  In general: is a clustering alone robust enough to rely on? Or we need a second method and get a shared result to be based on both?  My question is not only about possible ways to validate / evaluate clustering performance, but is broader - on what basis do we select/prefer one clustering method/algorithm over another one. Also, is there common warnings that we should look around when we are selecting a method to cluster our data?  I know that it is very general question and very difficult to answer. I only would like to know if you have any comment or any advise or any suggestion for me to learn more about this.


I am trying to implement sed replace with shell variables. As far for now I have working sed replace with '  sed -i -r 's#(export\ PATH=")(.*)#\1/home/USER/bin:~/.local/bin:\2#' ~/.zshrc   But unfortunately ' does not expand shell variables just as stated in this answer   While trying to use " I keep getting problems with parentheses etc. I would like to make this generic to always use whoami instead of USER  The first attempt would be   sed -i -r "s#\(export\ PATH=\"\)(.*)#\1/home/`whoami`/bin:~/.local/bin:\2#" ~/.zshrc sed: -e expression #1, char 60: invalid reference \2 on `s' command's RHS   EDIT  I have tried   sed -i -r "s#\(export\ PATH=\"\)\(.*\)#\1/home/$(whoami)/bin:~/.local/bin:\2#" ~/.zshrc   to escape the second group but I get the similar error :   sed: -e expression #1, char 63: invalid reference \2 on `s' command's RHS

In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="<funny characters here>" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user.


Package software-properties-common is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'software-properties-common' has no installation candidate   System: Ubuntu 16.04

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


What ultimates can be damage boosted by Mercy?  We already know that , but are there other ultimates that can be damage boosted by Mercy? Can all ultimates be damage boosted by Mercy?

In Overwatch, there are several ways to buff the damage dealt by a hero: the alternate fire of Mercy's Caduceus Staff, Ana's Nano Boost, and Orisa's Supercharger. Are they all governed by the same rules? What can they affect, or not affect?  This question exists to have a single reference point for the many, many questions that have been asked, instead of having to update each answer individually when game mechanics change


Today I installed Ubuntu for the very first time. I am having trouble installing any drivers for my GT 720M card.  I've tried to follow the guides for general NVIDIA driver installation but haven't had any success. Likewise, the "additional drivers" program fails to detect anything.   I would really appreciate any instructions to be typed out in baby-steps. Traditionally, I'm a Windows user, and I'm unfamiliar with what are, probably, basic operations.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I've tackled a discrete optimization problem which seems a bit hard to solve: Assume that we have N resources that we need to assign to N workers. Each worker $i$ gets a reward of ${R_{ij}}$ if assigned to resource $j$, and each worker is only assigned to one resource. My question is, is there a way to assign those resource such that we can maximize the minimum reward obtained ? I've been thinking about the Hungarian Algorithm, but it seems to me that it only tends to maximize the sum of Rewards obtained by all workers instead of Maximizing the minimum reward obtained. Thanks!

I'm trying to find an efficient algorithm for the following problem:  Given two different sets, both of size $N$. Each element in the two sets has coordinates $(x,y)$. The task is to optimize the pairings between these two sets such that the maximum distance between the paired elements given a pairing, is minimized. I have only found algorithms that deal with the squared sum of all distances between paired elements or the smallest distance between any two points from the two different sets.  For example: Given a list of $N$ pair of points that are associated with locations $(x_0,y_0), (x_1,y_1), (x_2,y_2),\dotsc,( x_{n-1},y_{n-1})$, name them $a_0,a_1,a_2,\dotsc,a_{N-1}$ accordingly. And another list of $N$ pairs of different points (locations) $(x_0,y_0), (x_1,y_1), (x_2,y_2),\dotsc,( x_{n-1},y_{n-1})$, name them $b_0,b_1,b_2,\dotsc,b_{N-1}$ accordingly. How can I pair all elements (each element is a pair of points) from list 1 $(a_0,a_1,a_2\dotsc,a_{N-1})$ to the other elements in list 2 $(b_0,b_1,b_2,\dotsc,b_{N-1})$ so that we chose the shortest distances? eventually, I'd need to print the maximum distance among all minimum distances (that we have found for each of the elements). Any idea how can this be achieved in reasonable run time? or name an algorithm that might help here.


I'm having this problem where objects look transparent but I don't know why. in the shader editor, they look like this.  And when I render it looks like an alpha mask? I don't know.  I don't know what to do, I've already reinstalled Blender.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I'm trying to update active/suspend button using AJAX and jQuery, after user clicked on "suspend" -> I have to change the status to "Suspended" + active button.  After user clicked on "active" button -> I change the status to "Activated" + suspend button.  Here is the HTML/PHP code :  Status :  <?php if($row['active']==2)   // 2 = Suspended { ?>     <span id="status<?php echo $row['id']; ?>">Suspended         <button type="button" class="active-button" value="<?php echo $row['id']; ?>">active</button>      <?php } else if($row['active']==1)  // 1 = Activated { ?>     <span id="status<?php echo $row['id']; ?>">Activated         <button type="button" class="suspend-button" value="<?php echo $row['id']; ?>">suspend</button>      <?php } ?>   This is the jQuery/AJAX code :  $(function() {     $('.active-button').click(function(){         var add_active = 1;         var add_id = $(this).val();         var status = "#status"+add_id;         $(status).text('Loading...');          $.post('active.php',{id: add_id, active: add_active}, function(){             $(status).html("").append("Suspended <button type='button' class='active-button' value="+add_id+">active</button>");         });     });      $('.suspend-button').click(function(){         var add_active = 2;         var add_id = $(this).val();         var status = "#status"+add_id;         $(status).text('Loading...');          $.post('active.php',{id: add_id, active: add_active}, function(){             $(status).html("").append("Activated <button type='button' class='suspend-button' value="+add_id+">suspend</button>");         });     }); });   But The problem is that the span "status" doesn't change(in the DB it works well).  I'm almost sure that the problem is in this line:  $.post('active.php',{id: add_id, active: add_active}, function(){     $(status).html("").append("Activated <button type='button' class='suspend-button' value="+add_id+">suspend</button>"); });

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


I'm wondering, what is a proper way to mix List<string> list = new List<string>(); content inside the list randomly, without using of another list for random rewriting.   For example, if I got value by index this way:  list[0]; list[1]; list[2]; list[3];   and order output is:  line1 line2 line3 line4   after desired mixing, how is possible to get it under the same indexes, but over the randomly mixed values:   list[0]; list[1]; list[2]; list[3];   to get random order inside the list:  line2 line4 line1 line3

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


I need to create a random array of int with certain parameters.   int[] test = new int[80]; Random random = new Random();   I need to assign 1's and 0's, randomly to the array. I know how to do that.  test[position] = Random.Next(0,2);//obviously with a for loop   But I need to have exactly 20 1's, but they need to be randomly positioned in the array. I don't know how to make sure that the 1's are randomly positioned, AND that there are exactly 20 1's. The rest of the positions in the array would be assigned 0.

I need to randomly 'sort' a list of integers (0-1999) in the most efficient way possible.  Any ideas?  Currently, I am doing something like this:  bool[] bIndexSet = new bool[iItemCount];  for (int iCurIndex = 0; iCurIndex < iItemCount; iCurIndex++) {     int iSwapIndex = random.Next(iItemCount);     if (!bIndexSet[iSwapIndex] && iSwapIndex != iCurIndex)     {         int iTemp = values[iSwapIndex];         values[iSwapIndex] = values[iCurIndex];         values[iCurIndex] = values[iSwapIndex];         bIndexSet[iCurIndex] = true;         bIndexSet[iSwapIndex] = true;     } }


If a particular community has a favorite tag, I would like for that question in the Hot Network Questions list to highlight.  If I have a tag set to ignore, it will either grey out or not show at all (as determined by my preferences for that community and tag.)  It seems like there is some customization in this list because I've ignored certain communities and those do not show up in this list.  It would be cool to take this one step further.

There are some types of questions I don’t want to see, and so I . However, I've found that questions with these tags can still show up in Hot Network Questions.   For example, I've ignored the tag for the latest Star Wars movie on Scifi/Fantasy Stack Exchange, but questions for that movie from that site show up in Hot Network Questions.  Would it be possible to make it so that Hot Network Questions does not show questions that contain tags I am ignoring on the site that the question originates from?


It's a staple of the fantasy genre: faced with an obstacle the barbarian can't punch his way through, the wizard flips through his spellbook until he finds the perfect spell. He reaches into his component pouch, withdrawing—somehow—exactly what he needs, then casts a powerful spell, surprising the heroes and allowing them to continue on. Wizards don't get to do that in 5e. They prepare so many spells per day out of their spellbook, and unless the other spells within are tagged ritual, they don't get to see use until after the next long rest. I want to house-rule that a wizard can cast unprepared spells from their book in the absence of exigent conditions. If I have time and space to crack out my spellbook, being disallowed from mage armor, disguise self, or jump without [8 minus sleep] hours of study feels arbitrary. What about the game changes, especially balance-wise, if wizards are allowed to cast unprepared spells from their spellbooks? Note: this would be different from [ritual] spell casting from the spell book.  In this proposed scheme, casting an unprepared spell would still require slots.

I have a party consisting of two PCs; a lv5 fighter (3 fighter, 1 rogue, 1 barbarian) , and a lv5 ranger (4 ranger, 1 cleric). Focusing on the ranger for the purposes of this question. She doubles as our caster, and it's been working super well for us. However, we're feeling really hemmed in by the way prepared spells are managed in 5e. As a GM I don't like a) hounding her to pick spells after each long rest and b) limiting what they can do just because she didn't magically see into the future to realize Comprehend Languages would have been useful today. I want to change how she prepares spells to allow her the roleplaying freedom to pick some spells at the time of casting, rather than needing to set them ahead of time. On the flip side I can see a lot of room for abuse so I'm considering offering one of the following two systems but would like someone to double check my logic (I'm a first-time GM and fairly unaware of what the later levels will bring.) At this point her prepared spells work out like so;  She has access to eight spells total. Five are predetermined; three because she's a ranger and knows those spells, and two which are always prepared for her because of her cleric domain. This leaves three spells she must prepare at the beginning of each day.  I see two logical ways to resolve this. Method 1 Of the three remaining prepared spells, one can be swapped at will at the cost of an action. The other two must be prepared ahead of time like normal. IE, she can take a turn during combat to switch one spell for another spell of her choice (or prepare one if the slot was previously empty). Needing to take an action to prepare the spell should be enough of a limiter to prevent abuse, and it gives her plenty of flexibility during combat. However, outside of combat it would logically follow that she can switch spells, at will, every 6 seconds. That seems pretty game breaking. Method 2 The remaining prepared spells are empty until used. She can declare the use of a spell at any time for no penalty, but once the spell is declared she can't switch it again until the next long rest. IE, over the course of a day she can select any three spells she likes to use but there's no option to change them once selected. This feels more balanced between in-and-out of combat scenarios, but I can see it potentially getting out of control in later levels. I was thinking of restricting this down to just 1-2 "empty" prepared spells (the rest would be pre-prepared as usual) as a limitation if three is too broad. TL;DR: I want to give my player more flexibility in her prepared spells. Is one of these two methods more acceptably balanced than the other? Will it become unbalanced as she levels up?


Is it true that if $a,b\in\mathbb{R}$ with $a,b\geq 0$ and $0<r<1$, then $(a+b)^r\leq a^r+b^r$?

If $p,q$ are positive quantities and $0 \leq m\leq 1$ then Prove that $$(p+q)^m \leq p^m+q^m$$    Trial: For $m=0$, $(p+q)^0=1 < 2= p^0+q^0$  and for $m=1$, $(p+q)^1=p+q =p^1+q^1$.   So, For $m=0,1$ the inequality is true.How I show that the inequality is also true for $0 < m < 1$.   Please help.


I have a Macbook Air and two Macbook Pros. All of their batteries got a bulge.  I like to use them in this way:   Always plugged to the power if there is one. 95% of the time, I plugged it to power. I do this because I think when power is on, the software runs fast. Never restart the OS. I do this because I think it saves me a lot of time waiting for the system to restart (even though it doesn't take much) Never shut down the machine, if I need to take the device, I just fold the screen (if not connecting to an external display) 70% of the time, I use an external display and fold the screen when using it. I do this because I like to put my keyboard on the top of the MacBook, so this would save a lot of space.   I hope to get some advice that which one (or more) of the above habits are causing the battery bulge.

I am using my MacBook pro 15" 2016 everyday and attached to it I have got a DELL Monitor 25" QHD. In order to use the monitor as main screen my MacBook pro needs to be plugged in charging all the time.  Will the battery of the MacBook deteriorate because of this?  Thanks


It's easy to prove that $L_{p}(K)$ is separable , using Stone theorem. But how can we show the same result for real line ?  I thought about considering : $ \mathbb{R} = \cup (a_i , b_i] $ and $\mathbb{1}((a_i , b_i])$. But my teacher said that they are not in $L_{p}$.

How can I prove that the space $l^{p}$ equipped with the norm (for $x=(x_{n}) \in l^{p})$: $\|x\|_{p}=(\displaystyle\sum_{n}|x_{n}|^{p})^{1/p}$ Is a separable space? (i.e. showing that there is a countable dense set in $l_{p}$). I saw a proof in which they started with first letting $x=(x_{n})$ be an element of $l^{p}$ and for any $\epsilon >0$, then they chose $N$ such that: $(\displaystyle\sum_{n>N}|x_{n}|^{p})<(\frac{\epsilon}{2})^{p}$ However, I'm not sure where does this come from. As well, I'm not sure how to proceed from this step. Thank you for your help!


Please give a example of function that is differentiate 2019 times, but is not differentiate 2020 times

For every $n \in \mathbb{N}$, (in this problem $\mathbb{N}$ starts at $n = 1$) find a function $f$ which is differentiable $n$ times at $0$, but not $n+1$ times.  The function I chose is the following:  $$ f_n(x) = \begin{cases} x^{n+1} &\mbox{if } x \le 0\\ x^{n} &\mbox{if } x > 0 \end{cases} $$  Now I can't think of the best way to prove that $f$ is differentiable  $n$ times at $0$ but not $n+1$ times.


I have installed ubuntu 13.10 along with windows 7 without creating any new partition. I am using a bootable pendrive to do so and the installation completes succesfully in the same drive in which windows is installed. But when the pc restarts to complete the installation this error shows up !! This same thing is successfully completed in another pc but in my pc it is showing an error. Pls help as i dont want to create a new partition and dont want to run it as a live cd.

I've been trying to install ubuntu 11.04 on Asus k50IJ notebook. All via Wubi went without problem. After a reboot, everything starts but during veryfying the installation, this error appears:     "No root system file defined"   I tried to run chkdsk because I thought there might be some HDD problems, yet nothing has been found.


I'm trying to install software on Ubuntu but whenever I write the command at terminal (e.g. sudo apt-get install scalpel) it shows following error:  user@OCAC:~$ sudo apt-get install scalpel [sudo] password for user:  Reading package lists... Done Building dependency tree Reading state information... Done N: Ignoring file 'trusty-stella-datong.volatile' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'trusty-stella-datong.volatile' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension  E: Unable to locate package scalpel   How can I solve this problem?

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


I've tried everything.Preferences- general-anti aliased artwork makes design look fine.Upload or check it in photoshop and the line is still there.A months work of work messed up. My thinking is I have something selected or checked somewhere and it's screwing up my work.

I have an object in Illustrator with a chevron pattern that I created in Illustrator. When I export as a .png file or rasterize image file, it shows horizontal lines.  Anyone have a clue why it does this? I am at a complete loss. It's not the seams of the pattern.  Below is a .png file export of the image:


I'm counting the words and my increment operator is not increasing even after matching with the similar word. And the output is like this   Enter a paragraph to check number of words and its frequency rahul rahul rahul  rahul 0 rahul 0  rahul 0   Scanner y = new Scanner(System.in); System.out.println("Enter a paragraph to the words and its frequency\n"); String para = y.nextLine(); String a = para.toLowerCase(); String array[] = a.split(" "); int l = array.length; int count[]; count = new int[1000]; for (int i = 0; i < l; i++) {     for (int j = i + 1; j < l; j++) {         if (array[i] == array[j]) {             count[i]++;         }     }     System.out.print(array[i] + " ");     System.out.println(count[i]); }

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


I need to show that  $$ \int_0^\infty \frac{\sin^4x}{x^4}dx = \frac{\pi}{3} $$  I have already derived the result $\int_0^\infty \frac{\sin^2x}{x^2} = \frac{\pi}{2}$ using complex analysis, a result which I am supposed to start from.  Using a change of variable $ x \mapsto 2x $ :  $$ \int_0^\infty \frac{\sin^2(2x)}{x^2}dx = \pi $$  Now using the identity $\sin^2(2x) = 4\sin^2x - 4\sin^4x $, we obtain  $$ \int_0^\infty \frac{\sin^2x - \sin^4x}{x^2}dx = \frac{\pi}{4} $$ $$ \frac{\pi}{2} - \int_0^\infty \frac{\sin^4x}{x^2}dx = \frac{\pi}{4} $$ $$ \int_0^\infty \frac{\sin^4x}{x^2}dx = \frac{\pi}{4} $$  But I am now at a loss as to how to make $x^4$ appear at the denominator.  Any ideas appreciated.  Important: I must start from $ \int_0^\infty \frac{\sin^2x}{x^2}dx $, and use the change of variable and identity mentioned above

The following question comes from   post $$\int_0^{\infty} \left(\frac{\sin x }{x }\right)^n\,\mathrm{d}x$$ but now I'd be curious to know how to deal with it by methods of complex analysis. Some suggestions, hints? Thanks!!!  Sis.


According to , .mpk files are just .zip compressed and I should be able to unzip them as normal. I've tried from the terminal on macOS (10.11.6):  unzip somefile.mpk   for multiple different .mpk files I always get this error:  Archive:  somefile.mpk  End-of-central-directory signature not found.  Either this file is not  a zipfile, or it constitutes one disk of a multi-part archive.  In the  latter case the central directory and zipfile comment will be found on  the last disk(s) of this archive. unzip:  cannot find zipfile directory in one of somefile.mpk or         somefile.mpk.zip, and cannot find somefile.mpk.ZIP, period.   I get the same error if I change the file extension from .mpk to .zip. These files are known to work fine on Windows, when uncompressed with ArcGIS tools. They can also be unzipped with 7-zip on Windows.  Any idea what's going on here?

I was under the impression that all ArcGIS package files could have their contents examined and potentially used by renaming them to *.zip and unzipping them.  This impression is supported for map package (*.mpk) files by  to  and I thought I had used it succesfully on geoprocessing package (*.gpk) files in the past.  However, today I am unable to use a  which I think is because it was created using ArcGIS Desktop 10.5.x when I am using 10.2.1.01. When I rename this *.gpk as *.zip and try to examine it in Windows Explorer I get:     Compressed (zipped) Folders Error      Windows cannot open the folder      The Compressed (zipped) Folder ....zip is invalid.     Is it possible to unzip a geoprocessing package (*.gpk) file to see whether it may contain some useful ArcPy code when that *.gpk cannot be unpacked to provide a usable toolbox?


i have canon slr 1200d.  i have problem with night portrait photography . with flash it focus only the subject and background become very dark. and without flash all are same lightning but subject not in focus.  i want subject as focus and also background has some light and blur effect.  i face this problem at outside photography. when background as nature and not able to gain flash.  also suggest exposer iso sutter speed and apature value for that.

I was trying to make a photo of my girlfriend around 9 pm with a D7000, Sigma 24-70 2.8, and SB-900. She was in the center of the frame, taking up about 20% of the frame. About 40% was taken up by ground, and the rest was the dark heavens.  I set my camera dial to A (aperture mode), aperture to f/2.8, ISO set to 400 and the SB-900 set to TTL mode. I was also experimenting with exposure (+0,7), yet all my photos had a dark background.  What can I do to expose at night without a totally black background?


Question: Let $A\in M_2(\mathbb R)$, Prove that $a_1A^1 + a_2A^2 + ... + a_5A^5 = 0$ for some $a_i\in\mathbb R$ which are not all zero.  First I figured out the point of this proof is to show $A^1, A^2... A^5$ are linearly dependent.  While since $A^5$ is a 2x2 matrix, there must be a relationship between $A^1$ to $A^5$ such that $A^5$ can be represented by a combination of $A^1,A^2,A^3,A^4$. I can compute that but I think there should be a smarter way to get the dependent we want. Thx.

I don't quite understand the proof my notes gave me.  Dimension of $n$ by $n$ matrix is $n^2$. Hence if $k \geq n^2$ then $\mathbf{ \{ I, A, A^2, ..., A^k \} }$ is linearly  dependent. So, there exist scalars $a_i$ not all zero such that $$a_k A^k + \cdots + a_0 I = 0$$  $f(x) = a_k x^k + \cdots + a_0$ is an annihilating polynomial.     I don't understand the bold bit. How do we know that $A, A^2, ...$ are all different? Surely there are matrices which give identity when raised to power of 2,3, etc right?  Thanks.


If $1,a,a^2,...,a^{n-1}$ are the n$^\text{th}$ roots of unity, then prove that$$\sum_{i=1}^{n-1}\frac{1}{2-a^i}=\frac{(n-2)2^{n-1}+1}{2^n-1}$$   $$ \alpha_r=e^{i\tfrac{2\pi r}{n}}=a^{r-1}\\ x^n=1\implies x^n-1=(x-1)(x-a)(x-a^2)...(x-a^{n-1})=0 $$  $$ \sum_{i=1}^{n-1}\frac{1}{2-a^i}=\frac{1}{2-a}+\frac{1}{2-a^2}+\frac{1}{2-a^3}+....+\frac{1}{2-a^{n-1}}\\ = $$ Note: This is solved using derivative of logarithm in  which is good, but I am looking for more of a direct and easier way to find the solution.

$$ \frac{1}{2-a_1} + \frac{1}{2-a_2} + \dots + \frac{1}{2-a_{n-1}} =  \frac{(n-2)2^{n-1}+1}{2^n - 1} $$  Here $1,a_1,a_2,\dots,a_{n-1}$ are $n$-th roots of unity  I know the sum of roots is 0. I think the series should be some sort of telescopic.


The inequality:  $$\sqrt{a^2+c^2}+\sqrt{b^2+d^2}\ge \:\sqrt{\left(a+b\right)^2+\left(c+d\right)^2}$$  But can someone help me with a nice elegant solution. This is an olympiad question I was trying to solve, but couldn't manage an elegant solution.

For $a,b,c,d \in \mathbb{R}$, is $\sqrt{a^2+b^2} + \sqrt{c^2+d^2} \geq \sqrt{(a+c)^2 + (b+d)^2}$? I have tried to show this using the fact that $\sqrt{x+y}\leq\sqrt{x}+\sqrt{y}\; $  for non-negative $x,y$ but haven't been able to arrive at a proof.


Her is my logcat: 07-02 19:56:01.273 4083-4083/com.example.sharide E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.sharide, PID: 4083     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference         at com.example.sharide.MapsActivity$4.onResponse(MapsActivity.java:257)         at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)         at android.os.Handler.handleCallback(Handler.java:739)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:148)         at android.app.ActivityThread.main(ActivityThread.java:7325)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)  If you want me to share my code I would happy to share it with you. But please resolve my problem

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


I have a set of data which basically looks like the following: +---------+--------+ | EventId | Field  | +---------+--------+ |       1 | apple  | |       1 | paper  | |       1 | boy    | |       2 | banana | |       2 | cat    | |       3 | girl   | +---------+--------+  I would like to pivot this to look like this: +-------+--------+------+ |   1   |   2    |  3   | +-------+--------+------+ | apple | banana | girl | | paper | cat    |      | | boy   |        |      | +-------+--------+------+  I am trying to fiddle around PIVOT, but I can't get the result I want. Am I looking at or using the wrong command? Is PIVOT the correct relational operator for this? This is the code I have been working on so far: DECLARE @columns NVARCHAR(MAX), @sql NVARCHAR(MAX); SET @columns = N''; SELECT @columns += N', ' + QUOTENAME(EventID)   FROM (             select distinct                 EventId             from Events         ) AS x;  SET @sql =  N'select  ' +  STUFF(@columns, 1, 2, '') +  '   into ##tempMap from (     select         ev.EventID,ev.FieldName     from Events ev ) as a pivot  (       max(FieldName) for EventId in ('   + STUFF(REPLACE(@columns, ', p.[', ',['), 1, 1, '')   + ') ) as pivottable;';  EXEC sp_executesql @sql  select * from ##tempMap drop table ##tempMap  The code above returns the following results because of the MAX aggregate function. +-------+-----+------+ |   1   |  2  |  3   | +-------+-----+------+ | paper | cat | girl | +-------+-----+------+

I know about the PIVOT feature in SQL Server and I've read a few other questions and answers on here but I just can't seem to grasp it in order to do what I need. I'm trying to run some calculations and I have the following:  TABLE office_settings column office_id (bigint not null) column setting_value (NVARCHAR(500) NOT NULL)  office_id    setting_value -------------------------------------------- 4             0.2 4             0.2 4             2 4             3 5             0.2 5             0.2 5             2 5             3   I'd like to convert this using PIVOT (assuming that's the right tool for the job) to this, basically "grouping by" the office_id column, so:  office_id    value_1    value_2    value_3   value_4 ------------------------------------------------------     4         0.2         0.2         2         3     5         0.2         0.2         2         3   I should also mention that I need to CAST the setting_value column values to DECIMAL(4,2) in the process of this - in case that has any bearing on the T-SQL required to accomplish it.  Any ideas?


I'm trying to convince myself that bootstrapping fails when estimating extreme order statistics (and thus functions thereof). This is a classic shortcoming of the bootstrap laid out in some detail by Chernick (2007, 2011). The reasoning for this is that other methods have been proposed to get around the issue of extreme values, such as the $m$-out-of-$n$ bootstrap. Consider bootstrapping sample range $R = X_{(n)} - X_{(1)}$ from a $N(5, 1.5)$ distribution from $n$ = 100 observations. This is easily accomplished in R as follows. set.seed(1991)  x <- rnorm(100, 5, 1.5) # simulated data r <- max(x) - min(x) # true value = 10.02242  f <- function(x, i) {    return(max(x[i]) - min(x[i]))  }  library(boot)  y <- boot(x, f, R = 10000)  plot(y) # histogram and QQ plot  boot.ci(y) # confidence intervals Intervals :  Level      Normal              Basic          95%   ( 8.97, 13.40 )   (10.02, 13.55 )    Level     Percentile            BCa           95%   ( 6.50, 10.02 )   ( 7.12, 10.02 )   Calculations and Intervals on Original Scale Some BCa intervals may be unstable  The true range is captured in two of the above intervals. I also notice that the true/bootstrapped value is often the endpoint of the CI. I don't think this is a random occurrence, since R sometimes warns users of this, but I still consider the endpoint value falling within the interval.' Here are the plots of the bootstrap distribution. This is what I'm getting at. Looking at these, it suggest something might be wrong -- and indeed this is the case. The below plots look nothing like your typical bootstrap distribution when $n$ is large. Typically, when we bootstrap "nice" (smooth) statistics like the sample correlation say, the plots end up approximating a Gaussian distribution quite closely.  Besides checking whether or not bootstrap confidence intervals capture the true parameter value (and looking at the distribution plots), is there any other evidence suggesting that the traditional bootstrap fails in the case of estimating the sample distribution of extreme order statistics? I'm thinking that interval coverage could also be examined, but is this typically done (or is there enough proof in the intervals and plots themselves)? Edit - In response to duplicate question Many responses to similar questions on CV are quite theoretical. While I appreciate and understand the theory behind the bootstrap, many researchers in other fields do not and would appreciate applied answers that use simulations/real examples in R.

Suppose I have a set of sample data from an unknown or complex distribution, and I want to perform some inference on a statistic $T$ of the data. My default inclination is to just generate a bunch of bootstrap samples with replacement, and calculate my statistic $T$ on each bootstrap sample to create an estimated distribution for $T$.  What are examples where this is a bad idea?  For example, one case where naively performing this bootstrap would fail is if I'm trying to use the bootstrap on time series data (say, to test whether I have significant autocorrelation). The naive bootstrap described above (generating the $i$th datapoint of the nth bootstrap sample series by sampling with replacement from my original series) would (I think) be ill-advised, since it ignores the structure in my original time series, and so we get fancier bootstrap techniques like the block bootstrap.  To put it another way, what is there to the bootstrap besides "sampling with replacement"?


Two week's back I was travelling back from India to USA,my flight was via Rome and Paris, so as par rule I was required a transit visa. And I did apply for the transit visa in Kolkata's Italian Consulate. I had done all the paper works for my visa application and also buy insurace, but at my interviw, I was told through VFS that since I have an USA F1 visa (Indian Passport) and I am not coming outside of the airport, I don't need a visa. In fact they have sent me an official email to support their words.   However when i reached the airport, the airlines (alitalia airlines) didn't allow me to get on the flight. Although I showed them my official email, but they didn't accept it. And thus I was forced to buy a new ticket.   So now is there any way I can take any legal action against either the airlines or the consulate to get my money back. If so, what could be my procedure. Since I am a student, that money matters a lot. And I did everything from my part but I was given wrong informations.

I was wondering if someone could help me out with the following question. I bought a ticket New York - Zurich - Vienna - Lviv (Ukraine). I read online on Swiss immigration website the following information (actually your website states the same):  If you a a permanent resident of the United States (which is my case), you can travel through Schengen airports (I read specifically about Swiss airports) without transit visa, regardless of your citizenship.  I am a Ukranian but I have the old non-biometric passport, which still should have been fine, since as a US permanent resident, I can travel through Swiss airports without a transfer visa (I don't have to leave the Schengen zone inside the airport.  In New York airport, I was denied boarding. I spoke with 2 supervisors and they all said the same: if you are doing 2 transfers in the Schengen zone, you have to have a transit visa, with no exemptions. I showed them 2 websites including the Swiss immigration and was told it's not the information they would acknowledge.  I still think I was right and that exemption rules should apply to me. I ended up buying another ticket and missing Christmas dinner with my family. Anyone with any suggestions, please help!


Right now i can only do 4k@30hz through the hdmi port. I get "No Signal" when i connect using a mDP to DP cable on the same monitor.  What steps would I take to get 60 Hz @ 4K display?

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


I have a windows forms application with a working GUI. However I want the application to be able to be started and used in a command-line interface aswell as a regular GUI application. When the application is started in an CLI the GUI shall not be used an instead relevant information will be written to the CLI-application. What I need to do this is a way to detect if the application (its exe file) is started in a CLI-application such as the regular windows CMD or started in a normal fashion such as clicking the exe file in the file explorer or using a desktop shortcut. Preferably the detection should be done in the main method of the application such as static class Program     {         [STAThread]         static void Main()         {             //if(application not started in a CLI-application)                   Application.Run(new DriverToolApplicationContext());              //else                   //Console.writeLine("Application started in CLI-application");         }      }  How is this detection best implemented? I preferably do not want to put any arguments in the main method.

I'm writing an application that can be started either as a standard WinForms app or in unattended mode from the command-line. The application was built using the VS 2k5 standard WinForms template.  When the application is executed from the command-line, I want it to output information that can be captured by the script executing the application. When I do this directly from Console.WriteLine(), the output does not appear, although it can be captured by piping to a file.  On the other hand, I can force the application to pop up a second console by doing a P/Invoke on AllocConsole() from kernel32. This is not what I want, though. I want the output to appear in the same window the application was called from.  This is the salient code that allows me to pop up a console from the command line:  <STAThread()> Public Shared Sub Main()      If My.Application.CommandLineArgs.Count = 0 Then         Dim frm As New ISECMMParamUtilForm()         frm.ShowDialog()     Else         Try             ConsoleControl.AllocConsole()             Dim exMan As New UnattendedExecutionManager(ConvertArgs())             IsInConsoleMode = True             OutputMessage("Application started.")             If Not exMan.SetSettings() Then                 OutputMessage("Execution failed.")             End If         Catch ex As Exception             Console.WriteLine(ex.ToString())         Finally             ConsoleControl.FreeConsole()         End Try      End If  End Sub  Public Shared Sub OutputMessage(ByVal msg As String, Optional ByVal isError As Boolean = False)     Trace.WriteLine(msg)     If IsInConsoleMode Then         Console.WriteLine(msg)     End If      If isError Then         EventLog.WriteEntry("ISE CMM Param Util", msg, EventLogEntryType.Error)     Else         EventLog.WriteEntry("ISE CMM Param Util", msg, EventLogEntryType.Information)     End If  End Sub


Let be $H$ a proper subgroup of finite group $G$. Who can we show that $G\not=\cup_{a \in G}aHa^{-1}$?

Let G be a finite group and H be a proper subgroup. Prove that the union of the conjugates of H is not the whole of G.  Thanks for any help


Do people down vote questions simply because the question is a duplicate of another question?  I've noticed that this seems to be the case as a lot of duplicate questions are always in the negative.   I can understand why people would do this if the title is very similar to the duplicate question, but a lot of the time even if the asker tries to find similar questions it can be difficult if the title is phrased differently.  In the case that the title is different to the duplicated question, are people downvoting the duplicate question solely because it's a duplicate, or is it because of poor grammer, etc.?   I think that it is a problem that (if) this is happening because it leads the asker to delete their question, which in turn makes it difficult to find the original question with the answer, leading to more duplicate questions.

Possible Duplicate:          The FAQ specifies that:     Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect.   But if I find a correct question, closed (or not yet) as duplicate, is downvote a correct behavior for Stack Overflow policy?


Sometimes a feature request is made and then, for whatever reason, time passes and it is ignored without much feedback and without being graced with "status-declined."  Suppose someone else comes along later and agrees with that feature request.  What is the protocol for that user calling attention?  Options as I see them are combinations of the following:   Upvote the old request Make a change in order to bump the old request Place a bounty on the old request Make a new request   It seems to me that #4 is likely to be the most effective but is in risk of being closed as a duplicate.  What's the correct way to handle this sort of thing?  On a related note, suppose that rather than being ignored, the old request actually was explicitly declined, but now someone that wasn't around the first time wishes to add to the discussion.  It's not unheard of for "status-declined" to be changed, but it seems unlikely that upvoting an old, stale, declined feature request is going to do anything.

I posted a question here on Meta Stack Exchange, or on a per-site meta, regarding a bug I found in the system. I got no comments, or a few comments stating that this is a legitimate bug (and not by design). However, it's been quite a long time, and no official response was ever posted there.  Or, I had an idea for a new feature, but realized it's already requested, either by searching or posting a request myself only to have it closed as a duplicate of the existing one. It's been a while since the original request was filed, but no official response has been made.   I'm aware that staff members are , but either my post isn't about one of the indicated topic areas for which they're accepting escalation requests for that month, or I already flagged to request escalation but it was declined, so the instructions there don't apply for my post.  What can I do to draw attention to meta questions for the SE team, so they can give an official response, and possibly implement the bug fix or feature?  Note: This is different from other general questions which ask for how to get attention for unanswered questions, since the procedures on meta sites are different, and getting an official response isn't necessarily the same as getting a good answer.


This website,  - has a statement (screenshot below should it be removed in future) The statement is "What is money were beautiful?". This does not make sense to me. In British English should it not rather read "What is money WAS beautiful?"

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


The more known proof of square root of $2$ is by contradiction when we assume it can be expressed as an irreducible fraction and later finding that it isn't irreducible, but... if we assume the same conditions for example: square root of $9$ we find that it isn't irreducible either. So, what's the trouble here?

The contradiction method given in certain books to prove that sqare root of a prime is irrational also shows that sqare root of $4$ is irrational, so how is it acceptable? e.g. Suppose $\sqrt{4}$ is rational, $$\begin{align}        \sqrt{4} &=p/q        \qquad\text{where pand q are coprimes} \\         4 &=p^2/q^2\\       4q^2&=p^2       \tag{1} \\          4&\mid p^2\\          4&\mid p\\      \text {let }p&=4m  \qquad\text{for some natural no. m}  \\        p^2&=16m^2\\       4q^2&=16m^2   \qquad\text{(from (1) )}\\        q^2&=4m^2\\          4& \mid q^2\\          4&\mid q \end{align} $$ but this contradicts our assumption that $p$ and $q$ are coprime since they have a common factor $p$. Hence  $\sqrt{4}$ is not rational. But we know that it is a rational. Why?


One day I needed paper and I turned all of my sugar cane into sugar.  So, I wondered do you find sugar cane near water?

I played several hours a started three different worlds in Minecraft, but I have never found any sugar canes. I read on Minecraft wiki to search near water but still no luck. Do you have more hints? Is it possible to re-create an environment that allow sugar canes to naturally grow?


currently getting the error "java.lang.NullPointerException: null" when attempting to add my Earthquake objects into my array list.   Note: I am using BlueJ to manually create and input values for my Earthquake(s).  Here is my earthquake class:  public class Earthquake {     // instance variables - replace the example below with your own     private double latitude;     private double longitude;     private double magnitude;     private int year;      public Earthquake(double latitude, double longitude, double magnitude, int year)     {         // initialise instance variables        this.longitude = longitude;        this.latitude = latitude;        this.magnitude = magnitude;        this.year = year;      }      public void storeLat (double longValue)     {         longitude = longValue;      }      public void storeLang (double latValue)     {         latitude = latValue;      }      public void storeMag (double magValue)     {         magnitude = magValue;      }      public void storeYear (int yearValue)     {         year = yearValue;      }      public int getYear ()     {         return year;      }      public double getMag ()     {         return magnitude;      }      public double getLat ()     {         return latitude;     }      public double getLong ()     {         return longitude;     } }   And here is my Observatory class which is used to create the array list and add the Earthquake objects:  import java.util.ArrayList;  public class Obersvatory {      private String ObsName;     private String ObsCountry;     private int ObsStartYear;     private double ObsLocation;     private ArrayList<Earthquake> quakes;      public Obersvatory()     {         this.ObsName = ObsName;         this.ObsCountry = ObsCountry;         this.ObsStartYear = ObsStartYear;         this.ObsLocation = ObsLocation;         ArrayList<Earthquake> quakes = new ArrayList<Earthquake>();     }      public void addQuakes(Earthquake e)     {         quakes.add(e);       }  }   I'd be grateful on any fixes / tips :)

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


Tonight I was using my Ubuntu and after I finished all my work, I turned it off. Today, I'm trying to boot it, but I'm getting a black screen right after the Ubuntu Logo.  After a long time searching for answers, I used the advanced option to start Ubuntu with systemd. I'm still having a black screen after my boot, but when I set to start it with systemd, it works.  Does anybody knows why?  I'm using UBUNTU 16.04 LTS  Thanks!

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


We have a rectangle that is rotating by its center from $0$ to $360$ degrees. This rectangle rotation starts in $0$ degrees when we know all four rectangle points. We also know the angle we want to rotate the rectangle.  What I need is a formula for these points when rectangle is rotated.

I have an example:    How to find point A's xy location (assuming point A can be anywhere on rectangle (not 4 small one, I mean the large one), including corners, but not inside or outside rectangle), with known alpha, beta angles, width, height and center xy location (center can be any position too, not just (0, 0) ) ?  Is there a formula too? If so, include it :)  P.S: I know about , but this one only have one angle to calculate..


My boyfriend will buy two return tickets in Mexico to travel to the UK. One for him to travel to the UK and back to Mexico, and one for me (I am already in the UK) to travel to Mexico. Is it possible for me to use the return ticket that he buys me as a one way, or am I not allowed to do that because I haven't actually come from Mexico to the UK and back to Mexico again?  Am I able to travel to Mexico from the UK (on the return ticket that my boyfriend bought for me, using it as a one way ticket) if I haven't actually flown from Mexico on it?

I've a friend that booked a round-trip journey. He booked A-to-B and B-to-A. Somehow he needed to be earlier at location B, so he took a train and did not take the flight from A to B.  When he went to the airport to take the "back home" flight (B-to-A), he was informed that his ticket was canceled because he did not take the A-to-B flight. They canceled the ticket and sold it to someone else.  Is this normal? The company said it was their right to do so, and he could not get the flight back. The company was Iberia.


I have got a header file that includes boost libraries and I need to include this header file in a source code written in C. Is it possible to do this?  Thanks!

I have a C++ library that provides various classes for managing data.  I have the source code for the library.  I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time.  I'm using GNU tool chain (gcc, glibc, etc), so language and architecture support are not an issue.  Are there any reasons why this is technically not possible?  Are there any gotcha's that I need to watch out for?  Are there resources, example code and/or documentation available regarding this?    Some other things that I have found out:   Use the following to wrap your C++ headers that need to be used by C code.     #ifdef __cplusplus extern "C" {   #endif   //   // Code goes here ...   //   #ifdef __cplusplus   } // extern "C"   #endif    Keep "real" C++ interfaces in separate header files that are not included by C.  Think  here.  Using #ifndef __cplusplus #error stuff helps here to detect any craziness. Careful of C++ identifiers as names in C code Enums varying in size between C and C++ compilers.  Probably not an issue if you're using GNU tool chain, but still, be careful. For structs follow the following form so that C does not get confused.  typedef struct X { ... } X  Then use pointers for passing around C++ objects, they just have to be declared in C as struct X where X is the C++ object.   All of this is courtesy of a friend who's a wizard at C++.


That is not a duplicate of the related question. That question is about stackoverflow and meta.stackoverflow while my question is about Stack Apps. So if this question is kept closed, then the other question will end up as cuold not repruduced since that bug is not reproducable in other stack exchange sites (I check some other Stack Exchange sites including beta sites and some meta sites.)  Error occurs on   When I click to add Favorite or ignored tag, Add button is cropped from the right side.  Favorite Tag Bug:          Ignored Tag Bug:          Occured in Firefox 26.0 on Linux Mint.

I have spotted a bug in rendering of Favorite Tags and Ignored Tags section in Firefox. This rendering issue is present on both stackoverflow.com and meta.stackoverflow.com sites.  I'm using Firefox 17.0.1 on Windows 7 x64. In Google Chrome page is rendered correctly.  Screenshots:  Firefox (please note cropped right part of both Add buttons)    Chrome (buttons are rendered correctly)


I am aware that if you just delete ubuntu, your pc isn't going to work anymore. I followed this guide on how to repair the MBR but it won't work so now I'm doomed. it said to do:  -bootrec /fixmbr  -boorrec /fixboot  When I boot up I get the "Minimal Bash-Like line editing is supported, For the first word...."   I can't factory reset with a windows DVD because there's no recovery partition (apparently) .  I don't care if I lose any files at all, I just want my pc working again preferably with windows but ubuntu could work to.   Possible extra info: I was on Windows 8.1 and ubuntu 14.04 (I think, possibly 14.10) Grub version 2.02 beta2-9  Please help me, I know I messed up.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


So I have been spending hours trying to figure out how to make the wp_editor() work on an ajax generated content. I bumped into this post:   and tried the solution of . His solution almost solves my problem but then there is a problem with my Text tab, I don't see any button: screencast.com/t/Emd2Da3UyThO My Visual tab on the other hand works fine: screencast.com/t/JGWf4ivZfaGb  Inspected my Text tab, I can see that quicktags aren't there: screencast.com/t/qyvwWDnuEPnb But by checking on my window's QTags instances: screencast.com/t/UAzIaZ7XOc5 The description instance (which is not ajax generated content) has the theButtons attribute, while the tabdescription35 (ajax generated) doesn't have one.

Once a page has loaded, how do I create a TinyMCE editor?  Putting a wp_editor call in an AJAX request then displaying it gives this:    Visual and text tabs are nonfunctional, no toolbar, no active TinyMCE instance, just the html markup. I need to instantiate the JS component of TinyMCE, but how?  I've also tried making a call in my AJAX response PHP to _WP_Editors::editor_js();, and I can see the response in the console using console.log and I see the JS script there, but it is not inserted into the DOM and it is never executed


I recently noticed that my rep displayed for Meta IPS is more than 3k less than my rep displayed on IPS. When I navigate to meta it shows my proper rep on the top bar, but still not in the list of my communities.

While using the top bar to navigate across communities, I noticed that the reputation displayed on meta sites on that list does not match the one of their corresponding main sites:    I have noticed on past situations that reputation gained takes a bit to "update" on the display on Meta sites (that is, if you gain rep on SO, for example, it will take some time for you to see your updated rep on MSO).  However, I have never noticed this behavior here, on the Sites List of the top bar. Furthermore, the "delay" here seems to be more severe, as the "outdated" rep showed is of several days ago (for example, I turned 3k on SO almost exactly a week ago, but the rep shown on MSO is still <3k).  Any idea what could be causing this behavior?    Update: 2 months later this persists: my main site rep updates correctly but their corresponding meta rep remains the same as in the image above.     Update: As per Catija's  I removed the site (MSO) and put it back in, but it didn't update the rep.   However, after removing one site (TWP Meta), waiting at least a day, and then adding it back I see that although the reputations still don't match, the number displayed did changed a bit (previously 29,924 but now 33,112):


I'm writing a program that finds the nth prime number, so if n was 10, the answer would be 29. I need to find an upper bound to search through though so if n was 10, the upper bound would be 30 (or any number before the next prime number which is 31).  Any ideas?

In  I have found that the bounds for $n$-th prime is given by, $$n(\ln n+\ln \ln n)>p_n>n(\ln n+\ln \ln n-1)$$ for all $n\ge6$. Are there even stronger bounds for the $n$-th prime?   If possible (of course if the answer is affirmative) in the answer (or comment) please give the link of the paper in which it first appears.


My problem is that when I was trying to install Nvidia drivers (some 301 version) on Ubuntu 13.04, it evoked a message     Ubuntu is running on low graphics    After the installation (I am repenting of that installation a lot :(), whenever I reboot my laptop it shows only command line version of Ubuntu 13.04. I could reinstall Ubuntu using usb-stick, but it could cost me loss of important data. I tried to copy my home directory using live Ubuntu through usb-stick, but I get a permissions error.  My problem could have multiple solutions such as   I can reinstall Nvidia or integrated Intel graphics driver so that I can continue with my previous installation and data. I can copy the data to an external harddisk through commands (which I don't know how to do) and reinstall Ubuntu (which I know how to do :)) I can copy the data though live Ubuntu run through usb-stick to an external hard disk.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


Are cards that are both Land and Creature affected by summoning sickness with regard to:   Possibility to attack Activating special abilities with the TAP symbol?

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


I would like to use in a comment the following command:    How can I do that so that character " ` " before and after the word "Private" is visible?

Suppose the following chunk of code:  lines = text.split`\n`   Not relevant, but it is valid ES6 code  My question is: How to write it inside one comment? When I use backticks around content it displays the content formatted as code. But what if there are backticks inside this content?


I have a fruity beef stew with plums, carrots, beef, onion, beef stock and far too much lemon juice and lemon zest. It tastes too lemony, what can I do to counteract it?

This happens to all of us - be it because we misread the recipe and threw in a tablespoon of sage when it said a teaspoon of sage, or because we were bravely experimenting with new tastes and suddenly noticed something amiss. The question also covers cases where the food is normally seasoned for the average person, but an eater hates a certain aroma and perceives it as strongly unpleasant, and cases where the unwanted aroma does not come from seasoning, but e.g. from burning the food.   In the end, we have a batch of smelly food and wonder where the Undo button is. How do we save it and make it tasty again?


My understanding of a random effect is based on , specifically this definition:  Random effects: factors whose levels are sampled from a larger population, or whose interest lies in the variation among them rather than the specific effects of each level. (Bolker et al., 2009)  In ecology random effects seem to be mostly used to avoid (psuedo-)replication from repeated measures, for example sampling from the same location repeatedly, or to account for phylogeny i.e. that closely related species are more likely to be similar due to shared evolutionary history. This seems to me to be only a restricted application of a random effect, based on the above definition. The Bolker definition says to me that treating a sampling unit as a random effect will control for unmeasured differences between sampling units that may affect the variables I’m interested in. Is this correct? Say I have a study where I’m interested in measuring X. My sampling design involves paired sampling at a number of different locations (not repeated), on different dates. Pairs would be random effects, to avoid repeated measures as discussed above. What about location and date? I’m not interested in the differences between locations or date, only X. In fact, I’d like to control for the differences between location and date to get a better understanding of the effect of X on my response. Would treating location and date as random effects accomplish this? I.e.: Response ~ X + (1|location/pair) + (1|date)  But why not treat location and date as fixed variables? Response ~ X + location + date + (1|pair)   This will still seperate the effect of location and date from the effect of X, so why have them as random variables? If I have them as fixed effects I'll be able to measure the effect they're having on X, so why use random effects?  While the answers from @Royce Yang and @Guille were helpful to get me thinking along the right lines, the best explanation I've found (and should have found before posting this question, not sure how I missed it) is  (thanks @mkt for the link) and leading on from that, the post . I think my question was the problem - I should have phrased it more broadly.

In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect and mixed effect models?


I am getting the following error while doing   sudo apt-get update  Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code   How to get rid of this? Thanks

I cannot install any package. It seems the command apt-get update must be run but it throws some errors:  $ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]      Hit:2 http://ve.archive.ubuntu.com/ubuntu xenial InRelease                      Hit:3 http://ve.archive.ubuntu.com/ubuntu xenial-updates InRelease              Hit:4 http://ve.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 102 kB in 23s (4337 B/s)                                                *** Error in `appstreamcli': double free or corruption (fasttop): 0x000000000210f4b0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fac8d8317e5] [...] Aborted (core dumped) Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success   'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;   then appstreamcli refresh > /dev/null; fi' E: Sub-process returned an error code


Machine:  (AMD Ryzen 5 3550H, 16GB, AMD Radeon RX 560X) ().  I first live booted to see whether Ubuntu 19.04 ran OK. I realised my  WiFi adapter did not appear, but when I used the lspci command, the name of my wifi adapter was present.   ubuntu@ubuntu:~$ lspci 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15d0 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 15d1 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h(Models 00h-0fh) PCIe Dummy Host Bridge 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3 00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3 00:01.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15db 00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15dc 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e8 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e9 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ea 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15eb 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ec 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ed   00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ee  00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ef 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] `Baffin [Radeon RX 460/560D / Pro 450/455/460/555/560] (rev e5) **02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE `802.11ac PCIe Wireless Network Adapter** 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. `RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c2) 04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de 04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 15df 04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e0 04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e1 04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3 05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61)   I have to constantly plug in an external WiFi adapter to connect this machine to the internet. This consumes an entire USB port on my I/O.

We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip.


This code works but it seems insecure because of concatenating GET parameters into the query. I'm concatenating because I need a dynamic number of parameters in the WHERE clause that can be of different types (IN, normal comparison condition).  How can I prepare a secure statement from a dynamic number of different type WHERE conditions?  class myclass {     public function index($where_clause = 1)     {         // db connection (using pdo)         $stm = $this->dbh->query("SELECT COUNT(amount) paid_qs FROM qanda $where_clause");         $ret = $stm->fetch(PDO::FETCH_ASSOC);         // do stuff     }     public function gen_where_clause()     {         $where_clause = '';         if (isset($_GET['c']) || isset($_GET['t']))         {             $where_clause = 'WHERE ';             if (isset($_GET['c']))             {                 $where_clause .= 'cat = ' . $_GET['c'];             }             if (isset($_GET['t']))             {                 if (isset($_GET['c']))                 {                     $where_clause .= $where_clause . ' AND '                     }                 $where_clause .= 'tag IN(' . $_GET['t'] . ')';             }         }         return $this->index($where_clause);     } }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Elaborating on , I'd like to ask: why airlines separate booking and checking-in in the first place? I recently travelled by bus between two major British cities and I only booked/paid my tickets online, no need for some second confirmation step.  The existence of two separate steps makes no sense to me, but since all airlines apply this there must be a very practical reason for it. What is it?

A few years ago, to do the check in, we would go to the airport and do it directly at the counter.  I always thought the function of the check-in for the airline company would be to tell the company "I am here at the airport and I am going to fly". That could be useful for them to know that you are really going to travel, to take a few extra verified information about you, to prepare the airplane (eg.: fuel/per passenger) and maybe for security to know that you are in the airport perimeter.  Nowadays we can do the online check-in up to one month before traveling depending on the airlines. A long time before traveling. That empties a bit all my assumptions.  What is the check-in for and what does that tell the air-line company? Why is that procedure necessary? Couldn't that be avoided? If it's just for collecting extra information couldn't you fill that up when buying the ticket online? If it's to generate the ticket for home printing couldn't that be also done when you pay for the ticket? Why not do it all in one step?


I am working to develop an advanced search option. Where there will be fields:    Text input Field (Post Title) Dropdown (it will be a taxonomy) Dropdown (it will be a taxonomy)   Basically I need this kind of search option. Please take a look at the image to better understand.   I am using the solution found  for searching taxonomies but I need to integrate the text field which will get data from Post Title field..

I'd like to build an advanced search form for a specific custom post type, having filters for the custom post types custom fields, custom taxonomies, and for a separate custom post types properties (fields and taxonomies) which will be links to the first post type using a custom relationship field.  I've recently started off with WPs custom post types, fields, and taxonomies, I love it so far but to make the best of it I'd like to be able to search it properly. Do I need to do it manually? If so, how?  PS. If it matters, I'm using the plugins:  and .  Below I've mocked up an example of how the filtering would look and how it might relate to the post types above.


Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


// Util function function addFormatter(input, formatFn) {   let oldValue = input.value;    const handleInput = event => {     const result = formatFn(input.value, oldValue, event);     if (typeof result === 'string') {       input.value = result;     }      oldValue = input.value;   }    handleInput();   input.addEventListener("input", handleInput); }  // Example implementation // HOF returning regex prefix formatter function regexPrefix(regex, prefix) {   return (newValue, oldValue) => regex.test(newValue) ? newValue : (newValue ? oldValue : prefix); }  // Apply formatter const input = document.getElementById('user_login'); addFormatter(input, regexPrefix(/mysite-/, 'mysite-'));     I want to use this fiddle to work with a variable instead of text, this is the line:  addFormatter(input, regexPrefix(/mysite-/, 'mysite-'));   As you can see it only allows you to input text after mysite- which is how I want it to work. But I want to be able to use a variable where it says mysite-. Like this:  addFormatter(input, regexPrefix(/$sitetitle/, $sitetitle));   Do you have any idea on how to do this?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


$\sum_{n=0}^{\infty} (n+1)^2 x^n$ Closed Form   I'm a bit stuck on finding the closed form here. I don't think I can use the technique of computing derivatives here directly.  Could someone point me in the right direction?

Background: This is a step from a longer proof/exercise that  $\sum_{n=1}^{\infty}\tau (n)^2/n^s=\zeta(s)^4/\zeta(2s)$ for $\sigma>1$  Expanding the sum and using counting I get:   $\frac{1+t}{(1-t)^3}=(1+t)(1+{3\choose 1}t+\left ({3\choose 1}+{3\choose 2}\right )t+\left({3 \choose1}+3!+1\right )t^2 \ldots=\sum_{n=0}^{\infty}(1+n)^2t^n$$  So the final coefficients are each coefficient in the infinite sum plus the coefficient before it because of the $(1+t)$ This gives 1, 4, 9, 16 How would one calculate explicitly (as the author likely did) that the coefficients of $\frac{1+t}{(1-t)^3}$ are $(n+1)^2$ rather than counting and recognizing a pattern?


I am new to this site, so I don't know if this will appear correctly.  I need to solve this limit without L'Hospital's Rule:  $$ \lim_{x\to 0}\frac{x-\sin x}{x^3}.$$  I know that the result is $\frac{1}{6}$ but I need a step-by-step solution.  Thanks in advance.

How can I prove that $$\lim_{x \to 0}{\frac{x-\sin{x}}{x^3}}=\frac{1}{6}$$  without using L'Hospital or Taylor series?   thanks :)


All I found were articles on patch availability for El Capitan, Sierra, and High Sierra. Where do I get a patch to fix the Meltdown exploit? (type that into Google if you don't know what that is, it's been all the buzz in tech news last week)  Bonus points if there's also a patch to minimize the risk of the Spectre exploit.

While Apple has yet to comment on the flaw, Alex Ionescu, Windows   security expert, noted a fix was present in a new 10.13.3 update to   macOS.   source:


Sometimes, when I run   sudo apt-get update    or install an app   sudo apt-get install   I get the error below at the bottom in the gnome-terminal and I can't remove it. I searched for it in the software-sources and in y-ppa-manager and I am not sure I want to mess with the sources list since I am a bit of a noob.  Duplicate sources.list entry http://archive.canonical.com/ubuntu/ oneiric/partner amd64 Packages \   (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_oneiric_partner_binary-amd64_Packages)

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


I know that once all the cubes that are connected are destroyed, the unconnected blocks collapse. How do you find out the unconnected blocks?  edit 1: How would you determine the collapsible object if it spans multiple chunks?

I'm looking for a good algorithms for the following problem: Given a 3D grid of voxels (which may be either empty or filled), if I pick two non-adjacent voxels, I want to know if they are connected to each other by other voxels.  For example (to illustrate the situation in 2D), where # is a filled square:    1 2 3 a # # # b # # c # # #   If I pick a3 and c3, I want to determine as quickly as possible if they they are connected; if there is a path between a3 and c3 through filled pixels. (The real situation is in a 3D voxel grid, of course.)  I've looked at floodfill algorithms and path finding algorithms, but I'm not sure which to choose. Both do unneccesary work: Flood fill tries to fill all voxels, but this is not needed. Path-finding algorithms are usually concerned with finding the shortest path, which is also not necessary. I only need to know if there is a path.  What algorithm should I be using?  Edit: based on the comments, I think should add the following: the content of the voxels are not known in advance, and also, the algorithm is needed to detect if removal (emptying) of a voxel would cause the group of voxels to break into two or more smaller groups.


Should I use "is" or "be" in the following sentence?      What can be said for sure is that it is essential for the challenge   that the claim is/be made officially.   If the above sentence has a subjunctive mood, then "be" is the right choice, but I am not sure if it does.

In which cases should I use the subjunctive mood?     I suggest that every applicant fill out the form carefully.        If she were rich, she would live on Long Island.


I posted a question and the answer was in the comments.   How can (should) I close the topic?

I have a question and have seen others to which the best and most relevant answer (at least the one that solved my particular problem) is placed in the comments to the question as opposed to the answers:   I would like to recognize the commenter as the person who correctly answered the question, but there doesn't seem to be any way to do that. The only thing I could think of was to ask the commenter to repost his comment as an answer, but I cannot figure out a way to contact him. In the meantime the question is sitting unanswered and I am getting other "answers" (leading me to believe that people are not reading the comments and answers already posted before trying to answer it themselves).  How are we supposed to do this?  Note: I don't want to accept the comment as an answer (I agree completely with the answers to this question that comments are comments and answers are answers and they should stay that way). I do wonder if there should be some way to contact people in a reasonable manner (comments on their profile that they must opt in to receiving in email?).


I'm newbie and not very familiar with definitions, so I could call something wrong.  How can I make an separate object with mesh like this (transparent) to use it for patricle hair system? I'm selecting faces of scalp I need, duplicate them and making them a separate object, but don't know how to make it's mesh transparent, with no material, just like at picture.  I've searched the web a lot, but all what I found is about making the material of mesh transparent. Maybe I just asked the wrong questions because don’t know how to call this option right.  Sorry for bad english, I'm not the native speaker.  Thank you in advance!

I'm using hair on my mesh but when I comb the mesh the hair goes through it. I don't want the mesh anyways so instead of figuring out how to stop the hair from going through the mesh I'm trying to figure out how make the mesh invisible but not the hair. When I use a transparency node it effects hair and mesh  I added the particle instance modifier like it says in this question  but it didn't hide the mesh.  Thanks in advance


I just learned that the discontinuity points of an increasing function are countable. Then what about the "constant" points?  Let $f:(a,b)\rightarrow R$ be an increasing function on a bounded interval, i.e., $f(x)\leq f(y)$ if $a<x<y<b$. Further assume that $f$ is differentiable on $(a,b)$. Let $C=\{x\in (a,b)| \ f'(x)=0\}$. Then, is it true that $f(C)$ is countable, or at least $m(f(C))=0$ where $m$ is the Lebesgue measure on the real line?  I suspect it is true since the "inverse" of $f$ is also increasing so that its discontinuity point is countable. How should I show it with rigor? Any help would be really appreciated. Thanks!

The following result is well known:     If $f$ is continuous on $[a, b]$, differentiable on $(a, b)$ and $f'$ is non-zero on $(a, b)$ then $f$ is strictly monotone on $[a, b]$.   However if the derivative vanishes at a finite number of points in $(a, b)$ and apart from these derivative maintains a constant sign in $(a, b)$ then also the function is strictly monotone on $[a, b]$ (just split the interval into finite number of intervals using these points where derivative vanishes and $f$ is strictly monotone in same direction in each of these intervals).     Let's suppose now that $f$ is strictly monotone and continuous in $[a, b]$ and differentiable in $(a, b)$. What can we say about set of points $$A = \{x \mid x \in (a, b), f'(x) = 0\}$$ Can it be infinite? Can it be uncountable? How large the set $A$ can be?


Is there a way to get the command that is executed when a keyboard shortcut is pressed?   E.g., when I press Ctrl+Alt+T, the terminal is ran. Is there a terminal command or an application that would print gnome-terminal when I press this shortcut?

How can I find which command is bound to a give keyboard shortcut? I remember playing with my keyboard shortcuts recently in different places: System/Preferences/Keyboard Shortcuts, "gnome-keyboard-properties" and Compiz. Is there a central place where all those shortcuts are kept or do I have to remember all the places where I set a keyboard shortcut?


there  They have met several times before.  vs.  They met several times before.  Could you please tell  the difference between the two sentences?  Thanks in advance!  Burning the midnight oil, Oodo

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I have created an encounter with monsters, with their relevant CR and XP. Normally, when the party kills everyone, they are rewarded the XP. If the party chooses to, and succeeds in, resolving the encounter without combat, do they get the XP they would've received for killing the monsters, or do you award XP based on the task they performed to defeat the encounter (and maybe use the DMG's easy/medium/hard XP reward for non-combat encounters)?  The possible solutions that come to mind:   They avoid the area (0 XP, as they didn't interact with situation) They talk their way out of it (Does this get the combat encounter's XP?) They find a very clever way to avoid fighting, with risk of being caught/killed/fall to their deaths (here I'm not sure if there needs to be a different set of XP values for what they're trying to accomplish).   I understand that a lot of people will say "I can do what I want", but I'm asking to find out what is the "standard".      I am not asking whether or not I should award the XP. I believe I should, and the DMG says I can/should too. I am asking if the XP awarded should be the same as if the PCs killed all the monsters, or at the difficulty of the "method" they thought of using.  For example, if they avoided the encounter by running through them stealthily and the monsters didn't see them (has risk) or by going overhead using the beams (risk of falling into the fight), should I award the full "killed-the-monsters" XP or a lesser XP because it's not difficult to go over the beams in a stealthy manner.

Some thug bandits set up a road block on the main road to extract a toll from passersby. It was twilight when my party encountered them. They used the Rogue to scout ahead, and they ultimately decided to bypass them by taking the long way around with some stealth to avoid the bandits.  Is there RAW justification that I should award XP as if they actually fought and killed the bandits? (5 x 1/8 CR)


Why have we assigned a negative charge to electrons (and positive for protons)?  I feel it would be easier if electrons were positive (thereby, protons negative)- electrons would flow in the direction of current rather than flowing in the opposite direction. Something that would make more natural sense.  Is there is a historical reason or just something we have overlooked and now it's too late to change it?  Or is there a compelling reason for this choice that I could not find over the web?

I recently came to know about the Conventional Current vs. Electron Flow issue. Doing some search I found that the reason for this is that Benjamin Franklin made a mistake when naming positive and negative charges. There is even this little comic about that   My question is, how can a naming convention be wrong? Perhaps I don't understand what is the actual mistake here, I don't know. But I don't see how a naming convention could be wrong or right. There is no right and wrong about that. It could've been any other name, like charge A and charge B.  I'll appreciate anyone can help me understand what is wrong in all this.


Somehow these pointer arithmetics are very confusing to me. An example:  uint16_t *a = (uint16_t *)0x200; a += 4 * sizeof(uint32_t);   When calculating the new value of a, what is your thought process?  This is how I am trying to figure it out:   The pointer (a) points to an address, which has a value of 0x200 of uint16_t type. The second operation moves the pointer a to a + 4 * 8 bytes to a location 32 bytes (20 in hex) further up, which is apparently 0x220. How come this is not &a + 32?  I think this is where I confuse things... Why is the pointer pointing to 0x200 and not &a?

Does anyone have any good articles or explanations (blogs, examples) for pointer arithmetic?  Figure the audience is a bunch of Java programmers learning C and C++.


So I play all my games with a pc, I do everything technology related on a pc. I don't use an xbox. I want to play games and stuff with my friends, who do use xbox, and thats mainly Minecraft. So I downloaded the xbox app, set everything up, but apparently to play minecraft I need a game pass, so my main question is, once I buy the gamepass, since I already have minecraft on my pc, do I have to buy it again on the xbox app, which is also on my pc?

I own a Minecraft disc for an Xbox One, and would like to play on my PC (ultimately, playing with others who will be on the Xbox).  I'm not too familiar with the Xbox account ecosystem, and with dozen different Minecraft editions, I'm lost as to how I can do that.


Let $x \in R$. I would like to know if it is true that if $$ R/(x) \cong R/(x^2) $$ as $R$-modules then $(x)=(x^2)$.   I was trying to play with the isomorphism and it's inverse but no luck so far. Any suggestions? Is it even true?

Is it true for a commutative ring $R$ and its ideals $I$ and $J$ that if the quotient $R$-modules $R/I$ and $R/J$ are isomorphic then $I=J$?


I have a 0-5 volt variable frequency sine wave signal source I am trying to convert to +/-2V.  I would like to preserve the frequencies 20Hz-20KHz.  I have a +5 and -5 volt signals I would like to use as power supplies.  How can I level shift this signal down 2.5 volts so that it is centered at 0, and amplify the signal by 0.8 using a dual supply op-amp?

I am generating a 0-5 volt sine wave using an arduino with a DAC. I would like to level shift this signal (DC bias?) by -2.5 volts and have a gain of .8, so that I end up with a line level sine wave.  Thus I am trying to design a single supply op amp with the following equation:  $$V_{\text{o}} = (V_{\text{i}}-2.5) \times 0.8$$  I found this white paper that is supposed to describe a way to do this but I'm having trouble following as I am new to op-amps.    Does anyone know of a way to do this with a single op amp or IC?  The frequency range of 20Hz to 20KHz must be preserved.


In Breaking Bad, Brock is poisoned by some substance contained in the lily of the valley, as the detectives admit to Jesse as they release him from custody.  First of all, although Walt did indeed get hold of the ricin, he pretends to find it, or a replica, on Jesse's floor, after he convinces Jesse that Gus poisoned Brock.  At that point, in Jesse's mind, Gus poisoned Brock with lily of the valley but wanted him to believe that Walt poisoned the kid with ricin.  Later on, in the final season, realising Huell lifted the ricin (or replica) from his pocket, he shifts over to Walt's house pouring gasoline all over the carpet. But why does he then believe Walt to have poisoned Brock? Has he forgotten about the tox screen results?

I'm struggling to understand the ending of Breaking Bad S05E11.  At the end of the episode Jesse realizes that Huell stole the cigarettes and confronts Saul about it. At one point, Jesse flat out says:     The ricin cigarette! You had him steal off of me! And all for that asshole Mr. White! He poisoned Brock! He poisoned Brock and you... you helped him!   I get that Jesse realizes that Huell stole his cigarettes the first and second time. I also get that Jesse realizes that Walt manipulated him into eliminating Gus. That makes sense. But how exactly does Jesse leap from thinking that Walt orchestrated the cigarettes being stolen to Walt poisoning Brock? Just because Walt manipulated him into helping him with the Gus situation doesn't necessarily mean that Walt was behind Brock's poisoning...  Something doesn't add up.