Existence of increasing sequence $\{x_n\}\subset S$ with $\lim_{n\to\infty}x_n=\sup S$

Let $S\subset\mathbb{R}$ be a non-empty bounded above set. Then there exists a monotone increasing sequence $\{x_n\}\subset S$ such that    $$\lim_{n\to\infty}x_n=\sup S.$$   I'm struggling with creating a formal proof for this problem. I understand that this has to be true, but I'm unsure of how to go about proving it.  I said that $\sup S = C$ and $x_n= C - y/n$ where $y$ is dependent on the size of $S$, but this is just a bunch of jumbled ideas and I can't really think of a way to formalize a proof. Any idea, even totally different from mine would be appreciated.


So I followed the instruction here:  for adding a .mdb into QGIS. There are great instructions about 1/3 of the way down. But I still can't get it to open. I on Windows 7 with QGIS 2.4  I restarted QGIS and my computer. I am still getting the error: "Invalid Data Source: ODBC:co2014ProdSumm (btw this is the .mdb) is not a valid or recognized data source. "  These are not vector layers nor is this a ESRI personal geodatabase. This is an Access database with 2 tables I need out of it.   I also found a few other posts    and this one might be the answer but I don't know what it's talking about:   Is there any way to add a .mdb into QGIS? Also I do not have Access on my computer.   Edit 1:I hope this clarifies my issue.  Each time I get Invalid Data Source: C:...Co 2014 Annual Production Summary-xp.mdb is not a valid or recognized data source. Here is where I added the access connection    Trying to add as a vector file   Trying to add a database, I also tried local:host 3000 The error in the pic is the same no matter the source, name etc... I've tried changing all fields around.


Computing $\max_{1/2 \leq x \leq 2} ( \min_{1/3 \leq y \leq 1} f(x,y) )$ where $f(x,y) = x(y \log y - y) - y \log x$.

Let $f(x,y)=x(y\ln y-y)-y\ln x.$ Find $\max_{1/2\le x\le 2}(\min_{1/3\le y\le1}f(x,y))$.   This problem is quite easy and it is from Spivak; it is the part $c)$ of the general exercise 2-41 page 43 Calculus on manifolds; here it is:     Let $f:\mathbb{R}\times \mathbb{R}\to \mathbb{R}$ be twice continuously differentiable. For each $x\in \mathbb{R}$ define $g_x(y)=f(x,y)$. Suppose that for each $x$ there is a unique $y$ with $g'_x(y)=0$; let $c(x)$ be this $y$.      $a)$: If $D_{2,2}f(x,y)\ne0$ for all $(x,y)$ show that $c$ is differentiable and $c'(x)=-\frac{D_{2,1}f(x,c(x))}{D_{2,2}f(x,c(x))}$      $b)$: Show that if $c'(x)=0$, then for some $y$ we have $D_{2,1}f(x,y)=0$, $D_2f(x,y)=0$.   I cannot visualize how part c) relates to the previous ones. Can you give me a hint?


Can I submit the same article, which is written in two different languages, to two different journals simultaneously?

I have written an article in Persian and then translated it into English. Is it possible to send them to two different journals (one in Iran and the other one in Belgium)?


How can I change the color of this object properly?

I'm pretty new to Photoshop. I would like to change the color of this object on my .png image:   But anyway I try, it becomes this fuzzy with the new color:    How can I change it's color to stay in it's original shape?


What can I replace the word “I” with in my cover letter?

When proofing my résumé’s cover letter, I found that I am writing I way too much. I have read that this is a potential turn-off for employers.   Does anyone have suggestions on how to replace I with something else?   This seems to happen more frequently at the beginning of my sentences.


Why is this printing out 1 instead of 2? How can I improve?

Given this code:  public class Test {    public void add(int x){     x++;   }    public static void main(String args[]){     Test t = new Test();     int a = 1;     t.add(a);     System.out.println(a);   } }   I just want to print out 2 instead of 1. I think I am calling this method wrong. Could you help me understand why?


How to pass the list starting from nth element

Suppose I have a list [1,2,3,4,5]. Now I want to pass the elements of this list, starting from 3rd element to a method.  i.e. i want to invoke:  myfunction([3,4,5])   How can I do this in python. tried passing mylist[2], but it doesn't quite work this way it seems.


Nvidia Prime doesn't appear in Nvidia Settings on Ubuntu 18.04?

I saw a question over here, says that Nvidia Graphics jumps to 90º and fan goes at maximum speed. So, I want to use the Intel graphics integrated, but in Nvidia Settings (I use Ubuntu 18.04, Nvidia driver 390) doesn't appear the option to use Intel graphics. In Ubuntu 16.04 I don't know if it's the driver or what, but doesn't work this option (but appears in Nvidia Settings) because then Ubuntu doesn't allow go to your session. You try to enter but it returns to the gdm. Maybe in this version doesn't have this fail.


An anime with necklaces with crystals to summon monsters

I watched an anime around 2008-2010. In it, the main characters use crystals to summon monsters to fight.  All I can remember is the main characters' appearances:   one was a red hair male middle age one teen blond guy one teen girl


Why electric company sell the electricity according to real power?

Electric company in some countries apply financial penalty for electricity consumers which have power factor lower than 0.9 If electric companies charged customers for apparent power, people would be encouraged to buy electric devices with better power factor because they will pay for Volt X Amp. Also, the company wouldn't need need to check the power factor of the consumer every day.  I think this could be more economic for the electric company.  So I'm wondering why the electric company doesn't sell the electricity according to Apparent power, so people are responsible for power factor correction, not the company.


If I'm looking at a question, how do I get back to the site the question is on?

Maybe I'm just stupid, but I can't figure out how I'm supposed to get from a question (in the Android App) to the site the question is on.   I know I can open the left drawer, tap "All Sites", and type in the name of the site I want to go to, but it seems like there should be a way to get from a question to its site without all that rigmarole. (Tapping the back button works if I was on the site in the first place, but if I get to a question from my feed or from a link in my browser or something, that doesn't help.)


How to remove the alpha channel in a Photoshop document?

I have a semi-transparent monochrome image in a Photoshop document, that I would like to become fully opaque:    The opacity is already set to 100% in Blending Options, it's just that this image has an alpha channel that I would like to remove.  How can I do that?


Novels with characters that gain power from stones imbued in their backs

For some time now, I've been trying to find a novel I've read sometime in the early 2000s. At long last, I gave up and will try asking for your help.  All of the details I write below are from my muddled memory and may be false or misshapen.  First of all, I think this is a series of novels, and not just one.  In this world, the characters can gain (magical) powers by having special stones imbued in their backs when they are children. The two main characters are brother and sister and each has an abnormal amount of stones in their back, something like 7 each. The stones are colourless before being placed in one's back, but then change into a colour of the person's power.  The main characters' home is destroyed and they must travel. In their travels they see the magical stones' miners and their children who mostly become miners themselves, as their stones turn to mud brown, the color of the earth in which the stones are found. The characters witness the ceremony performed by an individual wrapped in many scarfs, without a stone on their back.  The end of one of the novels ends with events concerning a prison in a parallel dimension/world. The characters travel to and from the world trying to break someone out of the prison.  The novels I read were probably in Croatian, but if so, that was probably a translation from an English original. Decided to mention it in case I'm mistaken and there is no English translation.


Can someone please help me set up a Virtual Machine of macOS High Sierra using VirtualBox?

I want to create a Virtual Machine of macOS High Sierra using VirtualBox 6.1 on my  mid 2014 MacBook Pro that's running macOS.   How do I do that?   I already installed VirtualBox.  How do I create the VM of macOS High Sierra now?


For the past year I have been quite active on SO and a bit on meta, but I had never heard of the timeline of a post until today in a comment on meta.  There was an  two years ago of this feature as "experimental". ( for that question).  This feature was , answer: this exists, but the link has to be built manually.  I think this could be quite interesting sometimes and I would like to use this, but I will not do so if I have to build the link each time by myself.  This feature has existed for two years and is still "experimental"? Who is using it? Who knows about it?  My feature request: Implement a link in the posts to their timeline. I am sure this nice feature will be used.


Prove by induction $1+2+2^{2}+...+2^{n-1} =2^{n}-1; \forall n \geqslant 1$

How can I prove by induction the following statement:  $1+2+2^{2}+...+2^{n-1} =2^{n}-1; \forall n \geqslant 1$


How to add confidence regions around a graph, from a table

I want to draw confidence regions above and below my graph, a little like below:  (which is from  ) I'm not quite clear how to do this in pgfplots? Let's say some minimum code to get things started: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{filecontents}     \begin{filecontents*}{data.txt}         X   Y       CI95         1   1.50    0.39         2   1.05    0.21         3   0.50    0.14         4   0.20    0.05         5   0.35    0.35     \end{filecontents*} \begin{document} \begin{tikzpicture} \begin{axis}[ ] \addplot [] table [x=X, y=Y]{data.txt}; \addplot [] table [x=X, y=CI95]{data.txt}; \end{axis} \end{tikzpicture} \end{document}  (these numbers don't match the graph depicted from the blog post, but concept is similar, i.e. there are y-values, and ci 95% values) Edit: came across   Maybe useful?  And this also looks relevant:


How do I make a diagram like this in LaTeX? Thanks!

How to draw this comutative diagrams in LaTeX


Why public companies care how their stock price fluctuates?

After IPO, the socks are traded between 3rd parties (let's assume the company's employees don't own shares), so why should the company care what's their (perceived) value on the market? After the IPO, the money they could have recruited from the public has already been recruited...


Testing methods with overloading using shims and stubs in VS 2013 c# Code

I have the below code which I am unit testing.      public static void Log(string appName, string message)     {         Log(appName, message, string.Empty);     }     public static void Log(string Name, string Message, string Source)     {         if (!baselogger.Initialize) return;         TryInitialize();         Count++;         foreach (ILogging logger in loggers)         {             logWrite(1000);             logger.WriteError(Name, Message, Source);         }         string message = string.Format(CultureInfo.InvariantCulture, "{0}: {1}: {2}", Name, Message, Source);         System.Diagnostics.Trace.WriteLine(message);      }   And I wrote below test methods to test it.     [TestMethod]    public void LogWith2Params()     {         Logging.Log("Host","Control not found.");     }      [TestMethod]    public void LogWith3Params()     {         Logging.Log("Host","Control not found.","ManageAccounts");     }   Are the above two tests enough or do I need to write new test cases ? Or should I write another testmethod by passing 3 parameters and do the shim  for logger.initialize property,TryInitialize method call, logWrite method call,logger.WriteError method call and Trace.Writeline method call ?


Wifi adapter not found Ubuntu 18.04 HP, Realtek RTL8821CE

Recently I installed Ubuntu next to Windows 10 and when I try to connect it to wifi it says "wifi adapter not found".   For every solution I've seen it says I need ethernet (I'm using USB ethernet through my phone, I don't know if that is a problem).  I have secure boot disabled and when I go to Additional Drivers it says that there are no additional drivers found.  If I enter the command lspci -knn | grep Net -A3; rfkill list I get  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]      Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless   Network Adapter [103c:831a] 0: hci0: Bluetooth      Soft blocked: no      Hard blocked: no


curl stops working when used in combination with xargs

I need to check a list of domains in parallel. So I was planning on using curl and xargs.  This is check.sh:  #!/bin/bash domain=${1?Pass the domain as a parameter} curl -o /dev/null --silent --write-out "http://$domain/,%{http_code},%{redirect_url}\n" "http://$domain/"   Now, when used a single time it works:  $ ./check.sh example.com http://example.com,200,   If instead I use it in combination with xargs, curl does not work properly and the output looks broken:  $ cat domains.txt | xargs -L1 -P2 ./check.sh ,000,//example.com ,000,//example.org   This is the test file I'm using (domains.txt):  example.com example.org   This happens also without -P2, so it must be related to the way lines are passed to the script. I also added an echo "$domain" in it, but everything looks ok.


So annoyed with no-comment, vindictive downvoting

I have been so annoyed recently by people who downvote my answers with no comments.  Usually it falls into one of two categories   The asker is asking a question that is inherently impossible or counter to the purpose of the thing they are asking about, like how do I use jQuery to (insert any horrific hack JavaScript coding practice jQuery is supposed to free us from).  The answerer responds with a reasoned description of why that might be misguided and offers an alternative approach.  Asker doesn't like that and downvotes the answer. A well meaning user posts a question, and Person A answers with a hastily written, insufficient, unreasoned, or maybe blatantly wrong answer.  Person B sees this answer, comments on why it might be insufficient, and then answers with a proper, well-reasoned answer.  Person A (presumably) sees this, gets angry, and downvotes Person B out of spite.   In both cases, of course, no helpful comment because all that would do is reveal how spiteful and/or vindictive the downvoting was.  I love Stack Overflow, but I am a busy person, so what little time I get to spend here, and what reputation I've earned, I've worked hard for, and I hope it adds to the value of the community at large ... but then someone comes along and chips away at my reputation out of spite, with no checks and balances?  If this goes on, what is my motivation for wanting to contribute to the community?  If I got downvoted with a reasonable comment, I would welcome that.  That shows me something I may not have thought of, gives me an opportunity to improve my answer, and again add to the community.  Downvoting with no comment serves no purpose but to degrade the community.  I propose that downvotes with no comment not detract from the poster's reputation.  And if that comment is something silly, and the comment gets flagged by someone else, the poster's reputation hit should be restored.  Thoughts?


How can I customize the background of the FileVault login screen in 10.8?

I've successfully changed the background image for OS X login screen, but cannot do it for the FileVault login screen.  This makes sense as the contents of the disk are still encrypted at that point in the boot process.  Per this link:  it appears possible, but I honestly cannot understand what they are suggesting here.  Any ideas or interpretations?


I created a plane and extruded some edges from it on edit mode. As you see the screenshot, I filled the last two edges to make a rectangular donut. Then I selected all inner edges and tried to dissolve them. But some edges were never dissolved.  How can I accomplish it?


What's the difference between the atomic and nonatomic attributes?

What do atomic and nonatomic mean in property declarations?  @property(nonatomic, retain) UITextField *userName; @property(atomic, retain) UITextField *userName; @property(retain) UITextField *userName;   What is the operational difference between these three?


How do I remove old kernel files from /boot and fix a potential error listed in ?

Any help with the following would be very much appreciated:  A few days ago I installed the latest stable Linux kernel (3.16.3) and then I used the one liner from  to remove my old kernels.   The command removed a bunch of packages, including my AMD fglrx drivers (I am now running the latest OpenSource Gallium), however it didn't remove the old kernels from /boot (which are not installed anymore). Please see below for details.  $ uname -a Linux linux 3.16.3-031603-generic #201409171435 SMP Wed Sep 17 18:36:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux   $ sudo ls -l /boot total 153701 -rw-r--r-- 1 root root  1158016 May  3 01:30 abi-3.13.0-24-generic -rw-r--r-- 1 root root  1163858 Aug 15 03:56 abi-3.13.0-35-generic -rw-r--r-- 1 root root  1163858 Sep  3 23:24 abi-3.13.0-36-generic -rw-r--r-- 1 root root  1204707 Sep 17 20:04 abi-3.16.3-031603-generic -rw-r--r-- 1 root root   165510 May  3 01:30 config-3.13.0-24-generic -rw-r--r-- 1 root root   165652 Aug 15 03:56 config-3.13.0-35-generic -rw-r--r-- 1 root root   165671 Sep  3 23:24 config-3.13.0-36-generic -rw-r--r-- 1 root root   170795 Sep 17 20:04 config-3.16.3-031603-generic drwxr-xr-x 5 root root     1024 Sep 30 13:20 grub -rw-r--r-- 1 root root 28803145 Sep 26 18:48 initrd.img-3.13.0-24-generic -rw-r--r-- 1 root root 26876001 Sep 23 17:05 initrd.img-3.13.0-35-generic -rw-r--r-- 1 root root 28958561 Sep 26 18:46 initrd.img-3.13.0-36-generic -rw-r--r-- 1 root root 28616184 Sep 30 13:31 initrd.img-3.16.3-031603-generic drwx------ 2 root root    12288 Aug 28 16:23 lost+found -rw-r--r-- 1 root root   176500 Mar 12  2014 memtest86+.bin -rw-r--r-- 1 root root   178176 Mar 12  2014 memtest86+.elf -rw-r--r-- 1 root root   178680 Mar 12  2014 memtest86+_multiboot.bin -rw------- 1 root root  3372643 May  3 01:30 System.map-3.13.0-24-generic -rw------- 1 root root  3386444 Aug 15 03:56 System.map-3.13.0-35-generic -rw------- 1 root root  3386479 Sep  3 23:24 System.map-3.13.0-36-generic -rw------- 1 root root  3629877 Sep 17 20:04 System.map-3.16.3-031603-generic -rw------- 1 root root  5776416 May  3 01:30 vmlinuz-3.13.0-24-generic -rw------- 1 root root  5806368 Aug 15 03:56 vmlinuz-3.13.0-35-generic -rw------- 1 root root  5806848 Sep  3 23:24 vmlinuz-3.13.0-36-generic -rw------- 1 root root  6417328 Sep 17 20:04 vmlinuz-3.16.3-031603-generic   Now my questions are:   How do I correctly delete all the files in my /boot except for the 4 files related to 3.16.3? Can I just manually remove them and then upgrade grub using ? Please see the output of the command below. Since I don't know the meaning of it, could someone please let me know if this displays an error or if this is what I should be seeing?    Thanks a lot! :)  $ sudo dpkg --list 'linux-image*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                    Version          Architecture     Description +++-=======================-================-================-=================================================== un  linux-image             <none>           <none>           (no description available) un  linux-image-3.0         <none>           <none>           (no description available) ii  linux-image-3.16.3-0316 3.16.3-031603.20 amd64            Linux kernel image for version 3.16.3 on 64 bit x86


postgres boolean function and check constraint

I been using postgres for a while.  Mostly simple stuff.  Now trying to implement a small perl function to check for a single valid email address.  My employees table should have either a single valid email address, or none (ie empty, zilch). I assume none means undef(email)  My sample code below.  I'm trying to return FALSE only if the given variable is NOT an email address.  The function appears to correctly check a given email address, BUT wrongly returns FALSE if email is blank or empty.  Grateful for any help to show me how to do this the-right-way.  CREATE OR REPLACE FUNCTION email_valid(email text) RETURNS boolean AS $BODY$ use Email::Address; my $answer = 1; return $answer if (undef ($_[0])); my @address = Email::Address->parse($_[0]); $answer = scalar(@address); return $answer; $BODY$ LANGUAGE plperlu;  ALTER TABLE employees ADD CONSTRAINT check_email CHECK (email_valid(email) = TRUE) ;   Edit.  Here's the revised procedure commented below, in easier to read format.  :-)  CREATE OR REPLACE FUNCTION public.email_valid(email text) RETURNS boolean AS $BODY$     use Email::Address;     my $input = shift;     return('TRUE') if ($input eq '');     my @address = Email::Address->parse($input);     return (@address == 1 ? 'TRUE' : 'FALSE'); $BODY$ LANGUAGE plperlu  This is a different question to the similar previous question at   I need to also allow null or blank email address, whereas other question and answer will require valid e-address.


How to delete all conversations all at once in iMessage?

It's clear on how to delete conversations in iMessage one by one. Does anyone know how I can delete multiple or all conversations all at once? Thanks.


$\int_{0}^{1}\frac{\sin^{-1}\sqrt x}{x^2-x+1}dx$  Put $x=\sin^2\theta,dx=2\sin \theta \cos \theta d\theta$  $\int_{0}^{\pi/2}\frac{\theta.2\sin \theta \cos \theta d\theta}{\sin^4\theta-\sin^2\theta+1}$ but this seems not integrable.Is this a wrong way?Is there a different way to solve it?


How to clear the cache or do a hard refresh in mobile Safari?

On OS-X it's Opt+Cmd+E or Cmd+R or certain menu options ().  Is there a way to do this for Safari on an iPhone or iPad?    This seems like a duplicate? What do you think? I really don't like force-quit:   This sounds better:


Correlation vs. entanglement for composite quantum system

Some authors exclusively use "Correlation" to classify composite quantum states, whereas most only speak of "Entanglement".  Correlation basically means that measurements on the subsystems are stochastically dependent and entanglement means non-separability of the composite state.  I am wondering, are those classifications equivalent, or is there any hierarchy (e.g. if a composite state is non entangled, it is always uncorrelated). Does the entropy of entanglement (in some cases) predict whether a state is (un)correlated?  References to a proof would be much appreciated!  Feel free to criticize me on the casual definitions given above as well.


Custom horizontal alignment in multicols environment

If I utilize the two columns of multicols for my Kurdish sequence of numbers, it arranges the items in column like the following figure:   But I want to arrange the items in rows splitted by some columns (two columns in this case) alike the following figure:   And for the case of "three columns", the output would be alike the following figure:   How may I achieve the functionality? And I don't want to use the sequence of the following commands:  \begin{multicols}{2} \begin{enumerate}[$1)$,noitemsep] \item  Yek \item  Du \end{enumerate} \end{multicols}   Instead, I want to specify the split count of the columns and then have the items arranged in the desired arrangement automatically. For the record, I've check  post, but it's too generalized.


Unable to render material/texture using the script

I am new to blender and trying to render . Trying to render using script gives a very different result (everything purple) as compared to what I see in Blender GUI. What am I doing wrong? Here is the script I am using import os import bpy  bpy.ops.wm.open_mainfile(filepath="materials.blend")  VIEWS = 1 RESOLUTION = 200 RESULTS_PATH = '.' DEPTH_SCALE = 1.4 COLOR_DEPTH = 8 FORMAT = 'PNG' RANDOM_VIEWS = True UPPER_VIEWS = True CIRCLE_FIXED_START = (.3, 0, 0)  fp = bpy.path.abspath(f"//{RESULTS_PATH}") if not os.path.exists(fp):     os.makedirs(fp)  # Render Optimizations bpy.context.scene.render.use_persistent_data = True  # Set up rendering of depth map. bpy.context.scene.use_nodes = True tree = bpy.context.scene.node_tree links = tree.links  # Add passes for additionally dumping albedo and normals. # bpy.context.scene.view_layers["RenderLayer"].use_pass_normal = True bpy.context.scene.render.image_settings.file_format = str(FORMAT) bpy.context.scene.render.image_settings.color_depth = str(COLOR_DEPTH)  # Background bpy.context.scene.render.dither_intensity = 0.0 bpy.context.scene.render.film_transparent = True  # Create collection for objects not to render with background objs = [ob for ob in bpy.context.scene.objects if ob.type in ('EMPTY') and 'Empty' in ob.name] bpy.ops.object.delete({"selected_objects": objs})  def parent_obj_to_camera(b_camera):     origin = (0, 0, 0)     b_empty = bpy.data.objects.new("Empty", None)     b_empty.location = origin     b_camera.parent = b_empty  # setup parenting      scn = bpy.context.scene     scn.collection.objects.link(b_empty)     bpy.context.view_layer.objects.active = b_empty     # scn.objects.active = b_empty     return b_empty  scene = bpy.context.scene scene.render.resolution_x = RESOLUTION scene.render.resolution_y = RESOLUTION scene.render.resolution_percentage = 100  cam = scene.objects['Camera'] cam.location = (0, 4.0, 0.5) cam_constraint = cam.constraints.new(type='TRACK_TO') cam_constraint.track_axis = 'TRACK_NEGATIVE_Z' cam_constraint.up_axis = 'UP_Y' b_empty = parent_obj_to_camera(cam) cam_constraint.target = b_empty  b_empty.rotation_euler = CIRCLE_FIXED_START scene.render.image_settings.file_format = FORMAT scene.render.filepath = fp + '/r_0' bpy.ops.render.render(write_still=True)  # render still  Output of blender --background --python script.py  Screenshot of Blender GUI


Is it possible to have people join your singleplayer world?

Is it possible to get people to join your singleplayer world if they are connected to your LAN?


how to compare two array of objects in javascript

I had taken two array of objects in javascript   arr1 = [{"name":"prudhvi", "age":"12"},         {"name":"pavan", "age":"13"},         {"name":"prudhvi", "age":"15"}];  arr2 = [{"name":"Sai", "age":"12"},         {"name":"Shiva", "age":"13"},         {"name":"prudhvi", "age":"12"}];    Actually I want to compare both arrays based on name only. Here, name prudhvi is repeated I want to delete that object from arr2. Another thing is I want unique items in arr1.  If there is any duplicate object, I want to delete it from this array.


Problems installing on Lenovo ideapad 100s-11iby

I recently bought a Lenovo 100s as a lightweight, portable, cheap pc. First step was to clean it and install Ubuntu but I've run into some problems. Firstly they have installed 32 bit Windows and a 32 bit EFI on the machine even though it has 64 bit architecture. The EFI also has no legacy support, so I need a 32 bit ubuntu with EFI support (although I want 64 bit since the hardware supports it). PC has no dvd drive or LAN port, so those boot options are not possible. Anyone have any ideas? I'm a bit of a linux scrub so a step by step would be much appreciated if possible. Thanks!


Is there a way to pass a python list as a parameter of prepared statement in pymysql?  list_id = [1,2,3] sql = "select * from table where id in (%s)" cursor.execute(sql,(list_id,))


How to sort a list of dates in a text file

Let's assume I have a text file with a list of dates (dd.mm.yyyy).  01.01.2020 01.03.2020 01.01.2019   How do I sort them out? (oldest to newest in a "from top to bottom" fashion)?


How can I calculate the angle and proper turn direction between two 2D vectors?

I am working on some movement AI where there are no obstacles and movement is restricted to the XY plane. I am calculating two vectors, v, the facing direction of ship 1, and w, the vector pointing from the position of ship 1 to ship 2.  I am then calculating the angle between these two vectors using the formula  arccos((v · w) / (|v| · |w|))   The problem I'm having is that arccos only returns values between 0° and 180°.  This makes it impossible to determine whether I should turn left or right to face the other ship.  Is there a better way to do this?


How to fix error java.lang.NullPointerException

I started using Java with MySQL for the first time, so I don't know it well yet. I need help with this class. For some reason does the "if" make my programm crash. The class should scan the name and check if it's already used or not. When it's not used it should enter the name in the database.  I get the following error:  java.lang.NullPointerException     at Registration.register(Registration.java:38)  import java.sql.*; import java.util.Scanner;  public class Registration {     public static String name = null;     public static String name_db = null;     public static Connection connection = null;     public static Statement selectStmt = null;     public static Statement selectStmt2 = null;     private static Scanner in ;      public static void register() {          in = new Scanner(System. in );          System.out.println("Name:");         name = in .nextLine();          Connection connection = null;         Statement selectStmt = null;          try {             Class.forName("com.mysql.jdbc.Driver");             connection = DriverManager.getConnection(                 "jdbc:mysql://localhost:3306/java", "root", "");              selectStmt = connection.createStatement();              ResultSet rs = selectStmt.executeQuery("SELECT name FROM staffs where name = '" + name + "';");             if (rs.next()) {                  name_db = rs.getString("name");              }              if (name_db.equals(name)) {                 System.out.println("Name already exists.");             } else {                 System.out.println("Name is available.");                 selectStmt2 = connection.createStatement();                 selectStmt2.execute("INSERT INTO `java`.`staffs` (`id`, `name`) VALUES (NULL, '" + name + "');");             }            } catch (Exception e) {             e.printStackTrace();         } finally {             try {                 selectStmt.close();                 connection.close();             } catch (Exception e) {                 e.printStackTrace();             }         }      }  }


What is the star symbol * used for in Python?

I'm learning Python, in the code below: # Use list comprehension and enumerate to pair guests to new times guest_arrivals = [(names[i],time) for i,time in enumerate(new_times)]  # Map the welcome_guest function to each (guest,time) pair welcome_map = map(welcome_guest, guest_arrivals) guest_welcomes = [*welcome_map] #print(guest_welcomes)  print(*guest_welcomes, sep='\n')  In the third and the last line, it uses *, could someone tell me what is this star symbol used for here? Thanks.


How do you set the cursor position in a text field using jQuery?  I've got a text field with content, and I want the users cursor to be positioned at a certain offset when they focus on the field.  The code should look kind of like this:  $('#input').focus(function() {   $(this).setCursorPosition(4); });   What would the implementation of that setCursorPosition function look like?  If you had a text field with the content abcdefg, this call would result in the cursor being positioned as follows: abcd**|**efg.  Java has a similar function, setCaretPosition.  Does a similar method exist for javascript?  Update: I modified CMS's code to work with jQuery as follows:  new function($) {   $.fn.setCursorPosition = function(pos) {     if (this.setSelectionRange) {       this.setSelectionRange(pos, pos);     } else if (this.createTextRange) {       var range = this.createTextRange();       range.collapse(true);       if(pos < 0) {         pos = $(this).val().length + pos;       }       range.moveEnd('character', pos);       range.moveStart('character', pos);       range.select();     }   } }(jQuery);


How to change the text in a Popup Window TextView?

@Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_check_attendance);      Intent intent = getIntent();        final ArrayList<String> names = intent.getStringArrayListExtra("names");     final ListView name_list = findViewById(R.id.name_list);     final ArrayAdapter<String> adapter = new ArrayAdapter<>(this,             android.R.layout.simple_list_item_1, names);     name_list.setAdapter(adapter);        name_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {         @Override         public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {             Log.i("Name",names.get(i));              LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);             View popupview = inflater.inflate(R.layout.popup_window, null);               int width = LinearLayout.LayoutParams.WRAP_CONTENT;             int height = LinearLayout.LayoutParams.WRAP_CONTENT;             popupWindow  = new PopupWindow(popupview, width, height, true);             popupWindow.showAtLocation(view, Gravity.CENTER, 0,0);            }     }); }   In the above code, everything works perfectly fine, except that I want to set the Popup window text to be the clicked element in the list view.   I use Log.i(), and the clicked element is being printed, however when I try to set the text to this clicked element like:  TextView sub_name = findViewById(R.id.subject_name); sub_name.setText(names.get(i));   I get the following error:     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference   XML for the popup window:  <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="match_parent"     android:layout_height="match_parent">      <Button         android:id="@+id/close"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginStart="161dp"         android:layout_marginTop="587dp"         android:layout_marginEnd="162dp"         android:layout_marginBottom="96dp"         android:onClick="quit"         android:text="Close"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent" />      <TextView         android:id="@+id/subject_name"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginStart="176dp"         android:layout_marginTop="258dp"         android:layout_marginEnd="176dp"         android:layout_marginBottom="455dp"         android:text="TextView"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout>


Link to view the edit history of a question

Is there a link on a question's page to see the edit history of that question?  What is the "normal" way to get this information?


What do I do about thinset that has oozed up between the tiles?

There is too much thinset in between my mosaic shower floor tiles (in some spots it looks like grout). What do I do before grouting?


Relationship between current through a motor and it's load

When a motor, connected to a battery that has a constant voltage, spins without a load it's speed is higher than with load. I'm told that because of back emfs the current is very small when there's no load because of the higher speed. And so when there is a load the back emf is less as the motor spins slower, and so the current is higher.  What is a back emf and what is the relationship between that and the speed of the motor (well the coils inside the motor)?  Is the output energy of the motor constant, whether it has a load or not? (ignoring friction and electrical resistance) because I don't understand how the current can be higher when the motor is (or seems to be) doing more work due to the load?


Can I use a non "me.com" address to send email with iCloud?

I will  be buying an iPad and will want to use iCloud.  However, I want to use a non "@me.com" address to send email from/reply to.  Is this possible when you sign up for iCloud?  Thanks


Testing rotation/orientation changes and cannot find what is causing this error

java.lang.NullPointerException: Attempt to read from field 'int android.support.v4.app.Fragment.mContainerId' on a null object reference at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1017) at android.support.v4.app.FragmentTransition.calculatePopFragments(FragmentTransition.java:996) at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:93) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2146) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6126) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   I have one activity a navigation drawer with fragments handling the views, my transitions and such work fine until i start rotating then i get that. Note: The rotation works fine upon first visit but when go away then return to the fragment > rotate > select other fragment in navi drawer it crashes. please advice would be great!  here is some more code:  Fragment currentFrag = getSupportFragmentManager().findFragmentById(R.id.newsfeedContainer); if (currentFrag instanceof NewsFeedFragment) {   result.closeDrawer(); } else {   if (newsFeedFragment != null) {     getSupportFragmentManager().popBackStack(null, POP_BACK_STACK_INCLUSIVE);     transaction.show(newsFeedFragment);     transaction.addToBackStack("newsfeed");     transaction.commit();   } }  result.closeDrawer();   } this is part my navigation drawer.. when this item is selected it works.. but when I open another fragment and come back to the previous fragment AND ROTATE it gives a nullpointer


Up to what level the adverbs 'firstly', 'secondly', 'thirdly' and so on is acceptable?

This question is different from the one that's already asked . I'm asking about the levels here.   About research: Trust me...the Internet gave me up to nineteenthly and to be frank, I then stopped searching for it. Let experts here put a bee in bonnet!


Is there a way to make some "2D solidify" from edges to faces. (It's about creating roads from GIS data). I've tried Skin modifier, converting to curves with depth and back to mesh, but all the methods resulted in a dirty mesh with lots of intersections and bad geometry. The problem seems to be that simple and straightforward that it simply must have a simple way to solve. But I don't see it. Please, point it out.


Eigenvalues of a matrix whose square equals its transpose

Let $A$ be a $n\times n$ matrix with $A^2=A^t$. Show that every real eigen value of $A$ is either $ 0$ or $1$


A macro which will output "next/previous section" if referenced section is adjacent to current one

I want to create a macro which will reference a given section (or chapter, part, subsection, etc.) but if the section referenced is the next section after the current one, it will say "the next section" rather than "Section X", and the same for the previous section and "the previous section". What I'm imagining the pseudocode would look like is something like this:  \usepackage{\ifthen}  \newcommand{\secref}[1]{     \ifthenelse{\equal{\thesection}{\ref{#1}-1}}         {the next section}     {\ifthenelse{\equal{\thesection}{\ref{#1}+1}}         {the previous section}     {Section #1}}}    Is there a package for this? And if not, how would I go about creating a solution?


Do shots fired before the match starts count towards your end-of-game statistics?

In Overwatch, there is short countdown for a few minutes before the match begins. During this time, the defending team is allowed to roam the map to set up their defenses, while the attacking team sits in a small lobby until the game starts and the doors open. (Or in KotH-type maps, both teams wait in a lobby.)  While players wait, it's not uncommon for them to fire off random shots, especially since a lot of the environment is destructable (it's entertaining to watch plush onions sail through the air in the arcade).   Do shots fired before the match starts count towards accuracy statistics at the end of the game?


Do file-extensions have any purpose (for the operating system)?

Linux determines the type of a file via a code in the file-header. It doesn't depend on file-extensions for to know which software is to use for opening the file.  That's what I remember from my education. Please correct me in case I'm wrong!  Working a bit with Ubuntu systems recently: I see a lot of files on the systems which have extensions like .sh, .txt, .o, .c  Now I'm wondering: Are these extensions are meant only for humans? So that one should get an idea what kind of file it is?  Or does they have some purpose for the operating-system too?


Is there a difference between "" and {} in BibTeX?

I see in some examples each field in a BibTeX entry is given within "", while in others it is given within {}. For example,  @Book{Torre2008,  author    = "Joe Torre and Tom Verducci",  publisher = "Doubleday",  title     = "The Yankee Years",  year      =  2008,  isbn      = "0385527403" }  @PROCEEDINGS {conference:06,  editor    = {First Editor and Second Editor},  title     = {Proceedings of the Xth Conference on XYZ},  booktitle = {Proceedings of the Xth Conference on XYZ},  year      = {2006},  month     = oct, }   What are the differences between the two? Which one should I use?


I am creating an addon for blender 2.75. Is there a way to accept user's input by creating a Variable? There can be an input slot in the Tools panel, and the user can enter the value in it, which will be stored in a variable which can use later in my code. :)


Mathematical expectation of picking cards of the same value from a standard 52-card deck

Suppose we have a standard 52-card deck (4 sets of cards from number 1 to 13). We pick the cards without putting them back. We stop when two cards of the same value are drawn (not necesarily to be consective draws). What is the mathematical expectation of the number of cards we need to pick?


Teenagers. All the literature tells you one thing and one thing only – that  whatever they are doing, give them a break, cut them some slack, it's normal.      From the novel, Apple Tree Yard   I'm curious about the origins of . I know slacks are American English for trousers or pants, and a slacker is a lazy person. But what is a slack and how does one "cut" it?


BB-8 seems to have a sense of humour and have a cheeky/nasty side to him but is there a full list of what he is meant to be saying (not just fanboy hopeful assumptions)?  As there is dialog for Chewie and other characters who speak other languages but does any exist for this droid in particular?


Proper typewriter font for math symbols (∀, ∃, →), e.g. in verbatim environment

I have a listing to be used in verbatim (acutally Verbatim) that uses unicode characters such as ∀, ∃, →, ∨. Using  \DeclareUnicodeCharacter{2203}{\ensuremath\exists}   they do appear in the listing, but obviously in the wrong font.  For → I got the desired result using  \usepackage{textcomp} \DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi}   but I do not see how to do it for ∃, ∀ and ∨.  MWE:  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} \DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi} \DeclareUnicodeCharacter{2203}{\ensuremath\exists} \begin{document} \begin{verbatim} Make this → ∃ look nice! \end{verbatim} \end{document}   I’d like to stick to latex (i.e. not xetex). I would prefer to stick to the default type writer font (Computer Modern Typewriter), but if it only works with a different font (such as DejaVu Sans Mono), then that would be ok as well.


What does the flag notification color mean?

I recently noticed that the flag notification background color changed.    I was wondering why? What does it mean? Or is it just a punctual change (as this block recently moved from the right of our picture, to the left)?


Word for when someone says they are good at something they know they are terrible at doing

I usually find contractors who do this and I am looking for a word to explain it. They are stating a claim, they know they are terrible at doing in order to get your business.


How to put a legend for \cellcolor{blue!25} in my table caption?

I would like to put a reference to  \cellcolor{blue!25} in the table's caption. Is it possible? Also why is the table so massive even in a makebox? I don't want to use resize, looks unprofessional.    \documentclass{article} \usepackage{booktabs} \usepackage{tabularx} \usepackage[table]{xcolor} \usepackage{multicol} \begin{document}       \begin{table}[t] \centering \makebox[\textwidth]{     \begin{tabular}{lccccccc}      \toprule      &\multicolumn{6}{c}{Care Type} \\      \midrule      \vspace{3pt}      &\textbf{Direct care} & \textbf{Housekeeping} & \textbf{Mealtimes} & \textbf{Medication rounds} & \textbf{Miscellaneous} & \textbf{Personal care} &\textbf{Overall} \\     \textbf{Correlation coefficient $r$} & 0.525 &   0.580   & 0.914 &   0.678 &   0.333 &   0.103& 0.5663\\     \textbf{p-value} & \cellcolor{blue!25}$ <$0.001 &  \cellcolor{blue!25} 0.015 & \cellcolor{blue!25}  $<$0.001 & \cellcolor{blue!25}  $<$0.001  & \cellcolor{blue!25} 0.004 &   0.7378& \cellcolor{blue!25}$ <$0.001\\       \bottomrule      \end{tabular}}      \label{tab:r_p_vals}      \caption{Correlation coefficients and p-values for time versus surface contacts. Where \cellcolor{blue!25} represents a statistically significant value }      \end{table}


Two kinds of Duplicate closing are too confusing - suggestion for a possible fix

before :         after :        This is confusing. This is two different designs for the same thing. To sum the changes up:   Different banner on top of the post. Before: banner pushed as part of post contents and can be edited.   Worth to mention the "marked as duplicate by ..." message in the bottom is the same.  Suggested fix: simply run a script that within the same transaction Reopens all questions closed as duplicates before Feb 7th 2013 then closes them again as exact duplicates. If possible prevent this from bumping the question i.e. don't update the "last activity" time stamp.


I am trying to convert an .osm file to a .shp file.  I am using OGR2OGR. There is an  which explains how this can be done. Here is an example command:  ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" output.shp input.osm   And it works perfectly. As a result of upper command, in the "output.shp" folder I get four separate .shp files: lines.shp, multilinestrings.shp, multipolygons.shp, points.shp  However what I would like to get is a single .shp file. So basically to convert an .osm file to a single .shp file.  Is it possible to do that directly through some change of the upper command?  If not then I tried to merge all these four .shp file into a single .shp file (merged.shp). I found an example topic . So I used the following 4 commands:  ogr2ogr.exe -f "ESRI Shapefile" merged.shp lines.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp multilinestrings.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp multipolygons.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp points.shp   And the merged.shp file is created, but an error is raised at the upper last (fourth) command:  Attempt to write non-linestring (POINT) geometry to ARC type shapefile.   I tried to google but I couldn't solve this error.  Can somebody please help me?


Which one is correct? two years’ period or two years period?

Which one is correct and more appropriate?      two years’ period      two years period   why?


Can pgfplots perform nonlinear regression?

Can pgfplots do nonlinear curve fitting?  In Excel, the fitting option is called log(agonist) vs response.  I couldn't find an option in the regression section of pgfplots.


Wifi cannot be turned on on Lenovo Yoga 910 with Ubuntu 18.04

I am relatively new to Ubuntu, and for the life of me cannot figure out why the WiFi won't switch on. Airplane mode is off seeing as Bluetooth is on, the problem seems only to be in the WiFi. Before installing Ubuntu, the WiFi was working fine in Windows 10. Thanks in advance :)  Edit: the laptop is a Lenovo Yoga 910, with a Qualcomm Aetheros qca6174 wireless adapter


'BluetoothAdapter null object reference' (with logcat) - Android

I'm currently programming an app which is a bluetooth controller for an Arduino  robotic arm.  When I press the button 'Start' (b7), it is supposed to enable bluetooth. But the app stops and in the logcat, i get:  "Attempt to invoke virtual method 'java.util.Set android.bluetooth.BluetoothAdapter.getBondedDevices()' on a null object reference".  here is the code:  package trombertlabs.essai1;  import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket;  import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageButton; import java.util.Set;  import java.io.IOException; import java.io.OutputStream; import java.util.UUID;  public class MainActivity extends ActionBarActivity {      ImageButton b, b0, b1, b2, b3, b4;     Button b5, b6, b7;       BluetoothAdapter bA;      @Override      protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          b = (ImageButton)findViewById(R.id.upbb);         b0 = (ImageButton)findViewById(R.id.upba);         b1 = (ImageButton) findViewById(R.id.downba);         b2 = (ImageButton)findViewById(R.id.downbb);         b3 = (ImageButton)findViewById(R.id.leftb);         b4 = (ImageButton)findViewById(R.id.rightb);         b5 = (Button)findViewById(R.id.closeb);         b6 = (Button)findViewById(R.id.openb);         b7 = (Button)findViewById(R.id.startb);          b7.setOnClickListener(new View.OnClickListener(){             public void onClick(View v){                  BtInterface();             }         });      }          public void BtInterface () {          if (!bA.isEnabled()) {             bA.enable();         }          else {         }       }        @Override     public boolean onCreateOptionsMenu(Menu menu) {         getMenuInflater().inflate(R.menu.menu_main, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         int id = item.getItemId();          if (id == R.id.action_settings) {             return true;         }         return super.onOptionsItemSelected(item);     }   }   Actually, there are 'imports' and buttons that are unused, but this is for the rest of the project.


Image a phone and browse on computer emulator?

I have a galaxy nexus (stock OS). During its use I have used WeChat and WhatsApp, and would like to save my chat and voice histories within these programs.  Does a way exist to image my current phone as it is, so I can load it onto some PC emulator and browse these apps on my PC? This would allow me to save everything as it is, but also start fresh on my phone with a format. I do not want to format my phone then load back on WeChat for instance, yet I still want to be able to browse my old WeChat chats and voice clips (using a PC).  Thanks


pgfplots, get the axis exponent in scientific notation

Many times, it happens to me to produce stacked time history plots, with xticks and xlabel in common in order to save vertical space in papers.  Consider the following MWE:  \documentclass{standalone} \usepackage{pgfplots}  \pgfplotsset{   compat=1.14,    width=200pt,   height=100pt, }  \begin{document}    \begin{tikzpicture}     \begin{axis}[       name = plot1,       xticklabels={,,},       ylabel = {$x_1$},       xmajorgrids,     ]       \addplot coordinates {(1,0.0001)(2,0.0002)(3,0.0003)};     \end{axis}      \begin{axis}[       at=(plot1.south west), anchor=north west,       xlabel = {$t$[s]},       ylabel = {$x_2$},       xmajorgrids,     ]       \addplot coordinates {(1,0.0002)(2,0.0004)(3,0.0006)};     \end{axis}    \end{tikzpicture}% \end{document}   which produces the following result:    As one can notice, the y-axis multiplier position is a problem. A possible solution would be specify the multiplier in every y tick label with scaled y ticks=false, but then the result is really heavy and space consuming.  I would like to be able to pragmatically produce the following result:    which, in my opinion, is really compact and elegant.  To do this programmatically, the exponent of the scientific notation is needed, in order to put it in the ylabel, something like:  ylabel = {$x_1 \cdot 10^{-\sci_exponent}$},   and then a way to get the scaled ytick label.  Is it possible?  Please, note that, differently from , I do not want just move the exponent, but I would like to invert the exponent in order to (for example) get $10^{4} in place of 10^{-4}, as in the figures above.


My computer is a Sys76 Lemur running Maverick, and my phone is a Nexus S running stock Gingerbread. I want to set up to use ADB (android debug bridge). I installed the Android SDK per instructions on the SDK website, but ADB doesn't work. Can someone help me with directions that are specific to Ubuntu?


A website put a launching icon in my taskbar/launcher, so I right clicked on it and a drop down menu came up that included an option to delete bar or something like that, and I clicked it, and now I have no launcher.  I have no buttons to shut the system down, I have no buttons for application menus and so on, so I can't get to any programs  I am using Ubuntu 13.10 with GNOME  How can I get the launcher back?


concatenate rows of a filed to one string along with other fields in a join query

I have few tables  EMP  EmpCode, EmpName, Age   Attendance   AtCode, EmpCode, Sample1, Sample2   AnotherTable   id, EmpCode, Sample4, Sample5   Now my query is   SELECT distinct b.Sample4, e.EmpName, A.Sample1, A.Sample2 FROM  Attendance  A inner join EMP e on a.EmpCode=e.EmpCode left join AnotherTable b on A.EmpCode=b.EmpCode   This query results in following records  Sample4      EmpName    Sample1  Sample2 MG           Joy         01      11104 ST           Joy         01      11104     I need the result as   Sample4      EmpName    Sample1  Sample2 MG,ST            Joy         01      11104   How can we achieve this.


Today I ran into a irrecoverable problem by accidentally formatting my ubuntu drive, In future I don't want to face these kinda problems, So how can I have a clone of my OS (I mean with all the software I installed) so that if i run into a problem I can just somehow use the clone to get back my OS ? BTW in another post someone mentioned Remastersys , but their website says that the software will no longer be available.  any related tips also might help.


~\cite adds space between citation and text

I am trying to add citations to a technical report using ~\cite, so that the result would be text[1]. But instead I get text [1] with a space between the citation and the text. I am using \usepackage{cite}. How do I remove the space?


Is there a "reasonable" way to get a sense of "how many" measurable subsets there are of $\mathbb{R}$?

I know the question is a little vague; I guess it sort of has to be. So, we know that there are subsets of $\mathbb{R}$ that fail to be measurable. I was wondering if there's a way to get a sense of "how many" such sets their are. I'm thinking that we'd need to define a measure on some sigma algebra in $\mathcal{P}(\mathcal{P}(\mathbb{R})),$ so that our ambient space is the powerset of the reals, and the elements of the sigma algebra will then be collections of subsets of real numbers. From there, define some suitable notion of measure and get a sense of "how many" subsets of real numbers are (say lebesgue) measurable. Does anyone know if this has been done, or if it's even possible? For all I know, there might be some deep problems with trying to construct such a measure. Maybe a slightly different way of phrasing my question, though similar in spirit, is; If I were to 'randomly' select a subset of $[0,1]$, what's the probability that it would be measurable, if such a probability exists?


Text is too closely spaced preceding empheq environment

This is a follow-up question regarding a previous question:    In the dukedissertation document class the solution given in the link provided above leads to improper line spacing preceding any use of the empheq environment.  How can I retain the left-bracket fix provided as an answer to my previous question without it causing improper line spacing in the paragraph preceding an empheq environment?  The following is a minimal working example illustrating the line-spacing problem.  \documentclass[]{dukedissertation}  \usepackage{amsmath} \usepackage{empheq} \usepackage{etoolbox}  \AtBeginEnvironment{empheq}{\linespread{1.3}\selectfont\normalbaselines}  \begin{document}  \chapter{Chapter Something}  A new chapter.  \section{Section Something}  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu mollis tortor. Sed massa quam, pellentesque quis metus id, ultrices scelerisque libero. Donec in magna sapien. Donec sit amet odio sed lectus sodales accumsan. Etiam rutrum ultricies congue. Fusce laoreet nulla in massa rhoncus, a cursus ligula aliquam. \textbf{Text preceding the empheq environment is too closely spaced.} \begin{subequations} \begin{empheq}[left=(1.1)\empheqlbrace]{align}     v &= \dot{x}\\     a &= \dot{v}\\     j &= \dot{a} \end{empheq} \end{subequations} \textbf{Text afterwards is just fine.} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu mollis tortor. Sed massa quam, pellentesque quis metus id, ultrices scelerisque libero. Donec in magna sapien. Donec sit amet odio sed lectus sodales accumsan. Etiam rutrum ultricies congue. Fusce laoreet nulla in massa rhoncus, a cursus ligula aliquam.  \end{document}


Can I have accounts on different SE sites that are not linked?

I would like to register on other SE sites, without having the accounts publicly linked in my profile (different user names would be nice for that, too). Is this possible?  Potential use-case: Assuming I want to prove my skills to a future employer by showing that I have answered many questions in the related field, they don't need to see that I am spending all my spare time playing D&D.


Nginx config can't reload. Have "bind() to 0.0.0.0:80 failed (98: Address already in use)" errors

I tried installing an HTTPS certificate, and after banging my head against the wall for a few hours, I realized that Nginx is NOT picking up the changes I made in my site configuration files contained within /etc/nginx/sites-available/  When I run service nginx restart it restarts fine. When I run nginx -t it says my syntax is OK and my config test is successful. However, when I run service nginx reload I get an error that says reload: Not running  When I look in /var/log/nginx/error.log I have these errors.  2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:443 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to [::]:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:443 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to [::]:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:443 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to [::]:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:443 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to [::]:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to 0.0.0.0:443 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: bind() to [::]:80 failed (98: Address already in use) 2016/08/29 16:04:40 [emerg] 14744#14744: still could not bind()   After Googling around, I ran across this command netstat -plutn | grep 80 which gives me...  tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      14642/nginx: worker tcp6       0      0 :::80                   :::*                    LISTEN      14642/nginx: worker   I have no idea what this really means, but reading around, it seems Nginx should NOT be running on port 80? Nginx is my webserver, don't I want it running on port 80?  Not sure how to proceed. I want Nginx to pick up the changes I made in my site config files with the service nginx reload command, and at the same time I'm hesitant to just copy/paste commands I find around the net since I have 10 websites hosted on this server.  Where am I going wrong? I have tried deleting the default file in my sites-available folder as some have suggested, but I just don't really understand what the problem is, and how to fix it.


I have a simple water setup: water flowing into a basin.  In edit mode, I can see the wireframe of the water, but once it is rendered, I don't see anything. What is going on here?   is my .blend


What is the difference between necessary and sufficient conditions?

If $p\implies q$ ("$p$ implies $q$"), then $p$ is a sufficient condition for $q$. If $\lnot p\implies \lnot q$ ("not $p$ implies not $q$"), then $p$ is a necessary condition for $q$.   I don't understand what sufficient and necessary mean in this case. How do you know which one is necessary and which one is sufficient?


What is the smartest way, before selling a mobile phone, to be sure that no one will be able to access my data?  In my case we are talking about an LG G4.


Nikon d5100 producing extremely underexposed images

I have a most vexing problem.   I have a Nikon d5100 (roughly a year old) which up until two days ago handled exposure and metering just fine. However, at night, in a well lit room (florescent bulbs) in which I NEVER had problems capturing images at reasonable shutter speeds, apertures and ISOs (< 400), here's what's happening now:   In Manual, even at low shutter speeds (1/90 and lower) and relatively open apertures (3.5) - ISO 640 and less - my pictures are almost completely black. Pointing the camera at a bright lightbulb just barely captures the light with heavy shadows all around it. Exposure compensation no longer has ANY effect on the exposure Shooting in Aperture Priority mode at f/3.5 at anything lower than ISO 1000 reduces my shutter speeds to 1/2 or lower to compensate.   Yes, I know. ISO. Keep in mind, the room is quite brightly lit and I never had this issue prior to last night. That being said, the only way I can capture a reasonably exposed picture here is at ISOs 6400 and above. But even a picture at 1/125, f/5.6, ISO 6400 (manual) is still ridiculously dark.  I have taken the following step to troubleshoot, to no avail:   Turned exposure compensation up to the max +5.0 - no effect Turned shutter speeds down to 1/40 and below - extremely limited effect Turned ISO up to 6400 and beyond - limited effect Update the camera's firmware (1.01 > 1.02) - no effect Reset the camera using the buttons with the two green dots - no effect, multiple tries Messed with the metering modes - no effect Turned it off and on again - no effect Stared pointedly at the camera - camera didn't even flinch   I am at an absolute loss here and I really, truly, need help.  Images:  ISO 100, f/3.8, 1/3   ISO 100, f/3.8, 1/90    ISO 1000, f/3.8, 1/90


I am unable to find the link for downloading Ubuntu 16.04 onto my   desktop/laptop. I am able to see the link only for 18.04, but I need 16.04.


I'm having some problems using threads in java

I'm new to using threads in general can someone explain why I sometimes get this exception:  Exception in thread "Thread-3" java.lang.NullPointerException     at Game.tick(Game.java:96)     at Game.run(Game.java:73)     at java.lang.Thread.run(Unknown Source)   It happens when the game starts or when I'm in the middle of playing. This error is so inconsistent as to when it decides to pop up, I have no idea what's causing it.  Here is the run and tick method:  public void run(){     this.requestFocus();     long lastTime = System.nanoTime();     double amountOfTicks = 60.0;     double ns = 100000000 / amountOfTicks;     double delta = 0;     long timer = System.currentTimeMillis();     int frames = 0;     while(isRunning) {         long now = System.nanoTime();         delta += (now - lastTime) / ns;         lastTime = now;             while(delta >= 1) {                 tick();                 //updates++;                 delta--;             }        render();        frames++;         if(System.currentTimeMillis() - timer > 1000) {         timer += 1000;         frames = 0;         //updates = 0;        }     }     stop(); } public void tick(){      for(int i = 0; i < handler.object.size(); i++){         if(handler.object.get(i).getId() ==ID.Player){             camera.tick(handler.object.get(0));         }     }     handler.tick(); }   My apologies if this post is very similar to other posts on threads I just need somewhat of a quick fix (if there is one). I'd forgot to mention that the error is different every time the game starts up for example:  Exception in thread "Thread-3" java.lang.NullPointerException at Enemy.tick(Enemy.java:59) at Handler.tick(Handler.java:13) at Game.tick(Game.java:101) at Game.run(Game.java:73) at java.lang.Thread.run(Unknown Source)  Exception in thread "Thread-3" java.lang.NullPointerException at Enemy.collision(Enemy.java:105) at Enemy.tick(Enemy.java:31) at Handler.tick(Handler.java:13) at Game.tick(Game.java:101) at Game.run(Game.java:73) at java.lang.Thread.run(Unknown Source)   This is also this is the handler class if it helps:      import java.awt.Graphics; import java.util.ArrayList;  public class Handler {      ArrayList<GameObject> object = new ArrayList<GameObject>();       public void tick(){         for(int i = 0; i < object.size(); i++){             GameObject tempObject = object.get(i);              tempObject.tick();         }     }      public void render(Graphics g){         for(int i = 0; i < object.size(); i++){             GameObject tempObject = object.get(i);              tempObject.render(g);         }     }       public void addObject(GameObject tempObject){         object.add(tempObject);     }      public void removeObject(GameObject tempObject){         object.remove(tempObject);     }      public void addObjectSpec(int i, GameObject tempObject){         object.add(i, tempObject);     }  }


Question about correlation between Y=A*B Vs B

I was presented a correlation graph with data set A Vs data set B and there was no correlation. Then I was shown another graph with Y=A x B Vs B and there there was correlation. As Y is calculated from B I thought there should automatically be a correlation between Y and B so why doing that correlation graph. But I did some simulation with randomly generated sets of B (A staying the same) and it was not always correlated. Does anyone has a mathematical explanation why Y = A x B should or should not be correlated to B Thanks


How to transfer WhatsApp conversations to a new phone?

I recently changed smartphones from an unknown to Samsung, and I've lost my WhatsApp conversations. I want them on the new phone. I have reinstalled it on the new phone, and the msgstore.db.crypt files are there, but WhatsApp does not read the older conversations back.   What I would like to do is have WhatsApp appear as an unbroken list of chats so that the date that I changed phones is not apparent in the list of chats.


How do I exclude certain email folders from being searched in Outlook 2013?

Email searches in Outlook 2013 work as expected. I am trying to refine it by excluding certain folders by default. I was hoping I could uncheck certain folders in Control Panel > Indexing Options > Outlook. Unfortunately, the checkbox is for Outlook itself. I can either search Outlook or not. There is no refinement beyond that. Is there another way to exclude searching of specific folders?


A novel about a man left behind by his family's spaceship who helps discover a warp drive

This is a book I read 40 years ago. I remember the plot but haven't a clue as to the title.  A young man misses the takeoff of his trader families’s spaceship and is marooned on a planet. He has no real skills to find work and falls in with a gambler who shows him how to play a game that will provide him with enough credits to live on. After a botched robbery attempt where his benefactor is killed, he finds himself a very rich man and sets out to pursue a rumor of a FTL/Warp drive so he can be reunited with his family.


How to install Dreamboxedit, Clonezilla and Skype in Ubuntu 14.04.3 LTS?


Is "hooray" generally considered to be onomatopoeic?

Is this word onomatopoeic, just an interjection, both, something else?


I want to show '\' in final pdf file, not as a command to latex, but as a text '\' itself. How can I do this?


I've been asked to prove that $1+x+\frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!}>0$. Proving that $1+x+\frac{x^2}{2!}>0$ is simple as you just need to consider the discriminant and show that it's less that 0. Showing $1+x+\frac{x^2}{2!} + \frac{x^3}{3!}=0$ only has 1 solution is to just consider the derivative and using the previous proof that $1+x+\frac{x^2}{2!}>0$ has no zero (so it is always increasing).  With this information, how would you be able to prove $1+x+\frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!}>0$? I've tried to show that the global minimum (the lone solution to $1+x+\frac{x^2}{2!} + \frac{x^3}{3!}=0$) gives a positive answer, however I have not been successful. How can I show this?


I'm having some issues with a sentence that is part of the purpose in a report that I'm writing. I'm not sure if the word "communicate" (in bold) should be singular or plural.  The applications in the "set" will communicate with each other, not with other "sets".     The purpose of this report is to develop a sample set of applications   that communicates between services on the internet, mobile devices   and a central processing unit in a motor vehicle.


Has anyone used online bank statements for a UK Visitor Visa

Have any of you used online bank statements (i.e. print outs of the pdf documents from your online banking) to apply for a UK Visitor Visa?  If so, were they accepted or rejected?  Please only reply if you have actually applied using the documents stated. I am specifically looking for real experience rather than opinions.  Not a duplicate as this specifically asks for people with experience. I am very aware of the guidance stating the need for originals only, however, it is not black and white on whether online statements constitute originals. As stated - PLEASE ONLY REPLY IF YOU HAVE EXPERIENCE OF USING ONLINE STATEMENTS


Javascript doesn't work when loading popover with button click event

Yosh! In a popover, I added two links. The 1st refers to an action by the controller (And it works) The second contains a simple class, which, when clicked, should trigger launch a simple alert in JS. Except it doesn't work.    The popover header code in the DOM:    $(".show").click(function(){  var header = "Click on me";  $(".show").popover({     title: header,     placement: 'top',     trigger: 'click',     content: "toto",     container: 'body',     html: true  }).popover('show'); });  $(".js-alert").click(function(){  alert("Hello !"); })        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
   <button type="button" class="btn btn-secondary show">Show popover</button>
     And when I click on the second link, nothing happens at all (and no error)  This is an example on jsfiddle :


my client has a special requirement. He wants to have a customize header in salesforce.    He wants to : - hidden help&Trainig link - hidden Setup link - hidden myprofile link - insert a custom logout link - have a different style for the header.  Is it possible ? How can I do that? Thank you for your hints


I see people putting these in emails, are they correct? My gut feeling says that please would have sounded a lot better.     Do let us know your thoughts.   Do let me know.   Do consider the proposal.


What's the best way to initialize a dict of dicts in Python?

A lot of times in Perl, I'll do something like this:  $myhash{foo}{bar}{baz} = 1   How would I translate this to Python? So far I have:  if not 'foo' in myhash:     myhash['foo'] = {} if not 'bar' in myhash['foo']:     myhash['foo']['bar'] = {} myhash['foo']['bar']['baz'] = 1   Is there a better way?


When the earth is hit by solar flares, will it make the earth move faster through space when the magnetic field bends?


Resizing Mac OS partition - macOS High Sierra

Hi I am having issues trying to resize my Mac OS partition, I previously had a very large recovery partition almost 100gb as a result of removing my linux installation, I since resized this to 650mb. The problem is I am unsure on how to increase the size of my main Mac OS partition as I have no experience with this new container disk stuff.   Here is what diskutil list shows:  /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *251.0 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         150.4 GB   disk0s2    3:                  Apple_HFS Recovery HD             650.0 MB   disk0s3  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +150.4 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Mac OS                  122.1 GB   disk1s1    2:                APFS Volume Preboot                 20.3 MB    disk1s2    3:                APFS Volume Recovery                506.6 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4   As you can see I resized the Recovery HD partition but the container is still 150gb.  I also tried the following command to try reduce the container size:  sudo diskutil apfs resizeContainer disk0s2 1g jhfs+ Media 0b   But I get the following error:  Error: -69605: There is not enough free space in the APFS Container for this operation   Additionaly within Disk Utility app if I view the partitions, it shows I have 99.6 GB of "Free space" but I am unable to resize the Mac OS partition as previously mentioned.  Any help would be greatly appreciated, Thank you


Debian installation issues with Broadcom network drivers

During the installation Debian tries to configure networking. It pops up a message about firmware being required and points me towards a list of missing files:  b43/ucode15.fw b43/ucode15.fw b43-open/ucode15.fw b43-open/ucode15.fw  Lots of posts say download x or y drivers but I've not found any links. I managed to download firmware-b43-installer_019-3_all.deb which appears to be the Debian package for all the Broadcom cards from what I can tell. Reading further it says to put that on a USB stick and pop it in during installation and it will find it. No it doesn't. Seems that the Debian installer can't read a .deb file or by putting it on the USB stick as explained during the installation, I didn't do it right, ya know, copying a file to a USB stick.  Seems that I didn't put the firmware file into a folder called firmware on the USB stick. Tried again. Nope, still can't find it. So, the firmware-b43-installer_019-3_all.deb file. If this doesn't contain the drivers, then what is it?  Where are the drivers? Once I have the drivers, what do I do with them? If they go on a USB stick, does it have to go a specific folder or is the installer clever enough to just search for it?


I found the following problem is quite hard for me, and I tried a lot but something I can't bring in my mind. Let $K$ be a normal subgroup of a group $G$ ($G$ can be finte or infinite) such that $[G:K]=m$. If $n$ is a positive integer such that $gcd(m,n)=1$, then show $K$ contains all elements of order $n$ in $G$.  I start by assuming that there exists an element of order $n$ which is outside $K$, then tried for getting a contradiction. But the group isn't provided finite,so I can't reach too far. Kindly provide me some hints.


What is the 'rev' dropdown supposed to do?

I only see this on sites where I don't have edit privileges, and only where there have been multiple revisions:        What exactly is this supposed to do?  Intuitively, I would expect it to change the text in the box to what it was at that revision, but it doesn't. And, if that's it, why only where I need to suggest edits?


How to make use of less data of a particular class for better modeling?

I have a dataset, say 9000 rows, with some features. Around 8000 belong to class 1 and 1000 to class 0. So, if I am creating a model with any method say SVM, LR, Random forest the model has a tendency to give more prediction to class 1. So I have two things in mind:  a) I want to separate 8000 rows belonging to class 1 into 4 groups and use each group with those 1000 rows belonging to class 0 and create a model. After that I thought of averaging over the models. My first question is, averaging over the models as in theory means really what. Does it mean that we have to sum over the coefficients of each model and take the average? I am stuck with that part of averaging. And is my approach a good one?  b) Another approach I am thinking of is to replicate the 1000 rows belongs to class 0 8 times to get 8000 rows of 0. So, total data will be 16000. Will the duplication result in new information? Will it tend to overfit?  Is there any approach to deal with these unbalanced data?


Why do we see patterns on a rotating wheel with spokes which seem to rotate counterclockwise or clockwise as and when the wheel accelerates or deaccelarates. What I mean is the patterns like


Motivating the ansatz for the infinitesimal translation operator

I'm reading Sakurai's Modern QM right now and in the first chapter he states a number of conditions required for a translation operator: unitarity, $$T(\mathrm{d}\mathbf{x})T(\mathrm{d}\mathbf{x^\prime}) = T(\mathrm{d}\mathbf{x}+\mathrm{d}\mathbf{x^\prime}),$$ $$T(-\mathrm{d}\mathbf{x}) = T^{-1}(\mathrm{d}\mathbf{x}),$$ and going to 1 for small translations.   He then makes the ansatz (1.6.20 in the new version): $$ T(\mathrm{d}\mathbf{x}) = 1-i \mathbf{K} \cdot \mathrm{d}\mathbf{x} $$ and demonstrates that this form of $T$ meets the requirements and is generally the correct choice. Here, $\mathbf K =(\mathrm K_x,\mathrm K_y,\mathrm K_z)$ with each component hermitian.  I was hoping somebody could provide some motivation for this particular choice. Is there any reason why it is to be expected or natural? How would you come up with this form of the operator by yourself?


How do I remove a previously installed app/software on Ubuntu 16.04

Like, in Windows, in Control Panel, we have Uninstall a Program option, is there anyway I can uninstall a program on Ubuntu? I have installed some programs previously, I do not remember the version and command line i wrote in terminal (because after that, I have used many commands) etc. I searched for a solution on web, and mostly I got an answer, to use Ubuntu software centers. But I do not see many of the softwares I had installed. (For eg. Android Studio, QT. etc) I wish to have a GUI where I can uninstall such programs. Is it possible?


Detect if rectangle intersects with other rectangle in geographic coordinate

I have two rectangles and want to detect if rectangle intersects with other rectangle in geographic coordinate. My actual code working only with positive geographic coordinate values  if (rect1.MaxLongitude < rect2.MinLongitude || rect2.MaxLongitude < rect1.MinLongitude || rect1.MaxLatitude < rect2.MinLatitude || rect2.MaxLatitude < rect1.MinLatitude) {     return false; } else {     return true; }   How can i achieve detecting in geographic coordinate with negative and positive values (even in one coordinate)?


Bind application to a specific network interface

I have tried ForceBindIP, but it has a significant downside - it doesn't affect the children of the application I'm trying to bind, it only affects the application itself. It also can't force an application to always run through a specified interface, it has to be run through forcebindip.exe every time. It becomes a problem with applications like League of Legends where the process tree looks like that:    The launcher runs the patcher, the patcher run the client, etc. I can only affect the parent of all these processes in the tree, so the actual game is not bound to the interface I want, making this whole venture pointless.  Is there a more modern alternative to ForceBindIP for Windows 7? There are many questions similar to this one on this site, but they are mostly old. Maybe there is now a better way to solve this problem?  My current idea is to do the following:   Set up local 3proxy server bound to the desired interface. Run the game through Proxifier or similar software configured to run through that local proxy.   I'm not sure if that will work, but even if it will, it seems like a sub-optimal solution. Do you guys have any better ideas?  Edit: My idea didn't work :(  Edit 2: Basically, what I'm trying to achieve is bind a few applications to a regular interface, while VPN is running. The reason is that I need to connect through VPN most of the time, but some applications (such as games) don't work properly this way, because of higher ping and other issues.


I am using Ubuntu 16 desktop, but I do plan to SSH into my machine just as much, if not more, than I use it as a desktop.  I am noticing that when I issue an sudo reboot command while I am SSH'd in, the machine will reboot, but it will no longer be accessible via SSH. I notice the machine action will reboot then go into a sleep state.  I am it set to allow network connections before log in and I have toggled "auto login" but neither worked.  I really just want it to work like a typical Linux Server where SSH can be performed after a reboot. I would prefer the machine to reboot, then start up, fire up my profile tasks, and stay awake till I issue a sleep or shutdown command manually.  Update: it was suggested that this issue would cover me () But I think it may be outdated as I do not have a /home/eric/.ssh/authorized_keys file... My SSH does work as along as I have already manually logged into my machine.


How to make Current to Voltage converter

I am working on level sensor which give output of 4-20 mA. I have to feed output of level sensor to an ADC of a micro-controller, to do so I have to convert it from current to voltage.Voltage range needed is 0-1.8 Volts.  So I have gone through some circuits below:      I want to know which would be much more suitable to be used with ADC of micro-controller.


This is a basic question on Box-Jenkins MA models. As I understand, an MA model is basically a linear regression of time-series values $Y$ against previous error terms $e_t,..., e_{t-n}$. That is, the observation $Y$ is first regressed against its previous values $Y_{t-1}, ..., Y_{t-n}$ and then one or more $Y - \hat{Y}$ values are used as the error terms for the MA model.  But how are the error terms calculated in an ARIMA(0, 0, 2) model? If the MA model is used without an autoregressive part and thus no estimated value, how can I possibly have an error term?


I'm a bit confused about the concept of ground, and perhaps voltage as well, particularly when trying to analyze a circuit. When I learned about Ohm's law in grade school, I learned how to apply the law to calculate current, voltage, and resistance of simple circuits.   For instance, if we were given the following circuit:    We would be could be asked to calculate the current passing through the circuit. At the time, I'd simply compute (based on the rules given) 1.5V/1Ohms=1.5A.  Later on, however, I learned that the reason the voltage of the resistor would be 1.5V is because voltage is really the difference in potential between two points, and that the difference of the voltage across the battery would be the same as that of the resistor (correct me if I'm mistaken), or 1.5V. I got confused, however, after the introduction of the concept of ground.   The first time I tried to do the current calculation for a circuit similar to the previous circuit on a simulator, the program complained about not having a ground and "floating voltage sources". After a bit of searching, I learned that circuits need ground as a reference point or for safety reasons. It was mentioned in one explanation that one can pick any node for ground, although it's customary to design circuits so there is a "easy place" to pick ground.   Thus for this circuit    I picked ground at the bottom, but would it be okay to pick ground between the 7 ohm and 2 ohm resistor - or any other place? And what would be the difference when analyzing the circuit?  I've read that there are 3 typical ground symbols with different meanings - chassis ground, earth ground, and signal ground. A lot of circuits I've seen used in exercises either use earth ground or signal ground. What purpose is there in using earth ground? What is the signal ground connected to?  Another question: since the ground is at unknown potential, wouldn't there be current flowing to or from ground to the circuit? From what I've read we treat the ground as 0V, but wouldn't there be some sort of effect because of a difference in potential of the circuit and ground? Would the effect be different depending on what ground was used?  Finally: In nodal analysis, one customarily picks a ground at the negative terminal of the battery. However, when there are multiple voltage sources, some of them are "floating". What meaning does the voltage of a floating voltage source have?


Fixed distance buffer version 2.16.1 problems

I am trying to buffer a simple line and the program simply won't complete the process after 10 attempts. I am buffering to 20,000 (I assume it's metres). Anyone had this issue before? My internet is fine and I restarted QGIS too. I am new to the programme.


probability of having all types in a 5 cards hand

I was asked for the probability of having at least one card from each type (hearts/spades/etc.) in a 5 cards hand chosen randomly from a 52 cards normal deck. my solution was $\frac{{{13}\choose{1}}^4{{48}\choose{1}}}{{52}\choose{5}}$ as in, choose one card from each type and then one from the 48 cards left, then divide it all by all the possible hands. my solution is wrong, and I don't understand why, can someone please point out where have I gone wrong?


PHP regular expression validation for date?

Hi I'm trying to create a regular expression for my date field.  The date format is MM/DD/YYYY.  My current regular expression code is as follows  var RE_DATE = /^[0-12]{2}[/][0-31]{2}[/][2010-2020]{4}$/;   which is wrong but well... I tried. :P  May I know how to get my regular expression to check for dates and months with a 0 in front of them?


if $\int\limits_a^bf(x)dx=0$ for all rational numbers $a<b$, then $f(x)=0$ a.e

Let $f:\mathbb{R}\to\mathbb{R}$ be an integrable function. Show that if $\int\limits_a^bf(x)dx=0$ for all rational numbers $a<b$, then $f(x)=0$ all most everywhere. Hint:  First prove $\int\limits_Af=0$ for $A$ an open set, then for $A$ measurable. My attempt: Let $A$ an open set in $\mathbb{R}$. Then  we can write $A=\bigcup\limits_{k}(a_k,b_k)$ where $\left\{(a_k,b_k)\right\}_{k=1}^{\infty}$ is a disjoint collection of open intervals with rational end points(Is this possible?) So $\int\limits_Afdx=\int\limits_{\bigcup\limits_{k}(a_k,b_k)}fdx=\sum\limits_{k=1}^{\infty}\int\limits_{a_k}^{b_k}fdx=0$ Then how should I use the result to for measurable $A$ and moreover, after doing so, does $\int\limits_{\mathbb{R}}f=0$ implies $f=0$  a.e? Appreciate your help


Is there a distribution such that a sum of its samples creates the uniform distribution?

Say I sample $N$ numbers from a mystery discrete distribution and add them all together. My goal is for the sum of these random variables to be uniformly distributed from $[a,b]$ and thus the distribution is paramaterized by $(N, a, b)$. Does such a distribution exist? I can imagine how to calculate the probability of each number being picked here, but I was wondering if this had a name or if anyone had formalized it (My GoogleFu is failing me). I mentioned the discrete case as it's relevant to the problem I'm trying to solve, but I'm curious about the continuous case as well.


Does a photon having superimposed frequencies exist?  (wrt frequency detected by prism or other detectors, not wrt human eye as only rod-cells can detect one photon falling in the detectable (visible) frequency band and the single photon is perceived by eye+brain as grey irrespective of frequency).  Also, with white here, I do not wish to restrict the question implying all VIBGYOR frequencies or only RGB as each color is also a range of frequencies and white to trichromatic-sensor human eye is just output from three frequencies RGB.  Or can it be that materials which slow light down cause a photon of some single frequency and higher energy to split into VIBGYOR? || and the entire spectrum of human eye's detection range is VIBGYOR+W (as monochromatic light of high intensity can also be perceived white by human eye and it is not related to individual color sensors of human eye at all but that above a certain energy per unit volume (referring to detector area of eye cells), we perceive it white, (somewhat but not exactly) similar to combination of red and green which human eye+brain calls yellow.  I have added the additional description to make the question more precise. If my description causes confusion, please stay with the original question and use description just to get an idea of the intent of the question.


Counterexample for the monotonicity of Lebesgue dimension?

I recall reading that the Lebesgue dimension isn't monotone, ie. that one can find spaces $V,W: V \subset W, \dim W<\dim V$. But I wasn't able to find any such examples on my own, nor could I find any article or book that would provide any not hidden behind a paywall. Reading Engelking's dimension theory, I've found a theorem on compactification: For every separable metric space $X$ there exists a compactification $\tilde{X}$ such that $\dim{\tilde X} \leq \dim X$ So I guess one just needs to find an example where the inequality is strict.


How to use Alt+Tab on Windows to switch to desktop?

I want to only use alt+tab to switch tabs, I consider the desktop a tab.  How would I enable switching to the desktop? I saw in this  that you need to change the option below, however it's nowhere to be seen in my settings menu.  Also there is this 5 year old . Windows version: 2004


How do I create a macro in Excel for Mac?

I have found this thread on this topic   But I have no idea how to create the macro people are talking about. I will be grateful for your help on how to create the macro with the suggested code.


I have a 24" bmx. I would like to know the make and model

I bought it as a complete bike. The forks are stamped fa. I figure free agent. The bottom bearing cup has a painted logo that says hammer. The numbers on the frame are ACA09E005025.       09-010. I tried uploading a pic but it wouldn't. Says needs smaller image idk.


Why can't we interpret the W, Z bosons as massive vector bosons not arising from a gauge theory?

The standard story goes as follows: gauge bosons cannot have a mass term because it would break gauge invariance in the lagrangian. This is clear, but why can't we just have massive vector bosons without any gauge transformations associated to them? My question arises from the standard model: spontaneous symmetry breaking gives you 3 massive bosons and a massless one, with a $U(1)$ residual gauge invariance from the subgroup of $SU(2) \times U(1)$ which leaves the $\varphi$ (vacuum) doublet invariant. My question is the following: why don't we just add massive vector fields with the desired masses and charges, without even defining gauge transformations for them?  On chapter 21 of Peskin&Schroeder they show how to quantize a spontaneously broken $U(1)$ theory in the $R_\xi$ gauge, and one interesting feature is that since the $\xi$ dependence drops out once you add both the (now massive) $A_\mu$ and the Goldstone boson $\varphi$ (with fake $\xi$ dependent mass) contributions, one can choose $\xi$ in different ways to prove different things, e.g. renormalizability, unitarity, and so on. Perhaps the theory wouldn't be renormalizable if we just added mass terms for the "non gauge" bosons, thereby making them fields with a Proca-like action.


When are command options prefixed with two hyphens `--`?

What are the general rules for knowing when command options are prefixed by -- as opposed to -?  Edit: An answer referencing a canonical source, such as steeldriver's is preferred. One suggested duplicate refers to Wikipedia which is okay but probably not as good as a GNU documentation link.  Second edit: I think the title is not my original so if it misleads, I'm sorry, it was not my edit. That probably explains why some comments direct me to the man page.


Tikz arrow originating from a node going east

How I can I draw an arrow that originates from a circular node and goes east for a certain distance.


AES CBC Initialization vector - Security issues

I have 2 questions regarding security issues related to initialization vectors used in AES CBC   Consider that I'm using a sequence number (which increments with every encryption) as an initialization vector. Would this be a security issue? Is there some way that an attacker who knows the sequence numbers and in turn knows the IV, be able to decrypt even some part of the data, if not the whole?    I'm asking this question because some of the comments on the 1st answer in the following link seem to suggest that using a counter for an IV would not be a good choice.   If it is possible to perform such an attack, can you provide an explanation of how this would be possible? I tried searching. But, none of the sources I found seem to answer why the IV cannot take values from a counter. They only talk about safety in terms of storage.   The other question is related to transmission of IVs. I searched quite a bit and everyone says that the IV need not be secret. But, if IV is exposed, isn't it possible for a man in the middle to change the IV so that the end result at the decryption end will fail?


Iterating through a Collection, avoiding ConcurrentModificationException when removing objects in a loop

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.