What does this symbol mean? (looks like a 1 with double vertical line)

I'm studying a course on probability and statistics and at some point this symbol comes up without introduction. It looks like the number one, but slightly bigger and with a double vertical line.  First time it comes up is when discussing stochastic/random variables that are neither continuous nor discreet in an example:   And somewhat later in a proof:    Anyone got an idea what this symbol represents?  EDIT: Thanks for the fast answers, I was still editing the question for better (larger) images :)


Single photon interference, state "top" current theory

Is there a simple generally accepted explanation for single photon interference?  Does each photon interact with or see both slits?


Tabs painted over "congrats" screen for new badge

I've experienced a layout bug, see image:    The tabs are painted over the "congrats" dialog for a new badge.   When I click the button, the page gets repainted with sizes slightly changing, and it becomes:    which looks ok. Screenshots were taken without changing window dimensions (although I may not have been 100% exact with getting the same selection rectangle.)  I'm using Firefox 60.2.2esr on Devuan ASCII (~= Debian Stretch), on a x86_64 machine. If any additional information regarding my box is necessary, please ask for it.


The program looks slightly advanced; it is not. Simple manipulation of array.  The program compiles correctly, however, it encounters an exception run-time.  Exception in thread "main" java.lang.NullPointerException at Ordliste.leggTilOrd(Tekstanalyse.java:85) at Tekstanalyse.main(Tekstanalyse.java:23)   So there is something wrong with if(s.equalsIgnoreCase(ordArray[k])). I cannot see why. It even provides the correct output.   import java.io.File; import java.util.Scanner; import java.io.FileNotFoundException;  public class Tekstanalyse {     public static void main(String[] args) throws FileNotFoundException {          Ordliste ol = new Ordliste();         ol.lesBok("scarlet.text");         ol.leggTilOrd("A");     } }  class Ordliste {     private int i = 0;     private String[] ordArray = new String[100000];     private int antForekomster;     private int arrStorrelse = 0;      public void lesBok(String filnavn) throws FileNotFoundException {          File minFil = new File(filnavn);         Scanner scan = new Scanner(minFil);          while (scan.hasNextLine()) {             ordArray[i] = scan.nextLine();             //System.out.println(ordArray[i]);             i++;             arrStorrelse++;         }         System.out.println("Array size: " + arrStorrelse + " Capacity: " + ordArray.length);     }      public void leggTilOrd(String s) {          for (int k = 0; k < ordArray.length; k++) {             if (s.equalsIgnoreCase(ordArray[k])) {                 antForekomster++;                 System.out.println("Den har vi sett for!");             } else {                 s = ordArray[arrStorrelse];             }         }     } }


FBX shaders messing with materials when importing to Blender

I'm trying to import an FBX model to Blender and when I do, it just completely messes up the materials. I know what shaders the model uses (which are custom) but I want to know if there's a way I can change the shader within Blender/change whatever to stop the materials to look like this.


How is the radian measure of angles derived/defined?

I'm currently studying angles and their measures and I've just been told that $\pi$ is the ratio of a circle's circumference to its diameter, so:   $\pi =\dfrac {C}{d}$  $\pi =\dfrac {C}{2r}$  $ 2\pi =\dfrac {C}{r}$  So essentially what this is saying is that for every circle the ratio of its circumference to its radius is always $2\pi$.  However the textbook then goes onto introduce the radian measure, it says (paraphrasing) that suppose we now take a portion of the circle instead of the entire circumference 'C' and compare that to the radius, this portion of the circumference is some arc length 's', and the angle subtended by it is $\theta $, using "proportionality arguments" it stands to reason that $\dfrac {s}{r}$ should be constant among all circles and that this ratio '$\dfrac {s}{r}$' defines the radian measure.    My Question is:  (1) How was the relationship $\theta =\dfrac {s}{r}$ derived? How do we go from a formula: $ 2\pi =\dfrac {C}{r}$  that is a ratio of the circumference to the radius, to then come to be defined in terms of theta: $\theta =\dfrac {s}{r}$ (which gives the ratio of the length of an arc to the radius). I think what im asking how is the radian measure defined and what is the reasoning behind it?      Edit: clarification


House's Power Cycling Between High and Low Voltage

Around 2am I noticed the voltage in my house changing. The only reason I noticed was because my bedside fan kept speeding up and slowing down. Usually my house has around 122v, so I got a meter and discovered that one supply leg was at 130v and the other was at 113v. The bizarre thing was that exactly every 2 minutes, the voltages would even out to around 120v. 2 minutes later, they would go back to being unbalanced. This repeated for about half an hour, then stopped with no apparent explanation. The voltage is usually rock solid. No appliances were running in the house and there was no inclement weather nearby. What could cause a situation like this?


sn edges and nice empty nodes styles in forest lead to dividing by zero; what's going on?

The  defines two styles: sn edges and nice empty nodes. They are defined as:  sn edges/.style={for tree={parent anchor=south, child anchor=north}}   and  nice empty nodes/.style={for tree={calign=fixed edge angles},delay={where content={}{shape=coordinate,for parent={for children={anchor=north}}}{}} }   respectively.  When both of these styles are used with the following tree, I get the following error:  ! Package PGF Math Error: You asked me to calculate `1/0.0', but I cannot divid e any number by zero.  See the PGF Math package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.51 \end{forest}   Does anybody know what is going on? How can I fix this?  MWE  \documentclass{article}  \usepackage{forest} \forestset{ sn edges/.style={for tree={parent anchor=south, child anchor=north}}, nice empty nodes/.style={for tree={calign=fixed edge angles},delay={where content={}{shape=coordinate,for parent={for children={anchor=north}}}{}}} }  \begin{document}  \begin{forest} nice empty nodes, sn edges     [TP         [{the ball} ]         [             [T ]             [PrP                 [{$<$the ball$>$} ]                 [                     [Pr ]                     [VoiP                         [{$<$the ball$>$} ]                         [                             [Voi ]                             [AffP                                 [{to Mary} ]                                 [                                     [Aff ]                                     [ThP                                         [{$<$the ball$>$} ]                                         [                                             [Th ]                                             [AgP                                                 [{by John} ]                                                 [                                                     [Ag ]                                                     [$\surd$throw ]                                                 ]                                             ]                                         ]                                     ]                                 ]                             ]                         ]                     ]                 ]             ]         ]     ] \end{forest}  \end{document}   Update  Interestingly, it compiles without error if everything below the Aff leaf is deleted. That is, the following will compile:  \begin{forest} nice empty nodes, sn edges     [TP         [{the ball} ]         [             [T ]             [PrP                 [{$<$the ball$>$} ]                 [                     [Pr ]                     [VoiP                         [{$<$the ball$>$} ]                         [                             [Voi ]                             [AffP                                 [{to Mary} ]                                 [                                     [Aff ]                                 ]                             ]                         ]                     ]                 ]             ]         ]     ] \end{forest}


Let $p$ be a prime number for which also $p^2+2$ is a prime. Show that then $p^3+2$ is also a prime.  Computing few first primes I got: $p=2$: $2^2+2=6$ (not satisfying the condition) $p=3$: $3^2+2=11$ (satisfying the condition) $p=5$: $5^2+2=27$ (not satisfying the condition) $p=7$: $7^2+2=51$ (not satisfying the condition) so I would have a reason to believe that only the case $p=3$ will satisfy this condition, but how would I go about showing this rigorously?


Indicate a certain element in a sequence / long list

Let's say I have  $  e \ times \ ldots \ times a \ times e \ ldots \ times e $  How do I indicate that $a$ should be in index $b$ cleanly?   Like this:    I would have put a small arrow above and $b$ if that was on paper. So, I want to see if there is such option here  They say in LateX everything is possible:)   Thanks.


My Linux book has many references to xinetd but I can't find it?

Can't see it anywhere, is it called something different?


According to  (also  and ), we cannot deduce just from the data alone (without any domain knowledge) which classifier is better. Of course, we use cross-validation to do precisely that.  So what are the assumptions that we implicitly make that make cross-validation a meaningful procedure?


java.lang.OutOfMemoryError: PermGen space for creating entity manager

Hi I'm writing a maven java web application. I use JPA and Hibernate in my project and wrote a contextinitialized listener which when application starts, will create an entity manager factory and put it in servlet context attribute.  But when I run this code, I get the following error. I did the same before and never got this exception.   public class ContextListener implements ServletContextListener {      @Override     public void contextInitialized(ServletContextEvent sce) {         EntityManagerFactory EMF = Persistence.createEntityManagerFactory("App");         ServletContext ctx = sce.getServletContext() ;         ctx.setAttribute("EMF", EMF);     }      @Override     public void contextDestroyed(ServletContextEvent sce) {      } }   The exception is:  java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method)     at java.lang.ClassLoader.defineClass(ClassLoader.java:800)     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)     at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2479)     at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880)     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294)     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)     at Listeners.ContextListener.contextInitialized(ContextListener.java:23)


Compare two similar directories and list differences between files

Suppose I have same version of linux kernel but I changed some driver lines. Is there any way to compare these kernels and list the results. The result would be helpful to go back if I changed a lot in original drivers.


Find a real number k such that the limit $$\lim_{n\to\infty}\ \left(\frac{1^4 + 2^4 + 3^4 +....+ n^4}{n^k}\right)$$ has as positive value.  If I am not mistaken every even $k$ can be the answer. But the answer is 5.


A customer would like to have the headlines of articles used as URLs. The database field of the headline is a varchar(512), so in the worst case I would have   http://+domain with 19 chars+512 chars+.html   means 543 chars if I ignore the categories (which could be nested and theoretically be of endless length). I read that on server-side there is a limit of 4000 chars, but there may be browsers which are limited to 256(!) chars. On which information can I rely?


How do i install win10 on a broken screen laptop?

I am installing windows 10 on laptop which have a broken screen. Can i move the installation window to the secondary screen that I have connected?  I have tried to move the screen around with no success also I have tried other button combinations


How to install Python library (Openpyxl) in QGIS 2.18.16?

I need to use GniPlannerFTTH, but this plugin does not work without the Openpyxl python library installed. How can I install Openpyxl in QGIS?


The following quotes all seem to contain agreement errors between their subjects and predicates:     A total of five youths were arrested in both incidents.   Shouldn't it be "A total . . . was"? The sense is plural overall, but the subject is the singular "total." The object of the preposition is "five youths." Nonetheless, the verb should be the singular "was," agreed?      Early returns from rural areas indicated that support from the Communists remain strong.   Shouldn't it be ". . . support . . . remains strong"?     A group of neighborhood volunteers are identifying these houses and forcing owners to fix them up or tear them down.   Shouldn't it be "A group . . . is"?     The council's actions, concluding more than six hours of testimony on the matter, effectively nullifies a city hearings officer's decision.   Shouldn't it be "The council's actions . . . nullify"?


How to find the type contained within a (strongly typed) collection?

I have a class that looks like this :   public class ObjectA {     public ObjectB OneObject { get; set; }      public List<ObjectC> ManyObject { get; set; } }   And then a function to read what the class contains and return the type of property :  source = typeof(*some ObjectA*)  var classprops = source.GetProperties(BindingFlags.Public | BindingFlags.Instance) .Where(x => x.PropertyType.IsClass && !x.PropertyType.IsValueType && x.PropertyType.Name != "String");  foreach (var prop in classprops) {     var classnamespace = CommonTool.GetNamespaceFromProp(prop);      if ((prop.PropertyType).Namespace == "System.Collections.Generic")     {         string newprop = prop.ToString();         int start = newprop.IndexOf("[")+1;         int end = newprop.IndexOf("]");         newprop = newprop.Substring(start, end-start);         newprop = string.Format("{0}, Env.Project.Entites", newprop);         classnamespace = newprop;     }     //some code to read attributes on the properties... }   My problem is what is within the if ((prop.PropertyType).Namespace == "System.Collections.Generic"). It smells.   Any better way to do that?  edit :  A class in the application uses List<int>. This caused crashes. It wasn't only smelling bad.


What do all those cryptic number and letter codes in a lens name mean?

When looking at a lens name, there are a lot acronyms describing its features (often specific to the manufacturer).   Examples, Nikon: Nikon AF-S DX 16-85mm VR f/3.5-5.6G IF-ED Nikon AF-I 600mm f/4D IF-ED Nikon AF-S VR Micro-NIKKOR 105mm f/2.8G IF-ED    Examples, Canon: Canon EF 85mm f1.2L USM Mark II Canon 70-300mm f/4.5-f/5.6 DO IS    Examples, Sigma: Sigma 150mm F2.8 EX APO DG HSM Macro Sigma 70-200mm F2.8 EX DG OS HSM Sigma 50-150mm F2.8 EX DC APO HSM II    How do I decipher these lens codes from different manufacturers?


The Probability of Rolling a Large Straight with 5 Six-Sided Dice

I don't know the probability of rolling a large straight with 5 six-sided dice, so I need to know what the probability is.  What is it?


What should taphold or click-hold do by default?

This question is not specific to language/framework/platform.   I want to know (and confirm), what should happen (by default) if a user taps and holds (or clicks and hold).  This is more about basic usability and user experience.  What would a user expect to happen if the user taps(or click) and hold.  For some clarification I did read this:   The framework where I need to work on currently triggers holdstart if you hold for more than 400ms, and that in turn triggers tapcancel. I am not happy with it, thus want to know what is the more appropriate default behavior a user would expect.


So I know that if we want to find the probability distribution of a sum of independent random variables $X + Y$, we can compute it from the probability distributions of $X$ and $Y$, by saying  $$f_{X + Y}(a) = \int_{x = -\infty}^{\infty} f_{X, Y}(X = x, Y = a - x)~dx = \int_{x = -\infty}^{\infty} f_X(x) f_Y(a - x)~dx$$  Intuitively, this makes sense, because if we want to find the probability that two random variables sum to $a$, it's basically the sum of the probabilities of all the events that lead to those variables summing to $a$.  But how can I formally prove this statement?


Trying to format USB (using Linux/fdisk) so it shows up on my Mac

I have a USB drive that I can see/access/modify/etc in Linux/Ubuntu but it doesn't show up on my Mac OSX.  I did sudo fdisk /dev/sdb (where my USB is) and then g to create a new GPT partition table, n to make a new partition, used all default settings, then w to save and exit.  Then I did sudo mkfs.fat -F32 /dev/sdb1 to format the partition with a FAT32 filesystem.  I ejected the USB and put it in my Mac and it doesn't show up / get detected.  What did I miss?


Give a example of 2$\times$2 matrix A such that A has one independent eigenvector while $A^2$ has two independent eigenvectors.  I do found a explaination here.   And I followed it to make X as $\pmatrix{0&1\\1&0}$ and get the A as $\pmatrix{0&0\\1&0}$. Not really sure whether I am right.  Yeah, I checked that post and my problem is I still don't know how to get the A. Because it says x should be nonsingular so I tried $\pmatrix{0&1\\1&0}$ but it seems it's wrong..


my button refuses to submit after i display it using ajax

I have a form in which i use to insert data using ajax and php  I have gotten it to work the way i want but i wanted to make some adjustments to it, below is what i am trying to say  Initially      <form id="<?php echo $row_trx['jobid']; ?>" name="<?php echo $row_trx['jobid']; ?>" id="form<?php echo $row_trx['jobid']; ?>" action="" method="post">      <button  type="submit" id ="<?php echo $row_trx['jobid']; ?>">Add as favourite</button> </form>   which works when the button is loaded on the page by default,  Adjustments i wanted to make was to display using ajax for some reason using below in the div with id='ajaxDiv'   <form style="font-size: 1px;" name='myForm<?php echo $row_trx['jobid']; ?>'> <input type='hidden' value="<?php echo $row_user['Username'];?>" id='age<?php echo $row_trx['jobid']; ?>' />
 <input type='hidden' value="<?php echo $row_trx['jobid']; ?>" id='wpm<?php echo $row_trx['jobid']; ?>' />
   </form>  <div id='ajaxDiv<?php echo $row_trx['jobid']; ?>'>
   the button submit my data wen i try to display in the div via ajax, please i need help on this


How to fight off Google Analytics referrer spammers?

Last months I have lots of referrer spammers in my GA statistics. Their count is ~10x higher than count of legit visitors (my site is not very popular yet). I've turned on an option to hide known spammers in GA settings, but it didn't help at all. It seems these spammers are using scripts to spam directly to GA (i.e. they are not logged in my IIS).  Is there anything I can do to stop these spammers?    UPD 10 months later, and they started spamming using fake target page names... and Google is still doing nothing about it.


I'm working on my university homework and i have faced this problem. What i need to accomplish is when the user inputs a metallic element of either zinc, iron, aluminum and sodium i want the program to return true.  When the element which is compared is true, the boolean still outputs false. Can you please identify the problem in this code?  class IonicCompound  public class IonicCompound {      public static void main(String args[]) {         Scanner input = new Scanner(System.in);         System.out.println("Please enter a metallic element: ");         String element1 = input.nextLine();         System.out.println("Please enter a non-metallic element: ");         String element2 = input.nextLine();         Elements element = new Elements(element1, element2);         element.isMetal(element.first);         if (element.isMetal(element.first) == true) {             System.out.println("It's a metallic element ");         } else {             System.out.println("It's not a metallic element ");         }     } }   class Elements  public class Elements {      public String first, second;      public Elements(String f, String s) {         first = f;         second = s;     }      public boolean isMetal(String ff) {         if (ff == "iron" || ff == "Iron" || ff == "aluminium" || ff == "Aluminium" || ff == "sodium" || ff == "Sodium" || ff == "zinc" || ff == "Zinc") {             return isMetal(ff) == true;         } else {             return false;         }     }      public String toString() {         String element = first + " " + second;         return element;     }


Is there a known pair of distinct bit strings (A,B) such that SHA-1(A) == SHA-1(B)?  If the answer is no, then how can SHA-1 be considered broken?


Menu to let me choose OS to run in a dual boot machine

I recently re-imaged my Dell PC to dual-install Windows 7 and Ubuntu 12.04.1 LTS. The dual-boot was a success, since I was able to start whichever OS I wanted.   Now, I installed some software (the OpenJDK package) on the Ubuntu side of the PC. Upon restarting Ubuntu, I unfortunately lost the ability to choose the OS that I wanted to run (i.e., Ubuntu).   Ordinarily, I'd expect to:  1. Hit the power button 2. A menu (Grub?) shows up listing all OSs installed in the PC (namely, Win7 and Ubuntu) 3. Choose which OS I want and hit enter. bingo.   The problem is that I don't see that menu (step 2 above). Instead, windows automatically starts, even when I hit F12 to see the boot options, none of which I understand.   Your help would be great! Thanks! - Kiptoo


my bibtex stopped showing refrences. It shows now only '[?]'. The story is like this. I use pdfLatex within the TexWorks. It worked all right. But after i added extra couple of new refs in the bib file, it did not want to show them in the text and showwed only [?]. ted the .AUX files. And it stopped showing ALL refs...just [?]'s. What can i do about it?


Dynamically update main navigation URLs with prefix

This is some code from my theme_menu_link in Drupal 7.  function mytheme_menu_link($variables) {   $element = $variables['element'];   if(arg(0) === 'x') {     if($element['#href'] === '<front>') {       $element['#href'] = 'x';     } else {       $element['#href'] = 'x/' . $element['#href'];     }   }   At this point, I just need to do the same thing in Drupal 8: If the visitor arrived at the page with an arg(0) of 'x', then prepend all of the menu links with 'x' keeping them in the "x" experience of the site.  I appreciate any help you can offer. Please provide detail if possible.


How to change font for a TextField with pdfLaTeX?

First of all, I am a TeX-Noob, so this may be easy answered by a pro ;-)  We have MiKTeX 2.9 and pdfLaTeX for creating pdf documents.  One pdf document contains multiple form fields (TextField), and one specific form field has to be a barcode. A code39.ttf font is installed in the system.  \documentclass[ngerman,oneside]{scrreprt} \usepackage{xcolor} \setlength\paperheight{55mm} \setlength\paperwidth{85mm} \usepackage[left=0mm,top=0mm,bottom=0mm,right=0mm]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{textcomp} \renewcommand{\familydefault}{phv} \newcommand{\transparentTextfield}[2]{\TextField[backgroundcolor={}, bordercolor={}, charsize=14pt, width=#1 ,height=6mm, name=#2]{}} \usepackage{graphicx} \usepackage[pdftex,a4paper=true,colorlinks=true,pdftitle={Title},pdfsubject={Subject},pdfauthor={Me},pdfpagemode=UseNone,pdfstartview=FitH,pagebackref,pdfhighlight={/N}]{hyperref} \begin{document} \begin{Form} \begin{picture}(0,0)  \setlength{\unitlength}{1mm}   \put(2,-10){\TextField[backgroundcolor={}, bordercolor={}, charsize=0pt, width=73mm, height=7mm, name=barcode1]{}} \put(6.5,-46){\TextField[backgroundcolor={}, bordercolor={}, charsize=8pt, width=12mm ,height=5mm, name=number1]{}} \put(38,-46){\TextField[backgroundcolor={}, bordercolor={}, charsize=8pt, width=25mm ,height=5mm, name=number2]{}}  \end{picture} \end{Form} \end{document}   But how can I set the font of the TextField to my installed code39 font?  My workaround is as follows: After creating the pdf, I open it with Acrobat Professional and change the font of the text field to Code39 manually and save it.


How can I turn on Wobbly Windows on Ubuntu Mate 18.04?

I tried turn on in compizconfig but I does not work. Any solution or it is possible?


White test confirms heteroskedasticity while Breusch-Pagan test doesn't

I'm using SAS in order to create a model for a cars datasets. The response variable y, is the price of the car. By the way I'm using the PROC MODEL statement in order to check heteroskedasticity. This is the output:                                 Test di eteroschedasticità Equazione       Test               Statistica     DF    Pr > ChiQuadr    Variabili  price           Test di White           56.32     27           0.0008    Cross of all vars                 Breusch-Pagan           11.43      7           0.1208    1,                                                                          normalized_losses,                                                                          height, bore,                                                                          stroke,                                                                          compression_ratio,                                                                          simbol, peak_rpm   Questions:     Is there heteroskedasticity? Breusch-Pagan accepts the null hypothesis, while White doesn't. I couldn't put in the proc model statement all my variables, because some of them were qualitative. Could this be a (or maybe "THE") problem?


Can't I delete a question (post) using the Stack Exchange mobile app?

I tried deleting a post from my Stack Exchange account. But I could not find any place to delete it. Can't I delete any post when I am using the Stack Exchange mobile app?


Create a workspace to work with PDF (C#)

I want to create a workspace with certain size (103x82cm for example) like an indesign-like environment where PDF pages can be arranged in a certain way, which is called impositioning:    I've learned about PDF libraries, but to me it seems like they do jobs like merging, importing, saving etc... I couldn't find something to manipulate the PDFs like the way I need to. Anybody knows one?  Thanks in advance.


Normally when going from a verb to a person who performs that verb, one adds er to the verb. So, if you walk you are a walker; if you deal you are a dealer, and so on.  But I noticed recently that pest and pester are the wrong way round. If you pester, then you are a pest.  My question is: is this a one-off, or are there other verbs that share this phenomenon?


How to filter/subtract and array of objects from an array of objects?

I have two arrays of objects, one is update and another is older. I need to to make third array with the values that are not in older one but are in updated one. I read a few answers like one here  but it is filtering the object based on string as values whereas I want to compare the complete object.   test = [{1:'name',2:'tame'},{3:'fame',2:'tame'}] checks = [{3:'fame',2:'tame'},{5:'lame',1:'name'}]  updated = test.filter(n => !checks.includes(n))  console.log(updated)    Expected output was :- [{"1": "name","2": "tame"}] Any help is appreciated :) I found this simple solution.   arr1 = [{1:'a',2:'b'},{1:'a',3:'c'}] arr2 = [{1:'a',3:'c'},{2:'b',3:'c'}]  for(let i = 0; i < arr1.length; i++){   for(let n = 0; n < arr2.length; n++){     if(JSON.stringify(arr1[i]) == JSON.stringify(arr2[n])){         arr1.splice(i, 1)     }   } } console.log(arr1)


Weakening the category-theoretic idea of a limit … but not a weak limit

In the words of the :  In category theory a limit of a diagram $F : D \to C$ in a category $C$ is an object $\lim F$ of $C$ equipped with morphisms to the objects $F(d)$ for all $d \in D$, such that everything in sight commutes. Moreover, the limit $\lim F$ is the universal object with this property, i.e. the “most optimized solution” to the problem of finding such an object.  One obvious way to weaken this is the notion of a :  A weak limit for a diagram in a category is a cone over that diagram which satisfies the existence property of a limit but not necessarily the uniqueness.  I have encountered a situation where I have the weakening in the opposite direction:  I have uniqueness, but not existence.  That is, instead of guaranteeing at least one map making a diagram commute, I guarantee at most one.  Does this concept, weaker than a limit but not a weak limit, have a name?


past perfect + past participle or had + object + past perfect

I came across  in Ray Monk's Bertrand Russell: The Spirit of Solitude, 1872-1921, Volume 1:     On the contrary, she had just written — and had had accepted by The Nineteenth Century — a polemic of her own entitled 'A reply from the daughters', which defended the right of ….   What is the structure of "had had accepted" in the above sentence? Is it of the form:"past perfect + p.p.", or of the form:"have/had + object + past perfect" , with the object "pulled out to the end"? Is there a passive voice in it?


Purpose: Construct a 95% confidence interval for $\theta$.   A common strategy is to construct a confidence interval for $\log(\theta)$ and then exponentiate.  Why is it valid?   My concern is that $E(\log(\theta)) \neq \log(E(\theta))$ and $Var(\log(\theta)) \neq \log(Var(\theta))$...   Do people use this back transformation because it has proven to work fine? What about other transformations (e.g. logit)?


SD Card partitioning got messed while installing Ubuntu

I recently shifted from windows to Ubuntu. I got a problem of SD Card partitioning. I run the sudo fdisk /dev/sdc1 and tried to manage it. I want only a single partition of 32 GB so that my sdcard works normally on any pc. Here is the details of current state of my sdcard. Please help me by telling the commands so that I can achieve the desired result.  It is currently having 1 sector of type extended and my sdcard is not detected on either wndows or linux


When I boot system in to recovery mode from GRUB menu, I can get in to all powerful root without entering any password, thus insecure.  How I can secure this and ensure that a password is asked every time I attempt to access root in recovery mode?


Sorting a list of tokens (not necessarily numerals) in expl3/LaTeX3

I'd like to sort a list of words according to their lexicographical order using expl3 code. My words are in a seq variable that I access in a stack-like manner (this is not relevant, though). I've learnt of the l3sort package, but it seems as though its functions worked only for numerical variables, because I've had no trouble with my code to sort a list of integers but I've ran into trouble with non-numerical data (meaning "plain" characters; no fancy macros, expandable stuff, or the likes).    Is there a ready-made way to do this in expl3/LaTeX3? On the negative, could somebody possibly provide some hints as to how to do this?


When do I star and question? Is starring the same as leaving a like? I have seen one other person star one of my questions, and I do not know why.   Note that this is not a duplicate because I am asking when do I star someone else's post? Do I star a post when I like the question? I am not -- for clarification reasons -- asking about how to star a post or what happens when you star a post.


Round off Double to 2 decimal without changing the datatype

double value1 = 1000 double value2 = 2563.59 System.out.println("value1 ="+String.format("%.2f",value1)); System.out.println("value2 ="String.format("%.2f",value2));  Output  value1 = 1000.00 value2 = 2563.60   This returns 1000.00 and 2563.60 but the type of output changes to string.  I want 1000.00 and 2563.60 as the output without changing the datatype.  Can anyone help me?  The dtatype must be double itself


What's the MSE of $\hat{Y}$ in ordinary least squares using bias-variance decomposition?

Suppose I have the following model: $$Y = \mu + \epsilon = X\beta + \epsilon,$$ where $Y$ is $n \times 1$, $X$ is $n \times p$, $\beta$ is $p \times 1$, and $\epsilon$ is $n \times 1$. I assume that $\epsilon$ are independent with mean 0 and variance $\sigma^2I$. In OLS, the fitted values are $\hat{Y} = HY$, where $H = X(X^TX)^{-1}X^T$ is the $N \times N$ hat matrix. I want to find the MSE of $\hat{Y}$. By the bias-variance decomposition, I know that \begin{align*} MSE(\hat{Y}) &= bias^2(\hat{Y}) + var(\hat{Y})\\ &= (E[HY] - \mu)^T(E[HY] - \mu) + var(HY)\\ &= (H\mu - \mu)^T(H\mu - \mu) + \sigma^2H\\ &= 0 + \sigma^2H \end{align*} I'm confused by the dimension in the last step. The $bias^2$ term is a scalar. However, $var(\hat{Y})$ is an $N \times N$ matrix. How can one add a scalar to an $N \times N$ matrix where $N \neq 1$?


How can I insert event handler to the top of the queue? If I use jquery.click() or javascript addEventListener(), I'll have a handler at the end of queue.  What is the best way for this?  I don't want to remove the existing handler, and then adds...


I am between academic institutions. If I submit a paper what do I say my affiliation is?

Basically, I was a student at University Y when I wrote a paper. I am no longer a student there, but work at Company Z.   Do I still list University Y as my institutional affiliation? Their resources helped make the paper possible and all of it was written at University Y.   But on the other hand, I am currently working at Company Z.


Why we are not using Lagrangian instead of Hamiltonian in non-relativistic quantum mechanics?


Few months ago I flew with IranAir from Rome to Tehran. Our flight was delayed by 7 hours! I claimed compensation and they offered me 25% off on my next flight which sounds funny, cause according to law I'm entitled to get up to 600€. I placed the issue on Resolver.com, after 3 months they replied saying call this number to follow your compensation. It's been a month since I first called them and sent them my bank information. Called another 3 times and the only thing they keep saying is that it's in process, and they don't give me a date or anything! What should I do now?!


I'm trying store the data about users to array in JavaScript. Problem is that i want to add user to array when his ID isn't in that array, yet.  var users = [   {     id: 2,     name: "Kevin"   },    {     id: 1,     name: "Jason"   } ];  for(var i = 0; i < users.length; i++){    if(users[i].id != 1){     users.push({       id: 1,       name: "Adam"     );   }  }   It's broken because first user with ID 2 is not equal to 1, but i don't know how to fix it. How it should look:  if(userID isnt in array users){   // add user to array }   Can anyone help me with that, please? Thanks.


What is the best stack-exchange to ask about naming objects in code?

What is the best stack-exchange to ask about the naming of fields, columns, classes, functions etc. in software?


migrate from sql server 2012 to sql server 2008 R2

I have been looking for the information since yesterday and could not find anything... I have sharepoint 2012 fundation and my SQL Server 2010 Evaluation is short of space (we already used 10GB), however I have SQL Server 2008 R2 license.  Question:   Is it possible to migrate my SQL Server 2012 sharepoint database to SQL Server 2008? Will the new database be compatible with my sharepoint? could you please send me a link with the instructions?   thank you very much


How are shorter power-plays counted in power play percentage?

One of the team statics in ice-hockey is power play percentage. From example, you can see it  for the currently played World Chapmionship or  for this year's NHL season.  I understand that this should be something like ratio of power play goals and total number power plays. I wonder whether in some cases the fact that the power play is shorter than 2 minutes is factored in when calculating PP%.  There are several reasons why power play might be shorter, here are some I can think of:   The power play ended because a team scored a goal. The power play was shorter because a team playing power power received a penalty. The power play was shorter because the penalty of the opposing team was called while playing shorthanded, which means that there was 4 on 4 play before the power play stared. The power play was shorter because it started less than two minutes until the end of the game.   In the first case, this was a successful power play - so there is no doubt how this should be counted. In the second case, it is the mistake of the team who had the advantage that they infringed the rules. So it should be counted an unsuccessful power play and the fact that it was shorter does not seem to be relevant. Probably the similar argument can be in the third case.   But at least in the fourth case we can say that it is not the team's fault that the power play they played was shorter. So the team has less time than 2 minutes to score a goal in the power play. So it seems a bit illogical that if they do not score this should be called in the same way as if they  do not score during the whole 2 minutes.  In any case, what I wrote above are just my speculations. I would be glad to find some official source showing how this statistic is counted in these special cases.


Is it possible that antimatter has positive inertial mass but negative gravitational mass?

Newtonian mechanics seems to allow for both positive and negative gravitational mass as long as the inertial mass is always positive.  The situation is analogous to electrostatics but with the opposite sign. Two positive masses or two negative masses are attracted to each other whereas one positive and one negative mass repel each other.  General relativity says gravitational and inertial mass are the same thing through the equivalence principle. This has been confirmed experimentally to a very high degree of accuracy, though not for very small masses and only for normal matter.  Antimatter is known to have positive inertial mass from observing the trajectories of particles in electric or magnetic fields. Presumably it is also known that the $m$ in the famous $E=mc^2$ is positive. The gravitational mass of elementary particles is currently too small to measure, but is it possible that antimatter could have negative gravitational mass - or is this absolutely precluded in general relativity?


How to Place a script file at other machine root

i want to place a script file on other machine root . here is my terminal command   scp /var/www/html/script.sh root@192.168.1.7:script.sh   it asks for root password. i enter correct root password but it says  Permission denied, please try again.   Can anybody help?


I want to prove the following logic equivalence in Coq.  (p->q)->(~q->~p)  Here is what I attempted. How can I fix this?  Lemma work : (forall p q : Prop, (p->q)->(~q->~p)). Proof. intros p q. intros p_implies_q not_q_implies_not_p. refine (not_q_implies_not_p). refine (p_implies_q). Qed.


Does a pedestrian walk 'in' the road, or 'on' the road (both are correct, but which is right?)

Having a bit of a debate about this with some foreign colleagues of mine.  I've always used the phrase 'I'm walking in the road', they think that you should say 'I'm walking on the road'..  I'm not 100% sure why I use the word 'in', but there must be a reason for it!  So... which is right?


I need to change the FilePath of an already imported Alembic File Cache.  In the UI it is done from the Datablocks>Cache Files>File Path, but I need do it with PY + File Blend + New Path)   Search all cache files List Change filepath Save   Any idea???


Remove spacing between per-chapter figures in LoF

When I'm generating a List of Figures in my project, all figures are grouped by chapter. I would like to have the whole list without any additional new lines between different chapters.  How it looks like:  Figure 1.1  Figure 1.2  Figure 2.1  Figure 3.1  Figure 3.2   How it should:  Figure 1.1  Figure 1.2 Figure 2.1 Figure 3.1  Figure 3.2   I tried to apply the following solutions but failed completely :        My main file:  \documentclass[12pt,oneside,titlepage,utf8x]{report}  \usepackage{times,a4wide,multirow,tabularx,graphicx}  \usepackage{psfrag,fancyhdr,longtable}  \usepackage[T1]{fontenc} \usepackage{float} \usepackage[utf8]{inputenc}  \usepackage{url} \usepackage{color} \usepackage{verbatim} \usepackage{fancyvrb} \usepackage{natbib} \usepackage{relsize}  \usepackage{caption} \captionsetup[longtable]{belowskip=10pt}  \usepackage[left=4cm,top=2cm,right=3cm,bottom=2.5cm]{geometry}  \renewcommand{\chaptermark}[1]{\markboth{\nouppercase{\thechapter.\ #1}}{}} \pagestyle{fancy} \headheight 30pt \rhead{} \lfoot{} \cfoot{\thepage} \rfoot{}  \setlength{\parindent}{2em} \setlength{\parskip}{1em} \linespread{1.3}   \begin{document}  \begin{titlepage} \maketitle \end{titlepage}  \tableofcontents  \chapter{First} \label{sec:First} \input{chapter1/chapter1}  \chapter{Second} \label{sec:Second} \input{chapter2/chapter2}  \chapter{Third} \label{sec:Third} \input{chapter3/chapter3}  \relsize{-1} \listoffigures \normalsize  \bibliography{praca_mgr} \bibliographystyle{plain} \nocite{*}  \end{document}


Writing this function on moodle using TeX Notation

I want to write an equation with one curly brace ({) on the right hand side and, next to the curly, two statements in two different lines. How can i do it using TeX or Latex? Thanks.


I want to read my *.bok and *.mdb in Ubuntu 12.04?

When I use Windows I read my arabic book (*.mdb & *.bok) by maktaba shamela.  And now  I use ubuntu 12.04 and I need to read my *.bok & .mdb file. I tried to install makatba shamela with wine but the arabic font was not showed. I tried to install thwab (not Thawab) to read my arabic book (.bok), but I could not install it. And now I wanna install Maktabah Al-Miftah. But to read *.bok need to import file (.mfth) from Shamela file (.bok) by using AccessDump.py  and it depends on gambas3-gb-db-sqlite3. What can I do?


Searching for "Item" in CSV file using java and apache commons CSV library

I am trying to access the CSV file's data using the Java and Apache commons CSV library.  I am stucked in a problem.  The problem is: "To Display the data of particular row if "Name" Header is equal to the "rahul". when I run the code nothing is printed out there."  The data in exportdata.csv file is :   Name,Food,Phone rahul,Rice,9876416884  ram,Egg,8437123456 rohit,Burger,9814125755 amit,chicken,8568934464   And my code is :  public class csvexample {   public void readfile()  {     FileResource fr=new FileResource();     CSVParser parser=fr.getCSVParser();     for(CSVRecord record : parser)     {          String str=record.get("Name");         System.out.println(str);          if(str=="rahul")         {         System.out.print(record.get("Name") + "    ");         System.out.print(record.get("Phone") + "    ");         System.out.println(record.get("Food"));         }               } }   I think that the error is in the line if(str=="rahul") , I have checked that the program is not treating the str and "rahul" same when str="rahul" in First iteration of for loop.


Some property of an ideal in commutative ring

Let $R$ be a Dedekind domain, and let $\mathfrak{m}$ be a maximal ideal in $R[x]$ is of the form $\mathfrak{m} = (\mathfrak{p},f(x))$ where $\mathfrak{p}$ is a maximal ideal in $R$, and $f$ is a polynomial in $R[x]$ which is irreducible in $(R/\mathfrak{p})[x]$. Let $g(x) \in \mathfrak{m}$.  I am know that exist a ideal $\mathfrak{a}$ in $R$ such that $(\mathfrak{p},\mathfrak{a}) = 1 $, i.e $\mathfrak{p} + \mathfrak{a} = R$ and $\mathfrak{p}\mathfrak{a} = \mathfrak{p}\cap \mathfrak{a} = (p)$. (chapter 16, corollary 19, page 768, Abstract Algebra, Dummit Foote...)  Easily, since $g(x)\in \mathfrak{m}$, we have $ g(x) = l(x) + f(x).k(x)$ where $l(x) \in \mathfrak{p}[x]$. The question is: Can we make a "strong" form as show that there exists an ideal $\mathfrak{a}$ in $R$ such that $g$ can be show as the form $$ag(x) = p h(x) + a f(x) k(x)$$ where $p\in \mathfrak{p}$ such that $(p) = \mathfrak{p} \mathfrak{a}$, $(\mathfrak{p},\mathfrak{a}) = 1$ and $a\in \mathfrak{a} - \mathfrak{a}\mathfrak{p}$.


AppStream problems found "Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml" on Ubuntu 17.04

I have researched this, and there are no other entries on the internet that I can find with this problem, so posting here.  It may be that the wording in 17.04 is different leading to no hits.  But anyway, here it is...  I'm getting this error when trying to update my software on Ubuntu 17.04:  AppStream system cache was updated, but problems were found:  Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml   I have performed (all with sudo):  apt-get clean apt-get update appstreamcli --version (shows 0.10.6) appstreamcli refresh --force   Then I went to the System > Software and Updates tab, selected other, then Select Best Server.  Did that, it set to http://mirror.atlantic.net/ubuntu, but I'm still getting problem.  Then ran:  appstreamcli refresh --force suso apt-get upgrade sudo appstreamcli refresh   Still getting the same error.  Any suggestion on how to clear up this issue?


Display shifts in curve and slope with Pgfplots

I have the following MWE and would like to plot three lines on it, displaying the shift in height (and maybe the change in slope) between the second and third lines.   \documentclass{article} \usepackage{pgfplots}    \begin{document}  \begin{tikzpicture}[scale=0.45,trim axis left, trim axis right] \begin{axis}[ylabel={$\hat{S(4)}$},xlabel={$S{^*}_{breakeven}$},ylabel style={rotate=-90},domain=1:25, legend style={legend pos=north west,font=\scriptsize}, legend cell align=left] \addplot+[black, mark=none, loosely dashed,forget plot]{x}; \addplot+[samples=200,mark=none]                                                    {exp(0 + 1*ln(x))}; \addplot+[samples=200,mark=none, dotted, thick]             {exp(0.46 + 0.28*ln(x))-1}; \addplot+[samples=200,mark=none, dotted, thick]             {exp(1.66 + 0.28*ln(x))-1}; \end{axis} \end{tikzpicture} \end{document}   Is there any way to display lines and arrows to show the shift in the curve, similar to the annotations that have been added to the following image i.e. an annotated bracket (with arrows) for the shift in the curve and an annotated right angle (with arrows) to show the slope?


How can I sum two values and store the result in other variable?

In LaTeX2e,how can I sum two values and assign them to other variable?  I want to compute something like:   var=\textwidth - 1cm    And if both were constants:   var=1+1


How does the hydrogen atom actually "look like"?

When deriving the solutions for the "simple" quantum mechanical hydrogen problem, one normally uses spherical coordinates $(r,\theta,\phi)$, since the problem has rotational symmetry. The solution has the form $$\psi_{lmn}(r,\theta,\phi) = R_{nl}(r)Y_{lm}(\theta,\phi)$$ where $R(r)$ describes the radial part and $Y_{lm}(\theta,\phi)$ are the spherical harmonics.   When deriving this solution, one normally aligns the problem to the $z$ coordinate and gets a representation for $Y_{lm}(\theta,\phi)$ with the angle $\theta$ measured from the $z$-axis.  One "surprising" observation is, that the spherical harmonics and therefore the solutions of the wavefunction and its absolute squared are not rotational symmetric. I. e. it has these "lumps" of high probability density when forming the absolute squared wave function.  My question is, how does this asymmetry and distinguishing the $z$-axis relate to the "image" of hydrogen? If I actually had a single hydrogen atom and would want o measure the probability density of the electron: To which axis would the wave function be aligned?


Let $trcA=0$.why $A=M+N$ where $M$ and $N$ are nilpotent matrices?

Let $A \in {M_n}$ and $trcA=0$.why $A=M+N$  where $M$ and $N$  are nilpotent matrices?


Can you help me !! how to make a border and vertical rectangle with chapter name and page number like this . Thank you


Resolve $\lim_{x \to 0} \frac {\tan 3x}{\tan 5x}$

I started resolving this limit:  $$\lim_{x \to 0} \dfrac{\tan 3x}{\tan 5x}$$  so:  $$\begin{align}\lim_{x \to 0} \dfrac{\tan 3x}{ \tan 5x} & = \lim_{x \to 0} \dfrac{\frac{\sin 3x}{\cos 3x }}{\frac{\sin 5x}{\cos 5x}} \\ \\ & = \lim_{x \to 0} \dfrac{ \sin (3x) \cdot \cos (5x)}{ \sin(5x) \cdot \cos (3x)}\\ \\ & = \quad?\end{align}$$  Could someone help me please


Is there any protection ring available for reversed lenses?

I've started reversing lenses for macro photography and I'm loving it, but something bothers me: a lot of articles say that it exposes the rear element of the lens. Are there protection rings available for the rear element when using a lens this way or do I need to do it myself like this one: ? It seems nice but, even if I like duct tape, using it for something relative to light leaves me uncomfortable...


Can I set my user account to have no password?

If I attempt to change my password to nothing by opening "User Accounts", the "Change" button remains greyed out:    How do I change my password to be empty? I know you can set Ubuntu to automatically log you in, but I want my password to be empty, I never want to type in a password to authenticate myself as that user.  I know that there are reasons why this might not be a good idea, but I want to know if it is even possible. I'm using Ubuntu 12.10.


Still trying to wrap my head around panoramas. I am using bracketed RAW photos and have merged using lightroom. Now, it is best to pick a single image, colour correct it and sync the settings across all the merged hdr images, or is it better to export all to a tiff, stitch in PTGui and then re-import into lightroom for color correction?  The problem I see if that if I stitch in PTGui 1st, I lose the flexibility of RAW. If I develop in LR 1st, then it's hard to get a good color grade due to working with a single reference image.  Any ideas?  EDIT: a few people have linked related threads. I have read these but i'm still unclear as to at what point I I should no longer be using RAW and when I need to color grade. I guess i'm looking for a workflow step by step guide from people.


The evolution of poor eyesight: is there weaker selection in modern humans?

Short question: Poor eyesight might have been a major impediment to survival and reproduction in early man (say, 100,000 years ago), but, with the advent of agriculture, major cultural changes, and modern medicine, one might imagine that genes for poor eyesight would persist more easily. Is that true? Has selection on eyesight been relaxed, or changed significantly, in modern humans? If so, when? Do we know what might explain relaxed selection? If there are any genes associated with, for example, myopia, has their population frequency increased through human history, or has it remained constant? This  discusses genetic changes 8 to 4 thousand years ago related to skin color, amino acid absorption, and eventually milk digestion, but it does not mention eyesight. Background on why I find the question interesting: A friend of mine speculated that human eyesight is worse today than it was only a few centuries ago, due to the invention and widespread adoption of glasses: a person with poor eyesight genes will now survive and have children, whereas in 1600 they might have died without reproducing. I'm skeptical: first, glasses became widespread only a few generations ago; second, blurry vision plausibly has little effect on evolutionary fitness. I see no reason why someone with slight myopia would on average have significantly fewer offspring than someone with 20/20 vision, even in a tribe of hunter-gatherers. A short-sighted person could specialize in making hand-axes, for example, and trade them for food -- so I find it plausible that eyesight-related allele frequencies have not changed much over time. However, I recently heard someone on the radio speculate that eyesight might have worsened significantly a few thousand years ago with the invention of agriculture; the story is that above-average eyesight is a major fitness advantage for a hunter, but not for a farmer.  What does the evidence say? Side note: I realize that eyesight is affected by more than just genes -- for example, age as well as time spent reading books probably both affect eyesight. That's not what this question is about -- I'm interested in genetic selection. Edit:  this question is indeed similar to , but it isn't identical.  That question asks why poor eyesight can persist at all, while mine asks whether evolutionary pressures have changed over time.  In particular, do we know of any genes associated with, say, myopia?  Do we know whether their allele frequencies have changed over human history?


yesterdays date and time showing single digit day - python

Hi my following code provides me with a single digit day(e.g 2015_09_1) even though I'm after 2 digits for yesterdays day:  import time   yesterday = time.strftime("%Y_%m_") + str(int(time.strftime('%d'))-1) print(yesterday)


How to remove "get info" sidebar in a finder window?

When I open a finder window I have this large side bar on the right hand site that provides some outline file info, size, modified date etc.  How can remove this sidebar?   My mac is running OSX 10.14.x (latest updates installed.)


How can we explain the fact that $\mathbb E\left( {\mathbb E\left( {X|Y} \right)} \right) = \mathbb E(X)$?

We know that the following property conditional expectation holds, assuming $\mathbb E[|X|]<\infty$: $\mathbb E\left( {\mathbb E\left( {X|Y} \right)} \right) = \mathbb E(X)$ Could anyone give me some intuition into this? why when we take the expected value again, knowing the random variable Y will not affect the expected value of X.


Ambient occlusion texture baking shadows too dark

When I bake my object using a blank image texture, dark patches appear in the middle of the torso and legs region after baking with bake type: ambient occlusion. This question is similar to this one :  but I followed the accepted answer i.e. flipped all the normals but still the Baking is not correct. screenshots below:   I'm using Blender version: 2.92.0  CPU device capabilities: SSE2 SSE3 SSE41 AVX AVX2 OpenCL device capabilities: No OpenCL platforms found CUDA device capabilities: No CUDA device found  I think the issue is that my UV wrapping is too crowded? I'm new to Blender and am following this . In the video they are using an old version of Blender.


Three column table with different number of multiple rows

I know how to use \multirow for two columns table but I can't figure out how to use it for three columns table in below picture.


Why did the SE team unfeature the recent announcement about font changes?

I noticed that  about the change of fonts was once featured in Meta, but now, it seems that it is no longer featured. How long do Meta posts stay featured?  I'm not asking about the technical reason why the post is no longer featured, which is what  is asking about. Instead, what I'm asking is why the SE team chose to remove the  tag from the post and when they remove the tag from posts. Those are not answered there.


I read a few times that a knot can reduce the strenght of a rope, but I can't understand why this happens. Can someone explain me what happens to a rope tied with a generic knot and stretched? Is there a way to calculate the reduction of resistance from the form of the knot?


I'm currently writing my dissertation in civil engineering using LaTeX. I think LaTeX is really good. I have been slowly distancing myself now from Microsoft Word. LaTeX is good for me since my paper (nonlinear structural dynamics) may eventually contain more than a thousand equations.  I just have one problem now.  Consider the following fraction with delimiter.  \left( \frac{a}{b} \right)   So far, there is really no problem with that fraction. The delimiters automatically resize.  Now, consider the following "complex" fraction with delimiters:  \left( \frac{\dfrac{a}{b}}{\dfrac{c}{d}} \right)   Again, there is no problem with this "complex" fraction, since the delimiters automatically resize.  Now, here's the problem. Consider the following "complex" fraction with delimiters:  \left( \frac{a}{\dfrac{c}{d}} \right)   The result of this is that the delimiters resize, but there is extra "vertical white space" within the region of the numerator. This is because the numerator is just a "variable" while the denominator is another fraction in "displaystyle" font size. Thus, they have different "sizes". I intentionally wanted the font size in the denominator to be bigger since I'm trying to show equations in display mode. (If the denominator was in textstyle fontsize, then there would be less "vertical white space" in the numerator, but the problem is still there. I really want the denominator to be in displaystyle font size.)  What I would want, if possible, is that the delimiter would resize but only up to the "actual size" of the complex fraction. In MathType, this problem is solved using the "fence alignment" command in the "Format" menu, where the delimiters resize exactly up to the size of the complex fraction.  Sometimes, the manual sizing commands \big, ... \Bigg commands can help, but when I have a "complex-complex-complex" fraction, even the biggest \Bigg command doesn't help anymore.  Output of the code samples:    I have been seeking help from the Internet, but I haven't found a solution yet.


Difference between having multiple partition vs just one

From old times i always remember everybody saying you should separate windows partition from others, i don't see any strong reasons to do that. I search a little about this but other than better organizing over my data and something like these i can't find any other reasons. So i wonder is it really a good reason to separate windows partition from others? is it affected performance in any kind? Is it a difference between small and large size HDDs? I'm exclusively talking about latest windows 10 release.    UPDATE what i mean about separating windows partition from others is you create a partition just for windows and use another partition for installing applications and store other personal data. i wonder is this behavior affects number of system calls to hard disk and is it faster for operation system to work with multiple small partition instead of one big partition?


Hello I have problems with exercise For a positive integer $n> 1$ let us denote by $Z_n$ the cyclic group of order $n$ a) Prove that all homomorphs of group $f: Z_{10}  \longrightarrow Z_9$ it is trivial. B) Find all homomorphisms of group $f: Z_{10}  \longrightarrow Z_8$ My atemp: a) We have $f: Z_{10}  \longrightarrow Z_9$ is homomorphism and we have $f(x) =1$ but I don't know how to better justify. b)How do I find all homomorphisms Thanks


A natural number $n$ is prime if and only if, for all primes $p \le \sqrt n$, $p$ does not divide $n$.   I proved the forwards direction, but I'm having trouble proving it backwards


What keeps a swinging rubber ball in a horizontal circle above head from falling?

If i swing a rubber ball above my head in a horizontal circle, there will be centripetal motion and force but only in X axis,what keeps the rubber ball from falling since there is only one force acting on the ball in Y axis and that is gravity, why the ball doesn't fall?


How do I control how Emacs makes backup files?

Emacs puts backup files named foo~ everywhere and I don't like having to remember to delete them.  Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's confusing and awful.  How can I either eliminate these backup files, or have them go somewhere other than the same directory?


vsftpd-cannot read config file even when file exists

I'm on Ubuntu 15.04 and I just installed vsftpd.  When I run the command service vsftpd status, I get the following output:  vsftpd.service - vsftpd FTP server   Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor   preset: enabled) Active: failed (Result: exit-code) since Fri 2015-10-09 19:18:50 IST;  3min 11s ago Process: 2981 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2) Process: 2979 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) Main PID: 2981 (code=exited, status=2)  Oct 09 19:18:50 harshal-Lenovo-B40-70 systemd[1]: Starting vsftpd FTP  server... Oct 09 19:18:50 harshal-Lenovo-B40-70 systemd[1]: Started vsftpd FTP server. Oct 09 19:18:50 harshal-Lenovo-B40-70 systemd[1]: vsftpd.service: main process exited, code=exited, status=2/INVALIDARGUMENT Oct 09 19:18:50 harshal-Lenovo-B40-70 systemd[1]: Unit vsftpd.service entered failed state. Oct 09 19:18:50 harshal-Lenovo-B40-70 systemd[1]: vsftpd.service failed.   I checked /etc/vsftpd.conf, it exists and I did not find anything wrong in it. How can I solve this?


Test for no selection without a definition query

I am trying to put together a little python script to check for whether there is a selection. The dataset I have is not robust enough to have an definition query on it, so I want it to just check whether there is a selection. arcpy.GetCount_management does this, and when I use the Describe function it does this too, but whenever I don't have a selection it is giving me the total number of rows in the dataset. From what I've read in the literature, the Describe function at least should return a zero value, because none are selected. Can anyone tell me why I can never get a zero value from either of these tools?  This is the piece of code I've been playing with most recently  len(arcpy.Describe("Footpath_centreline_Layer").FIDSet.split(';'))   so when I have nothing selected, 0 out of 16 records - I get a return of 16, and I need for it to be 0. I'm not sure how to achieve this, given my very limited python knowledge.


My output is just giving weird characters

public static void main(String args[])     {         int[] a = {0, 1, 2, 3};         int[] b = {100, 101, 102, 103, 104, 105};         System.out.print(shuffleArrays(a, b));     }      public static int[] shuffleArrays(int[] a, int[] b)     {         int[] c = new int[a.length+b.length];         for (int i=0; i<b.length-1; i++)         {             if (i<a.length-1 && i<b.length-1)                 c[i] = c[i] + (a[i] + b[i]);             else if (i>=a.length-1)                 c[i] = c[i] + b[i];             else if (i>=b.length-1)                 c[i] = c[i] + a[i];         }          return c;     }   This is giving me an output of "[I@1837b90c". No idea why this is happening. Am I calling on the method incorrectly?


How can a path animation be used as an action in the game engine?

I animated a rollercoaster using a Bezier Curve and a Follow Path Constraint affecting the vehicle.  Then I tried to use the automatically created action in the game engine but the Action Actuator has no effect .    How can this action be used in the BGE? Can the Path Animation alternatively be converted into keyframes?


Uncaught TypeError: Cannot read property 'on' of null

I'm getting this Uncaught TypeError:     I'm unsure what is causing it, maybes something to do with JQuery?  Here is the exact code:  //when add to cart link is clicked... $('.addtocart').on('click', function(){    //get the value of the "data-value" attribute for that link   var vehicleRegistration = $(this).data('value');   //save it to localStorage   localStorage.setItem('vehicleRegistration', vehicleRegistration);     //read from localStorage   if( localStorage.getItem('vehicleRegistration') ){     //add the value to the form input     $('#field34').val( localStorage.getItem('vehicleRegistration') );   }  });   Here is the page that it is happening on:   It's really got me stumped, if anyone can help me solve this it would be much appreciated.  Thanks, Nick


I am trying to find out the class of an element when hovered over, and I am getting a   TypeError: undefined is not an object (evaluating 'classString.split')   console error. Here is my code.  function findClass(){     var classString = $(this).attr('class');     var myClass = classString.split(' ')[0];     alert(myClass); }  //blog  $(".img2.blog").mouseenter(function() {     $('.img2.blog').css('opacity', '0');     $('.img1.blog').removeClass('hidden');      findClass(this);  });  //albums  $(".img2.albums").mouseenter(function() {     $('.img2.albums').css('opacity', '0');     $('.img1.albums').removeClass('hidden');      findClass(this); });  //videos  $(".img2.videos").mouseenter(function() {     $('.img2.videos').css('opacity', '0');     $('.img1.videos').removeClass('hidden');      findClass(this); });  //contact  $(".img2.contact").mouseenter(function() {     $('.img2.contact').css('opacity', '0');     $('.img1.contact').removeClass('hidden');      findClass(this); });   Not sure how to pass "this" as an argument. Any help appreciated.


I am trying to figure out a regex in JavaScript for removing any strings before the dot

I am looking for some help with Regex syntax. I tried many ways to make the syntax for this case, but nothing seems to work. Could someone help me with this?  So I have a case where I am trying to replace everything before the "." symbol in this string,   example_ so.myname   I successfully removed all the strings before the "." using this expression:  var removeStrBeforeDot = params.value.replace(/(\<b\>|\<nobr\>)[a-z]*\./g, "");     removeStrBeforeDot = removeStrBeforeDot.replace(/\(.*\)\<\/b\>/g, " ");   But the issue with this expression is, this works when there is only letters before the dot and doesn't work when there are symbols like , space, etc. Like for example, example so.myname has a space and a "_" which is not working in this case. What I like to do is keep it more generic and remove any string before the "."  to be removed. Any help could be greatly appreciable.  Thanks!


How do I solve this limit: $\lim _{x \to 0} \left(\frac{ \sin x}{x}\right)^{1/x}$?

$$\lim _{x \rightarrow 0} \left(\frac{ \sin x}{x}\right)^{1/x}$$  I have spent an hour on the above limit and have no work to show. I tried using L'Hopital's Rule, but just kept going around in circles. Any help would be appreciated. Thank you.


How to solve the integral $I=\int_0^\infty (e^{-u}\log u) du$ using standard methods

The following question from $\textit{Statistical Inference }$by Casella & Berger was given to me on an assignment last semester. On the surface, it appeared to be a straight-forward question about transformations, but I stumbled across an integral I could not understand. Here is the question:     If $X \sim \text{exponential(1)}$, show that $Y=\mu-\beta \log X$ has the $\text{Gumbel$(\mu,\beta)$}$ distribution, where $-\infty<\mu<\infty$ and $\beta>0$.    We have that $f_X(x)=e^{-x}$ for $x \geq 0$. Now, let $Y=\mu-\beta \log X$. Then, $g(x)=\mu-\beta \log x$, which is monotone on $0<x<\infty$. We will use the standard theorem for transformations, with $g^{-1}(y)=e^{\frac{\mu-y}{\beta}}$ on $-\infty <y<\infty$. Then, the transformed pdf is given by: $$f_Y(y)=e^{-e^{\frac{\mu-y}{\beta}}}\left|\frac{d}{dy}e^{\frac{\mu-y}{\beta}}\right|=\frac{1}{\beta}e^{-e^{\frac{\mu-y}{\beta}}}e^{\frac{\mu-y}{\beta}} \text{ on $-\infty<y<\infty$} $$  I then attempted to find the mean of the distribution as follows. \begin{eqnarray*} \text{E}(Y)&=& \frac{1}{\beta}\int_{-\infty}^\infty ye^{-e^{\frac{\mu-y}{\beta}}}e^{\frac{\mu-y}{\beta}}dy \hspace{0.5in}  \text{Let $u=e^{\frac{\mu-y}{\beta}} \implies du=-\frac{1}{\beta}e^{\frac{\mu-y}{\beta}}dy$} \\ &=& \int_0^\infty \left(\mu e^{-u}-\beta e^{-u}\log u \right)du=\mu \int_0^\infty e^{-u}du-\beta\int_0^\infty \left(e^{-u}\log u\right) du \\ &=& \mu-\beta\int_0^\infty \left(e^{-u}\log u\right) du \end{eqnarray*} According to , the mean is given by $\mu+\beta\gamma$, where $\gamma\approx 0.5772$ is the Euler-Mascheroni constant. Therefore, the last integral above is equal to $-\gamma$, and indeed, that is the answer  provides. I am wondering if there is any way to solve the integral $I=\int_0^\infty (e^{-u}\log u) du$ using standard methods. I tried making every substitution I could think of and kept getting stuck. I even showed this to my instructor; he was not able to show that it equals $-\gamma$ either. I should also mention that prior to doing this question, I had never heard of the Euler-Mascheroni constant. Any help would be appreciated. Thank you!


Return a key value-pair which value is the highest

The dictionary: sales_year = {"1998": 3124, "1999": 234, "2001": 7214, "2002": 789}  How can I return the key-value pair of which the value is the highest? In this case it should return: ("2001", 7214)  Is there any function like "max()" which is as simple as possible?


How to find $ \lim_{n \to \infty}\prod_{i=0}^{n}\frac {qn+ip+1}{qn+ip}$?

How to find   $$L=\lim_{n \to \infty}\prod_{i=0}^{n}\frac {qn+ip+1}{qn+ip}\,,$$  where $p\in\Bbb N ,p \neq \{0,1\},q>0$?  Also, I'm bound to using elemental methods.


What is the difference between ./ and sh to run a script?

I have written a simple script.  When I runsh <myscriptname.sh>, i got the correct output, but when I run ./<myscriptname.sh>, I got an error.  What is difference between when I do sh and ./?


well, this error log is not mine but I got the same a dozen times for the last few days. the last time it happened I was running virtualbox and I suddenly got a error I couldn't run any system then I tried to reboot, nothing has happened and I used ctrl + alt + del (once that my painel power button wasn't working either)... everytime it happens my computer just work good for a quite while without any trouble.  I've seen this problem a lot while I was looking for a way to fix it, and I do really know that's problematic ask the same thing a lot of times. There's rules that I should probably read somewhere but for now I just want to fix that thing... I'm kind of newbie and I can't just reinstall my distro once that I have no way to save my files  /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  edit: gsmartcontrol test is all okay


Maximum Likelihood Estimator - Beta Distribution

I'm taking a Mathematical Statistics course and trying to work through a homework problem that reads:  Let Y1, ..., Yn be a random sample from a Beta(1,$\theta$) population.  Derive the MLE for $\theta$.  Getting started, I set up the likelihood function as:  $$ L(\theta) = \frac{\Gamma(1+\theta)}{\Gamma(1)\Gamma(\theta)}\prod_{i=1}^n(1-Y_i)^{\theta-1} $$  This simplifies to:  $$ L(\theta) = \theta(1-Y_i)^{n(\theta-1)} $$  Taking the log:  $$ l(L) = log(\theta) + n(\theta-1)log(1-Y_i) $$  Take the derivative:  $$ \frac{dl}{d\theta} = \frac{1}{\theta}+nlog(1-Y_i) $$  Solve for $\theta$:  $$ \theta = \frac{-1}{nlog(1-Y_i)} $$  But this can't be right as I've not dealt with the summation of $Y_i$.  In most examples I've seen, this goes away as a result of the summation being divided by n,b ut in this case I can't find where I've gone wrong.   I appreciate any tips.


Can Linear Discriminant Analysis be used to classify data the way that logistic regression can be used to classify an outcome of something?


Across SE chat, oneboxes appear to be broken.   And feed items are being posted differently:  Can we please have our oneboxes back to normal?


I have the same problem reported .  Who can help me please?


Java program: Ask users to input the number of printing copies, then compute and display the total printing cost using following rate table

I am having trouble getting the correct result from the output. Some input give the right and some don't. For example, when I put 499 I get $29.939999999999998 but when I put 500 I get $25.0.  -Enter the number of copies to print:  499 The total cost is:  $29.939999999999998  -Enter the number of copies to print:  500 The total cost is:  $25.0  This is my code: What am I doing wrong exactly?  import java.util.Scanner;  public class Main {  public static void main(String[] args) {     Scanner in = new Scanner(System.in);     System.out.println("Enter the number of copies to print: ");     double numberOfCopies = in.nextDouble();     double cost;     double subtotal;     double totalAmount;      if(numberOfCopies >= 500) {         cost = 0.05 / numberOfCopies;         subtotal = numberOfCopies * cost;         totalAmount = subtotal * numberOfCopies;         System.out.println("The total cost is: " + " $"+ totalAmount);       } else if (numberOfCopies >= 300 && numberOfCopies <= 499) {         cost = 0.06 / numberOfCopies;         subtotal = numberOfCopies * cost;         totalAmount = subtotal * numberOfCopies;         System.out.println("The total cost is: " + " $" + totalAmount);     } else if (numberOfCopies >= 200 && numberOfCopies <= 299){         cost = 0.07 / numberOfCopies;         subtotal = numberOfCopies * cost;         totalAmount = subtotal * numberOfCopies;         System.out.println("The total cost is: " + " $" + totalAmount);     } else if (numberOfCopies >= 100 && numberOfCopies <= 199) {         cost = 0.08 / numberOfCopies;         subtotal = numberOfCopies * cost;         totalAmount = subtotal * numberOfCopies;         System.out.println("The total cost is: " + " $" + totalAmount);     } else if(numberOfCopies >= 1 && numberOfCopies <= 99) {         cost = 0.10 / numberOfCopies;         subtotal = numberOfCopies * cost;         totalAmount = subtotal * numberOfCopies;         System.out.println("The total cost is: " + " $" + totalAmount);     } else if(numberOfCopies == 0) {         System.out.println("Cannot compute cost of 0 copies");     } }   }


Proving remittance from friend for a UK Visit Visa

I am preparing to apply visa for my parents. My dad have income coming in from business but his account is usually low with balance which shouldn't be problem though.   But in may and june I have sent around 200,000 from my name and 300,000 from my friends name, after giving him them in cash. Now I am stuck with this stupid decision. That money shows like making his statement healthier otherwise his statement could be low however he does have documents to show his own regular income.   Anyways remittance is not crime and I have remittance reciepts but how can we prove that the money sent from my friend name was actually mine. We cant prove any relation with him obviously.


I am applying to PhD programs in astronomy this fall, and I will need letters of recommendation. I have been working with a research group for about a year, have done a poster session at a major conference based on work I have done with this group and have written a piece of software that will be used in a collaboration with another group at a different university. In these examples I worked most closely with a post doc in the group, but the PI was aware of what we were doing. The PI is well respected and widely known in the field, and the post doc recently received a prestigious and well known fellowship.   I am unsure whether to ask the post doc (who knows me better) or the professor (who knows me but is also more established in the field) for a letter of recommendation. I am in the fortunate position that I have more potential letter writers than I need, so I would prefer to have only one from this research position to show the breadth of my other research experience. Would I be better suited by asking the PI or the post doc? Is it common to have jointly written letters?


What kind of freewheel/cassette is this?

I bought some old bike from netherlands, I wanted to restore it. Rear wheel is broken and I wanted to exchange it but there is this strange freewheel which I cannot identify, do you have any idea what it is?


In Russian roulette, is it best to go first?

Assume that we are playing a game of Russian roulette (6 chambers) and that there is no shuffling after the shot is fired.  I was wondering if you have an advantage in going first?  If so, how big of an advantage?  I was just debating this with friends, and I wouldn't know what probability to use to prove it. I'm thinking binomial distribution or something like that.  If $n=2$, then there's no advantage. Just $50/50$ if the person survives or dies.   If $n=3$, then maybe the other guy has an advantage. The person who goes second should have an advantage.   Or maybe I'm wrong.


Would there be centrifugal force if I were alone in the universe?

When I'm rotating, I feel centrifugal force. But if I were the only one in the universe and rotating, wouldn't I just kinda be still (since I'm not rotating with respect to anything) or would there just be a force pulling me out? What if there were another person a billion miles away, this should not change anything, right?


How to extend USB beyond the recommended maximum cable length of 5m?

I'm planning to use USB port for an application(from a device to a PC) but the distance between the device and the PC will be around 15m. The recommended maximum USB cable length is 5m.  How can I buffer the data without loosing any information, safely? Would a USB hub work?


Is there any advice for shooting portrait in dark room, using only lamps. I am little bit confused with iso,aperture and shutter speed because i photographing with analog film.


Preventing windows 10 from being installed

I have windows 7 and do NOT want windows 10. I have the windows logo in my tray and have removed it twice. It always comes back.     What I want is a SIMPLE way to prevent windows 10 from being installed on my computer. Any help appreciated.


NullPointerException thrown from addToBack method from custom LinkedList Array

I am trying to implement a LinkedList. The methods are functioning perfect on this example:      LinkedList list = new LinkedList();     Node newNode = new Node("sarah", 20);     list.addToBack(newNode);     System.out.println(list.nodeAt(0).getName());   But not on this example, when I try to use the same method with an array:      LinkedList[] list = new LinkedList[3];     Node newNode = new Node("sarah", 20);     list[1].addToBack(newNode);     System.out.println(list[1].nodeAt(0).getName());   For the last example I get the following:      Exception in thread "main" java.lang.NullPointerException         at Main.main(Main.java:27)   It's the line where addToBack method is called. This is the method:  public void addToBack(Node newNode) throws NullPointerException {     if (this.head == null){         this.head = newNode;         return;     }     Node current = this.head;     while (current.hasNext()){         current = current.next;     }     current.next = newNode;     ++size; }


How to send SIGINT to a Popen() function

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


I went into my profile just recently and i saw this    as you can see, just the tabs for my profile are in portugese. i asked this in the chat room i'm always in to see if anyone else was getting the same thing and apparently not. i was told to check my language settings. since i have never touched the PC ones i checked my browser    and just to show it isn't just a Beta Site, Stack Overflow    However it's not happening here on Meta    I am wondering what's going on here and how can i fix it?


So, my java project has the following hierarchy :  Project folder ------src-----PackageA-----MainClass (with main method)           |       |           |         -----PackageB------SecondClass           ------resource----image.jpg   The src folder is on the classpath, but the resource folder is not(I don't know if this is the cause of my problem)  Here is the problem. When i try to use getResourceAsStream() from inside a method from SecondClass I get NullPointerException. I've tried   getClass().getResourceAsStream("/resource/image.jpg")  getClass().getResourceAsStream("/Project folder/resource/image.jpg") getClass().getResourceAsStream("Project folder/resource/image.jpg")  and in all the paths returned null pointer. I am sure I am doing something wrong but I don't get what. Please, help me out! Thanks!


It is well known that there is a one-to-one mapping between the integers and the rationals.  It is also well known that there no such mapping between the rationals and the real numbers.  Is there a one-to-one correspondence between the set of real numbers and the set of complex numbers?  As part of the answer, could you either provide a high-level sketch or a reference (either the name of a famous theorem or a url) that would help me to understand the argument.


The insect pictured below just flown into my room. I live in Central Europe (Poland), it is about evening now. The thing is about 1,5 cm in length (not sure about this, I was too focused on driving it out). Its white stripe on abdomen seemed to be translucent. What is this insect?


I accidentally uploaded an image in chat that contained some personal information. I deleted the chat message, but would like delete the image from imgur. I've seen , with  that says because "the account belongs to SE, not you" I cannot delete an image.  However, because this image contains personal information, it really must be deleted. How can I go about doing so?


$k$ litres of Milk delivery with minimum cost

Assume that you are the CEO of a milk delivery company and want to deliver $k$ litres of milk to one of your customers. You can buy milk from another company. Then you should use an arbitrary path to reach your customer. These paths are given to you as a graph $G=(V,E)$. At first, you are at vertex $p$. The objective is to reach vertex $q$. But there are some rules.    Assume that $u$ and $v$ are to arbitrarily chosen vertices. When you go from vertex $u$ to $v$, You should pay $C_{uv} \gt 0$ per each litre of milk. Also, For example if before going from $u$ to $v$, the amount of milk was $m$ litres, after going from $u$ to $v$, this amount becomes $m \times Y_{uv}$ such that $0 \lt y_{uv} \le 1$.    Assume that the cost of buying $1$ litre of milk is $\alpha$.    Notice that at the end, there should be $k$ litres of milk remained that can be delivered to the customer.    Question:       Find an algorithm to deliver $k$ litres of milk to the customer, with   the minimum cost.   Note1 (The meaning of cost):    Assume that you want to go from vertex $a$ to vertex $b$, $\alpha=2$ and the amount of milk you want to deliver is $1$ litre. There are $2$ paths from $a$ to $b$: 1. Going directly from $a$ to $b$:    You should buy $1$ litre of milk, Which costs $2$ units. Then you should go from $a$ to $b$ which costs $C_{ab}=10$. Also, if $Y_{ab}=1$, The amount of milk doesn't change. So, the  total cost becomes $2+10=12$ 2. Going from $a$ to $c$, and then from $c$ to $b$:    You should buy $3$ litres of milk, Which costs $6$ units. Then, you should go from $a$ to $c$. If we assume that $Y_{ac}=0.5$, Then the amount of milk becomes $1.5$ litres. Also, If $C_{ac}=5$, then we should pay $5 \times 3 = 15$ units  for going from $a$ to $c$. Then we go from $c$ to $b$. When we reach $c$, there are $1.5$ litres of milk remained. Also, If $C_{cb}=6$, Then the price of going from $c$ to $b$ will be $6 \times 1.5 = 9$ units. Also, $Y_{cb}= \frac{2}{3}$. Thus, $1$ litre of milk remains at the end. So, the total cost will be $6+15+9=30$ units.    Note2 (What my problem is):    First, i thought of labeling the edges with their costs. I thought that Kruskal's algorithm would solve the problem. But, There is a huge difference here! We are not sure about the costs! They depend on the amount of milk remained after each choice of vertices! That's where i'm stuck! Its like finding a minimum spanning tree, In a graph with edges having dynamic weights!


How can I prove that $x-{x^2\over2}<\ln(1+x)$

How can I prove that $$\displaystyle x-\frac {x^2} 2 < \ln(1+x)$$ for any $x>0$  I think it's somehow related to Taylor expansion of natural logarithm, when:  $$\displaystyle \ln(1+x)=\color{red}{x-\frac {x^2}2}+\frac {x^3}3 -\cdots$$  Can you please show me how? Thanks.


Logging a value that changes once a day in Google Sheets

In my Google Sheet cell D12 gets the difference of two numbers with =D9 - D4. How do I store the value in cell D12 to a log in another sheet on a daily basis? I would like each row in the log sheet to show the date and the difference. An onEdit() based change tracker will not work for this, because the difference should be saved once a day rather than every time the sheet is edited, and because the value I want to track is in a formula cell that is never edited.


Accidentally drop table in database that has no backup

One Table is accidentally dropped in my database. I had not taken backup of the database since it is in development environment. I want to restore the table. Kindly please provide any solution. The last backup was taken 6 months ago.  The table has related data to other tables.


I am trying to install tensorflow-gpu for python 3. when I run pip3:   sudo -H apt-get pip3 install tensorflow-gpu   I get:   Traceback (most recent call last:)  File "/usr/local/bin/pip3", line 5, in <module>   from pkg_resources import load_entry_point ImportError: No module named pkg_resources


Confusion over unexpected Math.cos behavior in Javascript

The cosine of 90 degrees is 0.  I understand Javascript's Math.cos takes radians, so I've tried:  Math.cos(90 * Math.PI / 180)   Why does this yield 6.123233995736766e-17 instead of 0?


First of I apologize if this is a duplicate thread, I tried searching to no avail.  I'm currently looking to reduce the entire system DPI in Ubuntu 13.04 I work better with multiple windows and the default DPI for my laptop is a little to big.


Probability $X$ is odd in a geometric distribution

I have this problem:      Let $X$ be a Geometric distribution with parameter $p = \frac1{10}$.   What is the value of $P(x\text{ is odd})$?     What I got was $P(X = i) = pq^{i-1}$ where $p = \frac{1}{10}$ and $q = (1-p)$   Is this right?


c++ template variadic function undefined reference

TestTempB.h  #ifndef TESTTEMPB_H_ #define TESTTEMPB_H_ #include <string> using namespace std; namespace ddl_lib {  class TestTempB { public:     TestTempB();     virtual ~TestTempB();     template<class ... Args>     void callCommandB(const string&, const uint32_t*, Args ...);     template<class ... Args>     void callCommandA(const string&, Args ...); };  } /* namespace ddl_lib */  #endif /* TESTTEMPB_H_ */   TestTempB.cpp  #include "TestTempB.h" #include "TestTempA.h" #include "stdint.h" #include <iostream> namespace ddl_lib {  TestTempB::TestTempB() {     // TODO Auto-generated constructor stub  }  TestTempB::~TestTempB() {     // TODO Auto-generated destructor stub }  template<class ... Args> void TestTempB::callCommandB(const string& cmdName, const uint32_t* cmdSn, Args ... params) {     cout << cmdName << endl; } template<class ... Args> void TestTempB::callCommandA(const string& cmdName, Args ... params) {     callCommandB(cmdName, NULL, params...); } } /* namespace ddl_lib */   main  #include <iostream> #include "TestTempB.h" using namespace std; using namespace ddl_lib;  int main() {     string aa="15615";     bool ccc=false;     TestTempB b;     b.callCommandA("name", &aa, &ccc);//undefined reference to `void ddl_lib::TestTempB::callCommandA<std::string*, bool*>(std::string const&, std::string*, bool*)' }   I'm using the  variadic-template. Why the gcc can't deduced the real func? When the callCommandA and callCommandB in the main file,it works just fine.  #include <iostream> #include "TestTempB.h" using namespace std; using namespace ddl_lib; template<class ... Args> void callCommandB(const string& cmdName, const uint32_t* cmdSn, Args ... params) {     cout << cmdName << endl; } template<class ... Args> void callCommandA(const string& cmdName, Args ... params) {     callCommandB(cmdName, NULL, params...); } int main() {     string aa = "15615";     bool ccc = false;     callCommandA("name", &aa, &ccc); //no erro }   Why and how could I fix it? Thanks!!!


nested while loops not working as expected

I'm trying to write a script to loop through two different lists : list 1 :  list of servers list 2 :  list of users I want to loop through the list of servers in list 1 and check the status of the user accounts in list 2 on each server. This is what I have so far, but the inner loop is only checking the first account in the list on each server, then going back to the "outer loop" of servers.  So I'm halfway there, I guess? This is my script so far: #!/bin/bash  unset SERVER unset USER  while IFS= read -r SERVER; do         echo "$SERVER"         while IFS= read -r USER; do                  ssh "$SERVER" "/usr/bin/lastlog -u $USER"         done < /path/to/list_of_users.lst done < /path/to/list_of_servers.lst  I can't seem to figure out where I'm going wrong here.  Any advice would be appreciated!


in my mysql table having rows in one single cell i have array. How can i select rows which are having a perticular array value?

postCategory column having an arrays like  Array (     [0] => movie news     [1] => breaking news     [2] => political news )      //So please tell me how to select data  <?php  $select_posts = "select *                   from blogposts                   where postCategory = 'political news'                   IN(postCategory)                   order by postId DESC                   LIMIT 1,6";  $run_posts = mysqli_query($con,$select_posts);  while($row=mysqli_fetch_array($run_posts)){      $postId = $row['postId'];      $postTitle = $row['postTitle'];     $postContent = $row['postContent'];     $futureImage = $row['futureImage'];     $postCategory = $row['postCategory'];     $postTags = $row['postTags'];     $postAuthor = $row['postAuthor'];     $postDate = $row['postDate'];   ?>

             <a href="blog-single.php?id=<?php echo $postId; ?>?postTitle=<?php echo str_replace(' ', '-', $postTitle);?>"> <?php echo substr($postTitle,0,60); ?>

 <?php } ?>


Getting Correct Type Name in Google Chrome

In the Chrome console I type:  function test() {}   Than I type:  new test()   Now Google prints "test {}" in the console. When I do:  new test() instanceof test   It prints true.  On new test().toString() it returns [object Object]. On new test().constructor it returns undefined. On new test().prototype it returns undefined. On new test().__proto__ it returns test {}.  So what is the deal?  This is just a stipped down problem of a 3rd party framework. So I can not just add a class literal, add a constructor myself, add any other fancy idea. Since Chrome already knows the correct type (name of the constructor method) I just ask myself: "How can I optain the information?".  Thanks,  Martin (Kersten)


Show $3^m + 3^n +1$ cannot be a perfect square for $m,n$ being positive integers.

So, I decided to work with mod $8$ to help develop some intuition on how to generalize the proof. I noticed that taking $a^2$ to clearly be a perfect square, $a^2$ is always congruent to $0,1,-4,4 \mod 8$, at least for a good finite set of cases. Also, I played around with solutions to $3^m + 3^n + 1 = b$ and seen again for a finite set of cases with $m,n$ varying these were always, $b$ is congruent to $-1,5,-5,3$. Now, I see that well only perfect squares produce a set $\{0,1,-4,4\} \mod 8$ and none of the cases I tried to $m,n$ gave me any of the numbers in this set. And now I'm stuck.


I would like to know how files are handled in a auto-dnssec environment.  My current setup (non-DNSSEC) places the zones files in /var/named/data. These files are then read by the bind server.  If I enable auto signing, will the zones files change? Or will bind just keep the signed zones internally? If the former thing happens, Puppet might not be a good idea to deploy dns zones anymore.


Which of these is grammatically correct?       1. a) He has been working under my direct supervision since the last two years           1. b) He has been working under my direct supervision for the last two years            2. a) He has not met her since a very long time        2. b) He has not met her in a very long time    Which of the above are correct? Are all of them correct? My friend says 1.b and 2.b are correct, but I am not sure. Or is this an American English and British English thing? (He mostly goes by American English)


MariaDB 10.1.18 - Resetting Auto Increment Column After Reboot

I have 2 live MySQL servers, one running on Linux and another running on Windows.  I have recently setup another MySQL environment on Windows however I am getting this error when inserting data into any of the databases's tables...  Failed to read auto-increment value from storage engine   From what I am reading this is because the MySQL auto increment field is reset after rebooting the server, which it does on this machine. However I am not getting this on my production boxes either Linux or Windows, which are the same version, with many reboots.   Any ideas how to fix this?  CREATE TABLE `images` (   `imageId` int(11) unsigned NOT NULL AUTO_INCREMENT,   `imageUrl` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,   `imageFileName` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,   `imageComments` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,   `imageAddedOn` datetime DEFAULT NULL,   `imageStatus` tinyint(3) unsigned DEFAULT NULL,   PRIMARY KEY (`imageId`),   UNIQUE KEY `image_UNIQUE` (`imageId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci


Date null pointer exception because of format not matching ? Java

I have a HashMap<Long, Date> forecastedEndDates. It is in a field class named Card. In my JUnit test I want to assertEquals my Date and a Date from the map, but  on   date1 = card.getForecastedEndDates().get(95L);  line, it givens me a null pointer exception. I have declared and initialized the date as:  Date date1 = new Date()  I can't go and change Date to Calendar or Time, because it is too big of a project. I have a suspicion that there is a format mismatch. When I println Date.getTime(), I get 1538473954932 and when I do:   Card card = new Card(); card.getForecastedEndDates().get(95L);  I get: Tue Oct 16 03:16:34 EEST 2018   I fill in the map with:  Map<Long, Date> forecastedEndDates = new HashMap<Long, Date>();     forecastedEndDates.put(50L,          Date.from(LocalDateTime.now(ZoneOffset.UTC)              .plus(Math.round(forecast.getSimulation().getMedian() * DAY_IN_MILISECONDS), ChronoUnit.MILLIS)              .toInstant(ZoneOffset.UTC)));   The 50L is the key and the Date is value


Is there an English proverb similar to the Hindi "Elephant goes to the bazar; Thousands of dogs bark"?

There is a proverb in Hindi language      हाथी चले बाज़ार कुत्ते भौंकें हज़ार    Literal English translation:     Elephant goes to the bazar; Thousands of dogs bark    It figuratively means when a person progresses with something or succeeds, the people often vilify him and protest. (So let them do what they do. A high-level person doesn't need anything to stop progressing or succeeding)


I recently came across  and found that the user has been deleted:    Generally, the deleted users will be displayed like this:    Why does that alone has a different view? A deleted user without a user id / name?


Reference citation appear in list of figures and tables

I am adding the reference in yje captions of Figures and Tables of my thesis. Reference is also appearing in the List of figures and list of tables at the start of the chapters. This is how I am citing in the captions of Figures and Tables.   \caption{Graph showing global increase in herbicide resistance \protect \cite{heap2019international}.}  I dont want it appear in the List of Figures and List of Tables. Is there any other approach to avoid that?


How did Gandalf come to possess one of the Elf rings?

Gandalf wasn't an elf, but rather he was one of a few wizards sent to help Middle Earth. So, how did he end up with one of the Elf Rings? And, why did Frodo not notice it, when he easily noticed Galadriel's ring?


Proving that $\sum_{k=0}^{\infty} \frac{2^k}{{2k \choose k}}=2+\frac{\pi}{2}$

Using tha integral representation of the reciprocal of the binomial co-efficient: $${n \choose j}^{-1}=(n+1)\int_{0}^{1} x^j (1-x)^{n-j}~ dx,~~~~(1)$$ here, we state and prove an interesting sum that $$\sum_{k=0}^{\infty} \frac{2^k}{{2k \choose k}}=2+\frac{\pi}{2}~~~~~~(2)$$ Proof: $$S=\sum_{k=0}^{\infty}  2^{k}{2k \choose k}^{-1}= \int_{0}^{1} \sum_{k=0}^{\infty} (2k+1)~ [2x(1-x)]^{k}$$ Using $\sum_{k=0}^{\infty} (2k+1)r^k=\frac{1+r}{(1-r)^2},$ we can write $$S=\int_{0}^{1} \frac{1+2x(1-x)}{(2x^2-2x+1)^2} dx =\int_{0}^{1} \left (\frac{2}{(2x^2-2x+1)^2} -\frac{1}{2x^2-2x+1} \right)dx $$ The first integral in above has been obtained by assuming $$\int \frac{2}{(2x^2-2x+1)^2}dx=\frac{Ax+B}{2x^2-2x+1},$$ then by differentiation, we find $A=2, B=-1$. $$\implies S=\left(\frac{2x-1}{2x^2-2x+1}-\tan^{-1}(1-2x)\right)_{0}^{1}=2+\frac{\pi}{2}.$$ The question is: how to prove this using other approaches?


I'm not sure what day I last checked my inbox, but definitely not 17 May 2015. The email was sent to me 4 hours ago.