I installed Ubuntu 19.04 alongside Windows 10 on my laptop using the "install alongside windows" option.   My problem is that when I boot, grub is there but it doesn't initialise the VGA controller. I can blindly use it by I can selecting a different OS, open a console or anything that is avalaible in grub but I just can't see anything.   However, if before booting on grub go to my BIOS settings and tell it to boot on "ubuntu" (other option is windows boot manager), it does boot on grub and it is visible and works as expected.  the question is: Why doesn't booting without going to the BIOS   not initialise the VGA controller whereas going to the BIOS makes it behave normally?  Things I have already checked :   List item Fast boot and secure boot disabled in BIOS UEFI mode selected Used grub customizer to add a grub theme, which is showing when manually booting on grub I tried to change video driver from NVIDIA to xorg, doesn't change anything I performed a boot repair (reinstalled grub) I changed grub settings from "quiet splash" to "nomodeset" it only made it worse, I could't even boot at all after the invisible grub menu. Ubuntu is set as number 1 in the boot order in the BIOS Tried pressing or holding or smashing Shift or ESC during boot without success

I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help. Can anyone help me bring up the GRUB boot menu? In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.  Reply (Himanshu) : Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see  or , where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.)


Iam using a RedirectResponse in drupal 8 in my custom module when a user is logging in,  $user = User::load(\Drupal::currentUser()->id()); $userRoles = $user->getRoles();   if(in_array('admin',$userRoles)){    $response = new RedirectResponse('/home');    $response->send();   }   later i was trying to change the url but even after removing the code the redirection occurs.

I would like to redirect users after they log in. Is it possible to use hook_user_login() to make the redirection? How do I add the parameter for the redirection?


This is Exercise 11.3.C from Vakil's notes.   Suppose $X$ is a closed subset of $\mathbb{P}_k^n$ of dimension at least $1$, and $H$ is a nonempty hypersurface in $\mathbb{P}_k^n$. Show that $H$ meets $X$.  (Hint: note that the affine cone over $H$ contains the origin in $\mathbb{A}_k^{n+1}$. Apply Krull's Principal Ideal Theorem to the cone over $X$.)  My attempt: Let $A=k[x_0,\dots,x_n]$,  $X=\operatorname{Proj}A/I$ and $H=\operatorname{Proj}A/(f)$. I suppose the hint suggests to consider $V(f)$ in $\operatorname{Spec}A/I$. Suppose $f$ is not a zero divisor of $A/I$, then every irreducible component of $\operatorname{Spec}A/I\cap \operatorname{Spec}A/(f)$ has codimension precisely $1$. There is an injection $\operatorname{Spec}A/I\setminus \{0\}\hookrightarrow \operatorname{Proj}A/I$, similiarly  $\operatorname{Spec}A/(f)\setminus \{0\}\hookrightarrow \operatorname{Proj}A/(f)$. If I can show that $\operatorname{Spec}A/I\cap \operatorname{Spec}A/(f)$ is not the maximal ideal corresponding to the origin. Then  I can conclude $X\cap H\neq \emptyset$.   Is this correct? Can any suggest how to proceed?

I'm having trouble with the exercise in the title, even with part (a), which asks to prove that if $X$ is a closed subset of $\mathbb{P}^n_k$ of dimension at least 1 and $H$ is a non-empty hypersurface, then $X$ and $H$ meet.   Following the hint, I've done the following: By assumption, $X$ is given by $V(I)$ for some homogenous prime ideal $I\subset k[x_0,\dots x_n]=:A$ and $H$ by $V(f)$ for some homogenous polynomial $f\in A$. We wish to prove that there is a homogenous prime ideal $\mathfrak{p}$ (that's not the irrelevant one) containing both $I$ and $f$.  Consider the affine cone $\mathrm{Spec}\ A/I$ of $X$ in $\mathrm{Spec}\ A$. Being homogenous, both $I$ and $f$ are contained in the ideal $(x_0,\dots x_n)$. By Krull's principal ideal theorem, every minimal prime ideal containing $f\mod I$ has codimension one. $X$ having dimension at least one implies that there are homogenous prime prime ideals $\mathfrak{q}\supsetneq \mathfrak{r}\supset I$. This implies that $(x_o,\dots x_n)$ has codimension at least two. Thus there are prime ideals containing $f\mod I$ that are contained in $(x_o,\dots x_n)$. However, I'd need to show that there are homogenous such prime ideals, right? I'd rather get hints than full solutions.


I am trying to communicate with a device over SPI using an STM32F429 Discovery kit. I would like to use the SPI5 but according to  and , table 12, page 76, there is no "Free I/O" available. Pins PF7, PF8, PF9 have as Alternate Function SPI5, but those pins are connected to L3GD20. I thought that I could just de-assert (i.e. set to "1") the CS (chip select) of L3GD20 (which I do not want to use) that is connected to pin PC1. But according to , table 3, page 8, chip select is used for "I2C/SPI mode selection". Can I use PF7, PF8, PF9 pins or will I interfere with L3GD20? Should I configure PC1 somehow and why?

BMA180 accelerometer can be either SPI slave or I2C slave.  The pins for both buses are shared.  SPI mode                    I2C mode --------------------------------------------------- SDI  input                  SDA  bidirectional (!) SDO  output                 ADDR address bit, input SCLK input                  SCL  input CSB  chip select, input     I2C  mode select, input   According to , the selection between buses is done through the CSB pin.  When CSB is low, the device is an SPI slave.  When CSB is high, the device is an I2C slave.  Here's a failure mode, which I'm concerned about.  Suppose, BMA180 is on the SPI bus.  There is also another device on the same bus with it’s own chip select.  Suppose, SPI bus master is communicating to that other device.  CSB for BMA180 is high, so it’s I2C should be enables.  BMA180 sees clock edges on SCL (SPI's SCLK) and bits on SDA (SPI's MOSI) flying by.  What if some of these bits look to BMA180 like a start of a valid I2C read transaction, and BMA180 starts to output data and clobbers the existing SPI transaction?  How would the design of BMA180 prevent that?  This is a matter of curiosity.  I haven’t experimented with these issues yet.  I will be using BMA180 on SPI.  Any suggestion, insight or reference is really appreciated!  Update.  Found something in .  It recommends disabling I2C by setting the dis_i2c bit, if communicating with BMA180 via SPI.      When SPI interface is used, it's highly recommended to set dis_i2c to   1 to avoid malfunction.   BMA180 has built-in EEPROM.  Register contents can be stored in the EEPROM and automatically loaded on power-up sequence.  So, it's possible to make BMA180 ignore I2C completely and always.  Update.   is another IC, which shares pins between I2C and SPI in a a similar way.  It doesn't seem to have a bit setting for disabling the I2C mode.  So, it would require an OR gate like ADXL345, which @markrages brought up.  Heads up!  Bosch stopped shipping BMA180 ().


I know from my calculator the answer is $\sum_{i = 1}^n k^n$ = $\frac{k^{n+1}-k}{k - 1}$. I'd just like help understanding why.

Why does the following hold:  \begin{equation*} \displaystyle \sum\limits_{n=0}^{\infty} 0.7^n=\frac{1}{1-0.7} = 10/3\quad ? \end{equation*}  Can we generalize the above to      $\displaystyle \sum_{n=0}^{\infty} x^n = \frac{1}{1-x}$ ?   Are there some values of $x$ for which the above formula is invalid?  What about if we take only a finite number of terms? Is there a simpler formula?     $\displaystyle \sum_{n=0}^{N} x^n$   Is there a name for such a sequence?    This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I have a map of part of Brazil. I want to find the latitude and longitude of some marked points on the map. Is there any way to find latitude and longitude of a point from its pixel coordinates given the map is using Mercator projection? I found a similar question in  but there lat-lon grid was provided but here in my question nothing is given .

I have an old map over a part of Laos and wondering how do I georeference the map with the help of the Grid lines and other Longitude and Latitude information on the scanned map? I have searched for information on the internet and tried many times. My scanned map wont overly correctly on the base map. Any base map would be fine. As long as I can check the result.  Do I add X/East and Y/North values from the grid line crossings as marked and written in some parts of the map? How do I begin georeferencing this map? Do I have to add zeros after the two digits? For example if the Easting is 24 (its in KM right? Do I add like three/four zeros to convert it to meters?  I georeferenced the map with the option "From Map Canvas" in the georeferencer tool and I succeeded but I want to know the coordinate of a point on my old scanned map and write them as X/East and Y/North to georeference the map.   I hope I am not babbling and someone understands what I mean!  We can set the CRS to WGS84, EPSG:4326.


I'm trying to set up  and hitting a bit of a wall. I generated a new gpg key with gpg --gen-key and then ran pass init 1E3C5C98 where 1E3C5C98 is the ID for my new key, at least as I understand it. It acts like it worked:   mkdir: created directory '/home/amanda/.password-store/' Password store initialized for 1E3C5C98   And I can add new passwords with pass insert Example/username but when I try to view them I get gpg: decryption failed: No secret key --  I can't figure out how to tell pass what my gpg passhprase is, and pass isn't asking me for it. I read through  but I'm finding an answer there. I suspect I'm missing something super obvious.  The pass developers recommend gpg-agent but I'm also not totally sure how to tell gpg-agent to unlock my gpg key.   Per the comments, I tried running pass Example/username through strace -- I can add a password just fine with pass insert Example/username but when I try to view the password I see the "no secret key" error.   amanda@mona:~$ strace -e execve -F pass Example/username execve("/usr/bin/pass", ["pass", "Example/username"], [/* 66 vars */]) = 0 execve("/usr/local/sbin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/local/bin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/sbin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/bin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = -1 ENOENT (No such file or directory) execve("/sbin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = -1 ENOENT (No such file or directory) execve("/bin/bash", ["bash", "/usr/bin/pass", "Example/username"], [/* 66 vars */]) = 0 strace: Process 1388 attached strace: Process 1389 attached [pid  1389] execve("/usr/bin/tty", ["tty"], [/* 65 vars */]) = 0 [pid  1389] +++ exited with 0 +++ [pid  1388] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1389, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- [pid  1388] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1388, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- strace: Process 1390 attached [pid  1390] execve("/usr/bin/which", ["which", "gpg2"], [/* 66 vars */]) = 0 [pid  1390] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1390, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- strace: Process 1391 attached [pid  1391] execve("/usr/bin/getopt", ["getopt", "-o", "c", "-l", "clip", "-n", "pass", "--", "Example/username"], [/* 68 vars */]) = 0 [pid  1391] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1391, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- strace: Process 1394 attached [pid  1394] execve("/usr/bin/gpg2", ["gpg2", "-d", "--quiet", "--yes", "--compress-algo=none", "--no-encrypt-to", "--batch", "--use-agent", "/home/amanda/.password-store/Exa"...], [/* 68 vars */]) = 0 gpg: decryption failed: No secret key [pid  1394] +++ exited with 2 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1394, si_uid=1000, si_status=2, si_utime=0, si_stime=0} --- +++ exited with 2 +++   Note: I think this might be related:  /

I'm using the  for quite a long time; but after exporting my key storage and gpg keys to another machine I see following output:  $ gpg --list-key /home/shved/.gnupg/pubring.gpg ------------------------------ pub   2048R/FA829B53 2015-04-28 uid       [ultimate] Yury Shvedov (shved) <shved@lvk.cs.msu.su> sub   2048R/74270D4A 2015-04-28   My key imported and trusted, but not usable:  pass insert test Enter password for test:  Retype password for test:  gpg: 2048R/FA829B53: skipped: No public key gpg: [stdin]: encryption failed: No public key fatal: pathspec '/home/shved/.password-store/test.gpg' did not match any files   What can I do to use my key again?


Show that there exists $m, n \in \mathbb{Z}$ such that $$|m+n \sqrt{2}|<\frac{1}{10}$$. Try assuming that there are no $m$ and $n$ that satisfy the inequality Then, $|m+n \sqrt{2}|\geq \frac{1}{10} \forall m,n \in \mathbb{Z}$ Then $\frac{1}{10}$ is a lower bound of  {$|m+n \sqrt{2}|$ for $m,n \in \mathbb{Z}$} but here I'm stuck and I don't know what to do next!

I am having trouble proving the statement:     Let $$S = \{m + n\sqrt 2 : m, n \in\mathbb Z\}$$ Prove that for every $\epsilon > 0$, the intersection of $S$ and $(0, \epsilon)$ is nonempty.


I'm trying to store images directly in a sql table using PHP. I have a table: CREATE TABLE `products` (      `id` INT UNSIGNED AUTO_INCREMENTS PRIMARY KEY,      `date` DATE,      `img` LONGBLOB,       `path` VARCHAR(255) );  Using php I try to save the image to a mysql table .: <?php  // snippet of main part of php code // query string $query = "INSERT INTO `produkt` (`id`, `date`, `img`, `path`)"; $query .= " VALUES('', date('d.m.Y'), ?, ?)";  // prepare query  $stmt = $conn->prepare($query);  //  bind  params $stmt->bind_param("bs", $img, $path); $img = addslashes(file_get_contents($_FILES['img']['tmp_name'])); $path = $_FILES['img']['tmp_name'];  // execution of the prepared statement $stmt->execute();  ?>  All data comes to the database, except for the img column, where the image does not want to be saved. I find that this sql database image management logic will probably be a bad idea, how can I manage images using a sql database as efficiently as possible without unnecessarily burdening my MySQL database? Can you describe a simple example? Thank you.

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


I'm going to brew a batch of beer today.  I'm not sure how long I should keep the beer fermented. What is the maximum amount of time, that home brew beer can ferment  without it going bad ???

What's the maximum amount of time for primary fermentation, assuming the beer is going straight to bottles next? Will it over ferment and then fail to carbonate, if left too long in a carboy?


I have to find the limit of: $$\sqrt[3]{n+1}-\sqrt[3]{n}$$  What I know is that multiplying can be the key here, so I simplified it to  $$\frac{1}{(n+1)^{\tfrac{2}{3}}+n^{\tfrac{1}{3}}(n+1)^{\tfrac{1}{3}}+n^{\tfrac{2}{3}}}.$$  Now what I do not understand: I know that this converges to zero, since all the terms of the denominator grow as $n$ increases. But how do I formally finish this proof?   Wouldn't I have to show for each term that it grows continually?   I am not quite sure how to do this. Any hints would be very kindly appreciated, thanks!

I am trying to  find this limit  $$\lim_{x\rightarrow \infty} \sqrt[3]{x+1}-\sqrt[3]{x}$$  My so far method is this   $f(x)>0.$ $f^{\prime}(x)=\frac{1}{3\sqrt[3]{(x+1)^2}}-\frac{1}{3\sqrt[3]{x^2}}<0.$ For every $0<y<1$ the equation $f(x)=y$ has a unique solution(found in maple):   $$x=\frac{1}{3}\cdot \frac{\frac{1}{3}y^2(3y^2+\sqrt{-3y^4+12y})+\frac{1}{6}\frac{3y^2+\sqrt{-3y^4+12y}}{y}-y^4-2y}{y}$$  The previous facts implies that the limit is $0$.  I am wondering if there is any way easier than this to find the limite.  thanks in advance.


How to prove equation of the form $| |y-x| - |z-y| | \leq |x-z| x,y, z \in \Re$ ?  There are 10(?) cases: (1) $x>y>z$ : $||y-x|-|z-y|| \le x-z$ (2) $x>z>y$ : $|y-x|-z+y \le x-z$ (3) $y>x>z$ : $|y-x-|z-y|| \le x-z$ (4) $y>z>x$ : $|y-x-|z-y||\le |x-z|$ (5) $z>x>y$ : $||y-x|-z+y|\le|x-z|$ (6) $z>y>x$ : $|y-x-z+y|\le|x-z|$ (7) $x=y>z$ : $|x-x|-|z-x|\le|x-z|$ (8) $x=z>y$ : $|y-x|-|x-y| \le |x-x|$ (9) $y=z>x$ : $|z-x|-|z-z| \le |x-z|$ (10)$x=y=z$ : $||x-x|-|x-x||\le |x-x|$    (1) $||y-x|-|z-y||\le x-z \to ||x-y|-|z-y||\le x-z \to |x-y-z+y|\le x-z \\ \to |x-z|\le x-z \to x-z \le x-z$ proved (2) $|y-x|-z+y\le x-z \to |y-x|+y\le x \to |x-y|+y\le x \to x \le x$  proved (3) $|y-x-|z-y|| \le x-z \to |y-x-|y-z|| \le x-z \to |y-x-y+z| \le x-z \to \\|-x+z|\le x-z \to |z-x|\le x-z \to |z-x| \le x-z \to |x-z| \le x-z \to \\ x-z\le x-z $  proved (4) $|y-x-|z-y|| \le |x-z| \to |y-x-|y-z||\le z-x \to |-x+z| \le z-x \to \\ |-x+z| \le z-x \to |z-x| \le z-x \to z-x \le z-x $  proved (5) $||y-x|-z+y|\le z-x \to |x-y-z+y|\le z-x \to |x-z|\le z-x \to z-x\le z-x$ proved (6) $|y-x+y-z| \le |x-z| \to |2y-x-z|\le|x-z| \to $ still no idea (7) $|0-|z-x||\le|x-z| \to |z-x|\le|x-z|$ proved (8) $|y-x|-|x-y|\le|x-x| \to 0 \le 0$ proved (9) $|z-x|-|z-z| \le |x-z| \to |z-x|\le|x-z|$  proved (10)$||x−x|−|x−x||≤|x−x| \to 0\le0$ proved  any ideas how to proceed? what could i do next?

I tried $|d(x, z) - d(y, z)| \leq d(x, z) + d(y, z)$, but the the triangle equation goes the wrong side. Is there an analogue to the reverse triangle inequality with metrics? The reason I want to know this is to proof that $d(x, A)$ is continious where $A$ is a set. (Let $|x - y| < \delta$, then after some algebra $|d(x, A) - d(y, A)| = \inf(\{|d(x, a) - d(y, a)| \ | \ a \in A \})$.


I am trying to install a dual-boot system on my windows computer (HP Spectre).  I have turned off secure boot and fast boot, partitioned my hard drive (I gave 100GB to Ubuntu) and created a USB Drive that was formatted to have the Ubuntu boot on it (I don’t have a DVD drive on my computer, so I have to use USB).  I used Rufus 3.1 to accomplish this.  I also changed my boot order to boot first to the USB HDD.  When I boot up with the USB drive inserted, it boots to the GRUB Menu.  I have tried both "Try Ubuntu" and "Install Ubuntu".  Both bring me to an Ubuntu loading screen, and then to one that says “Please remove the installation medium, then press ENTER”.  If I do not do anything, it will just stay there.  If remove the USB drive and press enter, it shuts down the computer.  If I DON’T remove the USB drive and just press enter, the same occurs.  After the shutdown, I have tried to restart.  Restart without the USB drive loads Windows 10.  Restart with the USB drive brings me back to the GRUB startup screen.  I have tried multiple USB ports and USB drives, so that is not the issue.  The computer is a 2018 model laptop with intel i7, 16GB RAM, and a SSD - power or RAM shouldn’t be a problem. I have also tried the “check for problems with the disk” option - it shows no issues. Heat is also not an issue - I tried this in the refrigerator and freezer, and it occurs no matter how hot or cool the computer runs.  At this point, I’m pretty much out of steps.  Has anyone had the same difficulty?  Does anyone know how to fix it?  Thanks.  EDIT: I tried to follow all of the steps in the mentioned article, and it does not solve the problem.  The question fails to explain a working solution to the problem - instillation with the USB media stops at the stage mentioned above, and there’s is no way that I can find (including boot options menu) to get to the boot without the drive installed.  Also, even if I select the “try Ubuntu” option, I get the same issue - I cannot get into a live Ubuntu Session beyond the Ubuntu loading screen  EDIT #2:  I don't know what caused the problem, but I was able to fix through this process: When at the grub bootloader, select the "try ubuntu" option, and press "e" for edit command.  In the edit command screen, add acpi=off to the end of the first command.  That fixed it for me.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


We've had an issue today with the nginx resolver in an AWS environment. According to the nginx log files, nginx did not resolve to the right servers, after the DNS record changes.  The DNS originally resolved:  webservers.ourservers.local A 10.0.0.5 webservers.ourservers.local A 10.0.1.8   ... but as soon as one of these IP addresses changed, nginx did not get the change - and continuously tried to reach the outdated ip address - far longer than the 60 seconds ttl.  According to nginx.org/en/docs/http/ngx_http_core_module.html#resolver, the nginx resolver caches answers for the ttl only - or, in our case, for the configured time.  My colleagues moved the resolver line from the location block to the server block, - but it did not help. We need to restart nginx in order to force it to resolve to the new ip.  Nginx configuration:  http {     include       /etc/nginx/mime.types;     default_type  application/octet-stream;      log_format  main  '$scheme - $http_x_client_ip - $remote_addr - $remote_user [$time_local] "$request" '                       '$status $body_bytes_sent "$http_referer" '                       '"$http_user_agent" "$http_x_forwarded_for"';      access_log  /var/log/nginx/access.log  main;     error_log   /var/log/nginx/error.log;      server {         listen 8080 default;          set $OUR_ROOT /var/www/pub;          location /health_check.html {             root $OUR_ROOT;             auth_basic off;             allow all;         }          location / {             # Work around to flush Nginx: http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver             # https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html#AmazonDNS             # This is will be your VPC's IPv4 CIDR value + 2             # You can find this value in /etc/resolv.conf on the EC2 instance             resolver 10.0.0.2 valid=15s;              proxy_pass http://webservers.ourservers.local; # Will be resolved by Route 53             proxy_set_header X-Real-IP  $remote_addr;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;             proxy_set_header X-Forwarded-Proto https;             proxy_set_header X-Forwarded-Proto-New https;             proxy_set_header X-Forwarded-Port 443;             proxy_set_header Host $host;             proxy_redirect     off;         }     }      #include custom config     include /etc/nginx/conf.d/*.conf; }   We use nginx version 1.13.7.  What did we do wrong? How can we make nginx re-fetch the dns records?    Update/Clarification:  10.0.0.2 is the AWS internal nameserver for VPCs:  . It does resolve correctly when checked via dig, even when nginx does not resolve correctly at the same time: We have tested these cases with   dig webservers.ourservers.local @10.0.0.2

I am using nginx/0.7.68, running on CentOS, with the following configuration:  server {     listen       80;     server_name ***;     index index.html index.htm index.php default.html default.htm default.php;      location / {             root   /***;             proxy_pass   http://***:8888;             index  index.html index.htm;     }     # where *** is my variables   The proxy_pass is to a DNS record whose IP changes frequently. Nginx caches the outdated IP address, resulting in a request to the wrong IP address.  How can I stop nginx from caching the IP address, when it is outdated?


I am working with GPS tracks (lat/lon values) and my goal is to  for a . The datasets are not huge, maybe a couple of tens of thousands of points. I could not find an algorithm that deals with tracks/datasets crossing from -180 to 180 lat or lon. Does anybody have pointers to algorithms?  To sum it up very simply, what I am looking for is:   Input: (lat/long)* [possibly tens of thousands of GPS points, potentially crossing 180/-180 boundary)] Output: (lower-left, upper-right) of the minimal box containing all points   The background for me is that I need the bounding boxes to initialize map viewers, in particular when there is more than one track displayed on a map.

As you see in the figure,  the question is:    How to find the minimum-area-rectangle (MAR) fitted on the given points?    and a supporting question is:    Is there any analytical solution for the problem?    (A development of the question will be to fit a box (3D) to a cluster of points in a 3D point cloud.)  As a first stage I propose to find the convex-hull for the points which reforms the problem (by removing those points are not involved in the solution) to: fitting a MAR to a polygon.  The required method will provide X (center of rectangle), D (two dimensions) and A (angle).      My proposal for solution:     Find the centroid of the polygon (see )   [S] Fit a simple fitted rectangle i.e., parallel to the axes X and Y   you may use minmax function for X and Y of the given points (e.g., polygon's vertices)  Store the area of the fitted rectangle Rotate the polygon about the centroid by e.g., 1 degree Repeat from [S] until a full rotation done Report the angle of the minimum area as the result   It looks to me promising, however the following problems exist:   choose of a good resolution for the angle change could be challenging, the computation cost is high, the solution is not analytical but experimental.


I've been trying to find a way to create layouts like this for a while, and now that I have the time to try, I'm wondering if anyone knows how to do this? Where do I start in trying to create images like this, especially like the second image in the link provided.  I am fairly advanced in Ai, Ps, and some of the other applications in the CC suite, but I never really use inDesign. Is that the tool used for these layouts?  Any help would be greatly appreciated, for I would really like to learn how to do this.

I'm wondering if anyone has any tips, tutorials or templates on how to 'fake' a printed effect. I want to make it look in my portfolio like I have printed business cards and other collateral without doing so.


I have a question which I keep researching for a past week or two. What's the correct or "best" so to speak way to cut holes non-destructively and without messing up the topology and without a need to then clean a mesh?

How do I make a hole in an object created by me? Please help, youtube tutorials didn't help at all. Hope the image help.


I have implemented a protocol and it is executed and give me the output I want but the problem is the runtime execution. Is a little more than I would expected. I wanted to measure the execution time of one of my methods of the class but I am not sure if what I have done is correct since I do not have much experience in testing. What I have done is:  public class MyClass {     // some private fields here      public int method toBeMeasured (int a){         long startTime=System.nanoTime();          // the code under my method including          // some for cycles and some operation.          long finalTime=System.nanoTime() - startTime;          return something of type int;     } }   Now what I need to know if the result I got is really telling me the performance speed of this method or am I measuring it wrong. Also I want to know how can I measure this 10000 times and take the average of those times. I hope to receive any feedback for my question.

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I am in search for Functional Analysis Books.  I need a book which have lots of elementary problems.  I mean it should force us to think more which will give a deeper insight for functional analysis.  To be precise, I need lots of problems like Is $A$ open in the space $\ell^1$ with respect to norm $\|.\|_2$. Find a counterexample to this statement and etcetera.  I mean it shouldn't ask us trivial questions. It should ask us questions which will force us to think more and more from functional analysis

I am a EE grad. student who has had one undergraduate course in real analysis (which was pretty much the only pure math course that I have ever done). I would like to do a self study of some basic functional analysis so that I can be better prepared to take a graduate course in that material in my university. I plan to do that next fall so I do have some time to work through a book fully. Could some one recommend some good books to start working on this?   Thanks in advance


During a physics lab we stumbled upon a little problem. The measuring device was unstable, oscillating between two values. We were told to write down the average with the half-difference between the values as error. There is also the error on the measure due to the instrument's resolution.   Now I have to consider the global error over the measure and I'm going to sum both errors. Is it correct?

We have to measure a period of an oscillation. We are to take the time it takes for 50 oscillations multiple times.  I know that I will have a $\Delta t = 0.1 \, \mathrm s$ because of my reaction time. If I now measure, say 40, 41 and 39 seconds in three runs, I will also have standard deviation of 1.  What is the total error then? Do I add them up, like so?  $$\sqrt{1^2 + 0.1^2}$$  Or is it just the 1 and I discard the (systematic?) error of my reaction time?  I wonder if I measure a huge number of times, the standard deviation should become tiny compared to my reaction time. Is the lower bound 0 or is it my reaction time with 0.1?


So, I can't boot into windows at the moment, and in order to fix this problem I need to access Advanced Options which I can do by pressing F8 in the windows boot loader. However, I have grub currently as the default boot loader. How would I be able to change the bootloader through Linux terminal? Any ideas appreciated. Thanks!

I have a Win 7/11.10 dual boot system with Grub 2 as the default bootloader. However, I want to make Windows bootloader the default bootloader (grub 'dos' like interface scrares the hell out of my sister) so when I start the PC I will have the following boot options: 1. Windows 7 2. Ubuntu  NB: A process to reverse this operation so Grub can be the default bootloader again will also be appreciated


For a definite integral   $$\int^b_af(x,h)dx,$$   can we in general show that   $$\lim_{h\to \infty} \int^b_af(x,h)dx = \int^b_a \lim_{h\to \infty} f(x,h) dx.$$   Intuitively this seems to make sense, as an integral can be approximated by a Riemann sum, and we could use the limit sum rule iteratively.  However, I did not found how to formalise this, can anyone help me with this.

After coming across this question: , I have the following question:     When taking the limit of an integral, is it valid to move the limit inside the integral, providing the limit does not affect the limits of integration?   For instance in the question, the OP is trying to determine that:  $$\lim_{n\to\infty}\int_{0}^{1}{\frac{dx}{(1+\frac{x}{n})^{n}}}=1-\rm{e}^{-1}$$  The answers to the question involve evaluating the integral and then taking the limit to prove the result; but I was wondering if it would be valid to move the integral inside the limit, that is:  $$\lim_{n\to\infty}{\int_{0}^{1}{\frac{dx}{(1+\frac{x}{n})^{n}}}}=\int_{0}^{1}{\lim_{n\to\infty}\frac{dx}{(1+\frac{x}{n})^{n}}}=\int_{0}^{1}{\frac{dx}{\rm{e}^{x}}}=\rm{e}^{0}-\rm{e}^{-1}=1-\rm{e}^{-1}$$  As required. So is this a valid technique, or is it just coincidental that this works?


I am Beginner in java ,I am just trying out to convert string into char array,though it is running fine on my System but on a competitive coding website it is throwing an error.Here is the link of that Exception in thread "main" java.lang.NullPointerException    Here is my piece of code I have used BufferedReader to take input:-                  String s1;                 s1= inp.readLine();                 String s2;                 s2=s1;                 char ch1[] = s1.toCharArray();                 char ch2[] = s2.toCharArray();   Please help!

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


I have installed Ubuntu 16.04.02 a couple of minutes ago. When I want to update my system:  $ sudo apt-get update && sudo apt-get upgrade   Ubuntu does not update itself. The error message is above:    The problem is with sources.list. But how can i solve this problem? Please help me!

I am looking for the best method to restore /etc/apt/sources.list to default from the command line.  Is there no way to reference the source code of the package which generates this file or something like that? I want a trusted and version-independent way of restoring this file.  Solutions Ruled Out  Before you mark this as a duplicate, note that I have reviewed  already. It is only applicable if you have the Ubuntu GUI available. This question is specific to the command line.  I have also reviewed  where the accepted solution is someone pasted the contents of their sources.list file. This is not an appropriate way to restore the file as the intentions of the person providing the file contents cannot be verified and the file is subject to change with new releases.  I checked out the , but this is also not from Ubuntu so I do not plan to use it.


I've set up DKIM key for primary domain as per this tutorial:   Can I use the same key to sign for subdomains as well?  If so, how?

How do I use OpenDKIM with multiple domain names on a single server?  I own 3 domain names, and I have a single server that's running postfix for sending email. How do I use OpenDKIM?  Can I use the same keyfile for all 3 domain names? Do I have to create a TXT record for each domain name?


show that if a,b belong to the ring $R$ and $I$ is an ideal of $R$ then $a+I=0+I$ if and only if $a$ belongs to $I$. I know that since I is an ideal then it is both a left and a right ideal.

How  can I show the following?     Show that, if $a$ and $b$ are elements of a ring $R$ and $I$ is an ideal of $R$, then $$a+I=0+I \iff a \in I$$    I am so interested to know the proof.Thanks and good night all!


Creating a very simple figure out of plane with Bevel modifier following by Subdivision Surface resulted in weird geometry. Steps how to reproduce the problem:  I've used a mesh plane, squished z-axis and applied scale, then added 4 loop cuts, then moved middle part with G or move tool, afterwards added modifiers and used shade smooth.  Normals weren't changed, all geometry is same as before, no n-gons were created. Why this might happen? Simple plane with 4 loop cuts  Bevel settings  Subdiv settings  normals

How can I setup the Bevel modifier to only work on 30 degrees angle and avoid pinching at the same time on convex shapes?    I want to avoid pinching generated on concave shapes to replace the manual edge loops or sharp edges workflow for hard surface models:


I would like to install a VirtualBox guest of macOS High Sierra on my MacBook Pro that is also running macOS High Sierra so that I can experiment with MDMs, etc. without rendering my primary laptop unusable.  I've created an ISO of High Sierra by downloading the installer from the Mac AppStore and running the following commands:  hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J  hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build  asr restore -source /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase  hdiutil detach /Volumes/OS\ X\ Base\ System  hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso  mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso   I've also created my VirtualBox guest on VirtualBox 5.2.0 r118431 with 8GB RAM and 2 processors.  However, when I attempt to boot from the ISO to start the install process, I'm met with a blank, black screen.  Is there something else I need to do in order to create my virtual macOS instance?

I’m trying to install macOS Sierra on VirtualBox, but can’t seem to make it work. For reference, here are the steps I took.   Downloaded the Install macOS Sierra app from the App Store. Used the inbuilt media creation executable, CreateInstallMedia on a disk image. Created a new VM with the default settings for an OS X El Capitan, plus 128 VRAM. Since VirtualBox refused to accept the DMG, I tried splicing out the InstallESD. VirtualBox now accepted it, but wouldn’t boot. I tried to boot through rEFInd, but still no luck. I tried to patch it both ways (base system and ESD) with iesd. No luck. When booting to GParted LiveCD, it flat-out refused to discover any of the installer CDs.   How can I patch the installer to work with VirtualBox? I don’t want to use pre-patched versions of either the installer or an existing installation, as though to avoid piracy.


This is the first sentence of an introductory paragraph     Translation of scientific texts has a long history in North Africa.   Does it sound right? Should it be:     The translation of scientific texts has a long history in North Africa.   Could you please explain why it should or should not be used here?

In this sentence:     The commission commanded that work on the building should cease.   Why isn't the used before the word work? It seems that the work is specified by on the building.  Another example is,     Construction of the building will start next week.   I understand construction here is something like putting up the building, and so the construction isn’t general in meaning. But the definite article isn’t used here, either.  I’ve asked about this several times, but none gave me a good answer.


I typed the code below in scala console and get the return:  scala> 1.0F to 5.0F by 1.3F res10: scala.collection.immutable.NumericRange[Float] = NumericRange(1.0, 2.3, 3.6, 4.8999996)   why the ret is NumericRange(1.0, 2.3, 3.6, 4.8999996) instead of NumericRange(1.0, 2.3, 3.6, 4.9) ?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I was browsing the meta footer and I saw a strange white space underneath the footer.    Should it be there, and if yes, why?  EDIT: As you can see this happens on Chrome. I also tested in IE and Firefox and it has the same effect.

I just noticed that here on meta the footer doesn't stick to the bottom of the page, I know that it's not that big of a deal but it does look a bit clumsy.    Shouldn't there be an easy fix for this?  EDIT:  Since this has been reproduced and discussed by some members I was wondering if anyone is actually trying to fix this?  EDIT: (imported from , )  #footer.categories #svnrev has margin-bottom: 10px;. It should have margin:0, or be moved alongside #copyright.


I am currently designing a complex app for a large energy corporation and I need to provide diagrams explaining the dimensions of my UI elements, layout constraints, typefaces, colours etc to my developer.   I was wondering if there is a resourceful way of doing this which will save time for both parties?   I want my developer to have a clear idea of the layout to make his life easier. Any help would be appreciated, maybe just an example of a smart way of representing it on a simple pdf. Working on Mac.

I've recently started a major redesign for a large web-based financial tool. To aid future development, I'm planning on generating a UX style guide that outlines best practices for things like forms, page layouts, animations, etc...   The existing application is a big jumble of forms with little grouping or organization. I can see a few major categories, (Object CRUD forms, static data, user session management controls, etc...) but there's a lot of very custom functionality that doesn't fit the mold.  The company I'm working with does it's development overseas, and this documentation is intended to support future development. I'm not looking to design the most amazing UX ever, I just want things to be functional. What's the best way to communicate designs to remote teams?  Here's my question:  What's the best way to approach a big messy project like this? (Major groups first, then focus on each custom function? Do you even include the custom functions in the documentation?)


I have a Dell inspiron n 5110. The laptop was working fine with ubuntu 14.04 desktop. I recently changed my hard drive to an ssd patriot 2.5'' SATA III 6Gps.  I have downloaded an installation file  ubuntu 16.04 desktop 64bit and stored on USB memory.  I constantly get the same message :  PXE-MOF: Exiting PXE ROM.  Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key_   Any ideas on how to move on and complete my installation?

I have a chromebook series 5. I want to install Ubuntu onto a USB stick. When I downloaded Ubuntu onto my USB stick, it won't start up.  Do I first have to download Ubuntu onto my chromebook hard drive, open Ubuntu and then make USB stick bootable? And then return back to chrome?  Or is there a way to download directly onto USB and make the stick bootable?  I appreciate any help.


I am using Windows 7 and it goes "off" periodically, I presume either suspended or screen locked (how can I tell the difference?)  This is a problem because sometimes I run applications that should not be suspended. For example, today I had the laptop in a car and it was reading the OBDII sensor via a USB connector collecting live data. In the middle of the trip the screen went dark. When I clicked it, the rainbow with the clock appeared, I clicked that and it invited me to log in. Was the computer suspended, thus interrupting the collection of data?  How can I understand and control the mode of the computer to ensure that vital processes that should not be suspended continue running?  These are my current power settings:    This would seem to suggest the computer would never sleep or hibernate, so am I safe in assuming that the data collection was not interrupted? I saw no data file in the directory where it supposed to be, so I am afraid it may have been interrupted anyway somehow.

I have attempted to prevent my screen from locking when plugged in for 3 hours, but it is not happening. These are my settings:    Nevertheless, if I leave my computer for 15 minutes it locks, even though it is plugged in. Is there some setting somewhere that is overriding these settings?  The screen locks after 10 minutes, just timed it.


Inspired by , what are your photography tips for people who are not even beginners, just the next person with a camera?   With that I mean people like me, who own a simple compact class camera and take pictures at family gatherings or vacations. They do not know all kinds of advanced concepts like "focal length" or "shutter speed" - nor are they particularly interested in them. They just want a good picture with their little camera. In fact, a definition of a "good" picture would also be appreciated.

Over time, I've found there are a handful of really simple things that anyone can do to take better pictures.  What are your favorites?   Understand the basics of aperture, shutter speed, and ISO. Take your camera everywhere, including when you don't intend to use it. Take a lot of pictures. If you find what you could perceive as an interesting subject or image, take many images varying angle, height, framing, working distance, aperture, focal length, etc. When reviewing your own pictures, think about what you like and don't like for each one. What could be done to improve it (not just in post process, but when you were taking it, or even stuff like if that tree wasn't there, the clouds were better, a certain facial expression, etc). Also look at photos and photogs that you like and try to understand why you like the work and how to do that. Submit your good ones to critique forums and websites. Critique other people's photos, it will help you see and take better pictures. Participate in photo challenges. Once you spend a week agonizing over a good concept for a theme, you can look at what other people did. The pains of your own creative process combined with great ideas that others have executed will give you new insight. Forget about gear. For a day, limit yourself to one focal length. Limit yourself to a certain number of pictures (once you have started to develop a photographic eye from taking and looking at many pictures), it will teach you to be careful and deliberate about creating a photograph. Have fun. "check your edges" -- think about everything that's inside the frame, and make sure you want it there.  ("check your edges" meaning to look around the edges of the frame -- often things that straddle the edge of the frame are good candidates for either bringing further in (tops of heads, say, or feet sometimes) or excluding (random objects, a transition that doesn't need to be there, etc.)).


I see:   Bluetooth manager Certificate and key storage check for new hardware drivers disk notifications GNOME login sound GSettings Data Conversion Network Manager NVDIA X Server Settings Power Manager Print Queue Applet PulseAudio Sound System PulseAudio Sound System KDE Routing Policy Remote Desktop Secret Storage Service SSH Key Agent Ubuntu One Update Notifier User folders update Visual Assistance   I'd like to turn off these:   Bluetooth manager disk notifications GNOME login sound GSettings Data Conversion Power Manager Remote Desktop Ubuntu One User folders update Visual Assistance

Which startup elements can be safely deleted (for home desktop users)?    I use this terminal commands to see the whole startup list:  cd /etc/xdg/autostart sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop


Stumbled along the use of the feminine pronoun for "baby". Previously, I've used it and singular they when the sex of the baby is unknown.   Is it correct to use the feminine pronoun (she) for "baby" when you don't know if it is a boy or a girl?  Can somebody please explain that to me? Here's an example: "At about 6 months, when your baby can sit up, she'll probably be too big to be bathed in an infant tub" ()

There are some questions on gender-neutral pronouns both  and on .  User Christine Letts :     In academia, there is currently a   movement toward using the feminine   pronoun at all times.   I wonder why that is. I came across several examples on papers I read, but the only one I can remember at the moment is a book: Seth Godin's . While some might not be comfortable labeling it as part of academia, it suits my point perfectly. Every time he refers to a person, he uses the feminine pronoun.  User Senseful  the following, potentially identifying affirmative action as the precursor for this trend.     I remember reading somewhere that it   was recommended to use the opposite of   what most people stereotype the   profession as. So, for example, when   talking about a chiropractor, you   would use "her", and when talking   about a secretary, you would use   "his".   So, where do you think this trend comes from?


What is the difference between a research paper and a research article? Frequently these two terms are considered in the same category. So, what features distinguish these two terms?

In the terminology for a peer-reviewed publication to be submitted to a reputable scientific journal, what are the differences and characteristic properties of the following?   draft manuscript preprint paper article   My own take on it would be that my text is a draft until I submit it to a journal, at which point it becomes a manuscript.  When the manuscript is accepted it becomes a preprint, and when it gets published it becomes a paper, which is synonymous to article.  Would that be an accurate summary?  Would anyone have corrections or additions?


I had Win10 on my SSD and installed Ubuntu afterwards. All I did was  insert an Ubuntu USB and partitioned the disk and installed.   In the meantime, I've read some articles about this and and a few stipulated that I need to partition my disk in Windows first.  Everything is running as expected, but I'm not sure if there is an issue that can occur (e.g. windows does not know that there is Ubuntu and it could use this space)?   Is there a way to fix this?

I am dual-booting Windows 7 and Ubuntu, both installed on separate partitions. I don't need Ubuntu anymore. How can I remove the Ubuntu partition(s) and add the reclaimed space to my Windows 7 partition for saving files in Windows?


The actual app uses the view, when to use materialized, when to use the view

What is the difference between Views and Materialized Views in Oracle?


Can someone please help here, i am trying to save the console output into a text file, i am getting NullPointerException error. Please suggest what wrong i am doing here.Also is there a way to create a new text file for each run?  Thanks in advance:  import java.io.*;   import java.sql.*;    public class RetrieveFile {       public static void main(String args[]) throws Exception {         try {             Class.forName("oracle.jdbc.driver.OracleDriver");             Connection con = DriverManager.getConnection("jdbc:oracle:thin:@tkdp2gpsdbc03-vip.hk.hsbc:35120/GPSEAU_TAF", "gppeareadu", "F4nt4na");              PreparedStatement ps = con.prepareStatement("select * from MSG_FEES where MID='1961108001406E00'");             ResultSet rs = ps.executeQuery();              try {                 printResultColumns(rs);             } catch (SQLException e) {                 System.err.println(e.getMessage());             }              con.close();         } catch (Exception e) {             e.printStackTrace();         }     }      public static void printResultColumns(ResultSet resultSet) throws SQLException, IOException {     ResultSetMetaData rsmd = resultSet.getMetaData();     int columnCount = rsmd.getColumnCount();      while (resultSet.next()) {         // you get a single result row in here, not the entire ResultSet         for (int i = 1; i <= columnCount; i++) {             switch (rsmd.getColumnType(i)) {             case Types.VARCHAR:             case Types.LONGVARCHAR:             case Types.CHAR:                 System.out.println(resultSet.getString(i));                 break;             case Types.DOUBLE:                 System.out.println(resultSet.getDouble(i));                 break;             case Types.INTEGER:                 System.out.println(resultSet.getInt(i));                 break;             case Types.DATE:                 System.out.println(resultSet.getDate(i).toString());                 break;             case Types.TIMESTAMP:                 System.out.println(resultSet.getTimestamp(i).toString());                 break;             case Types.BOOLEAN:                 System.out.println(resultSet.getBoolean(i));                 break;             case Types.DECIMAL:             case Types.NUMERIC:                 System.out.println(resultSet.getBigDecimal(i));                 break;             default:                 //System.out.println(rsmd.getColumnClassName(i)                }         }     }   StringBuilder record = new StringBuilder(); while (resultSet.next()) {     if (record.length() > 0) record.append("\n");     for (int i=1; i < columnCount; ++i) {         if (i > 1) record.append(", ");         record.append(resultSet.getInt(i));     } } try {     String filename = "C:\\Users\\45060849\\Desktop\\test1.txt";     BufferedWriter writer = new BufferedWriter(new FileWriter(filename));     char[] str = null;     writer.write(str);     writer.close(); } catch (IOException e) {     // handle exception }   }     }    Please find the below Log file for above code:- Please find the below Log file for above code:-  java.lang.NullPointerException     at java.io.Writer.write(Writer.java:127)     at RetrieveFile.printResultColumns(RetrieveFile.java:76)     at RetrieveFile.main(RetrieveFile.java:14) Picked up JAVA_TOOL_OPTIONS: -Duser.home=C:\Users\123

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


This question must be weird, but:     Is $f(x) = 1$ equal to $f(x) = \frac{x}{x}$ ?   The reason I am asking is:  Since $\frac{x}{x} = 1$, it would be reasonable to conclude $f(x) = 1$ is indeed equal to $f(x) = \frac{x}{x}$. However, it we look at the graphs of these two functions, we can see that $f(x) = 1$ is continuous everywhere, yet $f(x) = \frac{x}{x}$ is undefined at zero.

I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible?  Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ?  Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of  $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$.


$$\left| {\left| a \right| - \left| b \right|} \right| \le \left| {a \pm b} \right| \le \left| a \right| + \left| b \right| $$

So I was given the task of proving the following variant of the triangle inequality using only the properties of the absolute value:  $\vert\lvert x\rvert -\lvert y \rvert \rvert \leq \lvert x+y\rvert$  Now my initial instinct was to divide it to four cases based on the possible values of x and y, and show that in each case I get a truth expression, but it seems a bit "brute force" to me and I'm not sure this is what my instructor meant. Since I'm not allowed to use the actual triangle inequality and must adhere to absolute value properties, is there any other solution?  (Of course he'll accept this answer if it's correct, but I want to learn what it is I'm missing).


I try to concatenate 2 lambda expressions that are generated dynamically:  public Expression<Func<User, bool>> Expres(int id) {     var argument = Expression.Parameter(typeof(User));     var left = Expression.Property(argument,"id");     var right = Expression.Constant(id);     BinaryExpression binary = Expression.Equal(left, right);     Expression<Func<User, bool>> exp = Expression.Lambda<Func<User, bool>>(         binary,         new[] { argument }     );      return exp; }   Example:  >Expres(255); Param_0.id == 255  >Expres(10); Param_0.id == 10   but, when merge them...  >expression = Expression.And(exp1, exp2);      (Param_0.Id == 255) And (Param_1.Id == 10)   >Expression.Lambda<Func<TEntidad, bool>>(expression, new[] { argument });      Param_0 => ((Param_1.Id == 255) And (Param_2.Id == 10)   but it generates more dependencies than required, and the result of what I expected is:     Param_0 => ((Param_0.Id == 255) And (Param_0.Id == 10)

I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of these and get a new expression of the same type  Expression<Func<T, bool>> expr1; Expression<Func<T, bool>> expr2;  ...  //how to do this (the code below will obviously not work) Expression<Func<T, bool>> andExpression = expr AND expr2


I am building my own local search UI element that gives local search suggestions as you type. The problem I am having is that when I focus on the html text input element my browser (Safari, but could happen in other browsers) displays its own text suggestions based on things that I've typed in the past.   My guess is that this is dependent on the ID or Class of the < input > tag. So probably, if I change the input tag class to something obscure, the browser will not have any suggestions to offer. But I wonder if there isn't a more elegant way...  A related issue is about text field highlighting that happens in Safari when you focus on the < input > element. When I am filling up a form on Facebook, I don't see this outline. It would be great to hear if someone knows how to handle those two issues.

How do you disable autocomplete in the major browsers for a specific input (or form field)?


Does there exist a positive integer $k$ such that $A = 2 ^ k + 3 ^ k$ is a square number? I have tried from $k = 1$ to $k = 10$, seeing that $A$ is not a square number. Could you please answer in the general case?

My attempt :  If $n$ is odd, then the square must be 2  (mod 3), which is not possible.  Hence $n =2m$  $2^{2m}+3^{2m}=(2^m+a)^2$  $a^2+2^{m+1}a=3^{2m}$  $a (a+2^{m+1})=3^{2m} $  By fundamental theorem of arithmetic,   $a=3^x $  $3^x +2^{m+1}=3^y $  $2^{m+1}=3^x (3^{y-x}-1) $  Which is not possible by Fundamental theorem of Arithmetic   Is there a better method? I even have a nagging feeling this is wrong as only once is the equality of powers of 2 and 3 $(n) $are used.


Suppose $\mu$ is a Radon measure on a locally compact Hausdorff space $X$ such that $\mu(\{x\})=0$ for all $x\in X$ and $A \in B_X$ satisfies $0<\mu(A)<\infty$. Then for any $\alpha$ such that $0<\alpha<\mu(A)$, there is a Borel set $B\subset A$ such that $\mu(B)=\alpha$.  I am reviewing measure theory for my exam and got stuck on this question. Can any one help me ? Thank you very much.

Suppose $\mu$ is a Radon measure on $X$ such that $\mu(\left\lbrace x \right\rbrace)=0$ for all $x \in X$, and $A \in \mathbb{B}_X$ satisfies $0 < \mu(A) < \infty$. Then for any $\alpha$ such that $0 < \alpha < \mu(A)$ there is a Borel set $B \subset A$ such that $\mu(B) = \alpha$   I'm not even sure how to start this problem. It seems like a nice result, but any hints on how to start?


I have a druid character, and I want to find out how many spells I can prepare at any one time.

How many spell slots does a character get, and how do you calculate that if there's a calculation involved? I've been looking everywhere for this, but can't find it.  I started playing just about a month ago and I've had to make about 2 character sheets for my friends already (Human Fighter and a Wood-Elf Ranger) and now I'm making myself a Cleric of Life but can't figure out how many spell slots I have.


I want a to be rounded to 13.95.  >>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999   The  function does not work the way I expected.


I've done some searching here and have not found what I'm looking for.  I've got a form that gets filled out, upon submitting it adds it to an SQL database (using PHP). However, if someone puts an apostrophe or single quote, it will blow up...I need to be able to either parse each text field to check for single quotes to escape them out or find some other way for this to work.  Here is my SQL statement...if it helps.  $query = "INSERT INTO workshopinfo (Year, Presentername, email, bio, arrival, title, description, costyn, matcost, schedlimit, additionalinfo, typeofws, verified)" . "VALUES ('$year', '$presentername', '$email', '$bio', '$arrival', '$title', '$description', '$costyn', '$matcost', '$schedlimit', '$additionalinfo', '$typeofws', '$verified')";   So of course a single quote will blow it up, as will a double quote...it fails every time.  There is likely an easy solution to this.

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


I'm running Ubuntu 11.10 on a desktop, so I don't have fn, and the option doesn't appear in under System Settings > Screen as it apparently only appears if your computer is detected to be a laptop.  Is there any way to change screen brightness?

I have Ubuntu 12.10  I need an application/software that can increase and decrease my brightness.  I know I can do it through my pc monitor but I don't want that. I want to control it through a software.  I personally cannot find an application about this issue.  I know that it is possible because the OS has the Fading effects before Screen Savers.     I want to control brightness through a software for desktop pc.


I have a concern about my approaching flight, I just got my permanent resident visa for Canada. I have a connecting flight from Manila to San Francisco USA, then to Toronto. I will just stay two hours at the San Francisco airport for my connecting flight.  Do I need papers or a visa from the US embassy so they will not hold me or stop me from flying to Canada?

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


Why do polynomial of degree x have x zeroes? I searched on the net but could not find anything. Is there a derivation or proof?

Does anyone know of a relationship between the number of zeros (complex and real) and the degree of a polynomial?  Specifically, if a polynomial has a double root, is it compensated with complex zeros?


The graph is not working as intended and I am getting the following error code: ! Package pgfkeys Error: I do not know the key '/tikz/discontinuous' and I am going to ignore it. Perhaps you misspelled it.See the pgfkeys package documentation for explanation.Type H  for immediate help.... \end{axis}  My code is below.  \documentclass[]{article}  \usepackage{pgfplotstable} \usepackage{pgfplots}  \begin{document}  The C.D.F is as follows:  \[F(x)= \begin{dcases} 0&\text{$x<1$}\\ \frac{11}{36}&\text{$1\leq x<2$}\\ \frac{20}{36}&\text{$2\leq x<3$}\\ \frac{27}{36}&\text{$3\leq x<4$}\\ \frac{32}{36}&\text{$4\leq x<5$}\\ \frac{35}{36}&\text{$5\leq x<6$}\\ 1&\text{$x\geq 6$}\\ \end{dcases} \]  The C.D.F can be graphed as follows:  {\centering \begin{tikzpicture} \begin{axis}[ clip=false, jump mark left, ymin=0,ymax=1, xmin=0, xmax=5, every axis plot/.style={very thick}, discontinuous, table/create on use/cumulative distribution/.style={     create col/expr={\pgfmathaccuma + \thisrow{f(x)}}    } ] \addplot [red] table [y=cumulative distribution]{ x f(x) 0 0 1 11/36 2 20/36 3 27/36 4 32/36 5 35/36 6 1 }; \end{axis} \end{tikzpicture} \par} \end{document}

I have a function defined as:     How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.


If $x_n \to x$, how might we prove    $$\lim_{n \to \infty} \frac{\sum_{i=1}^{n} x_i}{n} = x$$  Of course, one has $\limsup x_n = \liminf x_n = x$, and thus, using the Stolz-Cesaro theorem:  $$\liminf x_n \le \liminf \frac{\sum_{i=1}^{n} x_i}{n} \le \limsup \frac{\sum_{i=1}^{n} x_i}{n} \le \limsup x_n$$ which shreds this easily. However, I'm wondering whether one could do this without the Stolz-Cesaro theorem.   Also, apparently the converse of this statement is not true. If we take $x_n = 0,\, n$ even, and $x_n =1,\, n$ odd, this suffices, correct? As the second expression tends to $1/2$, while the first has no limit?

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


I have multiple hostnames resolving to a single machine, e.g.:   build.mydomain.com www.mydomain.com jira.mydomain.com mydomain.com   Is it possible to setup apache in order to redirect requests to each different hostname?  e.g:   build.mydomain.com -> build.mydomain.com:8111, www.mydomain.com -> www.mydomain.com:8080 mydomain.com -> www.mydomain.com:8080   The DNS records are setup to all point to the same machine, i just want to redirect to the right port given the hostname.  Cheers,  Edit:  Machine is debian w/ Apache2  Edit2:  <VirtualHost *:80>     ServerName www.mydomain.com     ServerAlias mydomain.com     redirect 301 / http://www.mydomain.com:8080/ </VirtualHost>  <VirtualHost *:80>     ServerName build.mydomain.com     redirect 301 / http://build.mydomain.com:8111/ </VirtualHost>

I have some subdomains I want to redirect to specific ports on the same server. Say I have  dev.mydomain.com    I want dev.mydomain.com to transparently redirect to mydomain.com:8080 and I want to preserve the original sub-domain name the url of the browser.  How do I do this with Apache 2.2? I have Apache 2.2 running on default port 80. I can't figure out the write configuration to get this to happen.  I have already set up dev.mydomain.com to resolve in DNS to mydomain.com.     This is for an intranet development server that has a non-routable ip   address so I am not so concerned about exploits and security that   would compromise a publicly facing server.


How can I stop nautilus creating a desktop when it is run in KDE environment. Is there a way to make nautilus command work the same as nautilus --no-desktop?  I downloaded . It has no option for stopping nautlius.   did not help.

I'm using xmonad, and I would like to open a nautilus window to a certain directory, because I like the convenience of browsing inside an encrypted zip file without unzipping it, which nautilus allows.   however, opening nautilus, even with a path argument starts a desktop on the monitor I'm using (There are 8 xmonad monitors) The desktop is inoperative and renders that monitor useless until nautilus is killed.  Is there any way to open just a nautilus window without any desktop starting?


We have been asked to prove that given an irrational $\alpha$ there exist infinitely many relatively prime pairs $(p,q)$ such that $|p/q-\alpha|<1/q^2$. I have so far found a constructive solution with continued fractions, but only existence is required and I feel like there must be a much more concise and precise solution that does not require introducing continued fractions. As a tip we are told to use the pigeonhole principle.  Any other tips or piece of advice will be helpful. Thank you.

I want to show that     For all irrational numbers $a \in \mathbb{R}$ there exists an $Q \in \mathbb{N}$ such that $|a-\frac{p}{q}| \lt \frac{1}{qQ}$ for $p,q \in \mathbb{Z}$ and $1 \le q \le Q$.   My attempt:  Let $a \in [0,1)$ and $Q \in \mathbb{N}$. Divide $[0,1)$ in $Q$ disjunct subintervals $I_i := [\frac{i}{Q}, \frac{i+1}{Q})$ for $i \in \{0,1,\ldots, Q-1\}$. Consider the fractional parts $\{na\} \in [0,1)$ of the number $na$ for $n \in \{0,1,\ldots, Q\}$. Since there are in total $Q+1$ such fractional parts but only $Q$ subintervals, by the Pidgeonhole Principle there must be at least one subinterval that contain at least two fractional parts. Let such two fractional parts be $\{na\}, \{ma\} \in I_i$. Wlog let $m \lt n$. Then  $$|\{na\} - \{ma\}| \lt \frac{1}{Q}$$  since those two fractional parts are in the same $I_i$ which has a width of $\frac{1}{Q}$. By the definition of fractional parts  $$\{na\} - \{ma\} = na - \lfloor na \rfloor - (ma - \lfloor ma \rfloor) = na - ma - \lfloor na \rfloor + \lfloor ma \rfloor = aq - p$$  for $q := n-m$ and $p := \lfloor na \rfloor - \lfloor ma \rfloor$. Also $p,q \in \mathbb{N}$, because $m \lt n$. It follows then   $$|aq - p| \lt \frac{1}{Q} \iff |a - \frac{p}{q}| \lt \frac{1}{qQ}$$  If $a \ge 1$ then we can write $a = a' + k$ for some $a' \in [0,1)$ and $k \in \mathbb{N}$. Then with $p' = p+qk \in \mathbb{N}$  $$|a - \frac{p}{q}| = |a' + k - \frac{p}{q}| = |a' - \frac{p+qk}{q}| = |a' - \frac{p'}{q}| \lt \frac{1}{qQ}$$  by the first case.  If $a \lt 0$ then the rational number must be negative too, so let $p \in \mathbb{Z}$ and $p \le 0$. Then with $a' := -a \gt 0$ and $p' := -p \ge 0$  $$|a - \frac{p}{q}| = |-(a' - \frac{p'}{q})| = |a' - \frac{p'}{q}| \lt \frac{1}{qQ}$$  by the first case again.  My question:  Is my proof correct? Is there anything which could be done better?  I'm still not really sure about the dependencies. $Q$ is really $Q_a$ so so only dependend on $a$?! And is $p,q$ really $p_a,q_a$ only dependent on $a$ too or also on $Q$?  Could I instead take numbers $na$ for $n$ from another subset than $\{0,1,\ldots, Q\}$ provided it has the same cardinality?  How can I guarantee that $p' \in \mathbb{N}$ because $k$ could be a negative integer. Also I think the final argument I gave, why considering  $a \in [0,1)$ is sufficient, is not really the essence.


I'm new to LaTeX, and just want to ask how the following table may be created using LaTeX:

I'm new to LaTex, and would like to create a table that looks as follows:    How can this be done in LaTex?  Thanks.


Suppose  $$ \sqrt{n} \left( \hat{\theta}_n - \theta \right) \overset{d}{\rightarrow} F_\infty, $$  where $\hat{\theta}_n$ is a sequence of random variables, $\theta$ is a constant and $F_\infty$ is some distribution function.   Does this imply that  $$ \hat{\theta}_n \overset{p}{\rightarrow} \theta \; ? $$

How can I formally show that a root n consistent estimator is weakly consistent?  Heuristically its clear that if $\sqrt{n}(\theta_n-\theta_0)$ is bounded in probability then since $\sqrt{n} \to \infty$ as $n \to  \infty$ clearly $\theta_n-\theta_0 \in o_p(1)$ that is it goes to zero in probability but every time I try to write it formally I get stuck. Could someone help me out?


I'm developing a sort of a theme with a set of pre build components with is such as, styled data tables, input forms and etc... This is developed for internal usage in my company and I would like to add a style guide document to the theme. I've never written a style guide and would like some guidance on how to write one. I've googled and found out some templates but would like a professional guides as well.  Thank you.

I've recently started a major redesign for a large web-based financial tool. To aid future development, I'm planning on generating a UX style guide that outlines best practices for things like forms, page layouts, animations, etc...   The existing application is a big jumble of forms with little grouping or organization. I can see a few major categories, (Object CRUD forms, static data, user session management controls, etc...) but there's a lot of very custom functionality that doesn't fit the mold.  The company I'm working with does it's development overseas, and this documentation is intended to support future development. I'm not looking to design the most amazing UX ever, I just want things to be functional. What's the best way to communicate designs to remote teams?  Here's my question:  What's the best way to approach a big messy project like this? (Major groups first, then focus on each custom function? Do you even include the custom functions in the documentation?)


I've got a list of coordinate and i'm trying to change the value of these coordinate for something else in an NxN matrix as follows: import numpy as np  point2 = [(1,3), (3,5), (6,7), (10,10)]  usine_ = ["" * i for i in range(10)]  usine = [] [usine.append(usine_) for i in range(10)]  for i in point2:     x = i[0]     y = i[1]      del usine[y-1][x-1]     usine[y-1].insert(x-1, "x")    usine = np.array(usine)  print(usine)  But my code seems to change the x value of the coordinate for every list in my list [['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']  ['x' '' 'x' '' '' 'x' '' '' '' 'x']]  I've been trying to figure out what I'm doing wrong but I can't put my finger on it.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


today I found something strange about the /proc folder. There is a PID (7825) which I cannot see as a running process via ps, also I cannot see the process id when I make ls /proc BUT I can see it with ls /proc/7825 and also can cd into it. Here the outputs: # ls /proc  ... dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:57 7812 dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:52 7820 dr-xr-xr-x   9 root            root                0 May 16 20:52 7836 dr-xr-xr-x   9 root            root                0 May 16 20:52 786 dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:57 7923 dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:52 7924 ...  ps aux | grep [7]825  [EMPTY RESULT]  ls /proc/7825 attr    clear_refs  coredump_filter  environ  fdinfo   largest_task  make-it-fail  mem        mountstats  oom_adj        pagemap      root       setgroups  stat    syscall        timerslack_ns  weight auxv    cmdline     cpuset           exe      gid_map  limits        map_files     mountinfo  net         oom_score      personality  schedstat  smaps      statm   task           uid_map cgroup  comm        cwd              fd       io       loginuid      maps          mounts     ns          oom_score_adj  projid_map   sessionid  stack      status  time_in_state  wchan  Why is this PID available for ls /proc/7825 but doesn't show up in the ps os ls /proc? This is quite critical for my program, because I have to check if a certain PID (of the previous run) is still running (check if /proc/[LAST_RUN_PID]/exe exists). If so, I consider the previous run as "still-running". Today we had the issue, that the file /proc/7825/exe still exists (for hours) even if there is no program running. Can somebody elaborate why/how this happens?

I have process id 1234. This process contains thread id 1235. When I use ls -l /proc I see only the pid (1234) but when I open the thread status file using cat /proc/1235/status I can see data. Why is that? Can I access with C code directly with tid? /proc/1235/mem without knowing the process id?


Please see the screenshot from WinDirStat. Why does Windows 10 Professional take up almost 112GB on my 256GB SSD? Is that actually normal? I've run CCleaner and Windows' in-built clean-up tool, including for system files, but it only shrank by 1GB. What else can I do to free up disk space without affecting system performance? Thanks    Edit: Thanks guys! From what I gather, System Volume Information is the single remaining 'culprit' after the clean-up, but I'm told that, for the sake of system restoration, that's something I shouldn't remove completely. To err on the side of caution, I've put it at 7 percent of the disk size. If there's something else I could or should do, please let me know.

This is from my thinkpad t450s which has a Samsung 240GB SSD. It has been running fine (and still is). But I suddenly noticed one morning that my D: drive had filled up overnight. This is a surprise because I hardly do anything to occupy disk space other than browsing the web, and reading pdfs.  D: drive is 110 GB in size and in MyComputer it shows that 87.9 GBs of it has been used. But when I go into the drive in windows explorer, select all files and folders and then do a file size query it shows that the total size occupied by files and folders is 24.2 GB (there's no change of this even if I select hidden folders, system folders etc). Page file is disabled on the D: drive and the only one on C: drive is system managed. I have also disabled system restore on all partitions.   Surprisingly the disk usage is only abnormal as such in D: drive only. I have checked with WinDirStat, it shows up usage as 24.2 GB. But when run with CCleaner it shows file usage of 87.9 GB and describes the ~60 GB of unexplained usage as "other files".  My question is how can I find this mysterious disk usage/bloat that Windows Explorer cant see and only CCleaner classifies as 'other files' ? Is this a sign of disk wear with some random corrupted bit sectors ? I have checked SSD health and SMART data with software and almost all of them showed no signs of errors or warnings.


Which is the best usage? "To whom it may concern" or "To whomever it may concern"?

I received a letter of confirmation for funding from an English native speaker. She started the letter with:     To whoever it may concern,   I am not a native speaker, but that sounds quite odd to me and I would change that to To whom it may concern. Can anyone confirm whether her starting phrase is at least grammatically okay or is it just wrong?


I am faced with the following question: given a probability density function $f$ over  $\mathbb{R}$ with $\int_{\mathbb{R}}f(x)x^2dx=\sigma^2$ given, I am trying to find the "nearest" Gaussian to $\sqrt{f}$ in $L^2$, i.e. compute $$\inf_{a\in \mathbb{R}, b > 0}\|\sqrt{f}-G_{a,b}\|_2^2$$ where $G_{a,b}(x)=a\exp(-bx^2)$ and the $\|\cdot\|_2$ is the classical $L^2$-norm over $\mathbb{R}.$  If one replaces the $L^2$-distance by the relative entropy $H(f|G_{a,b})$, it is easy to check that the infimum is a minimum given by the centered gaussian with variance $\sigma^2.$ For the $L^2$-distance, it seems more involved......


I ride a Giant ATX 2. When my disc brakes started squeaking, I bought muc-off disc brake cleaner and used it on my discs and pads. It worked initially, but after 10km of paved road riding, the brakes will squeak when I brake hard. What's causing it?

I recently bought a new bike that came with Hayes Stroker Trail hydraulic brakes.  From day one they were squeeky and not very grippy.  I wrote it off to the burn in period that most disc brakes require.  But after a few hundred miles on them now they are just as bad.  I have bled then in hopes that air in the line was causing the problem.  I got several air bubbles out of the line which helped with the squishiness of the lever, but alas the brakes are still noisy and lack that braking power that I have had with other disk brakes.    I have read a little on this problem and some say that it is just the nature of this brand of brake.  Has anyone found a solution to fixing the squeel, short of buying better brakes.


I am trying to compare if two lists have the same objects, independent of its order and its number of elements.  For example:  List1 ["A", "B", "A"] and List2 ["A", "B"] must return equals.  I am using Set, because checks independently of the order of objects. However, returns false if both lists have a different number of elements.  Here is my code:  private Optional<EArea> getSimilarExistingArea(EImportArea importedArea) {     for (EArea existingArea : baseLineService.getBaseLine().getAreas()) {         EList<EPoint> importedAreaPoints = importedArea.getPoly().getPoints();         EList<EPoint> existingAreaPoints = existingArea.getPoly().getPoints();         final Set<EPoint> importedAreaPointsSET = new HashSet<>(importedAreaPoints);         final Set<EPoint> existingAreaPointsSET = new HashSet<>(existingAreaPoints);         if (existingAreaPointsSET.equals(importedAreaPointsSET)) return Optional.of(existingArea);     }     return Optional.empty(); }   I would like to return true if existingAreaPointsSET ["A", "B", "A"] and importedAreaPointsSET["A", "B"]   Here are the equals and hashCode funtions in the EPoint class:  @Override public boolean equals(Object o) {     if (o == this)         return true;     if (!(o instanceof EPoint)) {         return false;     }     EPoint ePoint = (EPoint) o;     return Math.abs(Math.abs(ePoint.lat) - Math.abs(lat)) < EPSILON && Math.abs(Math.abs(ePoint.lon) - Math.abs(lon)) < EPSILON; }  @Override public int hashCode() {     return Objects.hash(lat, lon); }

What issues / pitfalls must be considered when overriding equals and hashCode?


Can anybody please describe how and why it is even possible? If there is anything wrong what it is,?  Prove: $2+2=5$  $$-20=-20$$  $$16-36=25-45$$  $$16-36+\frac{81}{4}=25-45+\frac{81}{4}$$  $$4^2-2\cdot4\cdot\frac92+\left(\frac92\right)^2=5^2-2\cdot5\cdot\frac92+\left(\frac92\right)^2$$  $$\left(4-\frac92\right)^2=\left(5-\frac92\right)^2$$  $$4=5-\frac92+\frac92$$  $$4=5$$  $$2+2=5$$


If I use the [hang] format of the titlesec package (using a quite recent version of titlesec, namely 2016/03/15 v2.10.1, and TeX Live 2015), the section is not numbered. It seems that the [hang] option disables the numbering.  MWE (taken from , the image there shows my expected outcome):  \documentclass{article} \usepackage{tgtermes,tgheros} % use your preferred ones for the fonts \usepackage{lipsum} % this is just to produce some text  \usepackage{titlesec} \titleformat{\section}[block]   {\fontsize{12}{15}\bfseries\sffamily\filcenter}   {\thesection}   {1em}   {\MakeUppercase} \titleformat{\subsection}[hang]   {\fontsize{12}{15}\bfseries\sffamily}   {\thesubsection}   {1em}   {}  \begin{document}  \lipsum[1]  \section{A section title}  \lipsum[2]  \subsection{A subsection title}  \lipsum[3]  \end{document}   Is this a bug in the titlesec package?

After reinstalling TeXLive distribution (install-tl-20160318, Ubuntu 14.04), a issue occurs with the updated version of the titlesec package: the section numbering is lost.  What could it be missing? Is there a modification I have not seen?  Below is a MWE comparison of the two versions. The prevtitlesec package is a reinstall of the previous version (2011/12/15).  \documentclass{book} \usepackage[margin=2cm,a4paper]{geometry} %\usepackage{prevtitlesec}% 2011/12/15 version \usepackage{titlesec}% 2016/03/15 version \usepackage{lipsum}  \begin{document}  \chapter{Title of the first chapter} \lipsum[1] \section{A test section} \lipsum[4] \subsection{A test subsection} \lipsum[4] \subsection{A test subsection} \lipsum[4]  \end{document}   titlesec package 2011/12/15:    titlesec package 2016/03/15:


I'm ready for the nuthouse at this point. This error makes me want to stab my eyes out after staring at the screen and testing stuff for literally MONTHS now! The offending code, which looks to me like it cannot possibly fail: dbcall('INSERT INTO dblog_query_strings (query_string) VALUES ($1) ON CONFLICT DO NOTHING', $query_string); dbcall('INSERT INTO dblog_file_paths (file_path) VALUES ($1) ON CONFLICT DO NOTHING', $file_path); dbcall('INSERT INTO db_log (query_string_id, file_path_id, seconds) VALUES (     (SELECT id FROM dblog_query_strings WHERE query_string = $1),     (SELECT id FROM dblog_file_paths WHERE file_path = $2), $3)', [ $query_string, $file_path, $seconds ]);  The error is: pg_query_params(): Query failed: ERROR:  null value in column "query_string_id" violates not-null constraint DETAIL:  Failing row contains (1, 2020-08-27 00:37:32.419107+02, null, null, 0.00065708160400391).  I've made very sure that the actual string variables sent to PG are indeed populated, so they aren't null for sure. And this query mostly works, but every now and then spits out this nonsensical error. That's very important to point out here. It's working most of the time, but sometimes messes up for some reason. I cannot for the life of me figure out WHY that happens. I very clearly INSERT the strings to the first two tables before I then run the third and final INSERT query, which grabs the ids from the tables. I cannot see any way in which these queries could fail. It looks impossible. Whether the values exist already or not is irrelevant, because I INSERT with "ON CONFLICT DO NOTHING" in the end. And then I only grab the ids after that has run. These queries are not asynchronous or anything, which otherwise could explain this in that the third INSERT is run before one of the two first or something. Why do the SELECTs inside the third INSERT sometimes receive null instead of the existing-for-sure values from the tables? I don't understand it and this kind of thing, where I look at the code and simply cannot see any error, drives me absolutely insane for real. Please offer some kind of hint. I've removed the BEGIN/COMMIT I used around this query before, because I kept getting "deadlock detected" errors all the time. I thought I would stop getting errors after removing those, but instead I get these null errors... Even though they cannot happen according to the code. So how can they still happen? What have I fundamentally misunderstood about databases/PostgreSQL?

Table structure: CREATE TABLE dblog_query_strings (     id          bigserial,     query_string        text NOT NULL,     PRIMARY KEY     (id),     UNIQUE          (query_string) )  CREATE TABLE dblog_file_paths (     id          bigserial,     file_path       text NOT NULL,     PRIMARY KEY     (id),     UNIQUE          (file_path) )  CREATE TABLE db_log (     id          bigserial,     logged_at       timestamptz NOT NULL DEFAULT now(),     query_string_id     bigint NOT NULL,     file_path_id        bigint NOT NULL,     seconds         numeric,     PRIMARY KEY     (id),     FOREIGN KEY     (query_string_id) REFERENCES dblog_query_strings (id) ON UPDATE CASCADE ON DELETE CASCADE,     FOREIGN KEY     (file_path_id) REFERENCES dblog_file_paths (id) ON UPDATE CASCADE ON DELETE CASCADE )  The application code, which is indeed run at the same time by many different scripts: $query_string = 'test query string'; $file_path = 'test path'; $seconds = 0.00065708160400391; dbcall('INSERT INTO dblog_query_strings (query_string) VALUES ($1) ON CONFLICT DO NOTHING', $query_string); dbcall('INSERT INTO dblog_file_paths (file_path) VALUES ($1) ON CONFLICT DO NOTHING', $file_path); dbcall('INSERT INTO db_log (query_string_id, file_path_id, seconds) VALUES (     (SELECT id FROM dblog_query_strings WHERE query_string = $1),     (SELECT id FROM dblog_file_paths WHERE file_path = $2), $3)', [ $query_string, $file_path, $seconds ]);  The SOMETIMES logged error, for example right when I clear the database log: pg_query_params(): Query failed: ERROR:  null value in column "query_string_id" violates not-null constraint DETAIL:  Failing row contains (1, 2020-08-27 00:37:32.419107+02, null, null, 0.00065708160400391).  Analysis: The third INSERT sometimes gets nulls for its SELECTs, instead of the expected strings. This should be logically impossible, regardless of whether I run one script or 10,000 scripts in parallel, because even if the other scripts INSERT at the same time, and all but the first one fail, this is built into my mechanism, as you can see. The first two queries simply INSERT values if they don't exist. It thus doesn't matter how many concurrent scripts are being run. By the time the third and final INSERT is executed, the table is guaranteed to have those values in it. Yet this is clearly not always the case! But I don't see how that is possible. At this point, I'm 99% convinced that I've somehow hit a bug in PostgreSQL, but I'd much rather have this be a mistake/confusion by me. I don't see any way which in which the third INSERT can possibly ever get null values from those SELECTs, given that the queries before make sure that the values exist, prior to it being executed. They are not "asynchronous" but executed sequentially, one by one. I've tried it like this and as a single transaction. Nothing helps from the dreaded "magical" race conditions or whatever is really happening here. This is how I "clear the log": dbcall('BEGIN'); dbcall('TRUNCATE TABLE db_log RESTART IDENTITY CASCADE'); dbcall('TRUNCATE TABLE dblog_query_strings RESTART IDENTITY CASCADE'); dbcall('TRUNCATE TABLE dblog_file_paths RESTART IDENTITY CASCADE'); dbcall('COMMIT');  While that transaction is being executed, tons of scripts are doing the INSERTs, but this doesn't matter since they will either see the old tables or completely empty ones... right? So how can I get errors still?


The X-Wing opens its wings when in combat mode, but what purpose do the two modes have? Usually a fighter will become sleeker for higher speed, and then open itself up to allow better manoeuvring; but in space there is no benefit in terms of aerodynamics.  So what are the benefits in Star Wars to opening up wings?

The X-wing fighters can change their wing configuration, from the X shape during battle to flat wings (the wings on the same side fold together) during FTL travel.  I'm guessing that the real world explanation is something like, "it looks cool". But what is the in-universe explanation?  There is no (little) resistance in space, so wing configuration wouldn't make that much difference. I can't see it making much change to performance, e.g. in angular momentum, either.


So I started building a function with which I aim to correct the first 3  'allocations' which exceed a certain limit.   Below function now returns a list with the exceeded values per value in the passed list.   def correct_wrong_allocations_zw(weight_vect):     temp_weight_vect = list(weight_vect[:3])      limits = [1.00, 0.30, 0.25]     too_much_list = []      too_much = 0.00     for i in range(0, len(temp_weight_vect)):         if temp_weight_vect[i] > limits[i]:             too_much_list.append(temp_weight_vect[i]-limits[i])      return too_much_list  allocations = [0.10, 0.40, 0.50, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00] allocations = correct_wrong_allocations_zw(allocations) print allocations   The difference between allocations[1] and limits[1] is 0.10, yet the result of this program is:  [0.10000000000000003, 0.25]   What is going on?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


After upgrading from Ubuntu 14.10 to 15.04, my boot time increased dramatically from around 30s to more than ten minutes. The screen stays black for quite a long time, but when waiting long enough I reach the logon screen. When I manually switch back to Upstart booting is as fast as before.  What puzzles me is that the logs consistantly still show boot times around 30 seconds although in reality I wait for ages until I can logon.   Also an invalid swap partition in /etc/fstab as suggested  was not the culprit.  Here is my dmesg output of my last systemd boot  , but as mentioned, the boot time is in fact much longer.  Same for systemd-analyze critical-chain:  graphical.target @35.170s └─multi-user.target @35.170s   └─smbd.service @34.874s +295ms     └─nmbd.service @32.025s +2.847s       └─network-online.target @32.022s         └─network.target @26.271s           └─wpa_supplicant.service @26.842s +60ms             └─basic.target @24.166s               └─sockets.target @24.165s                 └─dbus.socket @24.165s                   └─sysinit.target @24.160s                     └─networking.service @24.016s +143ms                      └─apparmor.service @23.657s +357ms                        └─local-fs.target @23.652s                          └─shared.mount @23.538s +112ms                            └─systemd-fsck@dev-disk-by\x2duuid-fbff68ef\x2d6da1\x2d432a\x2d8500\x2d60795a470afd.service @16.688s +6.743s                               └─local-fs-pre.target @16.627s                                 └─systemd-remount-fs.service @16.546s +57ms                                   └─systemd-fsck-root.service @15.972s +573ms                                     └─system.slice @3.508s                                       └─-.slice @3.507s   Any hints and feedback is very much appreciated.

I have been using Ubuntu for a long time now, this is what happened when I use:  Systemd: It performs really bad using systemd: it uses 95% of the CPU all the time and the PC gets really hot. Also it takes a really long time to boot (about 1.5 min, and sometimes it does not boot at all as it has a black screen at boot.)  Upstart: When I tried the upstart options at boot, it performs as expected, booted in seconds, and it was awesome as it should be.  Laptop:   AMD A8 Radeon SSD   Questions:   Why does upstart perform better than systemd? How can I debug systemd? Should I switch to upstart? If yes, how do I do it?


I am travelling from India to Amsterdam with a layover at London, where I have to change airports from Heathrow to Gatwick. Do I require a transit visa?  I have a Dutch residence permit which is valid until next year. Does this exception statement apply to me? You can transit without a visa if you have a common format residence permit issued by an European Economic Area (EEA) country or Switzerland.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


Doesn't matter if it's selected or not, but whenever I click LMB, the cursor always appears there. It's also preventing me from selecting objects by clicking; I can only drag select, and it sucks trying to select a single object through bunches of them. I've been able to blend on other devices without this issue. How do I turn this off?

I don't understand what the white circle with the cross is for. I can change its position by left mouse click in the 3D view. Why does it change its position and what it is for?


I am attempting to disprove following statement with counter example. If $\sum_{n=1}^{\infty} a_{n}$ converges and lim $b_{n}$ = 0, then $\sum_{n=1}^{\infty} a_{n}b_{n}$ converges My work: If a series converges then lim $ a_{n} $ = 0. All of the examples I am trying to construct are turning out to be convergent. Can I get some help here?

Prove or disprove: if $\sum\limits_{n=0}^\infty a_n$  converges and $\lim\limits_{n→\infty}b_n =0$, then $\sum\limits_{n=0}^\infty a_n  b_n$ converges.  I tried this example $$a_n= b_n = \frac {(-1)^n} {\sqrt {n+1}},$$ this will show that $$\sum_{n=0}^\infty a_n  b_n = \sum_{n=0}^\infty \frac {1} { {n+1}},$$ which is the Harmonic series, diverges.   However, I tried every convergent test but I couldn't show that $$\sum_{n=0}^\infty \frac {(-1)^n} {\sqrt {n+1}}$$ converges.


I have a question about rendering an animation.   For a research project I am trying to animate displacements on a steel frame. This steel frame has vertices and edges.   In my script I just updated the vertices' x coordinates and then keyframe it. The animation I get in object mode is really what I wanted to have but if I try to render this animation it doesn't work.  I think it is because of the non defined faces but is there a way to render a mesh which only has vertices and edges? (In object mode I can see the animation.)  (Note that this is not the whole script because the creation of the keyframes and the animation in object mode works.)

I have a schematic of a raspberry pi that is completely flat, no solid faces, just connected vertices.  Is it possible to render these lines somehow, so that it looks like a 2D drawing?  Maybe with freestyle?


I have a list of n objects (17 for now) and I wanted to know if it is possible to take said list and split it into (potentially) 2 groups. That way the end result would be   NewList   -"GroupA"     -List1 = {"john", "mary", "sam"}    -"GroupB"     -List2 = {"tony", "aaron"}   The desired result would help me output the first half of the list of students in page 1 and then using paging the user can then view the remaining list on the next page.   Right now I am trying to do something like this:  var groupList = Classroom.GroupBy(o => o).Select(grp=>grp.Take((Classroom.Count + 1) / 2)).ToList();   But when I debug it I'm still getting the full list. Can it be done via linq?

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split?  Let me exemplify:  I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially).  eg.:   Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c]   I'd also need the resulting lists size to be a parameter of this function.


I used to think we should say "keep your hands off the wall", but one of the lines in Money, from Pink Floyd, they say "keep your hands off of my stash". That made me confuse.   Do we always say keep your hands off of  something? How does it work for "keep your hands off (of) the wall"?   Thank you

What is the difference when you say "get off of something" and "get off something"?


It looks like I am going to have three articles (if all goes well) that are dealing with quite different fields (psycho-accoustics, time-series analysis and machine learning). I do not have a single clue on how to start writting the introduction for a thesis that should tie these together ... Do you have tips for writting introduction when dealing with "sandwitch"/"stapler" thesis ?

I would like to know what are the main differences between the introductory part of a paper and of a thesis. My thesis would be a sandwich type, so I would have to wrap everything there.  Some of the differences are:   Longer in thesis. Deeper in thesis. Extended definition of key terms, concepts and methodology in thesis. Clear definition of the whole goal in thesis, whereas paper smaller goal.   To narrow the possible answers, I do research on the molecular aspects of the infection steps of a pathogenic swine bacteria. Also develop strategies to block infection by using vaccines.