I have HTC Desire 816 (codename a5) and want to port Ubuntu touch to it. Unfortunately I don't have AOSP device tree for a5 but i have CM device tree. I tried to follow with the  but after adding my device tree and starting lunch i got a error:  build/core/product_config.mk:222: *** Can not locate config makefile for product "a5"   Could you please help with this issue? Or provide with the link how to port Ubuntu Touch to the CM based devices? I have checked  but i think it is not clear for me. I have stopped on step from official porting guide. I started Lunch and selected my newly created device tree. I'm not sure why lunch can't find makefiles and which makefiles it tried to find.

I would like to port Ubuntu Touch to a device that is currently not supported. What are the requirements for doing this and where do I begin?


A couple of time recently I've seen a bike being ridden near work with drop bars, but upside down and with the brake levers facing towards the rider.    By upside down, I mean as if the stem bolts were loosened and the bars rotated 180°, not set up like bullhorns. I'm inclined to assume that this is a misguided attempt to make the bike more comfortable, but it looked the right size for the rider, who was riding on the bar tops when I saw him this morning. It would seem like the brakes are almost impossible to reach quickly or to cover.  What benefit could this have for the rider?

If I need to sit more upright on an old Fuji road bike, can I turn the drop handlebars upright and reversed so that they come up and then point to the rear?  I haven't seen anything on the net from anyone who has done that.


I have Ubuntu already installed. I wanted to get windows 7 as well, I followed the instructions I was given, to partition my hard drive and to format it to a NTFS for Windows but now When I try to boot from HDD I only get Windows. I am seeing that I was (if done right) to get a GRUB menu at start you, so I may pick which one I would to start up. I would much thankful of your help, also I have no issue with having to flash my hard drive and start from scratch.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I have an MSI GS63VR. It has an i7-7700HQ CPU, 16 GB of RAM, and an NVIDIA GeForce GTX 1060.  I just installed Ubuntu 16.04.4 LTS using the steps described on the site. I allocated 40 GBs to Ubuntu. Everything seemed to install correctly.  Once I saw the notification about the installation being successful, the machine said I'd need to restart. I press ok (or whatever the prompt said). It froze there. I left and came back a half hour later and saw it hadn't changed so I manually shut down the machine.  It restarted just fine. Instead of going straight to windows, it brought up the screen where I can choose ubuntu or windows. I chose ubuntu. After that, a black screen came up and nothing happened. It just froze there.  Is there something I can or should do to fix this?

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


Let $A$ be and $m\times n$ matrix and $B$ be an $n\times m$ so that $AB=I_m$ and $BA=I_n$.  Need to show that $m=n$.  Now I thought I could just show that $AB=BA$.  The way I approached this problem is the following:  $$AABB=ABAB \Longrightarrow (BA)ABB=(BA)BAB$$ $$I_nABB=I_mBAB \Longrightarrow I_nAB(BA)=I_nBA(BA)$$ $$I_nABI_n=I_nBAI_n\Longrightarrow I_nABI_n=BA.$$  I have noticed several problems with this though specifically $AABB$ because $$AABB=A(AB)B=AI_mB$$ since $A$ is $m\times n$ and $I_m$ $m\times m$ they can not be multiplied similarly for $B$ $n\times m$. Also for $I_n$ times $A$ and $B$ times $I_n$.  I have also tried $BBAA=BABA$ and run into a similar problem.  Any help would be appreciated.

Let $A, B$ matrices $n\times m$ and $m\times n$ respectively so that $AB=I_n$ and $BA=I_m$. Show that $n=m$.


Introduction: I recently created a load of figures in Microsoft Visio. These figures looks great, however, are stored in the .png format. I am interested in raising the picture quality.  Method: I am keen to get this to be vector graphics and I thought that the best option would be to save them as .pdf from Visio and load to LaTeX in following manner:  Package (Thanks Sigur):   \usepackage{graphicx}   Load in LaTeX:  \begin{figure} \begin{center} \includegraphics[scale=0.70]{myFile}\\ \caption{MyCaption} \end{center} \end{figure}   Problem/Question: My problem is that once I save my file in Visio - it brings a lot of whitespace with it (space under and besides the actual figure). I can't get rid of this whitespace once saving the file to .pdf from visio nor can I rid of this whitespace while including the .pdf in Latex. What do you think is the best option to get rid of this excess white space?  Thanks in advance!

Is it possible to clip a figure inserted with \includegraphics to contents? That is, remove all surrounding whitespace.


I run the generalized linear model on Poisson distribution with offset term to account for the differences in sampled area. The response variable is the count of aquatic insect larva and the explanatory variables are the physical characteristic of lake environment.   The frequency of my data is below: 0-13 (zero is a count and 13 is a frequency); 1-6; 2 -1; 3-3; 4-1;  5-1; 11-1; 36-1; 44-1; 65-1; 80-1; 99-1; 117-1; 175-1; 202-1; 270-1; 289-1; 474-1; 523-1; 1783-1  model5<- glm(Organism_Count ~ offset(log(AreaSampler)) +          Freq5 + Depth5 + Volume5, family = poisson(link=log), data=a)  The residual deviance of the model is 10713 on 34 degrees of freedom.   According to Zuur 2009, if the ratio of 10716/34=315 is bigger than 1, it provides the evidence of overdispersion.    But overdispersion test does support the overdispersion if I understand output correctly.  dispersiontest(model5)   data:  model5 z = 1.1174, p-value = 0.1319 alternative hypothesis: true dispersion is greater than 1 sample estimates: dispersion 687.1288  I attached residual plots. Point # 7, which look like an outlier, is not a mistake of data entrance or count.      An additional question is if there is no overdispersion, does Poisson model work for my data or do I need to consider Negative binomial distribution?

I was performing a Poisson regression in SAS and found that the Pearson chi-squared value divided by the degrees of freedom was around 5, indicating significant overdispersion. So, I fit a negative binomial model with proc genmod and found the Pearson chi-squared value divided by the degrees of freedom is 0.80. Is this now considered to be underdispersed? If so, how does one go about handling this? I have read a lot about overdispersion and believe I know how to handle this but information on how to handle or determine if there is underdispersion is scant. Can anyone assist?  Thanks.


Lets $p$ be a prime number, and $x$ any natural number.  If $p$ is factor of $x^2$, then $p$ is factor of $x$? I need this in one exercise, and i also want to somehow prove if it's true.  I tried to list all of numbers i get from prime factorization of $x$ and then try to show that this postulat is true, but i'm not sure if its ok to do this this way.

My professor assigned this for homework but I don't understand how to connect the dots. He suggested using the fact that $\gcd (x,y) \cdot \operatorname{lcm} (x,y) = xy$ but I'm not sure how that's relevant.


I am making an android application in it I need to run some python code. Is there any way by which I can integrate python code to android? This is the python code.  from py_translator import Translator s = Translator().translate(text='Hello my friend', dest='hi').text print(s)

We are working on an  version and this platform has a nice Python API..  However, there is nothing official about Python on Android, but since  exists, is there a way to let the snake and the robot work together??


I'm late town hall 7 with maxed cannons,archer towers,Wizard towers and Mortars my air defenses are level 4 which i will upgrade them very soon to max. my walls are level 6 mostly. should i max my walls and Tesla before going to Town hall 8?

I have heard that it is best to upgrade everything to the max before upgrading your Town Hall. Is this true, or is it impractical?


I have dual Bolivian/Czech Republic nationalities.  In my Bolivian passport, I have a US B1/B2 visa, which will expire in three months.  Can I apply for an ESTA and enter the US under the Visa Waiver Program (VWP) on my Czech passport, before my visa expires?  The Czech passport is a new one with the chip.

I have dual French/Honduran nationality. I'm living in France, and I'll be soon traveling to Honduras for holidays. My flight will go through the US (One night stay). My Honduran passport has a valid non-immigrant US visa that I got before becoming a French citizen.    My question: what passport should I use to enter the USA? The Honduran with my valid US visa? Or my French one, along with an ESTA application?  Another piece of information: I'm traveling alone with my 3 year old daughter, who is only French and who will be needing an ESTA application for the US.


I have the following two lines:  Map<String,Object>[] IEXDivMap = null;         IEXDivMap =  new Map[IEXJsonArray.length()];   and get the warning:  The expression of type Map[] needs unchecked conversion to conform to Map<String,Object>[]   Is there a way to fix that?  UPDATE:  I was asked in the comments why we need a Map array to begin with.  We are getting a series of hashmaps and placing each one inside the map array.  Here's the code:  @SuppressWarnings("unchecked") public static Map<String,Object>[] getDiv(String ticker) {     Map<String,Object>[] IEXDivMap = null;     try{         String url = "https://api.IEXtrading.com/1.0/stock/" + ticker + "/dividends/1y";          URL obj = new URL(url);             HttpURLConnection con = (HttpURLConnection) obj.openConnection();                con.setRequestMethod("GET");         int responseCode = con.getResponseCode();         if(responseCode == 404){             System.out.println("Ticker " + ticker + " NOT FOUND in getDiv()!");             return IEXDivMap;                         }else if (responseCode != 200){             System.out.println("IEX Printing All Response Header for URL: " + obj.toString() + "\n");             Map<String, List<String>> map = con.getHeaderFields();                         for(Map.Entry<String, List<String>> entry : map.entrySet()) {                 System.out.println("IEX " + entry.getKey() + " : " + entry.getValue());             }         }          BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));         String inputLine;         StringBuilder response = new StringBuilder();          while ((inputLine = in.readLine()) != null) {             response.append(inputLine);                      }         in.close();          JSONArray IEXJsonArray = new JSONArray(response.toString());                 IEXDivMap = new Map[IEXJsonArray.length()];          for (int i = 0; i < IEXJsonArray.length(); i++) {             IEXDivMap[i] = new HashMap<String,Object>();             JSONObject IEXJsonObject = IEXJsonArray.getJSONObject(i);              IEXDivMap[i].put("exDate",IEXJsonObject.getString("exDate"));             IEXDivMap[i].put("amount",IEXJsonObject.getString("amount"));              //System.out.println(IEXDivMap[i]);             System.out.println(IEXDivMap[i].get("exDate") + " 0  " + IEXDivMap[i].get("amount"));         }     }catch(Exception e){         System.out.println("FATAL ERROR: Something went wrong in getDiv " + e.getMessage());         System.exit(0);     }     return IEXDivMap;  }

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


They wear different helmets and are the soldiers for different regimes, but are there other differences between clone troopers and Stormtroopers?  I'm referring to the Stormtroopers under the Empire rather than the First Order.

Reading this article about , my nerd-rage started flaring as they claimed that Stormtroopers were still Fett-Clones 20 years after the rise of the Empire.  As I started thinking about it, I realized that everything I had read saying that Modern-Day Stormtroopers not being clones was from the EU - C Level books or games.   One of the quotes often cited for backing the idea that the Stormtroopers are clones comes from Princess Leia:     Aren't you a little short for a Stormtrooper?   But through the movie, paying close attention, Stormtroopers are often shown to be slightly different heights. One even hits his head in the doorway while others walk through uninjured.                                  Is there any G Canon fully canon (non-Legends/Infinities) evidence to support the idea that Stormtroopers are, or are not still clones at the time of Episode IV?


Say I have 1000 rtf o mp3 files and I want to change the date modified of them all to the current time. How can I do that?

What do you use when you want to update the date-modified field of a file on Windows?   commands accessible via C++, .NET, C#, or something native to Windows (Vista preferably) tools/applications preferably free, and if possible open source as well   Edit:  there is already a page for applications as pointed out by CheapScotsman .   If anyone knows how I can do this via C++, C#,  or something similar, well and good, else I would think everything else is covered in the linked question.


I have an issue, I would like my text link to have a background-color on :hover but now, the divs and images which are linked also have this background-color, does anyone has an idea how i can apply this background-color only to the text links?  I have tried all sorts of codes :   a:hover img{    background-color: transparent; }  a img:hover{     background-color: transparent; }   but nothing has worked...  This is not a duplicated of the linked question, I can't put a class on some links or images because it's running on wordpress so I can't programm all text links or all image links to have a certain class.  I have tried the "vertical align" solution of  , but i have images with padding, so one can see the background around, and also on regular image, one can see a thin yellow line aswell.

I have a CSS rule like this:  a:hover { background-color: #fff; }   But this results in a bad-looking gap at the bottom on image links, and what's even worse, if I have transparent images, the link's background color can be seen through the image.  I have stumbled upon this problem many times before, but I always solved it using the quick-and-dirty approach of assigning a class to image links:  a.imagelink:hover { background-color: transparent; }   Today I was looking for a more elegant solution to this problem when I stumbled upon .  Basically what it suggests is using display: block, and this really solves the problem for non-transparent images. However, it results in another problem: now the link is as wide as the paragraph, although the image is not.  Is there a nice way to solve this problem, or do I have to use the dirty approach again?  Thanks,


I have installed steam on my Laptop running 13.10, When I click on steam icon, it wont launch,So I have given "steam" command in terminal.Following is the output   Running Steam on ubuntu 13.10 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0_client) Uploading dump (out-of-process) [proxy ''] /tmp/dumps/crash_20140402034337_1.dmp /home/saikiran/.local/share/Steam/steam.sh: line 755:  6814 Segmentation fault      (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$PLATFORM/$STEAMEXE" "$@" mv: cannot stat ‘/home/saikiran/.steam/registry.vdf’: No such file or directory Installing bootstrap /home/saikiran/.local/share/Steam/bootstrap.tar.xz Reset complete! Restarting Steam by request... Finished uploading minidump (out-of-process): success = yes response: CrashID=bp-1e1a9170-2ae6-46c1-bc74-3c0db2140401 Running Steam on ubuntu 13.10 64-bit STEAM_RUNTIME has been set by the user to: /home/saikiran/.local/share/Steam/ubuntu12_32/steam-runtime Installing breakpad exception handler for appid(steam)/version(0_client) Uploading dump (out-of-process) [proxy ''] /tmp/dumps/crash_20140402034339_1.dmp /home/saikiran/.local/share/Steam/steam.sh: line 755:  6943 Segmentation fault      (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$PLATFORM/$STEAMEXE" "$@" Finished uploading minidump (out-of-process): success = yes response: CrashID=bp-06b25061-5bb4-42c2-b835-bc2e92140401   I have tried removing ~/.steam/steam/appcache as indicated in other threads  I have installed Steam on Xubuntu 14.04 beta, still same thing happens.

[SOLVED] I managed to fix the issue by uninstalling the proprietary AMD drivers, rebooting, starting Steam letting it update, reinstalling AMD drivers, reboot. It seems to be working and I can now play all my Steam linux games. I just installed Ubuntu 13.10 64bit on my main PC. I also installed Steam (.deb from ). The install went without errors. On running Steam, nothing happens. I run Steam from the terminal and receive two segmentation faults, always occurring on different lines of Steam.sh when I run Steam: /home/samathy/.local/share/Steam/steam.sh: line 755: 11111 Segmentation fault   /home/samathy/.local/share/Steam/steam.sh: line 755: 11239 Segmentation fault   The rest of the output on the terminal is just dump-saving text. I can't see anything about GLX issues, or locale issues (they seem to be popular issues with steam) I'm running Ubuntu 13.10 64bit with Xubuntu (installed after the Ubuntu install.) My specs are as follows: AMD FX 6350. AMD HD7870 (With AMD proprietary beta drivers) 12GB DDR3 Samsung 840 EVO 120GB. This problem is a little weird to me because Steam runs fine on my Ubuntu 13.10 + Xubuntu-desktop, Intel Atom N270 netbook without any fiddling, I can even run games. I've googled a lot and only really found solutions to other steam issues, not my own. If anyone could help, that'd be wonderful. Thanks! edit: I should mention that I've tried doing ~$steam --reset  It does not produce errors its self, but also doesnt solve the problem either. I have also tried installing Steam from Ubuntu package manage, but that results in the same errors.


I'm quite new here in Ubuntu. So I just recently moved up to Kernel 5.10, about a day ago, since it supports the Realtek ethernet drivers there...When I realized (and checked lately) that it still doesn't have Nvidia driver support causing to display an ERROR nvidia driver is not loaded ubuntu 20.04. I installed the Kernel 5.10 using from this . I heard that the nvidia driver 455.45.01 does support 5.9 and so the realtek ethernet driver. Is there a way to possibly revert back to Kernel 5.8 for a meanwhile to possibly install a 5.9 there? Thanks and hoping for a thoroughly guide/help on this one. cheers.

The latest kernel is causing problems with my sound, which worked fine with an older version. As I have only Ubuntu installed, Grub is not getting displayed while booting. How can I manually choose my kernel version while booting?


I have Ubuntu precise running on a VPS (server). I am connected with SSH and would like to upgrade to Ubuntu trusty.  I do not want the newest release. Changing /etc/update-manager/release-upgrades to "normal" causes the do-release-upgrade shell script to select the next release (12.10), not 13.x. Selecting LTS goes straight to 14.x. How do I specify 13.x release?  Would I have to manually change the /apt/sources.list to point to trusty and then do a dist-upgrade? I prefer to do it with the do-release-upgrade script, but can't figure out how.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I want to install an SSD in an iMac 2010. The thermal sensor has no place to install, and if I don't install it, fans will spin at maximum speed.  I read that I can disable the HDD thermal sensor by simply shorting the pins. Is that true?  edit: I shorted the pin and the iMac works great

After replacing the hard drive in my 2009 iMac 27", I noticed that the hard drive fan spins at maximum speed since the sensor cable is not plugged in. (The new SSD drive doesn't support it)  To solve this issue, I installed a software called "Macs Fan Control" that can read out the temperature from the SMART status of the drive and control the fan speed itself.   This was a near-perfect solution until I upgrade my system to macOS Sierra. Now both "Macs Fan Control" and also "smcFanControl" can't control the fans anymore and the latter reports that I am running it on an unsupported system.  Now my question is, can I somehow control the fan speed manually using Terminal etc. or do I have to "trick" the sensor hardware-wise?


Why is $\sqrt{2\sqrt{2\sqrt{2\sqrt{2\sqrt{2\sqrt{2\cdots}}}}}}$ equal to 2? Does this work for other numbers?

Prove that the sequence $\sqrt{2} , \sqrt{2\sqrt{2}},  \sqrt{2\sqrt{2\sqrt{2}}} \ $ converges to $2$.   My attempt  I proved that the sequence is increasing and bounded by $2$, can anyone help me show that the sequence converges to $2$? Thanks for your help.


I must say that electricity is hard to grasp conceptually. Just when it makes sense, you think hard about it and it all becomes confusing.  When someone says electricity takes the path of least resistance, it never made much sense. Consider you have a light bulb and one of the wires connecting to it is bare and the bulb is on. If I touch the bare wire, I will get a shock and it will travel through my body to the ground. I can understand this if I cut the bare wire and connected myself in series with the bulb. There is no where for the electricity to go. But when I touch the wire, I am in parallel with the bulb. The bare wire has less resistance so shouldn't the electricity bypass my body and go straight to the ground terminal? There's less resistance to get there as opposed to going through my body which is very resistant.  What is so special about ground (the floor) that electricity goes to it. How can it possibly complete the circuit?

If copper is more conductive than water (at any reasonable PH), submerging copper electronic circuits in should have no effect, as the electricity should continue to follow the path of least resistance (the highly conductive copper PCB paths, for example) rather than shorting into the mildly conductive water.  However, dumping water on electronics clearly shorts them out, even though copper is the superior conductor.    Why does this occur when the path of least resistance should be the copper rather than the water?


I'm beginning photography and sometimes I find it very difficult to rate my own work or to find answers to common basic problems...   Is there any websites/forums that allow people to get rating and advices on their pictures by other more experienced photographs ?  I don't think I can use photo.stackexchange.com to do this because, it's more of a "I got a problem / I got the solution"...  Any advices?  Thanks in advance!

Where can I post my photos and get reviews, comments, and critiques from the community, in order to learn to become a better photographer?  Here is a list of places to get feedback.  Please use answer wikis to comment and rate each one.    As you get more advanced you might also want to try out photo contests, both online and local.


The order of the groups does not matter The size of group must be at least 1   For example, in a more specific question , we got the answer 15 from Jared, which is the sum of 5 ways to split in group size 1 and 4, and 10 ways to to split in group size 2 and 3.  For more general cases, what is the formula to calculate this?

Suppose we have a finite set $S$ of cardinality $n$. In how many ways can we partition it into $k$-many non empty subsets?  Example: There is precisely one way to partition such a set into $n$-many subsets. and there is one way to partition into a single (sub)set.


Show that if $f(z)$ and $\overline{f(z)}$ are analytic on domain $D$ then $f(z)=$ constant.  If I'm understanding this correctly, a complex function and its conjugate should just be reflecting functions on the complex space on the y axis. Then $f(z)$ is constant on that one whole function. Is this the right approach? Or is there rather more elegant way to prove it?

is it true if $f,\overline f$ are both analytic in a domain $\Omega$ then $f$ is constant? I am not able to  find out what property of holomorphic map I need to apply. please help.Thank you.  $f(z)=u(x,y)+iv(x,y)$, $\bar{f}(z)=u(x,y)-iv(x,y)$


Recently I learned that the  tag can be auto removed by the  user.  I would like to know how this feature works. I.e. what are conditions that lead to removing the tag by Community from the question (regular timeout/creation of new questions with [featured] tag/...) ?

I've found that the Meta (moderator only) tag  is automatically  by the  user. So, I want to know when and why is the tag  is removed by this user?  Is there any mechanism for this removal or is there simply a specified time period after which the  is automatically removed by the Community user?


This question is similar to  which asks about how to "block all app & game invitations (once and for all)". My question is different: it asks about how to "block a particular, single game app". More details about what I'm after follow:  It's been months now that almost every single day I keep on getting annoying requests from some of my friends on Facebook to play a game called "Candy Crush Saga". At first, I thought my friends would go through their list of friends and send invitation to each one of them they wanted to play the game with explicitly, or maybe just bulk-invite them by pressiong one big button on the game's user interface. However, now I'm completely annoyed, and would like to block the game altogether. At least, due to frustration that's the way I've come to perceive things by just looking at the notifications area of Facebook's user interface.  So, my question is: What's the reality of what's going on, and how do I block a single app from posting notifications from within the timeline?

I want to block app and game invitations once and for all in Facebook. How can I do it so they cannot disturb me anymore?


I am heating up a wire with a current, and I am trying to express the cooling losses. What is the expression of dT/dx over a wire?

This is based on a problem that came up today. During the course of this problem I realized that I wasn't so sure I understood the relationship between wattage and heat produced.   In the past we did a test in the lab using .305 Ω /ft wire. The jacket is rated for 150C. We were able to get about 6.5A (at 3.66V)  out of it at 24C ambient, with out exceeding the jacket rating. I want to estimate what the ampacity of 0.027  Ω/ft wire is. So I am wondering if I did it correctly, because this amperage seems a little high for the wire to handle, then again most copper wire is only rated at 90C.  So the math I did on it was this  So you do .305 * 2 = .61 Ω /ft 6A^2 * .61 Ω = 21.62W   (I^2*r = W) 21.96W * / 2ft = 10.98 W/ ft  So would it be safe to assume that if I did the same with a 0.027w/ft wire with the same jacked I would arrive at this amperage?  If you start with 11W/ft * 2ft = 22W  0.027 Ω * 2ft = .054 Ω Sqrt(22W/(0.054 Ω)) = 20.18A  ETA: we are planning on testing this tomorrow when we get some wire in. So we shall find out.


In the book "Topology" by James Munkres we define topology on a set $X$ like the following(page 76):  $\mathscr T$ is a topology on $X$ if:   $\emptyset,X\in\mathscr T$ $T\subset\mathscr T\implies\bigcup T\in\mathscr T$ $T\subset\mathscr T\land T\mbox{ is finite}\implies \bigcap T\in\mathscr T$   Why does the third property have the fact that $T$ is finite? What does it gives us?

In the definition of topological space, we require the intersection of a finite number of open sets to be open while we require the arbitrary union of open sets to be open. why is this?  I'm assuming this has something to do with the following observation: $\cap_{n=1}^{\infty} (-\frac{1}{n},\frac{1}{n}) = \{0\}$ and there is some reason we don't want singletons to be considered open, I am wondering what this reason is. Am I thinking in the right direction here?  Thanks :)


This illustration summarizes my question:    Please assume no air resistance (unless that makes a large difference). Here's what we concluded, but I could use both confirmation and also help with the math:  Yes, jumping off of a plank will move you "up", but the timing of the jump makes a big difference. If you jump earlier in the fall, you'll move up, but you'll also add to the distance of the fall.. If you jump at the very end, you're essentially not adding to the fall at all, so you're getting essentially the maximum effect. In order to minimize the velocity at which you hit the ground, the best strategy would be to jump at the moment before impact.  To keep the math simple, let's say you can jump one meter off of solid ground, and also that the bridge is ten meters above the ground.  If you jump the instant the bridge crumbles, then you're actually doing yourself harm, since you will then fall from 11 meters. If you jump a less than a meter into the fall, you may get back up to the height of the bridge, get to "rest", but then still fall from 10 meters, as if you had done nothing.  The closer to the ground that you jump, the larger the share of your jumping velocity that will be subtracted from your downward velocity without later contributing to your downward acceleration.

I've always been under the impression that jumping in an elevator wouldn't help at all, especially after reading a snippet of physics where Einstein said that free fall was identical to zero gravity.   I just watched an episode of QI (a British game show) where they said that jumping would only take off about five pounds of force... How would jumping help at all? If the elevator is in free fall, then you're not really jumping--you're just pushing, right?


Why is the acceleration due to gravity at the center of the earth $0$?  My Attempt   actually at the center distance from the surface is equal to the radius so the formula $$g'=(1-\frac{d}{R})\times g$$ yields $0$.  But can anyone give me the other reason for this?

If you could travel to the center of the Earth (or any planet), would you be weightless there?


I have observed a few times that, when I suggest an edit and that edit is accepted by someone else, but they add a further edit, then they seem to duplicate my edit summary in their own edit. However, this is usually not accurate to their edit.  : revision 7 has the same edit summary as (my) revision 6.  Question (which is why I tagged this ): Is this just a default? Can the reviewer actually change the edit summary for their subsequent edit?

EDIT:  It seems that I've also had edits that stacked well, so I'm not sure if I had a timing problem, or was just delusional.  The one thing that can be fixed, that I'll turn this question into, is a feature request so that when I go to re-edit (either within the 5-minute grace period, or before a suggested edit is approved), it brings up the old edit summary text.  Right now, it brings up a blank edit summary, and this replaced the first one I did.  This isn't really intuitive, and even knowing that's what it's doing, I still forget to put everything in.  Original Question:  It has happened a few times now, when on a site where I don't have edit privileges, that I make an edit.  I then see that the edit didn't work quite right, so I go back in to re-edit it.  This creates a brand new edit review, with an additional useless summary. How about we have the same grace period to re-edit your up-for-review edit, as there is for a normal edit? Of course, it wouldn't be possible once it's been approved.


After looking at this question for quite some time, I've asked a couple of other students, and they also couldn't seem to come up with an answer.  This is from an old qualifying exam at our university.  Let $u$ be a harmonic function bounded on the set $\{z:0 < |z| < 1\}$.  Can it always be defined at the point $ z= 0$ to become harmonic on the whole unit disk?  The standard argument with the logarithm doesn't work here, as it must be bounded on the punctured disk, and the logarithm blows up at $0$.   Also, we can't use any kind of harmonic conjugate argument because our domain is not simply connected.  Thus, I think it's probably true, but I haven't been able to come up with a proof.   Thanks in advance for any help!

This is a reworking of a previous question  which was marked as a duplicate. Some nice folks have referred me to solutions to similar problems. I still have a couple of questions, since one of the solutions used the Poisson kernel, which is not the desired solution in the text, because the Poisson kernel has not been introduced yet. The other solutions were for problems that were similar, but whose solutions were only partially applicable, as I understand them.  I'm working on a problem from p. 166 of Lars Ahlfors' Complex Analysis:     If $u$ is harmonic and bounded in $0 < |z| < \rho$, show that the origin is a removable singularity in the sense that $u$ becomes harmonic in $|z|<\rho$ when $u(0)$ is properly defined.   My Solution So Far:   Here's what I've got for a non-Poisson kernel solution: We want to find a harmonic conjugate for $u$ in the punctured disk, and then we can apply big Picard to show that $0$ is a removable singularity. The problem is that the punctured disc is not simply connected.   If we take $\sigma = (u \circ \exp)(z): L \to \mathbb{C}$, where $L$ is the left half-plane, now we have $\sigma$ harmonic, and defined in a simply connected set $L$, so it has a harmonic conjugate $\tau$. Now we wish to take $v = (\tau \circ \log):\{0 < |z| < \rho\}\to \mathbb{C}$, but in order to do so we need $\tau$ to be $2\pi i$-periodic. This is where my proof breaks down.  One of the similar problems which readers referred me to used the following strategy: note that since $\sigma$ is $2\pi i$-periodic, and $\sigma, \tau$ satisfy the Cauchy-Riemann equations, we have that $\nabla\tau(z) = \nabla\tau(z + 2 \pi i)$ for all $z\in L$, or in other words, $\tau(z) - \tau(z+2\pi i)$ is a constant function, say, equal to $\alpha \in \mathbb{R}$. Then, the solution suggests, we can set $$g(z) = u + iv - \frac{c}{2\pi}z,$$  in order to make $g$ $2\pi i$-periodic, and then we can use $(g\circ \log)$ on $\{0 < |z| < \rho\}$. But the reason why this won't work for my purposes is: now we have changed $u$! On the other hand, we can't simply subtract $\frac{c}{2\pi}\Im{(z)}$, and try to leave $u$ untouched, because now $g$ is not analytic. How can we get around this?  Another strategy entirely might be to try to use the mean-value property. Ahlfors discusses that a lot in the preceding section, and his main example is the punctured disc. Since $u$ is harmonic, we know that the average over circles centered at zero is a constant...


I'm using windows 10 but I left some free space of about 300 GB so that I can install Ubuntu 14.04 on it , but windows is not showing any partition and I cannot get any further in installation , I also don't want to lose my data in windows so kindly guide me about this problem that how can I install Ubuntu easily in the free space I left.

I would like to see a full how-to guide on how to install Ubuntu.


I am a beginner modeler, trying to get realistic result. I have tried my best but i cannot remove the white spots from my scene in cycles. Lighting is not looking realistic. Please help me how can i do that i have also attached link below.

I often use Cycles' built in Glass BSDF shader to achieve realistic refraction effects, but in many cases, it seems that Cycles' glass caustics creates an unfortunately large number of fireflies (pixels that are abnormally bright relative to their surroundings). In some models of mine, even when I render for 3000 or more samples/pixel, my final image is still covered in fireflies. While I can improve this in many cases by increasing the total amount of light available in the scene, this loses a lot of the potency of the refractive effects I'm looking for, especially in scenes with low light levels.  So my question is, how can I reduce the amount of fireflies while using Cycles' caustics without sacrificing the quality of the refractive effects?  Note: I am aware that Cycles' caustics will perform much better once Cycles has full support for bidirectional path-tracing, but it looks unlikely that that will become , unfortunately.


How can I render a fire and smoke simulation in the Cycles render, with alpha channel for further compositing?

When rendering volumes with Film > Transparent enabled, the alpha appears to be the wrong type (premultiplied/straight). In the 3D view it works as expected:    This is a known .  Is there any way to work around this?


I want to prove the following statement:    using Hillbert's axioms sand rules of inference for propositional logic. I am having trouble doing so. It seems just like the transitive statment, can I prove it using MP ?  Edit: These are the Hillbert's axioms :  4  Thanks

I have proved {(α→β),(β →γ)}  ⊢ (α→γ) } using formal deductions using Modus Ponens and the three axiom of H2 :  A1: A -> (B-> A) A2: (A-> (B->C)) -> ((A-> B) -> ( A -> C))  A3: (( ¬ A) -> ( ¬B)) -> ( B -> A)   However now my professor is asking me to prove :   (1) (α→β) ⊢ (β →γ)→(α→γ) and (2) ⊢ (α→β)->((β →γ)→(α→γ)). I am stuck on it since proving their existence with the deduction theorem is not enough. I must use formal deductions, any help for this ? Thank you


I am working on a Debian-based Dragon Board (410C) system. The system will produce a touch screen that triggers some functions of a car. I am trying to hide the mouse cursor in my application. Connected to my device with SSH and tried lots of stuff. But cursor is always there. I think that maybe a graphical mouse cursor image (not an actual cursor) by the interface may cause the fail.  I tried such of ways to hide the cursor as installing application 'unclutter' and running it at startup file (.myxinitrc) with the command 'unclutter -idle 0.1 -root' and ended up with a working command, but no visual changes at all, this command hides the mouse cursor on a Debian-based Ubuntu system, I also tried to write option '.myxinit – -nocursor' when I am calling my xinitrc file at the startup.  when I enter the command  unclutter -idle 0 -root   it gives an error like “unclutter could not open display”. If I change the command like  unclutter -idle 0 -root -display :0   it runs the command (it moves to the next line and idles until I press ^c) but still nothing changes. When I run the same command on my Ubuntu, it hides the cursor.  The system runs my service called “mycarui” at startup. Not a linux interface or anything. It has only guided access to my service as default.

I have a touchscreen laptop and I want to hide the pointer whenever I touch the screen. I am aware of solutions like  and  but I want the pointer to hide/show dynamically, hiding if I use the touchscreen and showing when I use a hardware mouse.  I thought about making  and applying one of the two above solutions to the touchscreen pointer, but neither of those solutions mention how to target a single pointer, and having multiple pointers makes things act weird, and that wouldn't hide the hardware mouse cursor.  I figure I can most reasonably do this doing something like , keeping track of the current input mechanism and executing xinput -cursor [transparent cursor] whenever the touchscreen is used and xinput -cursor [normal cursor] whenever a normal mouse is used.  I looked at xinput though and it looks like since both the hardware mouse and touchscreen are slaved to the same pointer, both of them register the same events in xev so I'm not really sure where I would get the information needed to differentiate a touch from a mouseclick. is it possible?


So in JavaScript, 111111111111111111111 == 111111111111111110000. Just type any long number – at least about 17 digits – to see it in action ;-)  That is because JavaScript uses double-precision floating-point numbers, and certain very long numeric literals can not be expressed accurately. Instead, those numbers get rounded to the nearest representable number possible. See e.g.   However, doing the math according to IEEE-754, I found out that every number inside [111111111111111106560, 111111111111111122944] will be replaced by 111111111111111114752 internally. But instead of showing this ...4752 number, it gets displayed as 111111111111111110000. So JavaScript is showing those trailing zeros which obfuscates the real behavior. This is especially annoying because even numbers like 263, which are accurately representable, get "rounded" as described.  So my question is: Why does JavaScript behave like this when displaying the number?

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


I used a command i saw here to make my touch pad in lenovo 330 to scroll with 2 fingers and it worked exactly as i wanted but after each reset to the computer I need to retype the commend. Can you please tell me how i can make this command stay after i close my computer?

How can I make an application automatically start when I have logged in?


Prove that if $p$ divides $a^2+b^2$ , then $ p \equiv \ 1 \pmod 4$.  I know that both $a$ and $b$ are coprimes with $p$ but i dont know what to do next.

Prove that if $x^2+y^2 \equiv 0\pmod{p}$ where $p$ is a prime and $x,y$ are not both divisible by $p$, then $p \equiv 1 \pmod{4}$.   I tried using that $x^2 \equiv -y^2 \pmod{p}$ and conjectured that $-1$ must a quadratic residue modulo $p$, but I am not sure how that would help.


I'm trying to prove the dihedral groups are solvable for any Dn. I use the normal subgroup of all rotations, since the quotient of Dn/{rotations} is isomorphic to Z2 so it's abelian as well, so we get a solvable group.

Is the dihedral group $D_n$ nilpotent? solvable?  I'm trying to solve this problem but I've been trying to apply a couple of theorems but have been unsuccessful so far. Can anyone help me?


While writing some questions, I came across the following: Determine whether each of the following statements ____ true or false. a. statement 1 b. statement 2 c. statement 3 In the gap, which one of "is" or "are" grammatically correct? Thanks for your help!

Each of these CDFIs are finding solutions for communities that lack   access to traditional financial products and services, and the NEXT   Awards will accelerate their success.   OR     Each of these CDFIs is finding solutions for communities that lack   access to traditional financial products and services, and the NEXT   Awards will accelerate their success.   The difference is, the first one uses "CDFIs are" and the 2nd sentence uses "CDFIs is"  Which one is correct? Any why?


I need to add in a form.listwiew some rows but i need to add them dinamyically while my async function is processing... I have read that is not possible to do this from an async method. Anyway i have to do this ... any other method or solution? Example:  private async Task start(CancellationToken token)         {               try         {             await Task.Run(() =>             {              //do something and then modify UI              Guiadjust("",1); //function that add rows              },token);         }catch (Exception ex)         {             if (ex is TaskCanceledException)                 CustomMessageBox.Show("Unaxpected error", ex.ToString());         }       }   Function to add rows to list graphical form element that doesn't work because called from async method, instead it should normally work!  private void Guiadjust(string cc, int ff) {      string[] row = { "Working", "", "" };     var listViewItem = new ListViewItem(row);     list.Items.Add(listViewItem); }   Calling the function:  await start(cts.Token);

Which is the simplest way to update a Label from another Thread?   I have a Form running on thread1, and from that I'm starting another thread (thread2).  While thread2 is processing some files I would like to update a Label on the Form with the current status of thread2's work.   How could I do that?


Which one is the correct form in written English?  I am leaning towards "an NLP", since "N" starts with "e" but not sure.

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


According to Einstein and Brian Greene, does it logically follow that the photon remains stationary in the fourth dimension?  In An Elegant Universe, Brian Greene writes:  “Einstein found that precisely this idea—the sharing of motion between different dimensions—underlies all of the remarkable physics of special relativity, so long as we realize that not only can spatial dimensions share an object’s motion, but the time dimension can share this motion as well. In fact, in the majority of circumstances, most of an object’s motion is through time, not space. Let’s see what this means.” Space, Time, and the Eye of the Beholder, An Elegant Universe, Brian Greene, p. 49  Brian Greene and Albert Einstein also state that there is one and only one velocity for all entities through the four dimensions--the velocity of light or c.  A photon travels at c through the three spatial dimensions.  All of its velocity is directed through the three spatial dimensions.  Thus Brian and Einstein are stating that a photon must be stationary in the fourth dimension.  For if the photon had any velocity component in the the fourth dimension, its velocity would be different from c, which is not the case.  On the other hand, if an object is stationary in the three spatial dimensions, it must be moving at c through the fourth dimension.  We can summarize this as:  Axiom: All entities have one velocity through the four dimensions--c. (Einstein & Brian Greene).  Axiom: The velocity of light (photons) is c through the three spatial dimensions. (Einstein)  Theorem: The photon remains stationary in the fourth dimension, as all of its velocity c is through the three spatial dimensions.  Does this logic make sense?  Also, do you prefer using the word "Axiom" or "Postulate"?  An Axiom or a Postulate is a Truth.  A Theorem is that which follows logically from Axioms.

Quite a few of the questions given on this site mention a photon in vacuum having a rest frame such as it having a zero mass in its rest frame. I find this contradictory since photons must travel at the speed of light in all frames according to special relativity.  Does a photon in vacuum have a rest frame?


Is there an equivalent one-liner to '#'*number, which if number was 4 the output of that expression would be "####", in C++? If there isn't an equivalent one-liner, I would like to know if there are any quick ways to do this that don't include a for loop.  Note: I am using C++ 14, on the program I'm working with I can't use C++1z (17), so no C++1z suggestions.

I want to insert 'n' spaces (or any string) at the beginning of a string in C++. Is there any direct way to do this using either std::strings or char* strings?  E.g. in Python you could simply do  >>> "." * 5 + "lolcat" '.....lolcat'


I am trying to create a Firebase Authentication application in Android Studio 3.1.4 using Email and Password, but when I click on register button, it crashes the Application with following summary.   MainActivity.java  package com.example.vatsal2416.firebaseauth;  import android.app.Activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth;  public class MainActivity extends Activity {     private FirebaseAuth mAuth;     @Override     protected void onCreate(Bundle savedInstanceState) {         final TextView textEmail = findViewById(R.id.et1);         final TextView textPassword= findViewById(R.id.et2);         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          //Initialize buttons         Button btn_Login = findViewById(R.id.login);         Button btn_regsiter = findViewById(R.id.register);          //intialize Firebase Authentication         mAuth = FirebaseAuth.getInstance();          btn_Login.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 methodLogin(textEmail.getText().toString(),textPassword.getText().toString());             }         });           btn_regsiter.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 methodRegister(textEmail.getText().toString(),textPassword.getText().toString());             }         });     }      public void methodRegister(String email, String password){         mAuth.createUserWithEmailAndPassword(email, password)                 .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {                     @Override                     public void onComplete(@NonNull Task<AuthResult> task) {                         if (task.isSuccessful()) {                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                          }else{                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }                     }                 });     }      public void methodLogin(String email, String password){         mAuth.signInWithEmailAndPassword(email, password)                 .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {                     @Override                     public void onComplete(@NonNull Task<AuthResult> task) {                         if (task.isSuccessful()) {                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }else{                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }                     }                 });     } }   Github link of project        Can anyone tell me what is actually wrong in the code.

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


In the Avengers movie, Dr. Banner is discovered treating patients for some unspecified, possibly unknown, disease in what looks to be the slums of India. From my recollection, Banner is a gamma physicist and not a medical doctor (Ph. D not M.D.). While it can be argued that the Indians may or may not know the difference, Banner hardly seems the type to con people for a quick buck.

In Thor: Ragnarok, Bruce Banner mentions to Thor that he has several Ph.Ds. Later, Thor jokingly tells him, mid-fight, to     "do something, use one of your Ph.Ds".   This was hilarious to me, but it got me thinking, What are Bruce Banner's Ph.Ds?  5-7 Ph.Ds seems very excessive to me, but knowing that Banner has genius-level intellect, it would be interesting to know exactly what he specialises in.  Related:


Hi Team my Indian passport and Canadian Visa are expiring in December 2019 Could I visit Canada in August 2019 and come back in October 2019?

I am traveling from Boston to Canada by cruise ship. The first port of arrival is on July 30 and the last port in Canada is on August 4. Then I'm flying on August 5 from Montreal to California. My passport is valid until August 20th. Will I have a problem?


Show for any real numbers $a_1,a_2,...,a_n$ $$(a_1+a_2+···+a_n)^2 \leq n(a_1^2+a_2^2+...+a_n^2)$$  I know the definition of  Cauchy-Schwarz is $$(\sum_{i=1}^n a_ib_i)^2  \leq  \sum_{i=1}^n a_i^2 \sum_{i=1}^n b_i^2$$ I can write the same problem with following form, but I would not know how to continue to prove it $$(\sum_{i=1}^n a_i)^2 \leq n(\sum_{i=1}^n a_i^2)$$   Note: an other definition of Cauchy Schwarz $$ \langle\ v,u\rangle^2 \leq \langle\ u,u\rangle \langle\ v,v\rangle$$  Could you give me a steps what to use?

Let $d_i\ge 0$ and $$\sum_{i=1}^n d_i=c$$ and $$\sum_{i=1}^nd_i^2\le C$$ Show that $$\frac{c^2}{n}\le C$$ The text says     Using Cauchy-Schwartz inequality and the first equation, show the last equaliton.   I do not know how to apply C-S to this. The inequality roughly states $$(u,v)^2\le(u,u)(v,v)$$ which is a trivial equality when $u=v$....  We have  $$(\sum_{i=1}^n d_i)^2\ge\sum_{i=1}^n d_i^2$$ but I dont know what to do with it...


Is it possible to derive a formula for this series? If there is, how can it be derived? $$\sum_{R=1}^{K-1} (R\times2^R)$$

I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived.  For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to   Thanks!


I have the following MWE  \documentclass{article} \newcommand\setmarks[1]{\hfill (#1 marks)} \begin{document}  This works well, text appears on right \setmarks{10}  On the other hand, this line with additional text gets broken on a new line \setmarks{10}  I prefer the additional text to appear on an separate line, still flushed to the right like the following:  %%%% On the other hand, this line with additional text gets broken on a new line  \setmarks{10} %%%% \end{document}   How do I change the definition of setmarks so that the additional line is added automatically when needed?

I am a lecturer and have an issue when compiling test and exam questions. The questions will be in an enumerate environment and look something like this, where the marks shown in brackets are right justified on the last line of the problem:   Determine the reactions and draw the shear force and bending moment diagrams. Hence determine the maximum bending stress experienced by the component. \hfill(10 marks)   Using \hfill works fine when there is sufficient space on the line. In the case where there is insufficient space on the line to accommodate the marks bracket, the text wraps to the start of the next line. In order to right justify it on the next line I use the rather crude code \\ \hfill\makebox{\hspace{13.3cm}(10 marks)} to get the mark bracket right justified on the succeeding line, but have to play with the hspace length to get it to look right.  Is there a way to measure the remaining space on a line and simultaneously measure the length of the marks bracket, then, in the case where the marks bracket length is larger than the remaining space get the marks bracket to right justify on the succeeding line? Note that the exact length of the marks bracket varies (consider the lengths of "(1 mark)" and "(20 marks)" and the exact text of the last line is not known until the text is compiled.  Thanks in anticipation!


I Have a table in Mysql Which contains 10 Million Entries so far, and I am writing a script in python in which I want to get data from DB in chunks of 100K(Number of row's).   I have tried threw paging () but unable to do it anyone can help me with this.

Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum <= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.


I have a file which has 7375 lines and i need to add ls -l to the beginning of every line. How could i do this with sed?

I am looking for a way to add some string to the beginning of every line (same string for every line). Not something customizable but rather something that will be easy to remember and available on every POSIX-compliant platform (and every shell as well).


I work on a ship and I will disembark in Cozumel, Mexico.  Can I stay for a vacation in Mexico with my C1/D visa?  I hold a Serbian passport.

Can someone please confirm the following? I have a C1/D visa. I worked as a flight attendant (currently unemployed) and entered the US numerous times, and also visited Mexico in December 2017.  I am planning on visiting Mexico again for 3 weeks in due course. Will the C1/D allow for me to transit in the US and visit Mexico or do I need a B1/B2 visa? I had issues with CBP before as it seems to be a very grey area.  According to the Mexican Consulate in South Africa, the type of visa is irrelevant. As long as it is multiple-entry, I am good to go.  Can someone please confirm, as I cannot get a solid answer from anyone?  Thank you!


Proof that If $$ \sum_{n=1}^{\infty} z_{n} $$  converges, then  $$\lim _{n \rightarrow \infty} z_{n}=0 $$ Prove for complex numbers  Given an infinite sequence $z_{1}, z_{2}, z_{3}, \ldots ., $ let $$ S_{N}=z_{1}+z_{2}+\cdots+z_{N} $$ We call the sequence $ S_{1}, S_{2}, S_{3}, \ldots $ an infinite series, which we denote $$ \sum_{n=1}^{\infty} z_{n} $$ We call $ S_{N} $ a partial sum. If $ S_{N} $ converges with $S=\lim _{N \rightarrow \infty} S_{N}, $then we say $\sum_{n=1}^{\infty} z_{n} $ converges and write $$ \sum_{n=1}^{\infty} z_{n}=S $$ If $S_{N} $ does not converge, we say $\sum_{n=1}^{\infty} z_{n}$ diverges. Suppose $z_{n}=x_{n}+i y_{n} $ and $S=X+i Y . $ Then it follows from previous results that $$ \sum_{n=1}^{\infty} z_{n}=S $$ and only if $$ \sum_{n=1}^{\infty} x_{n}=X \text { and } \sum_{i=1}^{\infty} y_{n}=Y $$ If $$ \sum_{n=1}^{\infty} z_{n} $$  converges, then  $$\lim _{n \rightarrow \infty} z_{n}=0 $$ Proof. Let  $$S=\sum_{n=1}^{\infty} z_{n} $$  and $$S_{N}=\sum_{n=1}^{N} z_{n} . $$Then $$ \lim _{N \rightarrow \infty} z_{N}=\lim _{N \rightarrow \infty}\left(S_{N}-S_{N-1}\right)=S-S=0 $$ Let $\sum_{n=1}^{\infty} z_{n} $ be a series with $ \operatorname{sum} S $ and $ N^{th} $  $ \operatorname{sum} S_{N}= $ $ \sum_{n=1}^{N} z_{n} . $ The remainder $\rho_{N} $ after $ N  terms Is ( \rho_{N}=S-S_{N}   Notice that series $\sum_{n=1}^{\infty} z_{n} $ converges to ( S ) if and only if sequence Want to know that. Is this proof right or can i shorten this proof? If anyother easy way to proof please provide

Following the guidelines suggested in , I am going to post a proposed proof as an answer to the theorem below. I believe the proof works, but would appreciate any needed corrections.  Theorem If a series $\sum_{n=1}^{\infty}a_n$ of real numbers converges then $\lim_{n \to \infty}a_n = 0$


I have a page default.aspx When user browses this page as  -   www.mysite.com/default.aspx/?&#&emp=1']];alert(2);[['1    there is an alert pop up. To prevent such attack, I would like to get the entire string typed in the browser, but unable to.  [NOTE : As you see, the text after ? need not be a query string. Here it is random chars. If it was a query string, I could get that in code.]  protected void Page_Load(object sender, EventArgs e) {   string query = HttpContext.Current.Request.ServerVariables["URL"] +                                        HttpContext.Current.Request.ServerVariables["PATH_INFO"] +                   HttpContext.Current.Request.ServerVariables["QUERY_STRING"]; }   In 'query' I only get /default.aspx/default.aspx/&  How can I get the entire string typed in the address bar.    UPDATE:    HttpContext.Current.Request.Url.AbsoluteUri gives ?& HttpContext.Current.Request.Url.ToString() gives   This is not a duplicate of that Question, as my problem has chars, that are not query strings and also, the solutions in that Question did not resolve my problem. Thank you.  SOLUTION: Might help someone who have a similar concern. The fix was to deal this at Client side. I never knew that the part after # is not sent to the server side.  Awesome suggestion by AmateurProgrammer & shadowed. Thank you

I need to be able to get at the full URL of the page I am on from a user control.  Is it just a matter of concatenating a bunch of Request variables together?  If so which ones? Or is there a more simpiler way?


What is a good way to find the index of an element in a list in Python? Note that the list may not be sorted.  Is there a way to specify what comparison operator to use?

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


I have a machine running Ubuntu 12.04 (only console as this is supposed to be my server) and now I also want to add a graphical environment on this machine.   More details:   I want the main OS to be the: Ubuntu 12.04 console as it is now and by typing commands on this console to open a graphical environment (I prefer Ubuntu 12.04 desktop) in order to access the internet more easily without having to search from another PC   I was thinking of installing a virtual machine from my Ubuntu console and then installing Ubuntu desktop on this virtual machine.  Can anyone please tell me if this is feasible and how can be done?

Trying to run a Ubuntu server for the first time... But everything is in a terminal. Is there a way to switch to a GUI?


I was wondering how to create generalized entangled superpositions of qubits when I came to need of an algorithm to generate the following:  Suppose we have two $n$ qubit states, $$|\psi\rangle = \sum_X \alpha_X\ |X\rangle$$ and, $$|\phi\rangle = \sum_X \beta_X\ |X\rangle.$$  How do I come up with a state, $$|\psi'\rangle = \frac1{\sqrt N}\sum_X (\alpha_X+\beta_X)\ |X\rangle,$$ where $N$ is the normalization factor?

Assuming we have two sets of $n$ qubits. The first set of $n$ qubits is in state $|a\rangle$ and second set in $|b\rangle$. Is there a fixed procedure that generates a superposed state of the two $|a\rangle + |b\rangle$ ?


Can someone provide a derivation of the  for electromagnetic induction? To be clear,  $$ d\vec{B}~=~\frac{\mu_0}{4\pi}\frac{I d\vec{\ell}\times \vec{r}}{r^3}. $$  Is there a simple way to compute the magnetic field at a point between two Helmholtz coils, if the radii of the coils are the same and the current through each coil is the same?

There's already a question like this  so that my question could be considered duplicate, but I'll try to make my point clear that this is a different question.   Is there a way to derive  from the Lorentz' Force law or just from Maxwell's Equations?   The point is that we usually define, based on experiments, that the force felt by a moving charge on the presence of a magnetic field is $\mathbf {F} = q\mathbf{v}\times \mathbf{B}$, but in that case the magnetic field is usually left to be defined later.   Now can that force law be used in some way to obtain Biot-Savart law like we obtain the equation for the electric field directly from Coulomb's Force law?  I wanted to know that because as pointed out in the question I've mentioned, although Maxwell's Equations can be considered more fundamental, those equations are obtained after we know Coulomb's and Biot-Savart's laws, so if we start with Maxwell's Equations to obtain Biot-Savart's having use it to find Maxwell's Equations then I think we'll fall into a circular argument.   In that case, without recoursing to Maxwell's Equations the only way to obtain Biot-Savart's law is through observations or can it be derived somehow?


I have this code: \begin{tikzpicture} \begin{axis}[xlabel = x,              xmin = 0,              xmax = 20,              ylabel = y,              ymax = 0.8,              ymin = 0,              ytick pos=left ] \addplot [black] {-0.01 * x + 0.6}; \end{axis} \end{tikzpicture}  I get this result:  Why is it only showing the line for x between 0 and 5? I would like to have the line for x as defined in the axis.

I'm trying to plot the function  (0.5*x+1)^(-2)   for x in [0,6].   Here's my code:  \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat=1.12}  \begin{document}    \begin{tikzpicture}  \begin{axis}[       thick,       axis lines = center,       axis line style={->},       xmin = 0, xmax = 6.1,       ymin = 0, ymax = 1.1,       restrict y to domain = 0:1,       xlabel = {$t$}, ylabel = {$\phi(t)$},       xlabel style={at=(current axis.right of origin), anchor=west},       ylabel style={at=(current axis.above origin), anchor=south},       ]       \addplot[no marks,                 thick,                samples = 200,                ] expression {(0.5*x+1)^(-2)};   \end{axis} \end{tikzpicture} \end{document}   This produces    The problem is that the plot stops after x = 5. Also for x = 0, the function value should be 1. This doesn't seem to be the case in my plot.


I am mounting an iso file downloaded from CentOS website using below command as root mount -t iso9660 -o loop /root/Centos7ISO/CentOS-7-x86_64-Everything-1511.iso /mnt/CentOS7/  But it throws this warning about a read-only device mount: /dev/loop2 is write-protected, mounting read-only  I searched a lot and found several similar issues but none of the solutions worked in my case. total 1490 -r--r--r--. 1 root root      14 Dec 10 06:35 CentOS_BuildTag  dr-xr-xr-x. 3 root root    2048 Dec 10 06:33 EFI -r--r--r--. 1 root root     215 Dec 10 06:35 EULA -r--r--r--. 1 root root   18009 Dec 10 06:35 GPL dr-xr-xr-x. 3 root root    2048 Dec 10 06:33 images dr-xr-xr-x. 2 root root    2048 Dec 10 06:33 isolinux dr-xr-xr-x. 2 root root    2048 Dec 10 06:33 LiveOS dr-xr-xr-x. 2 root root 1486848 Dec 10 06:34 Packages dr-xr-xr-x. 2 root root    4096 Dec 10 06:35 repodata -r--r--r--. 1 root root    1690 Dec 10 06:35 RPM-GPG-KEY-CentOS-7 -r--r--r--. 1 root root    1690 Dec 10 06:35 RPM-GPG-KEY-CentOS-Testing-7  I even tried to use chmod to grant full rw permission to files, but Chmod +777 also does not work since it is a read-only mount.

I tried to mount my Ubuntu 13.04 64-bit image using the following command :     sudo mount -o rw,loop /home/varun/Downloads/ubuntu-13.04-desktop-amd64.iso /media/cdimage   But I gets the following warning :     mount: warning: /media/cdimage seems to be mounted read-only.      Help me to eliminate the warning.


My question is regarding a specific case displaying Newton's third law.   In the diagram below, a man is shown exerting a force on the wall, which in turn causes an equal and opposite reaction force on the man. I understand that the reason the man doesn't fly backwards is due to friction with the ground - the man exerts an action force on the ground which causes a reaction force back on the man. Hence, there is a 0 net force acting on the man as the original reaction force from the wall cancels out the reaction force from the ground.    I am not confused about how objects move in general with respect to the third law since i understand that the action and reaction forces act on two separate objects. However, the logic behind this specific example would suggest that nothing on a plane would be able to move when a force is applied, since the friction from the ground would result in a 0 net force on the object.  For example, in the diagram shown below, a hand is exerting an action force on the brick. This in turn causes the brick to exert an action force on the floor which causes a reaction force on the brick. The action force on the brick and the reaction force on the brick exerted by the floor cancel each other out resulting in a 0 net force on the brick. Hence, the brick (or any other object on a plane like this) should not move and accelerate no matter how large a force is supplied.    However, we are clearly able to push objects like bricks across a surface like a table in real life. I don't understand how this could be achieved as my understanding tells me that you cannot ever overcome the frictional force of the floor.  The original YouTube video where i got my diagrams from:

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


I'm sorry if this is basic, but I've searched a lot and found none.  Is there a way to change the font that appears on the PDF? To Nanumgothic specifically? I've tried with TeXmaker and Texworks and couldn't figure how to do that...

I'm sure this is a newbie question, but I can't figure this out. I have tried to follow the advice here:  and here:   But I can not seem to be able to generate any font change. I either get no change or error messages.  Here is the output of one failed attempt to change the font to Times using this command:  \rmfamily \renewcommand{\rmdefault}{ptm}     Apparently I either don't have a correct package installed or...  The output says " Metric (TFM) file not found." but I am not sure where to go from there.


I'm trying to get the intersection point between a line and a circle but then when I draw from that point to another it does not start just at the intersection. Here is my code:    \documentclass[margin=1mm]{standalone}  \usepackage{tikz} \usetikzlibrary{intersections}  \begin{document}     \begin{tikzpicture}         \draw [name path = circle]         (0,0) circle (1);          \path [name path = en1] (-3,.4)--(3,.4);         \path [name path = en2] (-3,-.4)--(3,-.4);          \draw [name intersections={of=en1 and circle}]         (intersection-1) node (ne) {}         (intersection-2) node (no) {};          \draw [name intersections={of=en2 and circle}]         (intersection-1) node (so) {}         (intersection-2) node (se) {};          \draw         (0,0) -- (ne);     \end{tikzpicture} \end{document}   And my result:

Consider the following TikZ drawing:    Why do the lines not go "all the way"? And why does that line appear below what is supposed to look like a water tank?  \documentclass{memoir} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing}  \begin{document} \def\balloonheight{1.5} \def\ballooonwidth{1} \def\vwidth{0.3} \def\vheight{3} \def\vpos{-3} \centering \begin{tikzpicture}     \tikzstyle{balloon}=[ball color=red];     \shade[balloon] ellipse (1 and 1.5);      \coordinate (bottom) at (0,-1.5);      \coordinate (vtop) at (0,\vpos);     \coordinate (vbottom) at (0,{\vpos - \vheight} );     \coordinate (vtopright) at (\vwidth, -3 );     \coordinate (vtopleft) at (-\vwidth, -3 );      \draw[rounded corners=8pt, thick,black] (vtopright) |- (vbottom) -| (vtopleft);      \draw[fill=blue!50!white] decorate [blue,decoration={snake}] {(vtopleft)++(0,-0.5) -- ++(2*\vwidth, 0 )} [rounded corners=8pt] |- (vbottom) -| (vtopleft)++(0,-0.5);      \draw[orange] (bottom) -- coordinate[midway] (ropemid) (vtop) -- ++(0,-1);      \coordinate (current) at (4,-1.5);      \path (current) -- ++(0,0.3) node (current+) {};     \path (current) -- ++(0,-0.3) node (current-) {};      \draw[thick] (current+) -- +(-0.5,0) -- ++(0.5,0);     \draw[thick] (current-) -- +(-0.2,0) -- ++(0.2,0);      \path (vbottom) -- ++(0,-0.5) node (belowvbottom) {};     \path (vtopleft) -- ++(0,-1.5) node (+entrance) {};     \path (vtopright) -- ++(0,-1.5) node (-entrance) {};      \draw[rounded corners=8pt,thick] (current+) |- ++(1,1) |- (belowvbottom) -- ++(-1,0) |- (+entrance);     \draw[rounded corners=8pt, thick] (current-) |- (-entrance);      \draw[thick,rounded corners=8pt] (ropemid) -- ++(2,0)      node[fill=white, draw, rectangle,rounded corners,align=center] (pico) {PicoScope} -| (current-);  \end{tikzpicture} \end{document}


In the Vim documents there a mention that Crtl+A should increase a number by one. In the Windows version it instead selects all text.  Is there an alternative shortcut for increasing a number by one?

While CtrlX works fine in vim under windows, CtrlA selects all (duh).  Is there a way to increment a number with a keystroke under windows?


Considering our company had no real relational schema in MySQL and, in the process of trying to transform our schema, we've run into some limitations using MySQL, we decided to import tables and data over to PostgreSQL. We've already done that. One thing I can't figure out (besides not being able to find decent tutorials on PostgreSQL 10 that aren't the documentation), is how to have variables, or if I even need variables for the following situation.  We have a subscribers table. This has a primary key subscriber_id. We have a subscriber_info table, that has a foreign key to the subscriber_id in subscribers. When we delete a subscriber, we just set the active record in the subscribers table to 0. We want this to propagate so that setting the master subscribers record to 0 updates all the references to that subscriber_id and sets their active records to 0. Similarly, if I restore a subscription record's active flag to 1, I want that to propagate as well.   So, I have two tables:  subscribers ------------ subscriber_id (PK) active  subscriber_info ---------------- subscriber_info_id (PK) subscriber_id      (FK) subscriber_name  active datetime_created   (current_timestamp) datetime_modified  (current_timestamp on update current_timestamp)   The following trigger works in MySQL:  DELIMITER $$ CREATE TRIGGER delete_or_restore_subscriber AFTER UPDATE ON subscribers FOR EACH ROW BEGIN   SET @subscriber_id = old.subscriber_id;   IF (new.active <=> 0) THEN     UPDATE subscriber_info     SET subscriber_info.active = 0     WHERE subscriber_info.subscriber_id = @subscriber_id;   ELSEIF (new.active <=> 1) THEN     UPDATE subscriber_info     SET subscriber_info.active = 1     WHERE last_created_record = (       SELECT MAX(subscriber_info.datetime_created)       FROM subscriber_info       WHERE subscriber_info.subscriber_id = @subscriber_id       AND subscriber_info.active = 0     );   END IF; END$$ DELIMITER ;   But in Postgres SET .  Is there a way to re-write this trigger? Is there a decent tutorial on triggers? I'd like some way to verify or test my trigger before actually executing it. Any other books, videos or anything would go a long way in understanding this.

In MS SQL Server, I create my scripts to use customizable variables:  DECLARE @somevariable int   SELECT @somevariable = -1  INSERT INTO foo VALUES ( @somevariable )   I'll then change the value of @somevariable at runtime, depending on the value that I want in the particular situation. Since it's at the top of the script it's easy to see and remember.  How do I do the same with the PostgreSQL client psql?


Basically what the title asks. I have seen multiple methods, such as using Apache commons, and UUID that seem too complicated for someone that just barely started Java.

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


I am American visiting in Germany .. do I need visa to enter turkey ? If yes what are the process? Since I am American visiting in Germany. .  Thanks

I understand that Turkey does not belong to Schengen area. So would I need to have a visa to visit Turkey?


2 months ago I installed Ubuntu 14.04., but today the Update manager showed me some recommended updates, one of these upgrade to 14.04.1 LTS. After installations the pc restarted, but cannot run Ubuntu GUI. Only show the command line black screen and ask me my login and password. I do not know what to do to fix this problem, I tried to reinstall nvidia drivers, but it did not work. Thanks for your time and support.

Tonight I upgraded to 11.04. Problems. Once I had finished the upgrade, I restarted my computer as it told me too. When I got past the ubuntu 11.04 (purple background orange dots), it simply went to the terminal and asked me to log in. I tried to restart the X server with "sudo service gdm restart" but no display popped up. I happened to have a few NVIDIA drivers in my downloads file also so I gave these a try, but the "install script" failed.   After all this I booted Ubuntu in graphic failsafe mode. I then decided to see what would happen if I removed the proprietary driver. Upon doing this and rebooting my Ubuntu booted into graphical mode "yay!". So without the Nvidia drivers I can finally see something other than terminal, but, I need those NVIDIA drivers for my work. So what can I do? I have tried installing the new NVIDIA linux drivers from the NVIDIA website, and have tried Installing the recommended driver via "additional drivers", but both have resulted in my being stuck in terminal.  If you can help or give me some advice PLEASE DO! I am really in a very bad situation...


I have already installed Windows 7 on C: drive. Now I want to install Ubuntu on E: drive which is a free partition. How do I proceed?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I'm trying to use MigLayout for my project but i'm struggling to understand the logic.  I'd like to place 2 labels on top and at the bottom of a certain panel with a margin of 20px between the labels and the ends of the panel.  Moreover, he labels must be centered horizontally.  Any ideas on how to do this ?

I read some information about Java layout managers and the recommendation was . My problem is, that I didn't found any tutorial or easy step-by-step documentation.  So I want to know how this all works, but I don't know how.  Hope, it's not to trivial.  Thanks in advance, guerda


There is a common home-remedy for scratched flat-screen monitors that says to rub a bit of petroleum jelly into the scratch. The rationale being that because the jelly has a similar refractive index as the plastic of the screen, light does not refract when moving from the jelly to the plastic and back as it does when moving from air to the plastic and back.  This makes sense, and some people have reported successful results, but naturally it depends on the specific jelly and specific monitor. Others have reported less success which also makes sense because there is a wide variety of jellies and monitors.  In this vein, I am wondering about optical discs. Scratches are a common blight on CDs and DVDs that most people have had to deal with at some point. It stands to reason that a similar technique could be used with optical discs (at least once, to recover the data). Even better, there is not as much variety with discs; they all use standard polycarbonate with little variation in their chemical composition, so the same material should work for pretty much all discs.  Does anyone know of a material which has a refractive index as close as possible to that of polycarbonate (1.584-1.586)?  There’s two things to note:   The disc spins very fast in the drive, so it can’t be something too soft because then the particles could get spun out and splattered inside the drive. CD/DVD repair-kits often include some sort of chemical solution, but a home-remedy should be a substance that most people can easily and cheaply get a hold of.

Does a scratched DVD result in lost data? How do I fix a scratched DVD?


Given $H$ an Hilbert space and $A:H\rightarrow H$ a compact operator with norm less than one. Consider  $$B: L^2([0,1];H)\rightarrow L^2([0,1];H) $$ defined as  $(Bf)(x):=A[f(x)]$.  Is $B$ still a compact operator?

Suppose we have an bounded linear operator A that operates from $L^2([a,b]) \mapsto L^2([a,b])$.  Now suppose that $A(f)(t) = tf(t)$.    Is A compact?  Edit: I know $A = A^*$ but I'm not really sure how to start on this.  It's not homework, just summer fun :D


How can I get the pairwise sum of two equal length tuples? For example if I have (0,-1,7) and (3,4,-7) I would like to have (3,3,0) as answer.

Is there anyway to get tuple operations in Python to work like this:  >>> a = (1,2,3) >>> b = (3,2,1) >>> a + b (4,4,4)   instead of:  >>> a = (1,2,3) >>> b = (3,2,1) >>> a + b (1,2,3,3,2,1)   I know it works like that because the __add__ and __mul__ methods are defined to work like that. So the only way would be to redefine them?


In Se7en John Doe had everything meticulously planned. Did he in any way have anything to do with Mills' transfer to the city?  Somerset: Very simple. You actually fought to get re-assigned here. I've just never seen it done that way before.  He couldn't have just waited for Mills' transfer to go through because Somerset's retirement was coming up, so was there any explanation for this? John Doe had at least sloth planned for a whole year, doesn't it seem a little uncharacteristic that he would plan the whole wrath thing from just the stairs encounter?

In , John Doe is shown as being extremely meticulous and patient while carrying out his plan of murdering and/or torturing people in accordance with the seven deadly sins.  At the end of the film, it is revealed that John Doe had killed and decapitated Tracy Mills, the wife of Detective David Mills.  Was Tracy Mills his intended target from the beginning?  Did John Doe decide to kill Tracy only after Detective Mills and Somerset discovered his residence?


I am running a Ubuntu 12.04 LTS Server on a private network that doesn't and never will have internet access.  I have a need to install packages from time to time for development purposes, and rather than download the .deb files everytime to manual install i would like to create an offline repository in the form of an .ISO that i can present to my VM's in ESXI.   What is the best way to go about doing this? I assume once i have them on a CD i can add the mounted ISO to apt sources.list?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


I am making a quiz with Java, and an error has appeared. When I enter in the right answer, it says it is wrong. Any ideas?  Code:  package revision_project;  import java.util.List; import java.util.Scanner; import java.util.ArrayList;   public class Quiz {     public static void main(String args[]){         String newline = System.getProperty("line.separator");         Scanner input = new Scanner(System.in);          String[] questions = {"What is an integer?", "What does CPU stand for?", "How far can a LAN go?",                 "What does LAN stand for?", "Give an example of a WAN.", "What is a syntax error?"};         String[] answers = {"a whole number", "central processing unit", "2km", "local area network",                 "internet", "when the programmer enters in incorrect syntax."};         List<String> correct = new ArrayList<String>();          for(int i = 0; i < questions.length; i++){             System.out.println(questions[i] + ": " + newline);             String x = input.nextLine();             x = x.toLowerCase();              if(x == answers[i]){                 System.out.println("Correct");                 //correct.add("Correct");             } else{                 System.out.println("Wrong");                 //correct.add("Wrong");             }         }                    } }

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


Is there any place where we could report this so that the moderator takes appropriate action against the user who is using multiple accounts to upvote his/her own answers?

I have, in my view, strong, albeit circumstantial, evidence that a particular user is operating a sock puppet account. It appears not to have been detected by any automated mechanisms–both users are still here.  The individual in question is not interested in collecting lots of rep but rather uses the account to carry out prolonged vindictive down-voting attacks. The down-voting account loses rep over time (due to the down-votes) and when it gets close to falling below 125, it is topped up.  Do moderators want to hear more details (e.g. via a flag)? Or do we just accept that if the automated detection scripts don't pick it up, then there's nothing more to be done.


I've been looking into quantum algorithms, Deutsch–Jozsa, Grover, Shor. To me all they share is that they do something in parallel and then cleverly extra some specific information for that. Which to me means QC can provide efficient parallel programming if the goal itself isnt the direct result. By this I mean if the goal was actually knowing the result of each calculation. Is there a property that all problems that QC will excel at share?

Is there a general statement about what kinds of problems can be solved more efficiently using quantum computers (quantum gate model only)? Do the problems for which an algorithm is known today have a common property?  As far as i understand quantum computing helps with the hidden subgroup problem (Shor); Grover's algorithm helps speedup search problems. I have read that quantum algorithms can provide speed-up if you look for a 'global property' of  a function (Grover/Deutsch).   Is there a more concise and correct statement about where quantum computing can help?  Is it possible to give an explanation why quantum physics can help there (preferably something deeper that 'interference can be exploited')? And why it possibly will not help for other problems (e.g. for NP-complete problems)?   Are there relevant papers that discuss just that?  I had asked this question before over on  but it may be more suitable here.


I want to run the script temp-throttle () at startup and show a custom Plank icon.  The script will throttle CPU frequency at 79 celsius if run like so   sudo ./temp_throttle.sh 79   As it needs the temperature to be specified as above after cd in the path of the script, a second script is needed.  #!/bin/bash  cd "path-to-the-folder//temp-throttle-stable" terminator -e 'sudo ./temp_throttle.sh 79' --geometry=300x80 -p hold    I have called that temp-throttle and put it in $HOME/bin, as indicated .  In order to have some info on the situation, I have integrated the command in a terminal command and added -p hold that sets a terminal profile to keep terminal window open.  If I add that script to startup applications list, the icon used in Plank is that of the terminal.     I would like it to run at startup and show in Plank my custom "temp.png" icon    For that, I have created the file ~/.local/share/applications/temp-throttle.desktop with the following lines:  [Desktop Entry] Type=Application Name=temp-throttle Icon=temp Categories=System;Monitor; Exec=temp-throtle     Executing that directly (double-click) it shows the terminal icon in Plank.  I can make the dock use the custom "temp" icon by executing the .desktop file from the applications search&launch tool (e.g. Slingshot) or with the command gtk-launch temp-throttle (as suggested ).   After that, the custom Plank icon can of course be pinned to the dock (right-click, "Keep in Dock"). That creates the file /home/cipeos/.config/plank/dock1/launchers/temp-throttle.dockitem with the lines  [PlankDockItemPreferences] Launcher=file:///home/cipeos/.local/share/applications/temp-throttle.desktop   as suggested in the 's answer. He also seems to suggest in a comment that the important thing here is to have the exact same names for all files involved:  all my file are called temp-throttle.  The problem is how to run a .desktop file at startup: if I simply add the desktop file at startup it will not run at all. If I add the startup command  gtk-launch temp-throttle.desktop it will still use the terminator icon.    This question is close to this: , but different, as the answers under that (use a .desktop file) will not work if the command/script/desktop-file is run at startup.  It seems that at startup the final command/script is run without taking into account the Icon= line in the .desktop file, no matter the method used to run the .desktop launcher.   I have tested many answers under this question () but they will not keep the icon specified in the .desktop file if that is run at startup.     answer provides a solution for Unity, but it doesn't work as such for Plank.

With Ubuntu 16.04, if you create a launcher (desktop file in ~/.local/share/applications) with a custom icon for a terminal application (so with Terminal=true) then when you start it, it will spawn a new standard terminal icon, and your custom icon will pulse and disappear within a few seconds.  In 14.04, it just worked as expected. (it would not start a new standard terminal icon).   Any idea what to do to change this behaviour? I have a few terminal apps that I want to launch from unity and the new behaviour is problematic (I lose trace of which is which since they all end up with the standard terminal icon)...


I have noticed that more often than not people tend to respond with answers to questions in comments as opposed to creating answers for a question.  Any thoughts as to why?  I am getting more heavily involved and just want to stay in tune with status quo.

Why do some people post comments that are actually answers to the question? Wouldn't posting an answer be better?


I'd like to forward several ports from my local machine to a remote machine through SSH tunneling. However, I want this to happen across a single port. Is there a protocol or tool that can multiplex between a single port and multiple applications?  Edit: I am forwarding a lot of ports from a lot of machines to a single remote, and I want to multiplex them at the application level per machine to use as few ports on that remote as possible. I see solutions like sshl that can multiplex certain protocols, but I don't know of any generic solutions that can wrap the messages in a protocol-independent way.

I am trying to monitor multiple JVMs running on different servers through an ssh tunnel.  Thanks to one of the UNIX gurus here, I have managed to get this running for a single server by:   Run jstatd on the target server Set up Visual VM to use 9696 as its socks proxy port. On my local PC, run:  ssh -L 2222:server1:22 bastion-host  On my local PC, run:  ssh -o port=2222 -D 9696 -L 1099:localhost:1099 localhost    This does the trick. Now when I try and tunnel to a second server I try:   On my local PC, run:  ssh -L 3333:server2:22 bastion-host  On my local PC, run:  ssh -o port=3333 -D 9696 -L 2099:localhost:1099 localhost    However, the last step complains with:  bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 9696   Has anyone managed to do something similar?  Update:  The reason this is so complex is that jstatd is an RMI server application:    As with RMI applications, these register with an rmiregistry. Using rmi through a firewall requires me to use SOCKS as described here:    Unfortunately, visualvm only lets me set the SOCKS proxy port once, and the -D option won't allow me to forward the same local port to both servers...


Is it normal for a PC to keep sending out UDP packets to other local devices using random source ports? In my case, I'm using Wireshark to monitor my own Windows PC network and I found there is one IP address constantly sending a UDP packet to my PC port 2054. The source port is almost random as I hardly find any repeated port numbers. I checked the ports' activity but I do not know how to log it into some kind of text file. So I do not know what application is using port 2054. Netstat results do not show this port number. I also tried blocking IP address inbound and outbound but my PC is still receiving the packet. I configured this using Windows Defender Firewall with Advanced Security. Since I am using a public Wi-Fi network, I only block the inbound and outbound of IP address of the device sending me packets. Set block by Any program, Any local port and Any remote port. Any idea on this case?

I noticed today that McSvHost.exe (part of McAfee LiveSafe running on Windows 10) is sending traffic to every host on my network on UDP port 2054. This is what the packets look like (the part with Xs was actually the sender's MAC address):     0x0000:  4500 0038 16c5 0000 8011 d2c9 0a14 1e01  E..8............     0x0010:  0a14 1efe d13b 0806 0024 ba22 0001 0800  .....;...$."....     0x0020:  0604 0001 XXXX XXXX XXXX 0a14 1e01 ffff  ........V[......     0x0030:  ffff ffff 0a14 1efe                      ........  ...and here's Process Monitor showing McSvHost.exe sending the packets:  My questions are—  Is this expected behaviour, or should I be suspicious? and If it is expected behaviour, what is McAfee trying to do?  I've checked and nothing on my computer is listening on UDP port 2054.  I've tried contacting McAfee support but I struggled to make the support agent understand my question.


My host is Ubuntu 12.04 and I have installed Virtual Box on it. Network setting of Virtual Box is NAT.  Then I have Oracle Enterprise Linux as guest.  Now I want to set a static IP for my guest, because it's one of pre-requisites of oracle installation.  I tried setting static IP using "Applications menu -> System Settings -> Network" but oracle installer complains about dhcp IP again.  Any helps are appreciated. My Linux knowledge is so limited.  P.S: In /etc/sysconfig/network-scripts/ifcfg-eth0 I have   BOOTPROTO=none   Since I'm using Virtual Box I guess this is different from other questions about static/dhcp ip.

I installed Redhat 6 x86_64. I am using the Network connection screen to set a static IP address like below (I want two PC's in my house to see each other: one Redhat PC and one Mac)   192.168.0.5   255.255.255.0   192.168.0.1     When I run ifconfig it displays only lo and virbr0 information. I don't know what these items are (I don't really know much about network settings).   When I try ifconfig -a it displays eth0, lo, sit0 and virbr0. The information for  eth0 is as follows:   Link encap : Ethernet HWaddr 90:2B:34:74:05:30 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:192 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 frame:0 collisions:0 txqueuelen:1000 RX bytes 53811 (52.5 KiB) TX bytes:468 (468.0 b) Interrupt:29 Base address:0xc000   Could someone help me to point out if anything wrong with my setting or how to resolve this problem?


I have created the following filter in angular.js. Now I am trying to use the indexOf to remove the country variable by splice I always get the error saying _filters.indexOf is not a function:  .filter('MyFilter', function () {     return function (_filters) {         _filters = _filters.splice(_filters.indexOf(_filters['country']), 1);     } })   The filter object looks like this:  {   "rate": 5,   "country": [     "Russia",     "Polen",     "France"   ],   "city": [     "Dubai"   ] }

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };