how to auto detect the scrollTop position of a particular Div?

I was trying to implement the scroll based animation. I mean i want to animate the content of a particular div when it comes in the view. To achieve this i have given the hard coded value to like   if($(window).scrollTop() > 700)   if there are so many section on a page then for all of them i will have to give the hard coded values.   is there a way to detect if a particular div is in view?  here is my HTML , CSS and JS.  HTML

     CSS  .container{     width: 100%;     height: 550px;     background: #ddd;     padding: 30px;     border-bottom: 1px solid black;     margin-bottom: 20px;     position: relative;     overflow: hidden;     perspective: 1000px;  } .clearFix{     clear: both; } .container > div{     display: block;     width: 22%;     height: 300px;     border:1px solid black;     background-color: #ccc;      padding: 10px;       text-align: justify;     position: absolute;     transition: all 1s ease-in-out;     transform-style: preserve-3d; } .text1{     left: 30px;     opacity: 0; } .text2{      right: 30px;     opacity: 0; } .container:nth-child(3) .text1{      transform: rotateY(90deg);     left: 200px; } .container:nth-child(3) .text2{      transform: rotateY(-90deg);     right: 200px;    } .section2T1{     transform: translate(200px) rotate(360deg) ;     opacity: 1; } .section2T2{     transform: translate(-200px) rotate(360deg) ;     opacity: 1; } .section3T1{     transform: rotateY(0deg) !important;     opacity: 1; } .section3T2{     transform: rotateY(0deg) !important;     opacity: 1;  }   JS  $(document).ready(function(){ $(".container:nth-child(1) .text1").delay(500).animate( {             left:200,             opacity: 1         },500);      $(".container:nth-child(1) .text2").delay(500).animate( {         right:200,         opacity: 1     },500);      $(document).on("scroll",function(){            if($(window).scrollTop() > 150){              $(".container:nth-child(2) .text1").delay(500).addClass("section2T1");              $(".container:nth-child(2) .text2").delay(500).addClass("section2T2");         }         else{             $(".container:nth-child(2) .text1").delay(500).removeClass("section2T1");              $(".container:nth-child(2) .text2").delay(500).removeClass("section2T2");          }           if($(window).scrollTop() > 700){              $(".container:nth-child(3) .text1").delay(500).addClass("section3T1");              $(".container:nth-child(3) .text2").delay(500).addClass("section3T2");         }         else{             $(".container:nth-child(3) .text1").delay(500).removeClass("section3T1");              $(".container:nth-child(3)        .text2").delay(500).removeClass("section3T2");         }    });  });


How to prove this convergence in probability property?

How to prove if $X_n$ converges in probability to $X$ then there exists at least one subsequences converge almost surely to $X$? I have no idea how to proceed.


Booting off raid'ed > 2GB drives, btrfs, handling bios boot partition

Setting up an array of (3) 5GB drives using btrfs.  It will soon grow to (6) 5GB drives.  Starting with raid 1, will rebalance once all the drives are installed to either raid5, 6, or 10.  I will be booting off of this, so I believe I need a bios_grub / BIOS boot partition.  How is this usually done?  I'm starting with:  # parted /dev/sda mklabel gpt mkpart grub ext3 1M 2M set 1 bios_grub on mkpart btrfs btrfs 2M 5001GB   I guess my preference would be that the BIOS boot partition be a raid 1 across all 3 (eventually 6), so there isn't just one drive hosting the boot partition that if it dies preventing booting before re-installing the boot partition to another drive.  mkfs.btrfs won't run on a 1MB partition.  Says the minimal size for each btrfs partition is around 16MB.  Syslinux can't boot off btrfs yet, so that's not an option.  (In this paragraph, using "boot" not in the sense of the bios_boot partition, bot the rest of the boot sequence.)  Would you increase sdX1 to 20MB, make a 20MB on each drive, and make a btrfs raid1?  (The 20MB doesn't matter at all with these sizes.)  Or, would you make a 1MB partition on each, make it ext3, and a mdadm raid1?  (Not even sure a mdadm raid can work for a bios_grub partition...)


Ubuntu Detects 2 monitors when I only have one

Ubuntu Detects 2 monitors when I only have 1. This causes an issue when booting up because it's detecting 2 monitors and by default it is mirroring the display; which is causing a distorted picture since it's trying to create a mirror image on 1 display. xrandr output.... The VGA1 is the phantom monitor and I need to remove it so it boots to LVDS1 and NOT mirrored.   Any suggestions on how to permanently remove VGA1?  :~$ xrandr -q Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 VGA1 connected (normal left inverted right x axis y axis) 1024x768 60.0 800x600 60.3 56.2 848x480 60.0 640x480 59.9 LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1920x1080 59.6*+ 1680x1050 60.0 59.9 1600x1024 60.2 1400x1050 60.0 1280x1024 60.0 1440x900 59.9 1280x960 60.0 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9


Graphics card power consumption regarding PCI power and 6-Pin power

I am aware that the PCI-E slot can power up to 75W and so can the 6 pin molex power cable, I was wondering if the power draw is split evenly between both the PCI and 6 pin cable, for example would a graphics card using 110W split the consumption evenly into 55W from the PCI and 55W from the 6 pin, or would it be for example 75W from PCI and 35W from the 6 pin? I ask because my 250W psu will not be enough to power my gtx 650ti and plan on using a secondary psu for the 6 pin connector. Thanks in advance.


Badges summary of some tough guys on SO does not fit. Not critical, but sometimes distracting.


I have been stuck trying to show $\limsup_{n\to\infty}s_n^{1/n}\leq\limsup_{n\to\infty}s_{n+1}/s_n$ for any sequence of positive reals, $s$ given that $\limsup_{n\to\infty}s_{n+1}/s_n=\lim_{n\to\infty}s_{n+1}/s_n=L\in\mathbb{R}$ I wonder if it would be appropriate to combine the limits: $\lim_{n\to\infty}\left(\sup_{m>n}s_m^{1/n}-\sup_{m>n}s_{m+1}/s_m\right)\geq0$ Since we know so little about $s$, I don't think combining the $\sup$ will be very helpful. So how can we find a relationship between these to prove the inequality? Even if we were to combine them, we don't know any relationship between $s_n$ and $s_{n+1}$. Of course, $s_{n+1}/s_n$ is bounded, so perhaps we can use this to but a bound on $\sup s_n^{1/n}$ and pin it between $0$ and $L$ instead of messing with combining the limits. This may be preferable since it seems impossible to establish a relationship between the elements of the two derived sequences, given so little information about $s$.


launcher, top panel disappeared and global menu & hud disabled

This morning, I removed all the unity-webapps-something and didn't pay attention that removing unity-webapps-service or unity-webappas-common required to remove other key packages:  The following packages will be REMOVED:   bamfdaemon hud indicator-appmenu indicator-sound libbamf3-1 libunity-webapps0 lightdm-remote-session-uccsconfigure unity unity-tweak-tool unity-webapps-common   unity-webapps-service xul-ext-unity xul-ext-websites-integration 0 upgraded, 0 newly installed, 13 to remove and 1 not upgraded. After this operation, 10.3 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 458920 files and directories currently installed.) Removing unity-tweak-tool ... Removing lightdm-remote-session-uccsconfigure ... Removing unity ... Removing indicator-sound ... Removing indicator-appmenu ... Removing hud ... Removing libbamf3-1:amd64 ... Removing bamfdaemon ... Removing xul-ext-unity ... Removing xul-ext-websites-integration ... Removing unity-webapps-common ... Removing libunity-webapps0 ... Removing unity-webapps-service ...   Now, that I login to my unity session, I have no launcher, no top panel, global menu integration and hud are disabled.   I reinstalled all the packages removed above and restarted the computer but in vain.  I reconfigured these packages but in vain (sudo dpkg-reconfigure unity)  I issued:  unity --replace and compiz --replace  but in vain.   Any Ideas please. this is kind of frustrating.  PS: At the greeter stage, everything is fine. It's only when I log in.  I can also login to my gnome Fall back session without problems.


I want to have a question mark over the arrow "\to". I cannot use "\limits^{?}" command because "\to" is not a mathematical operator.  How can you have a question mark over the arrow?


Getting "error: snap "zoom-client" has "install-snap" change in progress" while installing zoom-client in Ubuntu 20.04

I am getting an error on Ubuntu 20.04 while installing Zoom-client. "error: snap "zoom-client" has "install-snap" change in progress"  Is it happening because I cancelled sudo apt upgrade?


Geometric distribution and expectation of polynomials of random variable

Let $X$ be a random variable geometrically distributed. I have known that geometric distribution is memoryless which means  $P(X>i+j|X>i)=P(X>j)$.  Now I want to compute the value of $E(X(X-1)(X-2)...(X-r+1))=\frac{r!p^r}{(1-p)^r}$.  I see the answer from this post below. But I really don't understand what does $U$ in this answer mean. Is there another way to interpret the solution?


the drupal_get_messages() function is returning nothing when run from page--front.tpl in my custom theme. Do I have to add something to page.tpl.php to build this?  I have a print_r set up and it's always entirely empty even though in the admin panel I've got all types of messages


Prove that every finite integral domain is a field.

I am a little confused about the proof for the following theorem:     Every finite integral domain is a field.   $R$ is a finite integral domain with $R^{*}$ being the set of nonzero elements of $R$. The proof defines a map for all $a\in R^{*}$ to be $\lambda_{a}(r)=ar$ for $r\in R^{*}$. It showed it was injective. Then this is the part I am confused about: Since $R^{*}$ is a subset of $R$, $R^{*}$ is finite hence must be surjective. Could someone please explain this implication?


I am try to under stand this javascript code but tired of it?

<!DOCTYPE html>     <html>     <body onload="myFunction()">     <script>     var go="globle";     function myFunction() {     var go="local";     document.write(go);          }     document.write(go);     </script>      </body>     </html>   when I run this code it will print local.But when I run the following code:      <!DOCTYPE html>     <html>     <body onload="myFunction()">     <script>     var go="globle";     function myFunction() {     var go="local";         }     document.write(go);     </script>      </body>     </html>   This code print globle. Why not the first code printing both local and globle. And also when I run first code my html body is also not executed.


Appropriate word for a young person who behaves like a cynical old person?

What is an appropriate term for a young person (child or teenager) whose words and actions mimic that of a much older person from a previous generation? Such a youngster would demonstrate strong nostalgia for the past, despite never having lived during that time period.  An example I can think of is a 12 year old boy who observes that, "children nowadays spend all their time with their faces glued to smartphones", or who prefers to write letters rather than emails, "like it was done in the good old days". This child would never have a Facebook or Twitter account, because they are, "silly fads of the 21st century".1  A possible phrase would be mature beyond his years, although that doesn't quite capture the characteristic in question—in particular the underlying contradiction, cynicism, and nostalgia.  I can think a perfectly fitting term from another language, but not English...  1The motivation behind this question is  an interesting youngster I know who makes these statements!


When I tried rendering the scene with white background in filmic blender, I'm getting grey coloured background. But I'm able to achieve this with standard colour management options.  P.s: I have edited light source to match the filmic blender.


It is that when looking for a flight Madrid-Santa Cruz I've found the price and its options, that is correct, but What is the meaning of  SSEEOB, QEEOB, TMEEOB, VEEOB, HEEOB, BEEOB, YOW ? This is always beside the prices


I'm doing anomaly detection on unsupervised data using k-means I got a result but I don't know how to validate my clustering result. by plotting I can see my anomalies but how should I validate that clustering is accurate. in supervised learning, we use cross-validation like this any method or technique for unsupervised means.


Investment options for f1 visa students in USA

I am foreign graduate student in USA. I recently completed my undergrad (from USA) and have a bit of money saved up. I know that F1 students cannot work off campus and other business activities such stock trading etc are prohibited as well. I wanted to know if opening an account in an investment management firm like Charles Schwabb or Betterment is allowed. I would not be working but I will still be earning a small interest on my deposits. If that is not allowed, are there any good and legal ways for foreign students to earn a little interest on savings?


Finding Maximum Area of a Rectangle in an Ellipse

Question: A rectangle and an ellipse are both centred at $(0,0)$.        The vertices of the rectangle are concurrent with the ellipse as shown         Prove that the maximum possible area of the rectangle occurs when the x coordinate of   point $P$ is $x = \frac{a}{\sqrt{2}} $     What I have done  Let equation of ellipse be   $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$$  Solving for y  $$ y = \sqrt{ b^2 - \frac{b^2x^2}{a^2}} $$  Let area of a rectangle be $4xy$  $$ A = 4xy $$  $$ A = 4x(\sqrt{ b^2 - \frac{b^2x^2}{a^2}}) $$  $$ A'(x) = 4(\sqrt{ b^2 - \frac{b^2x^2}{a^2}}) + 4x\left( (b^2 - \frac{b^2x^2}{a^2})^{\frac{-1}{2}} \times \frac{-2b^2x}{a^2} \right) $$  $$ A'(x) = 4\sqrt{ b^2 - \frac{b^2x^2}{a^2}} + \frac{-8x^2b^2}{\sqrt{ b^2 - \frac{b^2x^2}{a^2}}a^2} = 0 $$  $$ 4a^2\left(b^2 - \frac{b^2x^2}{a^2} \right) - 8x^2b^2 = 0 , \sqrt{ b^2 - \frac{b^2x^2}{a^2}a^2} \neq 0 $$  $$ 4a^2\left(b^2 - \frac{b^2x^2}{a^2} \right) - 8x^2b^2 = 0 $$  $$ 4a^2b^2 - 4b^2x^2 - 8x^2b^2 = 0  $$  $$ 4a^2b^2 - 12x^2b^2 = 0  $$  $$ 12x^2b^2 = 4a^2b^2 $$  $$ x^2 = \frac{a^2}{3} $$  $$ x = \frac{a}{\sqrt{3}} , x>0 $$  Where did I go wrong?  edit:The duplicate question is the same but both posts have different approaches on how to solve it so I don't think it should be marked as a duplicate..


$\gcd(a,b)\!=\!1\!=\!\gcd(a,c)\Rightarrow\gcd(a,bc)\!=\!1$ [coprimes to $\,a\,$ are product closed]

How do I go about proving this?  If $\gcd(a,b)=1$ and $\gcd(a,c)=1$, then $\gcd(a,bc)=1$. I'm very confused with gcd proofs.


Is there a way to join the Android beta?

I seem to find myself in possession of a shiny phone. As opposed to my old one, which was an abhorrent pancake sandwich of electronics, screen, and what must have been some kind of horse poop.   Is there any way for me to join the Android beta, or is that period over / the slots filled?


Why my while loops doesn't recognize the condition of the integer and make infinite loop? (Java while loops "Validate a bank Pin")

I have tried inputing the same int as the validPin variable, but it makes infinite loop even though  the condition is already true. Also, I have tried to change validPin to 12345 and it worked, but if the validPin is 002200 it doesnt work. Why? public void main() {      Scanner in = new Scanner(System.in);     int validPin = 002200;     System.out.print("Enter PIN to access:");     int pin = in.nextInt();       while (pin != validPin) {         System.out.print("Invalid PIN, Try again:");         pin = in.nextInt();     }      System.out.println("You have entered the correct PIN, now you have acces for your account!");  }  }


On Mac OS X, the default $PATH values are:  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin   What are the default values on Linux?


Variable thats defined in if is later not defined

I thought I can define a var in an if statement and use it later in the following code. Why is this not working in my example?   let a = prompt('1', '');   if (a == 1) {   let x = 10;   let y = 20;   let z = x + y; } else {   let z = 50; }  alert(z);    I'm pretty new to JS, thats why this error comes up for me. What would be the correct way to override z if the if is false?


Problems after upgrading to 14.04 (only background and pointer after login)

After upgrading from 12.04 to 14.04 I could log in to my X session (albeit with really low graphics). While trying to fix the graphics, I managed to break the X session.  Now, after typing my password in the unity-greeter, the items disappear and I can only see the desktop background and the pointer. This happens for every user. I can still log in in tty's. How can I solve this?  Also, I cannot seem to be able to install nvidia-current as it tries to install nvidia-304 and it depends on old video-abi libraries. Is there a way to tell the package manager that nvidia-current should use a newer version?


Network profile shows 117 score on my top voted question, but it actually has 118 score

In , I see 117 score for my top voted question. But if you visit the question, you'll find that it has 118 score. The last vote I got on that question was at least a week ago, IIRC. Bug?


Confusion regarding passing values to a method?

I am really confused how values are passed to a function. I am unable to figure out what types of values gets changed when we pass it to a function. Example 1 - Passing a String(reference type) to a function - public static String word = new String("Hello World");  public static void main(String[] args) {     System.out.println("Before: " + word);     UpdateValue(word);     System.out.println("After: " + word); }  public static void UpdateValue(String x) {     x = "Hi World"; }  Output: Before: Hello World After: Hello World  Example 2 - Passing an array of String[] to the function - public static String[] words = new String[] {"Hello", "Everyone"};  public static void main(String[] args) {     System.out.println("Before: " + Arrays.toString(words));     UpdateValue(words);     System.out.println("After: " + Arrays.toString(words)); }  public static void UpdateValue(String[] x) {     x[0] = "Hi"; }  Output: Before: [Hello, Everyone] After: [Hi, Everyone]  My questions -  How does it all work? String is a reference type, so my earlier assumption was that the value will be changed if we pass it to a function. But that didn't happen. The value did not change. At the same time, when I passed the array (which is an object in Java, so basically a reference type?) we see that the original value got changed?


Why did the world stop using Dc for transmission?

Why did the world stop using it for transmission ? And is there any countries still use it ?


Did the services at USCIS for UK visa resumed?

I cant find this information anywhere. please help


I am getting Null Pointer Exception in my Selenium Script?

enter code here import java.util.ArrayList;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;   public class ArrayLiist {      public static void main(String[] args) {         launchBrowser("CH");         WebDriver driver=null; driver.findElement(By.id("user_login")).sendKeys("admin");         driver.findElement(By.id("user_pss")).sendKeys("demo123");         driver.findElement(By.id("wp-submit")).click();        }        public  static void launchBrowser(String bn) {         if(bn=="CH")         {         System.setProperty("webdriver.chrome.driver","E:\\Selenium Downloaded\\chrome\\chromedriver.exe");          ChromeDriver driver = new ChromeDriver();         driver.get("http://demosite.center/wordpress/wp-admin/plugins.php");         }   } }   i think driver is not being identified ? i have institiated webdriver =null , still it is showing null pointer exception  Exception in thread "main" java.lang.NullPointerException     at ArrayLiist.main(ArrayLiist.java:13)


Count the number of n-bit strings with an even number of zeros.

I am currently self-studying introductory combinatorics by reading Introduction to combinatorial mathematics. I am currently in the first chapter, and I have a question regarding one of the examples. The question was asking to count the number of n-bit strings with an even number of zeros. The answer is of course $2^{n-1}$. The author gave 2 solutions. I however didn't completely understand what I think is the straightforward one. The solution I got was that he took out 1 bit, leaving $(n-1)$ bits, if the number of zeros is even in the $(n-1)$-bit number, then he will just append a 1, if not then he will append a zero. So in the end we just needed to count the number of $(n-1)$-bit strings. The other solution (the straightforward one) that I didn't understand examined the symmetry that half of the $2^n$ must have an even number of zeros, and the other half will have an odd number of zeros. I just don't get why this property must hold. I can understand that half of the $2^n$ numbers will have even parity, but I can't see how it holds for the parity of the number of zero or one bits. If anyone can show me how that property holds, I'd be very grateful. I'd also be interested to see different explanations and proofs if possible.  Thank you.


Is there any reason to prefer [[ over [ in bash?

I used to think [ would spawn /usr/bin/test and [[ was a builtin, but apparently, it doesn't:  $ strace bash -c " [ -z "$FOO" ] && echo yes " 2>&1 | grep test   and  $ type [ [ is a shell builtin   [ is a shorter and seems more portable too. I'm on GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu).


Is it better to upgrade Canon 18-55mm IS kit lens to the 18-200mm, or complement with 55-250mm?

I currently have the Canon EOS 550D with the 18-55mm IS kit lens. I am primarily looking for greater telephoto reach, as I have found the 55mm length to be quite limiting at times. So, I was considering the  which would be a good general purpose replacement for the kit lens, versus the  that would give slightly greater telephoto reach while complementing the kit lens.  What are the pros & cons of each like optical quality, effort in changing lenses etc, considering the fact that the 18-200mm lens is almost 3x as expensive as the 55-250mm one?  Note that it's highly unlikely that I'll be printing photographs larger than A4 size.


Regular expression for parsing a phone number


If $f,g:(X,A)\to (Y,B)$ are homotopic functions under a homotopy $H:X\times [0,1]\to Y$ then $f_*=g_*:H_n(X,A)\to H_n(Y,B)$.

If $f,g:(X,A)\to (Y,B)$ are homotopic functions under a homotopy $H:X\times [0,1]\to Y$ such that $H(a,t)\in B$ for all $a\in A$ and $t\in [0,1]$, then $f_*=g_*:H_n(X,A)\to H_n(Y,B)$.   This question has already been posted here  and here  but I still have many doubts, I would like to know where we are using that $f,g:(X,A)\to (Y,B)$ are homotopic in .  I think it is enough to show that $f,g:X/A\to Y/B$ are homotopic, because in this case we already know that $f_*=g_*:H_n(X/A)\to H_n(Y/B)$ where $H_n(X/A)=H_n(X,A)$ and $H_n(Y/B)=H_n(Y,B)$. Now if $f,g:(X,A)\to (Y,B)$ are homotopic, how do I prove that $f,g:X/A\to Y/B$ are homotopic? Thank you.


Installing Ubuntu on a desktop from .iso downloaded to a Mac

I've downloaded the .iso file to my Mac but I cannot open it to generate files to save on a pendrive as a bootable source to a new Dell desktop PC. The PC doesn't boot. It is stuck. I need to reinstall Ubuntu OS.


Why did the Jedi believe the Sith had been extinct if they knew about the Rule of Two?

When Qui-Gon encounters Darth Maul and the Jedi realise he was a Sith, they are amazed, having believed that they had been extinct for a long time.  On the other hand, at the end of Episode I, Yoda says "always two there are, the master and the apprentice", so they knew about the Rule of Two.  How can this be explained?  EDIT (given the answers)  Let's list the things that happened, which apparently the Jedi were aware of:  1) 1000 years ago the Sith were almost wiped out (became "extinct")  2) 1000 years ago, because they were almost extinct, the Sith started existing through a single pair (master and apprentice)  Given these two facts, why are they surprised? Yes, the Sith were extinct for 1000 years as a civilisation, but there are always two !


Are $g_1$ and $g_2$ elements of $\langle g_1g_2\rangle$ when $g_1$ and $g_2$ commute and have co-prime orders?

Consider a finite group $G$. Let $g_1$ and $g_2$ two elements of $G$ that commute and have co-prime orders. Are $g_1$ and $g_2$ elements of $\langle g_1g_2\rangle$ ?


System.Exception: Too many SOQL queries: 101

I am getting a Too many SOQL queries: 101 error on a trigger when I am trying to deploy another trigger.  I am posting the trigger which is causing the error.  trigger rollupAccountShowings on Account (before insert, before update) {    if (trigger.isinsert) {       for (Account a:Trigger.new){           a.No_of_Viewings__c = 0;        }    } else {      for (account a : [select                   id,                  (select id from pb__Showings__r)                  from account                   where id in:trigger.new LIMIT 1]) {           trigger.newMap.get(a.id).No_of_Viewings__c = a.pb__Showings__r.size();      } }   Can anyone correct me where I have gone wrong and suggest me the changes.  Thanks


Differently from $e^x = ex$ or $e^x = x^2$, which can be easily solvable with the Lambert W function, I can't see how to approach $e^x = x^2 + 2$. Thanks.


How do I setup spamtraps with Postfix so clients that send to trapped addresses are prevented from sending me more spam?


Ubuntu- How do I change clock speed from terminal?

What command or program do I need to run in order to change the clock speed to a specific value I want? For example, I'm looking for something like <command name> 1.7, or something similar, to change the speed to a specified frequency in GHz or MHz. I would prefer a terminal application, but a desktop app would also suffice.  I am using Ubuntu 12.04 LTS.


creating a new vector layer from a part of the current one

I am using qgis 2.6 for the first time. As I was using 2.2 previously, it was easy for me to create a new vector layer from a part of the current layer with the help of option "save selection as a new vector layer" from Layer menu. But I don't seem to find this in qgis 2.6.


Children's book about child on failing generation starship saved by Cygnus The Swan?

In the late 1970s I bought a book at a school book fair (likely published by Scholastic) about a young boy who lived on a generational starship.  The ship was failing.  I remember some bit about an icey cold airlock.  One of the constellations (Cygnus) somehow took on actual fleshy form and manifested as a talking swan, which somehow helped the starships reach their destination.  Pointers?


How to find the Big-O complexity and worst case running time of this Java program?

I am having trouble understanding Big-O notation. How do I find the Big-O and worst case running time of this function?  I wrote this function to reverse the order of a doubly linked list.  public void reverse() {     Node<T> temp = head;     Node<T> current = head.next;     head.next = null;     head.previous = current;      while(current != null)     {         Node<T> next = current.next;         current.next = temp;         current.previous= next;         temp = current;         current = next;     }     head = tail; }


Travel to US two day before B1 visa expires

I have a B1 visa which is expire in next 5-10 days and need to travel to US for an urgent assignment. Can I travel just before 2-3 days of my visa expires. Will immigration officer give me I 94 more more than my VISA expiry date. Any Idea?


Integrating factor $1/T$ in 2nd Law of Thermodynamics

How would you prove that $1/T$ is the most suitable integrating factor to transform $\delta Q$ to an exact differential in the second law of thermodynamics: $$dS = \frac{\delta Q}{T}$$  Where $dS$ is the change in entropy, $\delta Q$ is the change in heat energy, and $T$ is the equilibrium temperature.


Creating a GPA Report with Java (eclipse)

I am currently trying to create a program that will ask user for number of classes the user is enrolled in, make an array to store that data, and then ultimately display all that information in a print statement. I am not worried about the final print statement but I just cant seem to make the array work. There are no errors in the program but once it asks me to input class number, It returns "Exception in thread "main" java.lang.NullPointerException     at GPAreport.main(GPAreport.java:24)"  Heres the code:   import java.util.*; public class GPAreport { public static void main (String [] args) {  int classnumber[] = null;  double gpa[]; String ClassDescription[] = null; Scanner myScanner = new Scanner(System.in);  String LetterGrade = ""; double GradePoints = 0; double PercentageGrade = 0; String currentterm, studentname = ""; int numberofclasses;  System.out.println("Please enter the current term (ex: fall 2011):"); currentterm = myScanner.nextLine(); System.out.println("Please enter Student Name:"); studentname = myScanner.nextLine(); System.out.println("Please enter number of classes:"); numberofclasses = myScanner.nextInt();  for(int i = 0; i <= numberofclasses ; i++){      System.out.println("Input Class Number: " + (i+1));     classnumber[i] = myScanner.nextInt();     System.out.println("Input class description: " + (i+1));     ClassDescription[i] = myScanner.nextLine();     System.out.println("Input percentile grade for: " + classnumber[i]);     PercentageGrade = myScanner.nextDouble();          if ((PercentageGrade < 100) && (PercentageGrade >= 93 )){         LetterGrade = "A";         GradePoints = 4.0;              }         else if ((PercentageGrade > 100)){          LetterGrade = "A+";         GradePoints = 4.0;             }         else if ((PercentageGrade < 93) && (PercentageGrade >= 90 )){          LetterGrade = "A-";         GradePoints = 4.0;             }         else if ((PercentageGrade < 90) && (PercentageGrade >= 83 )){          LetterGrade = "B";         GradePoints = 3.0;             }         else if ((PercentageGrade < 83) && (PercentageGrade >= 80 )){          LetterGrade = "B-";         GradePoints = 3.0;             }         else if ((PercentageGrade < 80) && (PercentageGrade >= 73 )){          LetterGrade = "C";         GradePoints = 2.0;             }         else if ((PercentageGrade < 73) && (PercentageGrade >= 70 )){          LetterGrade = "C-";         GradePoints = 2.0;             }         else if ((PercentageGrade < 70) && (PercentageGrade >= 63 )){          LetterGrade = "D";         GradePoints = 1.0;             }         else if ((PercentageGrade < 63) && (PercentageGrade >= 60 )){          LetterGrade = "D-";         GradePoints = 1.0;             }         else if ((PercentageGrade < 60) && (PercentageGrade >= 0)){          LetterGrade = "F";         GradePoints = 0;             }         else if (PercentageGrade < 0){          System.out.println("That is not a valid score. Please try again");             }  }   }  }


Usage of "to" before verbs after "let me"

I'm actually writing a scientific article, and my professor is correcting all my (numerous) grammar errors.  One in particular is bugging me. In my article I wrote     "[object] that lets us introduce [object]"   and was corrected into     "[object] that lets us  to introduce [object]"   My form is totally wrong? Or are they both correct? And why?    As  shows, the base rule imposes to not use the "to". My question here is a bit more specific.  Is the expression used above indicated/correct for a formal/scientific document?


Let the group $G \subset S_7$, $|G|=8$. Show that there exists $i\in{1,...7}$ such that for all $f\in G,f(i)=i$.  I have attempted this problem, but I am not entirely sure if my thinking is correct. Using orbit stabilizer theorem, I write $|G|=|orb_G(i)||stab_G(i)|$, and since $|G|=8, $ then $|stab_G(i)|$ is equal to either $1,2,4,8$ and $|orb_G(i)|$ equal to $8,4,2,1$ respectively. Now, when the order of the orbit is 8 and stabilizer 1, can I conclude that there exists a function that maps $i$ to $i$?  Any help would be appreciated!


Unlock votes if post is edited during the grace period

I downvoted an answer 17 seconds after it was posted, and left. I came back 17 minutes later (what a coincidence) and the post had been edited, but the system didn't let me undo my vote. I believe it was because the edits took place during the grace period and weren't registered. Is that so? I wish I were able to remove my downvote.


rational number solutions to $\frac{a}{a^2+1} + \frac{b}{b^2+1} = \frac{c}{c^2+1}$ with $abc\ne 0$

This question concerns the equation $$\frac{a}{a^2+1} + \frac{b}{b^2+1} = \frac{c}{c^2+1}$$ and the possibility of rational number solutions with $abc \ne 0$.  In comments arising from:  It is mentioned that this equation has an infinite number of such solutions.  How can we determine that there are an infinite number of such solutions?  And is there a way to generate these solutions (or at least find a few of them)?


How to disable TouchWiz Easy Home mode and enable TouchWiz Home?

I've accidentally enabled TouchWiz Easy Home on my Samsung Galaxy SIII Neo (Android KitKat 4.4.2). Now I'm not sure how to get rid of it and get back to TouchWiz Home. I've tried rebooting the phone but I don't see an option. How do I switch?


Transforming multiple rows into a single row


What happens if I boot a low-latency kernel?

I am very interested in what low latency mode is. It appears in the "Advanced Options" of the GRUB menu. Does anyone have any insight?


One-hot vs dummy encoding in Scikit-learn

There are two different ways to encoding categorical variables. Say, one categorical variable has n values.  converts it into n variables, while  converts it into n-1 variables. If we have k categorical variables, each of which has n values. One hot encoding ends up with kn variables, while dummy encoding ends up with kn-k variables.  I hear that for one-hot encoding, intercept can lead to collinearity problem, which makes the model not sound. Someone call it "".  My questions:   Scikit-learn's linear regression model allows users to disable intercept. So for one-hot encoding, should I always set fit_intercept=False? For dummy encoding, fit_intercept should always be set to True? I do not see any "warning" on the website. Since one-hot encoding generates more variables, does it have more degree of freedom than dummy encoding?


I have a Latitude 5480 which came pre-installed with Windows 10. I have installed Xubuntu 16.04 myself but failed to make some of the drivers work correctly. I would like to try the dedicated, pre-installed Ubuntu image that comes with this laptop. The problem is I cant find this image anywhere.  only states that the hardware is supported, but doesn't provide any download link.   I would appreciate all help regarding this matter.


i have 32 bit ubuntu 12.04 on an offline computer. I can access the internet using a different windows 7 computer and i have a memory key. How do i install vlc on my offline ubuntu computer?


Is there a website with historical temperatures and weather data?

I am interested in hiking this fall in France and camping along the way. In order to figure what gear I need to pack to camp (particularly for the sleeping bag), I would like to know what temperatures to expect.  I am interested in historical temperatures to figure the usual temperature and I might look at them for other seasons. If that matters, I am thinking about hiking in the Pays Basque (South West of France), the mountainous part.  Where (ideally online and for free) can I find such data? Are there resources that cover Europe, or even the whole world?


For the creation of an oracle package I can use the following two headers:   CREATE OR REPLACE PACKAGE IS ... CREATE OR REPLACE PACKAGE AS ...   When do I use which header and what are the differences


Traveling to Japan from the USA avoiding air travel?

This may be a bit of an odd question, but is it possible to make it to Japan without using an airplane. I have an inner ear disease and the last time I flew, it literally left me incapacitated for a week. My doctor said it's just not a good idea to take a chance. I want to visit Japan and possibly move there, however I cannot fly.   Does anyone on here know of ways around this? I have done some googling, but they all seem to be "Stupid" answers like "Sneak into a shipping container". I could easily go by way of boat or ship, but the only things I've seen are private charter and cost upwards of $20,000 to rent them.   I know this is a unique situation, but I'm going to possibly get a job there so I need a method other than flight to get back and forth from the states.  Thanks ahead of time for any suggestions.


In MySQL version 8.0.19 how to split string into columns as some older functions are not available like character index(), string_split()

I have one row that I would like to split into columns for example column name is Code with the row showing 01,04,07 for product items. I want to split up the product items into columns. Any suggestions would be helpful as I have tried the older functions but realized the SQL version I am working on does not have those options such as string_split and character index. I used instr() and substring() but a buyer may purchase more or less items than shown above.


$\forall \alpha \in [0,1] \exists B_{\alpha} \in \mathcal B(\Bbb R): \Bbb P(B_{\alpha}) = \alpha$

Let $\Bbb P$ be a probability measure on $\Bbb R$ with $\Bbb P(\{x\}) = 0$ for all $x \in \Bbb R$. I want to show that for all $\alpha \in [0,1]$ there exists a $B_{\alpha} \in \mathcal B(\Bbb R)$ such that $\Bbb P(B_{\alpha}) = \alpha$.  My approach is to take an interval $I_m = [-m,m]$ (let's assume $\Bbb P([-m,m]) > \alpha$) and construct a sequence of subintervals $[-m + q_k, m - q'_k]$ with $(q_k,q'_k) \in \Bbb Q_+^2$ such that $[-m + q_k, m - q'_k] \supseteq [-m + q_{k+1}, m - q'_{k+1}]$ and $\Bbb P ([-m + q_k, m - q'_k]) \ge \alpha $ for all $k \in \Bbb N$. Then my idea was to use the continuity from above of the measure but I'm not sure whether this sequence indeed converges to a set with measure $\alpha$.


I am not sure if this is the case, but when you do iCloud Backup of your phone, it will backup Whatsapp. ( I am unsure if this include the Photos and Video )   Then Whatsapp itself has backup option to backup itself in iCloud Drive Backup.   Is that a double Backup? Because i see 2.1GB inside the iCloud Backup, and then 1.7Gb inside document and settings.


How to add syntax highlighting for new language

Is there already a standard way for introducing syntax highlighting for a language (and tag) that did not previously have it?  I would like to have syntax highlighting for the  tag, since code is sometimes hard to read without it.


Is there a short proof for the 2-sphere being connected? I only saw proof for the n-sphere but that is more complex than I need it to be.


I'm having problems signing into my account. I know my user name but not my password and I can't recover it because I don't have the phone number that's on the account. What can I do about this?


How to compute $P(X>Y)$ if $X$ and $Y$ are independent and exponentially distributed

$X$ and $Y$ are independent and exponentially ditributed with parameters $a,b$, respectively. Calculate $P(X>Y)$  1)$P(X>Y)=1-F_{X-Y}(0)$. Then I try to calculate density  of $X-Y$ from characteristic functions but I cannot deduce distribution of $X-Y$ from this.  2)ok I can also calculate density of $Z=X-Y$ from transformation of RV formula and then marginalize  3) Is there any simpler way to calculate $P(X>Y)$ than 2)?


Sorting citations using \cites command in biblatex

I am using biblatex for citations and bibliography. Now I often have lists of multiple citations, for which biblatex has the \cites command. Now I can get citations to automatically sort if I don't want page numbers, but I cannot get it right with page numbers.  What I want is all citation ordered chronological (oldest first). Is this possible, or must I just do this by hand?  Here is an example.  \documentclass[11pt,oneside]{memoir}  \usepackage[     style=authortitle,     useprefix=false,     maxnames=2,     firstinits=true,     sortcites=true,     uniquename=init,     abbreviate=true,     backend=biber,     sorting=ynt ]{biblatex}  \begin{filecontents}{jobname.bib} @book{tom1,   author = {Author, A.},   year = {2001},   title = {This book is from 2001},   shorttitle = {2001}, } @book{tom2,   author = {Author, A.},   year = {1999},   title = {This book is from 1999},   shorttitle = {1999}, } \end{filecontents}  \addbibresource{jobname.bib}   \begin{document} This one is corrent.\footnote{\Cites{tom1,tom2}.} This one is corrent.\footnote{\Cite{tom1,tom2}.}   This one is incorrent.\footnote{\Cites{tom1}{tom2}.} This one is incorrent.\footnote{\Cites[1]{tom1}[12]{tom2}.} \end{document}


How can I check memory usage of an object in java

UPDATE  I tried the answer of         but when I tried the code below, it gave me 16 for below code   public class MemoryTest {      public static void main(String[] args) {         System.out.println(ObjectSizeFetcher.getObjectSize(new ArrayList<>().add(new DummyObject())));     } }   and 16 is not what I am looking for, so I asked this question again.  Is this question still duplicated question?    I want to check the memory usage of an object, and here is what I tried.  (java 8)  // Dummy Object class public class DummyObject {     int dummy; }  // Separate class to check memory public class MemoryTest {     public static void main(String[] args) {         Runtime runtime = Runtime.getRuntime();          long before = runtime.totalMemory() - runtime.freeMemory();         DummyObject obj = new DummyObject();         long after = runtime.totalMemory() - runtime.freeMemory();          System.out.println(after - before);     } }   and result is "0"   Can anyone tell me 1. why result is 0 2. what is the proper way of measuring memory usage of an object  thanks in advance     UPDATE  When I tried the same code in Android project as below, (SDK version 23)  public class MainActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);          Runtime runtime = Runtime.getRuntime();          long before = runtime.totalMemory() - runtime.freeMemory();         DummyObject obj = new DummyObject();         long after = runtime.totalMemory() - runtime.freeMemory();          System.out.println("test memory: " + (after - before));     } }   the result was "680"  What makes this difference and why?


Iterative functional equation $f \circ f = f$

I tried but failed to find some references about the following iterative functional equation: find all functions $f \colon \mathbb{R} \to \mathbb{R}$ such that $f \circ f = f$, that is $f(f(x))=f(x)$ for all real numbers $x$.  There are some obvious continuous solutions: the constant functions, $f(x)=x$, $f(x) = \pm \vert x \vert$.  There are also very pathological solutions. If $(e_i)_{i \in I}$ is a Hamel basis of $\mathbb{R}$ seen as a $\mathbb Q$-vector space with $e_{i_0}=1$ for a given $i_0 \in I$, then the projection onto $\mathbb Qe_{i_0}$ is a nowhere continuous solution.   I would be very interested if there is a characterization of all continuous solutions, and eventually with "weaker" conditions (monotony, continuity just at one point, etc).  Any help would be appreciated, thanks !


The Python Virtual Machine is different for different Operating Systems, but the bytecode is portable. I mean, why was the bytecode designed in the first place? Wouldn't Python be much faster if its code ran directly on a native machine?


In my PhD, i have 2 chapters published in book chapters published by springer and elsavir. To what extent do you think the importantance of book chapters regarding in the PhD student CV? Does these chapters have a good impact when applying for faculty positions ?  Hint: i have other journal and conference papers.


Given a matrix $A \in R^{n \times n}$ which is normal ($AA^H=A^HA$ where $A^H$ is hermitian of $A$) and nilpotent ($A^k=0$ for some $k$). Now we need to show that $A=0$. (This is essentially exercise 5(b) in sec. 80 on p.162 of Paul R. Halmos' Finite-Dimensional Vector Spaces.) I tried to show in the following way, we know that, $AA^H=A^HA$ pre-multiply by $A^{k-1}\implies A^kA^H=A^{k-1}A^HA$ Now, we have $0 = A^{k-1}A^HA$, since $A$ nilpotent. I am not sure how to proceed from here to show $A=0$. Can someone help me in this problem?


Completely buffer command output before piping to another command?

Is there a way to only execute a command after another is done without a temp file? I have one longer running command and another command that formats the output and sends it to a HTTP server using curl. If i just execute commandA | commandB, commandB will start curl, connect to the server and start sending data. Because commandAtakes so long, the HTTP server will timeout. I can do what I want with commandA > /tmp/file && commandB </tmp/file && rm -f /tmp/file  Out of curiosity I want to know if there is a way to do it without the temp file. I tried mbuffer -m 20M -q -P 100 but the curl process is still started right at the beginning. Mbuffer waits just until commandAis done with actually sending the data. (The data itself is just a few hundred kb at max)


What is the "maximum" temperature for my GPU

I have . I want to overclock, but I don't know what the maximum temperature is.


How many words with $N$-characters can be formed from the numbers $\{0, 1, 2\}$, such that adjacent numbers have maximum difference 1?

How many words with $N$-characters can be formed from the numbers   $\{0, 1, 2\}$, such that adjacent numbers have maximum difference $1$?   Example: For $N = 2$ there are $7$ words that can be formed: $<0,0>;<0,1>;<1,0>; <1,1>; <1,2>; <2,1>; <2,2>$. The $<>$ notation specifies a   single word. If $N = 10$, how many words can be formed?   a. 8119   b. 8121   c. 8123   d. 8125   e. 8127    I have tried to answer this problem by counting all possible words, then subtracting those words that violate the rules, but I found the answer isn't one of the choices.   $<a, b, c, d, e, f, g, h, i, j>$    All combination is $3^{10} = 59049$ when the difference is more than $1$ then the only possibility is that the word contains a $0$ and a $2$ that are adjacent to each other.    Please help me THANK YOU!


I was looking at flights out of Baltimore (BWI) to different places; France, Spain, etc. then on one of the bundle sites, it showed the same flight out of Boston (BOS) for less than half the price.   From Baltimore to Paris one month from now is $1200 but from Boston, it's only $448.  I check Philadelphia and other local airports but none were close.  Why are flights out of Boston cheaper?


Safety of installing Ubuntu alongside Windows

Is it really safe to choose the "Install Ubuntu alongside Windows" option from the Ubuntu installation program?  I never used that option, instead I used other tools such as partition magic or windows 7's disk tool to resize my partitions.  Since I'm going to install Ubuntu across a lot windows (XP, Vista and 7) machines. It would not be nice to damage those Windows partitions.  What is your experience? Can I use this feature without concerns?


jQuery: Appeding tr to table tbody prevents tr click functions

After executing a query, a table row is added, good, it gives the user the option to delete that row with a Delete button, here is when things start to get fussy, any function related to the appended tr just won't work,even when I changed the button.click to a whole tr, it deletes the headers tr and every other table tr except for the appended ones!  Just to clarify, the table is inside a form that is not #codbar  $('#codbar').submit(function(e)     {         e.preventDefault();         $.ajax(         {             url: "/GoogleStore/ajax/venta.php",             data: {'iditem': $('#id-item').val()},             dataType: "json",             type: "GET",             success: function (data, status, jqXhr)             {                 var i = 0;                 var end = parseInt($('input[name = "contador"]').val());                 for(i = 0; i <= end; i++)                 {                     if($('input[name = "cod'+i+'"]').length && $('input[name = "cod'+i+'"]').val() == data["Cod"])                     {                         $('input[name = "cant'+i+'"]').val(parseInt($('input[name = "cant'+i+'"]').val()) + 1);                         $('span[name = "total'+i+'"]').text(parseFloat($('input[name = "cant'+i+'"]').val()) * parseFloat($('input[name = "precio'+i+'"]').val()));                         i = end;                     }                     else if(i == end)                     {                         $('input[name = "contador"]').val();                         $('table[name = "venta"]').find('tbody').append($('
'+data["Prod"]+'	<input type="hidden" name="cod'+i+'" value="'+data["Cod"]+'">'+data["Cod"]+'	<input type="text" name="cant'+i+'" value="1">	<input type="hidden" name="precio'+i+'" value="'+data["Precio"]+'">'+data["Precio"]+'	'+data["Precio"]+'	<input type="button" class="red" name="DeleteRow" value="Eliminar">
'));                         $('input[name = "contador"]').val(end + 1);                     }                 }             },             error: function (jqXhr, textStatus, errorThrown)             {                 console.log("Error response:", jqXhr.responseText);             }         });     });      $("input[name = 'DeleteRow']").click(function()     {         alert('');         $(this).closest('tr').fadeOut('slow', function()         {             $(this).closest('tr').remove();         });     });


Why are two radicals set at different heights?

In typesetting the following in a,  \sqrt[n]{a \cdot b} = \sqrt[n]{a} \cdot \sqrt[n]{b}   … the second radical is being typeset higher than the first:    Why? And how can I fix it?     MWE:  \documentclass[12pt]{article}  \begin{document}  \begin{displaymath} \sqrt[n]{a \cdot b} = \sqrt[n]{a} \cdot \sqrt[n]{b} \end{displaymath}  \end{document}


I installed OpenStack and then I shutdown the laptop. After turning on the laptop again I can't enter the programmer.  How can I save my work in Ubuntu?


In a sentence taken from the Oxford Dictionary:     ‘The inscription on his tombstone in Groombridge Church, where he is buried alongside his three children, bears his original name and no reference to his nom de plume.’   Is ‘buried’ an adjective, a , or a   because it follows the copular verb is?      Predicate nominatives complete only linking verbs. The linking verbs include the following: the helping verbs is: am, are, was, were, be, being, and been; the sense verbs: look, taste, smell, feel, and sound; and verbs like become, seem, appear, grow, continue, stay, and turn.   Or is it a past participle because the clause is in the passive voice?   Does “he is buried” mean currently his body lies in a coffin covered with soil, or  does it mean he has been buried by someone?  If we say ‘he was buried’ it clearly refers to an event that happened and ended sometime in the past. It might even suggest that the burial ground has since been changed.


Version 2:Help finding the probability that $Ax^2 + Bx + C$ has real roots?

Suppose that $A, B,$ and $C$ are independent random variables, each being uniformly distributed over $(0,1)$. What is the probability that $AX^2 + BX + C$ has real roots?  I am given a hint that if $X$ ~ uniform $(0, 1)$, then $-\ln(X)$ is exponential. The sum of two (or more) independent exponential random variables is gamma...  How does this hint help answer this question?  Thanks a lot


I wanted to install some software on Ubuntu, but first I wanted to update packages, and I received this : sudo apt-get update Ign:1 http://ro.archive.ubuntu.com/ubuntu eoan InRelease Ign:2 http://ro.archive.ubuntu.com/ubuntu eoan-updates InRelease                                        Ign:3 http://ro.archive.ubuntu.com/ubuntu eoan-backports InRelease                                      Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu eoan InRelease              Err:5 http://ro.archive.ubuntu.com/ubuntu eoan Release                                            404  Not Found [IP: 91.209.189.249 80] Err:6 http://ro.archive.ubuntu.com/ubuntu eoan-updates Release                                    404  Not Found [IP: 91.209.189.249 80] Ign:7 http://security.ubuntu.com/ubuntu eoan-security InRelease                                 Hit:8 http://ppa.launchpad.net/phpmyadmin/ppa/ubuntu eoan InRelease                             Err:9 http://ro.archive.ubuntu.com/ubuntu eoan-backports Release                                  404  Not Found [IP: 91.209.189.249 80] Err:10 http://security.ubuntu.com/ubuntu eoan-security Release   404  Not Found [IP: 91.189.88.152 80] Reading package lists... Done E: The repository 'http://ro.archive.ubuntu.com/ubuntu eoan Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ro.archive.ubuntu.com/ubuntu eoan-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ro.archive.ubuntu.com/ubuntu eoan-backports Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://security.ubuntu.com/ubuntu eoan-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details   I don't know exactly what's happening , since I never had problems before. Can you please help me make this work ? I have Ubuntu 19 version : No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 19.10 Release:    19.10 Codename:   eoan


Match lines between two patters using sed just once

Given: sed -e '/pattern1/,/pattern2/!d' file.org  How can I match the first occurrence of the lines between pattern1 and pattern2, but not the rest?  For example:  pattern1 aaaa pattern2 pattern1 bbb pattern   should output: aaa  Alternatives solutions (using grep, awk or whatever) are welcomed.


What does 5' and 3' mean in DNA and RNA strands?

What are 5' and 3' in DNA and RNA strands? Please clarify with some images and please use simple English.


Why intuitively does $\mathbb E(\frac d {d\theta}\log p_\theta(x))=0$?

Let $p_\theta(x)$ be the probability density function of $x$. Then obviously, $\frac d{d\theta}\mathbb E(1)=0$. But note that $\mathbb E(1)=\int p_\theta(x)dx$, so that $\frac d{d\theta}\mathbb E(1)=\int p_\theta(x)\frac d{d\theta}\log p_\theta(x)dx=\mathbb E\left (\frac d{d\theta}\log p_\theta(x)\right)=0$.  Is there an intuitive explanation for why this final equation is true?


how to prevent /usr/lib/apt/methods/http from consuming internet quota on startup?

it is from apt package  it isnt directly called as a dbus service: egrep "http" /usr/share/dbus-1/services/* -i  "software & upudates" options are like - check? NEVER - security upd? display imediately *1 - other upd? every 2 weeks *2 - new ubu version? NEVER    I think it is *1 and *2 looking for updates, but I want to do that manually and not when I need that little quota (about 8MB) that consumes about 10% of my daily quota!  couldn't find the answer here:   obs.: after login, rarely when I wait a few minutes before connecting, it wont be activated and wont consume some of the daily quota


This is written in the beginning of "LOTR: Fellowship of The Ring" novel.   Tolkien invented many languages. But It doesn't match with any languages I have seen on internet. Can anyone tell me which language of Tolkien is it? Also can anybody give me a link to all of Tolkien's languages?


migration tool deploys all not just changes

When I use a SF:deploy it deploys all the code in the src folder not just the files that have been changed.   How can I make it so that it only deploys the files that have changed?


How to teach a course or courses that I have not formally taken myself?

I am currently a postdoc. My PhD research has been using Finite element method for additive manufacturing simulations. I come from materials engineering background and I don't have any formal education on continuum mechanics or finite element method. I had taken some advanced courses on mechanics. But, they did not cover anything related to finite element analysis or continuum mechanics. My self study on these topics are neither structured or formalized. I read books, online videos, tried some coding and concentrated on portions applicable for my research. I have forgotten most of the theory part. As a result, I know how to model my problem statement, publish papers and develop new problem statements. But I know nothing many topics that is covered in an actual finite element course. Also, I did not do many example problems or coded my own programs (just 1d or 2d case). Now, if I get an opportunity to teach students on the theoretical aspects of the finite element, how can I be confident that I can do a good job? I have very limited teaching experience and I have taught only materials engineering courses. Please advise.


Is there a technical reason why there aren’t any basic USB Type-C to USB Type-C multiport hubs?

Not asking for shopping advice, but simply to ask that after spending more time searching for this kind of thing than I expected, it seems the main type of USB Type-C hubs out there translate/convert a USB Type-C connection into multiple USB A female ports.  This makes sense given the overall popularity and prevalence of USB A cables and devices out there currently. But it would seem to me there should be at least some basic USB Type-C to multiple USB Type-C hubs out there. But I can’t find any.  And by USB hub I mean just a hub: I don’t mean one of these dongles that is a veritable “Swiss Army” knife of too many connections—like DVI, USB ports, Ethernet and maybe even an SD card port—but a basic port multiplier.  FWIW, I am asking this because I have a MacBook Air (2018) and for all intents and purposes I don’t need USB A type connections for much of my daily uses. But having at least 1 to 2 more USB Type-C ports would be helpful in some cases.  So is there some kind of host/guest limitation to the USB Type-C spec that prevents this or is it simply a supply and demand sort of thing?


In my undergraduate mechanics class, we just finished the section on coupled oscillators where we use eigenvalues to find solutions to the differential equations describing the motion of our spring mass system. When we finished, one of my fellow students started going on a rant about how he "knew the determinant had a physical meaning," and he went on to talk about how frustrated he was with his differential equations professor who said that the determinant was just an operation and only had physical meaning when it was given one (ie- showing the system is linearly independent by setting the determinant to $0$). I sided with the professor, but I wasn't sure how to explain it to my classmate.   What do you guys think?


I would like to center the checkbox in a line with text next to it.                                      I've tried already style="text-align: center;" in
 but it doesn't work.    input {   font-size: 16px; }  label {   font-size: 11px;   vertical-align: middle; }  form {   margin-top: 30px;   display: flex;   justify-content: center;   align-items: center;   flex-direction: column; }  input[type="checkbox"] {   width: 15px;   height: 15px;   -webkit-appearance: none;   background: white;   outline: none;   border: none;   border-radius: 50%;   transition: .5s;   box-shadow: inset 0 0 5px rgba(0, 0, 0, .2) }  input:checked[type="checkbox"] {   background-color: transparent; } <form class="form-box__form form">   <input type="e-mail" name="e-mail" id="e-mail" placeholder="e-mail" />   <input type="password" name="password" id="password" placeholder="password" />   <button>Create account</button>
     <input type="checkbox" name="consent" id="consent" />     I agree to whatever you want me to agree
 </form>     At the moment it looks like this in the attached picture. So can someone please guide me on how to center the checkbox in a line?


How can I implement a button that copies the text displayed on to clipboard with a simple method? I'm having a mental block.

                     www.testexample.com

                     <button className="iconHolder">                                          <FiCopy />                     Copy                     </button>


How can I wrap text around a bottom-right div?

Every time I try to do something seemingly-simple in CSS, it doesn't work.  I have a content div that contains a 460x160 image. All I want to do is position the image at the bottom-right corner and wrap my text around it.
          text text text text text text ...
   So I want it to look like:  ------------------ | text text text | | text text text | | text text -----| | text text |    | ------------------   Doing it with a top-left or top-right image is cake:  #contents img { float:right; }  ------------------ | text text |    | | text text -----| | text text text | | text text text | ------------------   Now how do I push that to the bottom? The best I've come up with so far are:  #contents img { float:right; margin-top: 90%} // really needs to be 100%-160px  ------------------ | text text      | | text text      | | text text -----| | text text |    | ------------------   In this case the text does not print in the margin, so there is white space above the image.  #contents { position:relative; } #contents img { position:absolute; right:0; bottom:0; }  -or-  // move the img tag under the text in the html and: #contents img { float:right; margin-top:-160; }  ------------------ | text text text | | text text text | | text text -----| | text text | te | ------------------   In this case the text prints over or under the image.  So... how can I accomplish this?


Are the units of the quotient ring $\mathbb{F}_2[x]/\langle x^k+1 \rangle$ known in general, where $\mathbb{F}_2$ is the finite field with two elements? I'm specifically interested in the case where $k$ is divisible by two, such as say $k=8$, or $k=12$.  If so, can they be constructed easily? I'd be grateful if you could provide a few examples.


Looking out into the universe means looking back in time - how does that work?

This is a question that has been gnawing on me for many years now. Back a long time ago, as I recall in reference to a scene in a popular science show on TV, I was asked the following.  The claim is that when you look out into the universe, you see the universe as it appeared at some past time. (This follows from the speed of light being finite, and looking at objects by observing their emitted light or other EM radiation.) The amount of time that one looks backwards is equal to the distance to the observed object in light-distance (so looking at something ten lightyears away means you are observing it as it was ten years ago).  Matter moves at a rate of speed less than the speed of light (it has to, since matter has mass, even if miniscule at the atomic level). So $v_{mass} \lt v_{EM}$ (probably significantly less, since $v_{EM} = c$).  So let's say you're looking at an object $10^{10}$ lightyears away by observing something for which $v=c$. To the observer, that object appears as it was $10^{10}$ years ago. But the Earth is much younger than $10^{10}$ years and we established that matter moves at a slower speed than EM radiation, so wouldn't the radiation that was emitted $10^{10}$ years ago long since have passed Earth's current position?  If, say, $v_{mass} = 0.5 \times c$ (a big assumption, but bear with me for a second), it would seem that the radiation emitted $10^{10}$ years ago would have passed Earth's current position $10^{10} - (0.5 \times 10^{10}) = 5 \times 10^{9}$ years ago, around the time when the solar system was still forming. Setting $v_{mass} = 0.25 \times c$ (which seems more realistic) means the radiation would have passed "us" around $7.5 \times 10^{9}$ years ago. So how could we be observing it now?  I'm not sure I'm posing this question in the best possible way (I'll admit I do find the concept somewhat confusing), and I'm sure that there's a simple explanation for it all. Just what am I missing?  I did find  which seems peripherally related but not quite the same thing. Qmechanic brought up  but that question seems to be about whether it is so, not why it is so.


How can I change the default folder location that nautilus opens?

The default is that clicking on the folder in the unity dock opens the home directory.   Since there are shortcuts for all the sub-folders of the home directory in the sidebar already, I'd prefer the default directory to move to a different location (~/Documents).  How can I achieve this?


Major visual issue with cycles rendering

Im rendering a scene using cycles which looks absolutely perfect when rendering in view port mode as you can see in the first image  But when I finally render it, it looks like this I'm using 2.79 and i tried it on 2.78 with the same result. any help is appreciated.comment below if you need more information


square things in statistics- generalized rationale

Why do you square things in stats? I have run across this a lot, in both data mining and statistics classes, but no one has ever been able to give me an answer. One specific example is when summing the deviation scores in statistics you have to square them (otherwise the sum is 0). Why do you square them rather then using something else, like absolute value.   Difference between prior question: If you have an answer for the problem above, does your answer apply to most statistics stuff that does this? If not, why not.


What is the difference between "dentry" and "inode table" in Linux FS?

Are dentries and inode table same thing? If not what is the purpose of each and where are they stored? How does the filesystem exactly work specifically "ext4" or "xfs"?


How to understand the definition of empirical distribution function

I am reading the , by Larry Wasserman. At page 12, he defines the empirical distribution function as:  The empirical distribution function $\hat{F_n}$ is the CDF that puts mass $\frac{1}{n}$ at each data point $X_i$. Formally,  $$\hat{F_n}(x)=\frac{1}{n}\sum^{n}_{i=1}I(X_i\le x)$$  where   $$I(X_i\le x)=\left\{\begin{matrix}  1& if\ X_i \le x\\  0 & if \ X_i>x \end{matrix}\right.$$  My questions are:   Why is $\frac{1}{n}$ called mass? The CDF puts mass $\frac{1}{n}$ to each data point $X_i$, then, by my understanding, it should be $\frac{1}{n}X_1+\frac{1}{n}X_2+...+\frac{1}{n}X_n$.    Why is it $\hat{F_n}(x)=\frac{1}{n}\sum^{n}_{i=1}I(X_i\le x)$? I think this formula puts mass $\frac{1}{n}$ on each indicator function $I(X_i \le x)$ but not $X_i$.  What is the meaning of "puts" something "at each data point"?


Why does my float of 999999999 become 10000000000?

When I perform the following code, it has a problem:  float number = 999999999; printf("%lf", number);   The result is 10000000000 instead of 999999999.  Why isn't it 999999999?


Java: Exception in thread "main" java.lang.NullPointerException for "edgeList.next"

I know this question is answered all over the internet, especially here on StackOverflow, but I think I need a more specific answer for my case.  undirectedEdge temp = edgeList.next;   The line above is getting me this error for some reason. The "next" must be null, or something? Here is the top of my undirectedEdge class:  public class undirectedEdge { public int Ni; public int Nj; public int edgeCost; public undirectedEdge next;  public undirectedEdge(int i, int j, int cost) {     Ni = i;     Nj = j;     edgeCost = cost;     next = null; }  public undirectedEdge getNext() { return next; } . . . }   I hope I supplied enough info. Please let me know if I should include some other code. TIA!


Should I use $ or \( for inline math mode?

My friends told me that the sophisticated way to use display math in LaTeX is \[ instead of $$. Reading about the issue here on tex.stackexchange and in the l2tabu, it seems like the consensus reason why is that $$ is a TeX primitive, and thus deprecated at least since 1994 (the year I was born) with the release of LaTeX2e. Meanwhile, \[ is part of LaTeX, not TeX, so using it doesn't muck around too much in the source, it's easier to detect errors when using it, the vertical spacing is better, and it works really well with the amsmath package. (Although it does have the slight disadvantage that it is not supported by MathJax.)  My question: To what extent does all of this reasoning carry over to the decision to use either $ or \( for inline math?  The single dollar sign $ is also a TeX primitive, so seemingly it should also be deprecated for the same reason the double dollar sign $$ is.   supports the position that \( should be used instead of $, in spite of the author of l2tabu's assertion to the contrary.  However,  only mentions facilitating error correction and detection as an advantage of \( over $.  Who is right?


12 weeks in America - What questions should I prepare for?

So, to put it simply I'm going to America for 12 weeks and staying with a friend and her parents the entire time. They've already agreed to feed me and pay for all my basic needs if necessary.  I've brought travel insurance for the time I'm there as well.  SO my question is, what questions and the likes should I prepare for?  I don't have a job since I'm starting college this September. So the whole purpose of this trip is to spend the summer in America since I'll be too busy for any long trips when I'm in college.  I don't plan on lying to the officer, but I do want to be prepared to let them know that this is purely a long vacation since when I'm a student I won't have the funds or time to do something like this till I'm finished.  Funds - Since I'm staying for so long I'm unsure of how much money they'll expect me to have? I'm not paying for housing since I'm staying with my friend and the food I do buy will be restaurant stuff since obviously they'll have food in the house. I plan on having at least $200 upon entering the USA, but will be receiving more money from my parents at home as time goes on?   I feel like I'm forgetting something but I'm just nervous I guess? I stayed in the USA with the same family for Christmas last year and everything went smoothly but this is my first long stay in America so i just want to make sure I'm prepared.   Thanks for any help!


Just downloaded the latest version of Ubuntu. How do I actually install it?

Just downloaded the latest version of Ubuntu, What do I do now?  I see where it is downloaded in my downloaded folder, but how do I run this operating system?


Why did Yondu abduct Quill and then raise him as his son?

Within MCU canon, what was Yondu's motivation to travel to Earth, only abduct Quill, and then raise him as his son?  It seemed to me that Yondu and his crew of Ravagers had more rewarding things to do if they were going to travel all the way to Earth, and had more rewarding uses for Quill than making him an adopted son. Or am I missing something?


Why does Windows 10 uses so much RAM and CPU?

I have Windows 10, and nowadays as I use my laptop, my computer uses more and more RAM and CPU. If I don't do anything, happens the same, I left my laptop at home, and after 8-10 hours it uses 99% of my hardwares, and after a while my computer freezes and says, that I have to restart my computer, because I have no more RAM. I don't have any viruses, and yes, I disabled Superfetch also. The top 2, which uses, are always Service Host: Local System (mainly this one) and System.  Here's a picture after 10 minutes of run:    And here after 2 hours:     Expanded as requested:


How to preserve timezone when deserializing DateTime using JSON.NET?

I'm parsing some JSON in C# using JSON.NET.  One of the fields in the JSON is a date/time, like this:  {     "theTime":"2014-11-20T07:15:11-0500",     // ... a lot more fields ... }   Note that the time part is  07:15:11 (TZ of GMT-5 hrs)  I parse the JSON from a stream like this:   using (var streamReader = new StreamReader(rcvdStream))  {      JsonTextReader reader = new JsonTextReader(streamReader);      JsonSerializer serializer = new JsonSerializer();      JObject data = serializer.Deserialize<JObject>(reader);      //...   }   Then access the time:  DateTime theTime = (DateTime)data["theTime"];   However, this gives me this DateTime object:  {20/11/2014 12:15:11} Date: {20/11/2014 00:00:00} Day: 20 DayOfWeek: Thursday DayOfYear: 324 Hour: 12 Kind: Local Millisecond: 0 Minute: 15 Month: 11 Second: 11 Ticks: 635520825110000000 TimeOfDay: {12:15:11} Year: 2014   I need to know the original local time and tz offset, but I seem to have lost that information in the deserialization process, and it is giving me the time in what I presume is my local time (I'm in the UK, so currently at GMT+0).  Is there a way for me to preserve the timezone information when deserializing?  EDIT: added more detail about how I'm deserializing.


How can I add Linux to the new Windows 8 boot manager?

Which OSes can be put into the new bootloader that Windows 8 provides?   It seems to be quite pretty and consistent with the rest of the new Windows 8 design, so it would be cool to put Linux (Ubuntu) into it instead of using  or . Besides on my personal system, Linux will be put on a hard drive and not the , so it would be a bit faster.


Can I automatically add a new host to known_hosts?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh.  The virtual machines will have previously unused hostnames and IP addresses, so they won't be in the ~/.ssh/known_hosts file on the central client.  The problem I'm  having is that the first ssh command run against a new virtual instance always comes up with an interactive prompt:  The authenticity of host '[hostname] ([IP address])' can't be established. RSA key fingerprint is [key fingerprint]. Are you sure you want to continue connecting (yes/no)?   Is there a way that I can bypass this and get the new host to be already known to the client machine, maybe by using a public key that's already baked into the virtual machine image ?  I'd really like to avoid having to use Expect or whatever to answer the interactive prompt if I can.


How do I remove objects after building them, for example a fence that I placed without taking into account its orientation? I have right clicked on it like you would a structure but nothing happened. I have also tried Shift+Alt+Click and nothing has happened. I couldn't think of any other solutions as this is my first game.


To break mental health condition to potential new advisor?

I will be meeting with a professor tomorrow who I previously asked to supervise me. I believe he has the right knowledge to assess the standing of my work in the interdisciplinary field I work in and help me moving forward. He said yes and gave me some suggestions which I partly followed, but the last time we spoke was in May. I am currently struggling with issues related to mental health () and have been in the past months, although it took a while to realize the depth and take action. They are not diagnosed but they probably include a mixture of: low self-esteem, impostor syndrome, anxiety, and acts of self-sabotage. These are linked and the names I feel are not strictly important. I am currently seeing a psychoanalyst (to address the root causes) and the well being/mentoring program of the university (to get practical suggestions and coping strategies). Fighting on. I seek two things from the professor:  Relevant advice and (within reason) some mentoring whenever my cross-field preparation is weak.  An external commitment device that provides motivation for work and help me overcome some of my issues.   I think I have 1. covered, but I am looking for suggestions on how to discuss 2, especially whether I should break the information about my mental health issues with him. I see two possible ways to go:  I can simply set the pace by saying "I would like to meet every week to discuss my progress" and not mention my (alleged) conditions. This will be enough to set a weekly deadline for myself and would surely be helpful.  I could mention my issues to some extent. One of the reasons I didn't ask him to meet before is an ongoing self-sabotage/perfectionism which makes me unwilling to show my work until it has reached a satisfactory level. I now realize that, essentially, this satisfactory level is short of publication-grade material and clearly impossible without expert feedback. I am afraid of course that this could: sound like an excuse for my absence and lack of advancement; mark me as a "bad apple"; monopolize the conversation away from content; be plain awkward; as I write this answer I am also concerned about .   This is ill-timed, as the meeting is tomorrow (but I wanted to break the cycle of postponing this and I could always go with 1. right above and postpone breaking the mental health "coming out" to a more appropriate time), but any suggestions from you would be a great help. EDIT I ended up doing something midway between telling and not. I have hinted at the fact that I was somewhat stressed out and partially disclosed a concrete example (checking a computation for over three days out of a fear it might be wrong). He said he understands this kind of difficulties as well as my need to have someone to talk the fine details over. I believe he caught the implications and was overall very kind and sympathetic. Unfortunately, he will be entering a half-year sabbatical soon and might not guarantee his presence until the start of the next academic years, but said he would like to read what I am working on and pointed me to others who might be of help.


If I have a quotient map $q : X \rightarrow Z$ and then I form a map $q\times \text{id}_Y : X\times Y \rightarrow Z\times Y$, apparently this is only a quotient map if $Y$ is locally compact and Hausdorff.  Why is this? What goes wrong if $Y$ isn't locally compact or Hausdorff? I would think that the openness of the preimage of an open set under this map only depends on the first coordinate since the second one is just the identity on $Y$.


Create PostgreSQL table from GeoJSON data FeatureCollection

I would like to store GeoJSON data into PostgreSQL database.  WITH data AS (SELECT '{ "type": "FeatureCollection",     "features": [       { "type": "Feature",         "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},         "properties": {"prop0": "value0"}         },       { "type": "Feature",         "geometry": {           "type": "LineString",           "coordinates": [             [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]             ]           },         "properties": {           "prop0": "value0",           "prop1": 0.0           }         },       { "type": "Feature",          "geometry": {            "type": "Polygon",            "coordinates": [              [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],                [100.0, 1.0], [100.0, 0.0] ]              ]          },          "properties": {            "prop0": "value0",            "prop1": {"this": "that"}            }          }        ]      }'::json AS fc)  SELECT   row_number() OVER () AS gid,   ST_AsText(ST_GeomFromGeoJSON(feat->>'geometry')) AS geom,   feat->'properties' AS properties FROM (   SELECT json_array_elements(fc->'features') AS feat   FROM data ) AS f;    I can query but I need to save data as a table. Does anyone know how to store this kind data into a table in PostgreSQL.?  Reference to   This reference does only query but I need save the layer as a table.


20.04 - How to change the size and appearance of desktop icons and the way they are handled?

I've just upgraded from Ubuntu 18.04 to its newest LTS version - 20.04. While it comes with some interesting changes, the Desktop icon system was messed up in my opinion. When you hover the mouse cursor over the icons, you see a huge space marked around them that cannot be violated (as you can see in the image below) so that they need to be placed very far apart from each other.  18.04 allowed you to place icons much closer to each other and didn't have that marked space around them. This new way leaves much less space on the Desktop to organize large amounts of icons - including folders, files and shortcuts. Is there a way I can significantly reduce the size of icons and their "spaces" or go back to the old system of organizing files? On "Settings", there is a tool to change the size of Dock icons, but not of Desktop icons.  Also, every time I move or delete something, the Desktop "flashes" and the icons seem to rearrange themselves automatically, nothing of which happened in 18.04. I also can't move anything directly to the Desktop; I need to move to the Desktop folder on Nautilus. This makes me start to think about downgrading Ubuntu back to 18.04.


I'm trying to write I in the following style:   How do I do this?


i want to show that $(n+1)!(n+1)+(n+1)! = (n+2)!$   i put it into wolfram and it showed this to be true, but im not sure why.  I need to show this as a part of a induction proof.


Curves and curve modifier is a nightmare

I try to learn the basics about curves and curve modifiers. To do this, I tried to make a zipper. It was a catastrophe. Doesn't matter what tutorial i follow, the following things (one, more, or all) happening to me:   The mesh and the curve is fram from each other The mesh not following the paths shape The mesh turning to different directions applying the same origin destroys everything Apply all transform sets the origin to the pivot of the coordinate system Twist Strange shapes   So can anybody tell wich is caused by what? I'm near to breakdown. Thanks


Infinity axioms with one function symbol

Let an Infinity Axiom be any first-order sentence $\varphi$ such that for any model $M$, if $M \models \varphi$, then the universe of $M$ has to be infinite. An example of such a sentence is a $\forall\exists$-formula over the signature consisting of one unary function symbol, say $f$, asserting that $f$ is a non-surjective injection. It is well-known that in a functional language consisting of one unary function symbol, say $S$, and one constant (i.e. $0$-ary function symbol), say $z$, there is a $\forall$-formula (i.e., a purely universal one) that is an Infinity Axiom, according to the definition above. Question: if we restrict ourselves to a signature that consists only of one (unary, or binary, whatever), function symbol, does there exist a purely universal formula that is an Infinity Axiom? If not, how can one prove it?


OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about  but it looks really slow.  Can you suggest a more efficient or just an alternative way for just copying what is rendered by OpenGL 3.0+ to the local RAM and in general to output this in a image or in a data stream?  How i can achieve the same goal with OpenGL ES 2.0 ?  EDIT:  i just forgot: with this OpenGL functions how i can be sure that   I'm actually reading a complete frame, meaning that there is no overlapping between 2 frames or any nasty side effect I'm actually reading the frame that comes right next to the previous one so i do not lose frames


How to prove that $\lim\limits_{n \to \infty} \frac{k^n}{n!} = 0$

It recently came to my mind, how to prove that the factorial grows faster than the exponential, or that the linear grows faster than the logarithmic, etc...  I thought about writing: $$ a(n) = \frac{k^n}{n!} = \frac{ k \times k \times \dots \times k}{1\times 2\times\dots\times n} = \frac k1 \times \frac k2 \times \dots \times \frac kn = \frac k1 \times \frac k2 \times \dots \times \frac kk \times \frac k{k+1} \times \dots \times \frac kn $$ It's obvious that after k/k, every factor is smaller than 1, and by increasing n, k/n gets closer to 0, like if we had $\lim_{n \to \infty} (k/n) = 0$, for any constant $k$.  But, I think this is not a clear proof... so any hint is accepted. Thank you for consideration.


The set of all finite sequences of members of a countable set is also countable

While I was reading Enderton's "A mathematical introduction to Logic", I came across the proof of the following sentence: "The set of all finite sequences of members of the countable set A is also countable".   Proof: The set S of all such finite sequences can be characterized by the equation  $$S=\bigcup_{n \in N} A^{n+1}$$ Since A is countable, we have a function f mapping A one-to-one into N. The basic idea is to map S one-to-one into N by assigning to $(a_0,a_1,...,a_m)$ the number $2^{f(a_0)+1}3^{f(a_1)+1}\cdot ... \cdot p_m^{f(a_m)+1}$, where $p_m$ is the $(m+1)$st prime. This suffers from the defect that this assignment might not be well-defined. For conceivably there could be $(a_0,a_1,...,a_m)=(b_0,b_1,...,b_n)$, with $a_i$ and $b_j$ in A but with $m\neq n$. But this is not serious; just assign to each member of S the smallest number obtainable in the above fashion. This gives us a well-defined map; it is easy to see that it is one-to-one.  Note: P is a finite sequence of members of A iff for some positive integer $n$, we have $P=(x_1,...,x_n)$, where each $x_i \in A$.  First of all, I cannot understand why the former assignment might not be well-defined and the latter assignment is well-defined. Secondly, I cannot understand what Enderton means by "just assign to each member of S the smallest number obtainable in the above fashion". By the way, is $(a,b,c,d) = ((a,b),(c,d))$ true? Also, in which cases can I omit/add parentheses in a tuple so as to have an equal tuple?


Show that the matrices form a group. Find an isomorphism of G with a more familiar group of order 6

Show that the matrices  $$\left[\begin{matrix}1&0&0\\ 0&1&0\\ 0&0&1\end{matrix}\right], \left[\begin{matrix}1&0&0\\ 0&0&1\\ 0&1&0\end{matrix}\right], \left[\begin{matrix}0&1&0\\ 1&0&0\\ 0&0&1\end{matrix}\right], \left[\begin{matrix}0&0&1\\ 1&0&0\\ 0&1&0\end{matrix}\right], \left[\begin{matrix}0&0&1\\ 0&1&0\\ 1&0&0\end{matrix}\right], \left[\begin{matrix}0&1&0\\ 0&0&1\\ 1&0&0\end{matrix}\right]$$  form a group. Find an isomorphic of G with a more familiar group of order 6.  How do i prove that matrices are groups? would i find the det? or let a matrice be called A and assume things and try and prove it?


Show decimal places if not a complete whole number

I have numbers in cells in Excel. I want the numbers formatted so that if they have decimal places they show to a maximum of two, and if they have no decimal places it doesn't show any.  For example:  •   1 should be formatted as 1 NOT 1.00 •   0.75 should be formatted as .75 •   0.2 should be formatted as .2  •   0 should be formatted as 0   The closest custom format code I've come up with is 0.##. Unfortunately this formats 1.00 as 1. (note the extra decimal point).  How can I create a custom format code to remove the decimal point on cell values the report a full whole number?


Below is an example, any help on why it's not working?  \documentclass[12pt, a4paper, oneside, notitlepage]{article} \usepackage[english]{babel} \usepackage{lipsum} \usepackage[parfill]{parskip}     \title{Title} \author{Author}                      \date{Date}  \begin{document} \pagenumbering{gobble}  \maketitle \abstract{Abstract} \clearpage  \pagenumbering{roman}   \tableofcontents  \clearpage  \listoffigures     \clearpage \pagenumbering{arabic}  \section{Introduction}  \lipsum  \section{Analysis}  \lipsum    \clearpage \end{document}


How to compute sum of sum (linear analysis)

I'm not sure if I should call this "the sum of a sum" but I can't think of another phrase for it.   Anyhow, I'm confused about excercises such as this one  $$\sum_{j=2}^{\infty} \left( \sum_{k=2}^{\infty} k^{-j} \right)$$  where I want to compute the sum. I'm thinking maybe I could rewrite it as  $$\sum_{k=2}^{\infty} \frac{1}{k^{2}} + \sum_{k=2}^{\infty} \frac{1}{k^{3}}+... $$  but I don't know where to go from there or if that is even correct thinking. (I just began my first course in linear analysis.)


Is there a maximum possible acceleration?

I'm thinking equivalence principle, possibilities of unbounded space-time curvature, quantum gravity.


How to batch resize an image and create multiple sizes (with Photoshop)?

I want to batch resize an image in multiple sizes with Photoshop.  The sizes are most of the time the same so I would like to have profiles for a set of fixed sizes. Ideally I just need to open my source image and click on "Batch Profile #1" and then Photoshop is creating/saving X different sizes of that image as an output in a specific folder.  This is what i want:


Please help me with this doubt from thermodynamics

My textbook says that net rate of heat transfer due to radiation is $\epsilon \sigma A(T^4-T_o^4)$ but i couldn't understand it.  Rate of emission is $\epsilon \sigma A T^4$ and rate of absorption is $a \sigma A T_o^4$ so net rate of heat transfer must be $\epsilon \sigma A T^4 - a \sigma A T_o^4$,it is possible only if $a=e$ which means body is in thermal equilibrium.  But that is not always the case. Please help.


What do "the best of both worlds" and "young minds" mean?

The following is an excerpt from a newspaper article. What do "the best of both worlds" and "young minds" mean in this context?  Not only do these standing desks improve focus but they can also have positive health benefits as well, which really brings the best of both worlds when it comes to young minds.


I have a few images I've like to put on a page with text, but instead of normal figures I'd like to the text to flow around the shape of the image like so:    I have no idea where to start.


Can I marry in the UK while on a standard visitor visa?

I am planning to go to the UK with a standard visitor visa.  I will meet my girlfriend there. If we all of a sudden decide to marry, can we?   My girlfriend is Lithuanian who just works and lives there; she doesn't have a residence permit. I am a Palestinian who lives in Lebanon


Prove the following property of a measure: $\mu ((0,x]) = cx.$

Let $\mu :\mathcal{B}(\mathbb{R}) \to [0,\infty]$ be a measure such that for all $h\in \mathbb{R}$ and $A\in \mathcal{B}(\mathbb{R})$, $\mu(A+h) = \mu(A)$. Let $c= \mu((0,1])$.  I want to prove the property that $\mu((0,x]) = cx$ for any $x\geq 0$.   I have already proven that $\forall x\geq 0, \forall q\in\mathbb{N}: \mu((0,qx]) = q\mu((0,x])$.  As well as $\forall p,q\in \mathbb{N}: \mu((0,\frac{p}{q}]) = c\frac{p}{q}$.   However now I'm stuck. I know that $\mu$ is a measure and therefore $\sigma$-additive, however I am not quite sure how to use this because $x$ is now a real number instead of an integer or a fraction.


Erased Macintosh HD and installing OS X Lion again

I erased my Macintosh HD from Disk Utility with a journaled encrypted format and I wanted to install OS X 10.7 Lion. I left it to download and install overnight because it took about 16 hours.  When I checked it again it gave me a weird screen that has a circle with a slash inside it, like a stop sign. What can I do?


$H \lhd N \lhd G$ but $H \ntriangleleft G$

I got stuck on the following exercise:    Find a group $G$, a subgroup $N$, a subgroup of this subgroup $H$ such that $$ H \lhd N \lhd G \quad \text{but} \quad H \ntriangleleft G  $$    This is what I tried to solve it. I knew that   $\{e\} \ \neq \  H \neq N \neq G $ $G$ is not abelian.   I didn't know if a had to look for a finite group or rather an infinite one. I was thinking about taking $G= S_n$, $H = A_n$, and $|H| = \frac{n!}{4}$ for some convenient $n$. I hoped it would be easy to look for an even element $h$ of order $\frac{n!}{4}$, so that we can put $H = \langle h \rangle$. Do you think that it would be a good approach?


Why are high-rep users allowed to delete their own questions without approval?

I just spent half an hour writing up a detailed response to , only to have the author delete it seconds later. I posted a followup and a moderator re-opened the original, only to have the poster close it again. Questions and answers are for community benefit, I don't see why he should be able to wipe his question when it has a good response. This is very demotivating and I'm sure anyone else who has had this happen is much less likely to spend their time and thought into answering a question. This is a contributing factor to the "" problem, and promotes two-line answers that don't really answer anything.


Sci-fi book: two college kids witness man's first landing on Mars with a wormhole/travel machine they invented; they're ultra rich and nigh-immortal

I can't recall how long ago I read this book, but it starts with 2 college kids using some form of wormhole or instant travel mechanism they invented to personally witness man's first landing on Mars.  The story skips then to them being ultra rich & nigh-immortal due to medical advances.  One lives on a hollow asteroid that is very well appointed, the other more in touch with the world & politics. The story is somewhat light with a bit of mystery & discussion of societal impacts from income discrepancy.  All my recollection of important events in the book are vague.


What "If tail else head" do? If I take it out, it shows an error:  ValueError: not enough values to unpack (expected at least 1, got 0)  items = [1, 10, 7, 4, 5, 9]  def sum(items):       head, *tail = items     return head + sum(tail) if tail else head    sum(items)


Combinatorial proof of a binomial identity: $\sum_k \binom {2r} {2k-1}\binom{k-1}{s-1} = 2^{2r-2s+1}\binom{2r-s}{s-1}$

I am to find a combinatorial argument for the following identity:  $$\sum_k \binom {2r} {2k-1}\binom{k-1}{s-1} = 2^{2r-2s+1}\binom{2r-s}{s-1}$$  For the right hand side, I was think that would just be number of ways to choose at least $s-1$ elements out of a $[2r-s]$ set. However, for the left hand side, I don't really know what it is representing.   Any help would be greatly appreciated!


sum of multiplications of number sets with sum n

suppose $n$ , $k$ are positive integers both. if for any set $ \{ a_1,a_2,....,a_k \}$ with sum of $n$ we write down multiplication of $a_1,a_2,....,a_k$. now I want to prove that the sum of written numbers is $\binom{n+k-1}{2k-1}$ .


E: The package needs to be reinstalled, but I can't find an archive for it

I keep getting this error message when I try to use the update manager:  E: The package thunderbird needs to be reinstalled, but I can't find an archive for it.   This error has slowed my computer down and does not allow me to use the Ubuntu Software Center.


How can I access blocked websites in firefox?

In the recent waves of blocking websites in different countries, India also started doing it. Recently India blocked some regional websites. So I want to know is there any way to bypass the blocking and visit those websites in Firefox? Is there any firefox add on  for this?


Euler-Lagrange equation in curved spacetime: how to calculate $\partial \mathcal{L}/\partial(\nabla_\nu A_\mu)$?

My problem is mostly with notation. When we apply the Euler-Lagrange equation to the Lagrangian scalar $$\mathcal{L}= -\frac{1}{4}F^{\mu\nu}F_{\mu\nu}$$ Where $$F_{\mu\nu} = \partial_\mu A_\nu -\partial_\nu A_\mu= \nabla_\mu A_\nu -\nabla_\nu A_\mu$$ and I start with $$\frac{\partial\mathcal{L}}{\partial A_\mu}=\nabla_\nu\left(\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}\right).$$   Now I rewrite the lagrangian as $\mathcal{L} = -\frac{1}{4}g^{\mu\alpha}g^{ \nu\beta}(\nabla_\mu A_\nu-\nabla_\nu A_\mu)(\nabla_\alpha A_\beta-\nabla_\beta A_\alpha)$ $$\mathcal{L}= -\frac{1}{4}g^{\mu\alpha}g^{\nu\beta}\left[(\nabla_\mu A_\nu)(\nabla_\alpha A_\beta)-(\nabla_\mu A_\nu)(\nabla_\beta A_\alpha)-(\nabla_\nu A_\mu)(\nabla_\alpha A_\beta)+(\nabla_\nu A_\mu)(\nabla_\beta A_\alpha) \right]$$ My problem is calculating $\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}$, how are the rules of partial derivatives generalised to covariant ones? Also, is $\frac{\partial\mathcal{L}}{\partial A_\mu}=0$, is that correct ?


Let $G$ be a Lie group and $\mathfrak{g} = T_eG$ its Lie algebra (where $e \in G$ is the neutral element). Denote $Z(\mathfrak{g})$ the center of $\mathfrak{g}$ and $Z(g)$ the center of $G$. I've read the following statement but don't see how to prove it: $$Z(\mathfrak{g}) = 0 \Longleftrightarrow Z(G) \text{ is zero dimensional.}$$ I'm mainly interested in the "$\Leftarrow$" direction, as this is used in a corollary of the Bonnet-Myers theorem in the text I'm reading.  Now, my knowledge of Lie groups is very basic. For instance, I guess that the dimension of $Z(G)$ means its dimension as a manifold. So I would think that $Z(G)$ is a submanifold of $G$. But how do I even see this in general?  According to this question , it seems to be difficult to find conditions when $Z(\mathfrak{g}) = Z(G)$ holds in general, however the statement above looks more simple.  Would someone be able to prove the above equivalence?