What is the difference between "I'm in no mood " and "I was in no mood"? I asked my mentor and he told me they're both the same, but I see that these are different in regards to tense.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Device = Redmi 5 Plus.  I have 250 apps as a .bak created by PC app. But the cheater PC app is asking for premium to restore it now. So, I can extract the .bak and find my apps.  I wanted to batch install those apks. I tried adb install apkname.apk to check if it works. But the phone keeps prompting me to accept the install and countdown starts, or else it will auto deny after countdown finishes. I've also tried 3rd-party app like ApkInstaller but it's the same.  I read many articles and they say it works without prompt. So, why am I getting this issue? How to bypass this prompt automatically?

I want to batch install apks from my desktop directly. Such as I downloaded many apks on the desktop and want to install apks without actually touching my android. How to do this?


Previously when opening Windows explorer, it would come up as below:  Key Folders : UPPERCASE documents : LOWERCASE   Example A:   APPLES apple 1 apple 2 BANANAS banana 1 banana 2 CARROT carrot 1 carrot 2   Etc, etc, all types of files (whether they be folders or documents) showed alphabetically.  Now, they show like below:  Example B.   APPLES BANANAS CARROTS apple 1 apple 2 banana 1 banana 2 carrot 1 carrot 2   Sorting the folders alphabetically then the documents alphabetically.  How do I get it back to example A?

When Windows Explorer sorts files, it first sorts files from directories and only then sorts each group using the sort specified (My default is DateCreated). I don't like this as the default behavior.   I would like it to be a simple sort (without separating files from folders). Is it possible to change, and if so how?


I need to prove that  $ \int_0^\infty (\frac{\sin x}{x})^2 = \frac{\pi}{2}$.  I have proved that $\sum_1^\infty \frac {\sin^2(n \delta)}{n^2 \delta}=\frac{\pi-\delta}{2}$ for $0<\delta<\pi$ and I'm supposed to use this identity.

I am looking for a short proof that $$\int_0^\infty \left(\frac{\sin x}{x}\right)^2 \mathrm dx=\frac{\pi}{2}.$$ What do you think?  It is kind of amazing that $$\int_0^\infty \frac{\sin x}{x} \mathrm dx$$ is also $\frac{\pi}{2}.$ Many proofs of this latter one are already in this .


This book is from the late 80s at the earliest; I read it around 1988). Here is the synopsis:  A young man on the cusp of becoming an adult is to take a test mandated by the Empire (Emperor) called the Fortune Hunter Test or something.  Basically it is a test that is supposed to set you on your life path and some 'very lucky' people who pass it are taken to special schools and never seen again but assumed to be filthy rich or whatever.    The kid takes test and is one of the lucky ones and they take him through a matter transmitter called an MT Screen or Empty Screen.  It is gray and opaque.  The kid is (fuzzy on this part, as I was like 11 or something and sick) rescued or escapes or something and goes on the run after realizing that the Emperor is actually culling out the people who are lucky or smart enough to threaten his reign.    The kid ends up fighting the for a rebel group that is part of an interstellar circus or something as a cover. They have all this tech based on the matter transmitters including a MT cube that is basically projected around the person as a shield but can have the walls removed so they can be shot then have them pop back into existence to protect the person inside. Also the mt screen can be weaponized as it instantaneously transmits matter that it touches to another place and can therefore be used as a slicer to remove parts of people or whatnot (Kind of violent theoretically, but not really that bloody).    At one point the kid is trying to get past a security checkpoint and the ringmaster (I think) gives him the identity Asa Baqua (spelling?) who we later find out was his child who maybe passed the fortune hunters test before, and disappeared, giving the ringmaster (weird word but that is what I remember) a reason to fight against the emperor.  Anyway, it was teen fiction or sci fi/fantasy and I loved the story but only read it once forever ago.  If anyone can figure out this book or remembers having read it please let me know!

I read it in English in the United States, somewhere in the 1990s. I got it off of the big bookshelf in our family room, which means it could be a good bit older; some of the books were my Dad's. At the beginning, a young boy (maybe an early teen?) leaves his house, where he lives with his parent or parents, and takes a test to become a spaceship pilot for the military. Part of the test judges reaction speed, and he fails the test. He later learns (I think when he's approached by an agent of the government) that he "failed" because he has some sort of enhanced fortune that meant that he was actually giving the results before they could be displayed on the screen. At the time, I remember thinking that the book felt a bit like a Star Wars rip-off.  Years later, I read that one of the Star Wars books (probably now Legends) had Luke similarly failing the Imperial Academy test because he gave his answers too quickly, and it amused me that I was uncertain as to which had come first.  I don't remember anything concrete about the cover, although I have a general impression that it was white. Definitely futuristic. My impression was that the boy was wearing a white uniform for the testing and that the government agent who spoke to him had a grey beard, but I might be mixing bits of Star Wars in there.


I use an HP Pavillion running Ubuntu 14.04 LTS and up until now I did not have any problems with my computer's wifi connection. After about five minutes after booting, the Internet will slow down and after a few moments stop working completely, even though the wifi signal in the top right corner still shows that the computer is connected. Why does that happen?  Also, if I try to disconnect and reconnect, it will fail to connect and indefinitely spam me with wifi password requests that seemingly do not change anything.  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723] Subsystem: Hewlett-Packard Company Device [103c:2231] Kernel driver in use: rtl8723be

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


Our client wants different domains for different countries where they have headquarters. So we would have www.example1.com, www.example2.us, www.example3.com.br, etc. (it is also multilanguage, with /en/, /es/, /pt/ suffixes).  The content is basically the same, except for the news, which are specific to each country and some other contain (videos, image galleries, etc.)  However, the catalogue of products, corporate pages, etc., are the same.  Will Google (or other search crawlers) detect these common parts as duplicate content? Would it affect SEO performance? How could it be avoided or mitigated?

I currently work at a pretty big website that has visitors from around the globe. My job is to help out on the SEO, and one thing we've been discussing lately is the use of international TLD's. The ones we use range between:   (partly) translated websites like .es and .de that serve most of the content in the country's language non-translated (english) websites for non-english languages (due to a lack of translations) like .ro and .cz english websites for english speaking countries with localized TLD's (.co.nz, .co.uk)   On one hand I really have the feeling this is causing a lot of duplicate content, especially for the last two categories of TLD's.   On the other hand though it seems a lot like country-specific TLD's tend to score a lot better in that country's Google. Would it be advisable to keep on using these domains, or should we canonicalize them all to the .com version?


I want to multiply two unsigned numbers and I want to know if the result has overflowed. For example I may be calculating the size of a memory block to allocate.  I could use a type for the multiplication that is at least twice as large as the types I am multiplying so that overflow simply cannot happen but such a type may not be available.   I could do a division after the multiplication and compare the result with the original operands but divisions is a relatively slow operation  Is there a better way?

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


I am having a problem with TexMaker. When compiling the following section, it says ! Missing $ inserted.<inserted text>$ ...13 is the smallest value on the path 1 \to [...] (can't see the rest).  Source text:  The maximum amount of flow between 1 and 3 would hence be 13 in our example, for 13 is the smallest value on the path 1 \to 2 \to 6 \to 5 \to 3 in the Gomory-Hu-Tree.    pdf-output:    The problem is the last part, where all the words are thrown together for some reason (and also printed cursive I think). I have not worked with Latex before, so I do not have any idea what might be causing the issue, any help would be

Newbie question: Within the body of the text that I've inserted into a Journal's Latex Template, I don't understand why I get a newline and italicized font when I add the command \leq to generate "less than or equal to"...  Below is (1) the Journal's template preamble and (2) my text in the body of the document.  I'm using MacText/TexShop on MacOSx10.6  (1) PREAMBLE  \NeedsTeXFormat{LaTeX2e}[1995/12/01] \documentclass[10pt]{bmc_article}      % Load packages \usepackage{cite} % Make references as [1-4], not [1,2,3,4] \usepackage{url}  % Formatting web addresses   \usepackage{ifthen}  % Conditional  \usepackage{multicol}   %Columns \usepackage[utf8]{inputenc} %unicode support %\usepackage[applemac]{inputenc} %applemac support if unicode package fails %\usepackage[latin1]{inputenc} %UNIX support if unicode package fails \usepackage{times} %so today's date appears on each version \urlstyle{rm}  \def\includegraphic{} \def\includegraphics{}  \setlength{\topmargin}{0.0cm} \setlength{\textheight}{21.5cm} \setlength{\oddsidemargin}{0cm}  \setlength{\textwidth}{16.5cm} \setlength{\columnsep}{0.6cm}  \newboolean{publ}   (2) IN THE BODY OF THE DOCUMENT .tex  coefficients kappa: \leq 0.4 poor to fair; 0.6 moderate agreement.   in Typeset: this pdf reads      coefficients kappa:      <={italics}0.4poortofair;0.6moderateagreement


After booting my computer one day, my computer routed me to the "grub rescue" shell. All the settings there seemed fine. I booted ubuntu from my usb drive to try to get to my ubuntu partition on my hard drive. I could get into some folders but trying to get into my home folder gave me an "Input/Output error".   Not able to access my files through usb drive ubuntu, I use the grub2 shell and I was able to access my files with the "cat" command and read them. Is there any way to transfer all my files from my hard drive to an external storage device?  PS: I have some very important files that I haven't backed up on my ubuntu partition of my hard drive.  Any help is much appreciated.  Thanks in advance.  EDIT: My smartctl checkup on the hard drive said that the health status is OK.

I have a 1TB FAILING hard drive, a brand new 1 TB hard drive, a bootable ubuntu usb, and a working computer.  All I need is a step by step process of how to safely clone as much data as possible from one to the other. NOTE: THE DRIVE IS FAILING.  I know I need to enable multiverse and then install and use ddrescue to complete the task. But everywhere I look online, I can't get a straight path to the task. I know that this can be all done within the terminal and that's what I seek.  How can I do this?


we are planning to lunch business in multi-language. Now, the content will remain the same for all the website but, we are also trying to cater to the local audience. So, what will be the best solution for this should we go with subfolder or sub domain

When I set up a site in multiple languages, how should I set up my URLs for search engines and usability?  Let's say my site is www.example.com, and I'm translating into French and Spanish. What is best for usability and SEO?  Directory option:  http://www.example.com/sample.html http://www.example.com/fr/sample.html http://www.example.com/es/sample.html   Subdomain option:  http://www.example.com/sample.html http://fr.example.com/sample.html http://es.example.com/sample.html   Filename option:  http://www.example.com/sample.html http://www.example.com/sample.fr.html http://www.example.com/sample.es.html   Accept-Language header:  Or should I simply parse the  header and generate content server-side to suit that header?  Is there another way to do this? If the different language versions don't have different urls, what do I do about the search engines?    UPDATE 2011-12-06  Google has new recommendations for meta tags for explicitly pointing to other language content: .  UPDATE 2012-05-25  Related but not precisely:   UPDATE 2013-06-12  includes discussion of several URL schemes directly relevant to the question.


When I write C++ code for a class using templates and split the code between a source (CPP) file and a header (H) file, I get a whole lot of "unresolved external symbol" errors when it comes to linking the final executible, despite the object file being correctly built and included in the linking.  What's happening here, and how can I fix it?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have been doing landscape photography for a while now and I am looking to upgrade to a Canon EOS 5DS.   As a Sony user, I have a few lenses that I like. In particular, the Zeiss Batis 2.8/18 is my favorite lens.   I can find plenty of adapters going from Canon's EF to Sony's E mount, but not the other way.  If I were to switch cameras to the EOS 5DS, does it mean I have to give up all my lenses and buy new ones?

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


We have developed an application in Visual Basic 6 as a front end. This application requires to capture automation values from machinery to system.  It captures the data using serial port.   So here I would like to know first, will Ubuntu supports installing vb6 in it?  If that's the case, what is the process to install and execute an application that need to be installed on Ubuntu.

How can I install Visual Studio?    I'd prefer to use it in Wine or PlayOnLinux if possible.


In version 12.10 there was a setting under System Settings > Mouse & Touchpad to "Show position of the mouse when the Control key is pressed”. While using 12.10 I enabled this option.  I have since upgraded to version 13.10, and this setting appears to have disappeared.   How can I now disable this? It is interfering with the use of the control key in a number of apps, such as VirtualBox.  I'm quite happy to use the terminal or edit a settings file if that is the best (only) way to do this. I really (!!) don't want to have to reinstall just to reset this one option.

I've searched everywhere in the system settings but I still can't find it.


I got trapped in a position when I had an observer tping people to a position and it's stuck on repeat. Anybody who joins my LAN gets tpd. How do I remove the observer from almost 100 blocks away? I've tried /fill and don't know the coords and I don't want to abandon the world. It's really important. anybody know anything?

I set a command block to /tp. It was supposed to activate only if you had 0 time left, and to activate the command block with a hopper clock to keep giving it power.   But it is not checking if you have 0 time left, so it keeps teleporting me. I can't get close enough to the command block to break it, so I'm stuck in a neverending teleport loop.  Any ideas?


Hi just started in Ubuntu and can't install any program from Ubuntu Software I read some solutions and need to install gdebi , I download the package installer.deb but still can't install gdebi , please help me how to install gdebi   Note : i dont have internet access , need to install gdebi before access to the internet

How do I install a .deb file via the command line?


There are some APIs with some versions. i.e.      1. /v1/order/create     2. /order/v2/create  Their is common middleware going to invoke. In middleawre I need version of API (i.e. v1 or v2) to perform some specific task for specific version. I tried with below code but failing for 2nd type of url.  var pieces = req.url.replace(/^\/+/, '').split('/'); var version = pieces[0]; req.version =  version || 0;   Please suggest. Thanks

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I have 2 identical queries . One is executed with parameters, the other is executed with hardcoded values. Somehow sql server is creating 2 different execution plans for the 2 queries. The first one is almost instantaniously completed. The other one takes +- 2 seconds to complete. The application is creating the second query(which takes the longest) .  How do i make the parameterized query take the same execution plan as the other one? I already tried rebuilding the statistics & indexes but with no success.  The execution plans in the screenshot are scrolled to the right top position, showing a clear difference in approach.

I had this issue long time ago, I found a workaround which suited me and forgot about it.  But now there's  on SO so I'm willing to bring this problem up.  There's a view that joins few tables in a very straightforward way (orders + order lines).    When queried without a where clause, the view returns several million lines. However, noone ever calls it like that. The usual query is  select * from that_nasty_view where order_number = 123456;   This returns about 10 records out of 5m.  An important thing: the view contains a window function, rank(), which is partitioned exactly by the field using which the view is always queried:  rank() over (partition by order_number order by detail_line_number)   Now, if this view is queried with literal parameters in the query string, exactly as shown above, it returns the rows instantly. The execution plan is fine:   Index seek on both tables using the indices on order_number (returns 10 rows). Calculating windows over the returned tiny result. Selecting.   However, when the view is called in a parametrized way, things get nasty:   Index scan on all tables ignoring indices. Returns 5m rows. Huge join. Calculating windows over all partitions (about 500k windows). Filter to take 10 rows out of 5m. Select   This happens in all cases when parameters are involved. It can be SSMS:  declare @order_number int = 123456; select * from that_nasty_view where order_number = @order_number;   It can be an ODBC client, such as Excel:  select * from that_nasty_view where order_number = ?   Or it can be any other client that uses parameters and not sql concatenation.  If the window function is removed from the view, it runs perfectly quickly, regardless of whether or not it's queried with parameters.  My workaround was to remove the offending function and reapply it at a later stage.  But, what gives? Is it genuinely a bug in how SQL Server 2008 handles window functions?


I've gone to my router settings and added port forwarding for port 22 to my linux machine. However, when I now type         ssh @  from another computer (the terminal of my mac), it says operation timed out. I've used grep Port /etc/ssh/sshd_config to confirm that port 22 is infact the port ssh uses on my linux. Am I missing some thing?

I'm on Fedora 19 and I have a problem with ssh.  Ssh is up and running and I can connect when I enter my lan ip. But when I try my server name (blahblah.no-ip.org) I get a connection refused. No-ip is already running as a service and is working properly (sending the correct ip).  I've already set up port forwarding on my router, I also changed the port of ssh both on the service and on the router port forwarding (in case my beloved ISP decided to block those ports). But still I get a connection refused and when I nmap the hostname I see that the ssh port is closed.  One thing though: I have two PCs under the same external ip (I've set up the port forwarding to the correct internal ip). When I nmap blahblah.no-ip.org I get a Port 23 and 80 open. 80 seems OK but I've never started telnet service on my machine.  Any ideas what else to try? Router is zte zxv10 and port forwarding is correctly set up. I say this because I've already set up port forwarding for deluge and it's working properly.


It's printing 0 but I expect 1. The size of first dimension in array is omitted because I want to pass multiple arrays entries in this same method how to get this for iteration void printValues(char hotelData[][3][50], int n);  char hotelData [1][3][50] =       {     "unidadeid1Fk", "john fernandes", "executiveRoom"     };  int main( void ) {     printValues(hotelData, 0);     }  void printValues(char hotelData[][3][50], int n) {             int arraySize = sizeof (hotelData) / sizeof (hotelData[0]);     printf("ArraySize: %i ", arraySize); }  Output is  ArraySize: 0  And this code is returning this warning that I don't know what means and how to solve it:  teste.c: In function 'printValues': teste.c:29:32: warning: 'sizeof' on array function parameter 'hotelData' will return size of 'char (*)[3][50]' [-Wsizeof-array-argument]          int arraySize = sizeof (hotelData) / sizeof (hotelData[0]);                                 ^ teste.c:27:27: note: declared here      void printValues(char hotelData[][3][50], int n)

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


Everybody has been taught at one point, "oh the universe expands, but that doesn't mean that everything is expanding uniformly, since that means we can't detect the expansion, but only that huge galaxies are moving away from each other".  But I'm rather confused. Can't the expanding universe simply be thought as a coordinate axis that expands? The definition of "1" on the coordinate axis constantly expands? After all, spacetime itself is expanding, and not only "average distance of galaxies".  So our Planck length would expand, light wavelengths expand, we expand, etc. But clearly this isn't happening. Of course, the handwavy explanation is "electromagnetism/gravity overcomes expansion at small scales", but the electromagnetic and gravity forces are defined in terms of constants relative to our "coordinate intervals", so if spacetime itself is expanding "under the feet" of gravity, shouldn't gravity not be able to do anything about it?  We would also be unable to measure the expansion of spacetime since all of our measurement benchmarks and tools are also expanding.  Clearly, this isn't happening. What is the precise reason?

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


This EFI boot system may be secure, but it surely is a pin ....., right? Through my laptops life, I have generated a few Machine-Owner Keys, and I would like to remove them. I have tried sudo mokutil --delete MOK-0001.der  After typing the password I think I used it does now throw any error messages. But when I type mokutil --export  All the .der files are exported again, in other words, none were deleted. Can anybody help-me with that?

While fighting with my discrete graphics card, I reinstalled Ubuntu several times.  The first couple times I was very careful to move the .priv and .der key I was using to sign my dkms kernel modules to another partition.  Unfortunately, as I got more frustrated I became less careful and apparently accidentally cut and pasted from the backup (rather than copying and pasting) and then reformatted over the sole remaining key in the next re-install.  I used photorec to try and recover the files but unfortunately no *.der or *.priv files were recovered.  It seems that the intended way to un-enroll machine owner keys (MOKs) is  mokutil --delete keyname.der   Given that I no longer have the public key, is there another way for me to un-enroll it?


I want to write a class like this. How can I define findMin and findMax function in another cpp file?  template <typename Comparable> class BinarySearchTree { private:     struct BinaryNode     {         Comparable element;         BinaryNode *left;         BinaryNode *right;          BinaryNode(const Comparable & theElement, BinaryNode *lt, BinaryNode *rt)         : element(theElement), left(lt), right(rt){}     };      BinaryNode * findMin(BinaryNode *t) const;     BinaryNode * findMax(BinaryNode *t) const; }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm getting mad with list indexes, and can't explain what I'm doing wrong.  I have this piece of code in which I want to create a list of lists, each one containing values of the same circuit parameter (voltage, current etc..) that I'm reading from a csv file that looks like this:  Sample, V1, I1, V2, I2 0, 3, 0.01, 3, 0.02 1, 3, 0.01, 3, 0.03   And so on. What I want is to create a list that for example contains V1 and I1 (but I want to chose interactively) in the form [[V1], [I1]], so:  [[3,3], [0.01, 0.01]]   The code that I'm using is this:  plot_data = [[]]*len(positions)     for row in reader:     for place in range(len(positions)):         value = float(row[positions[place]])         plot_data[place].append(value)   plot_data is the list that contains all the values, while positions is a list with the indexes of the columns that I want to copy from the .csv file. The problem is that if I try the commands in the shell, seems to work, but if I run the script instead of appending each value to the proper sub-list, it appends all values to all lists, so I obtain 2 (or more) identical lists.

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


Let $X=C[0,1]$ i.e. the set of continuous functions on $[0,1]$ with $L^2$ norm. Then there exists an $F\in X^*$ i.e. dual of $X$ such that there exists no $g \in X$ so that  $$ F(f) = \langle f,g \rangle$$ holds for all $f \in X$.  My effort: Since $(X,|| \cdot ||_{2})$ is not complete. Hence it is not a Hailbert space. We can't apply the Riesz Representation Theorem.  Any help in this regard would be highly appreciated! Thanks in advance!

I wanted to find a counter example to show that the completeness of the inner product space is necessary in . Please give an example of a bounded linear functional $T$ on an incomplete inner product space $X$ which do not have any inner product representation i.e. there does not exist any $z$ in $X$ s.t. $T(x)= \langle ,z\rangle$ for all $x$ in $X$.


I am trying to set proxy for APT so I can update.  The server is behind a proxy which is in the domain. I have tried the following in /etc/apt/apt.conf   for FTP, HTTP, https   Acquire::HTTP::Proxy "http://[domain\user[:Password02#]@10.1.1.8:8080/";  Also tried  Acquire::http::Proxy "http://domain\user:Password02#]@10.1.1.8:8080/";  Also tried  Acquire::http::Proxy "http:/user@domain.com:Password02#]@10.1.1.8:8080/";    I always get the error below:  root@canonical:/etc/apt# apt-get update    407  Proxy Authorization Required  Reading package lists... Done W: The repository 'http://security.ubuntu.com/ubuntu xenial-security Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://za.archive.ubuntu.com/ubuntu xenial Release' does    How can I set up my proxy correctly?

When I try to install a software using Ubuntu Software center I get:  Failed to download repository information Check Your Internet connection   When I try to do a apt-get install something, I get:  407  Proxy Authentication Required   I use a proxy server that requires a user-name and a password. I have set my systems proxy manually, by plugging in the required numbers in the Networks proxy and applied it system wide. I guess the problem now is plugging in my user-name and password.  When I use INTERNET via Mozilla, it specifically asks me for my user-name and password.


Looking at  and thinking of its use as a parachute.  If falling at terminal velocity, and Dimension Door is cast, would the caster (and anything or anyone with them) appear travelling at speed?

To be more specific, do teleportation spells conserve momentum from before to after the obvious infinite violation of momentum conservation inherent in instantaneous magical travel? Credit to nitsua60 suggesting this sentence!  For instance, if I were to take a running leap and then Dimension Door forward, would I continue to be propelled forward by my momentum (assuming that I still have a number of feet of movement speed remaining), or would that dissipate as part of the spell.  Similarly, if I were to launch a cannon ball from a cannon and then Teleport it into the throne room of a local king, would the cannon ball continue traveling forward at the same velocity or would it simply drop to the ground (given that the Teleport spell was successful)?  , but the only conclusive answer was from the Pathfinder SRD. I'm wondering if there is anything specifically in dnd-5e text that explicitly answers this question.


Given an integer template parameter Key, the search method should extract a layer of the onion that has key == Key during compilation.  How to fix the search method?  Test (also at )  #include <iostream>  class A { public:     static constexpr int key = 0;     template<int s>     constexpr auto& search() const { return *this; } };  template<class P> class B { public:     static constexpr int key = P::key + 1;     template <int Key>     constexpr auto& search() const {         if constexpr (Key == key) return *this;         return p_.search<Key>();     }     P p_; };  int main() {     B<B<B<B<A>>>> onion;     std::cout << onion.search<1>().key << "\n";     return 0; }   Error:  error: expected primary-expression before ‘)’ token          return p_.search<Key>();                                ^

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


First of all, sorry if this question is already answered, but i haven't found it.  I have an XML file that looks like this:  <data success="1" status="200">     <id>SbBGk</id>     <title/>     <description/>     <datetime>1341533193</datetime>     <type>image/jpeg</type>     <animated>false</animated>     <width>2559</width>     <height>1439</height>     <size>521916</size>     <views>1</views>     <bandwidth>521916</bandwidth>     <deletehash>eYZd3NNJHsbreD1</deletehash>     <section/>     <link>http://i.imgur.com/SbBGk.jpg</link> </data>   I want to get the id as a string. Any ideas?  Note: The XML file is a web response, that i retrieve using:  XmlDocument doc = new XmlDocument(); byte[] response = w.UploadValues("https://api.imgur.com/3/upload.xml", values); string xml = Encoding.UTF8.GetString(response); doc.LoadXml(xml);

How do I Deserialize this XML document:  <?xml version="1.0" encoding="utf-8"?> <Cars>   <Car>     <StockNumber>1020</StockNumber>     <Make>Nissan</Make>     <Model>Sentra</Model>   </Car>   <Car>     <StockNumber>1010</StockNumber>     <Make>Toyota</Make>     <Model>Corolla</Model>   </Car>   <Car>     <StockNumber>1111</StockNumber>     <Make>Honda</Make>     <Model>Accord</Model>   </Car> </Cars>   I have this:  [Serializable()] public class Car {     [System.Xml.Serialization.XmlElementAttribute("StockNumber")]     public string StockNumber{ get; set; }      [System.Xml.Serialization.XmlElementAttribute("Make")]     public string Make{ get; set; }      [System.Xml.Serialization.XmlElementAttribute("Model")]     public string Model{ get; set; } }   .  [System.Xml.Serialization.XmlRootAttribute("Cars", Namespace = "", IsNullable = false)] public class Cars {     [XmlArrayItem(typeof(Car))]     public Car[] Car { get; set; }  }   .  public class CarSerializer {     public Cars Deserialize()     {         Cars[] cars = null;         string path = HttpContext.Current.ApplicationInstance.Server.MapPath("~/App_Data/") + "cars.xml";          XmlSerializer serializer = new XmlSerializer(typeof(Cars[]));          StreamReader reader = new StreamReader(path);         reader.ReadToEnd();         cars = (Cars[])serializer.Deserialize(reader);         reader.Close();          return cars;     } }   that don't seem to work :-(


It appears my left shift key is permanently down on my MBP. All keys trigger capital letters, and numbers print out the symbols, I have to hold down esc when booting to prevent it from booting into safe mode...  I have taken the key off and cleaned underneath but that hasn't helped matters. If I open the visual keyboard I can see that the right shift responds to my presses but the left one does not, which leads me to think it is the one that is bust.  Is there any way for me to disable this key? I can make do with just using the right hand shift, obviously the laptop is practically un-usable with shift always being on...

This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards)


I am working on a project of converting any real number into binary using IEEE 754 format. My first trial is using the bitset library type for conversion of the number  then i can worry about dividing the whole number into sign bit, exponent and mantissa.    int foo; cin >> foo;  bitset<32> my_bit(foo);   As it turns out, bitset will do with signed integers only. How do i include floating point numbers? Can i accomplish my task with another library type that is as fairly simple as bitset?

I want to take a floating point number in C++, like 2.25125, and a int array filled with the binary value that is used to store the float in memory (IEEE 754).  So I could take a number, and end up with a int num[16] array with the binary value of the float: num[0] would be 1 num[1] would be 1 num[2] would be 0 num[3] would be 1 and so on...  Putting an int into an array isn't difficult, just the process of getting the binary value of a float is where I'm stuck. Can you just read the binary in the memory that the float variable? If not, how could I go about doing this in C++?  EDIT: The reason for doing the comparison this way is that I am wanting to learn to do bitwise operations in C++.


Prove that $A \times B = B \times A $ if and only if $A = B \lor A =  \emptyset \lor B = \emptyset $  So, I need to prove that  $$A\times B = B \times A \iff A = B \lor A = \emptyset \lor B = \emptyset$$ It is easy to show the right-to-left implication. The problem begins when I want to show the left-to-right one. I tried using the axiom of extentionality, but that did not work. What kind of trick should I use to prove that the relation from left to right holds as well?

If $A$ and $B$ are nonempty sets, prove that $A \times B = B \times A$ if and only if $A = B$.   Proving the first direction of this is easy. That is, if $A = B$ then it is obvious that $A^2 = A^2$. I am wondering how to prove the other direction now. Maybe proving it by contradiction will be easier than directly.


I've installed a fresh copy of Xubuntu 15.04 and I can't get my Broadband B4311 Wifi card working. I had Ubuntu GNOME 14.04, and I solved the problem using the b43 driver, so I'd already done a lot of tweaking, now neither the b43 driver or the Broadcom proprietary driver works. Is this kernel related? Has anyone had the same problem?

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


When $n$ is a natural number, prove that $\frac{(2n)!}{n!^2}$ is a natural number.  If possible, I would like you to prove this by induction.  I tried to prove this by induction, but I can’t because $k+1$ is left in the denominator when I substitute $k+1$ to $n$.  Help me to solve this.

Prove that $\frac{(2n)!}{(n!)^2}$ is even if $n$ is a positive integer.      For clarity: the denominator is the only part being squared.   My thought process:   The numerator is the product of the first $n$ even numbers and the product of the first $n$ odd numbers.   That is, $(2n!) = (2n)(2n-2)(2n-4)\cdots(2n-1)(2n-3)(2n-5).$ In effect, the product of even numbers can be cancelled out with $n!$ resulting in the following quotient:  $$ \frac{(2^n)(2n-1)(2n-3)}{(n!)}\;.$$  To me this looks even thanks to the powers of $2$. But I am not convinced for some reason.   Was this approach to naive?   Sorry for the poor notation, I don't know any coding languages, my apologies.


In my data set, each individual has two properties, a and b. It seems that a + b is close to 10. Which statistic method could I use to test if this is true?   I really appreciate your help!   Person a   b     1   2   8     2   2   9     3   3   7     4   2   8     5   4   6     6   2   8     7   4   6     8   2   9     9   2   8     10  5   5

I have a correlation matrix of security returns whose determinant is zero. (This is a bit surprising since the sample correlation matrix and the corresponding covariance matrix should theoretically be positive definite.)  My hypothesis is that at least one security is linearly dependent on other securities. Is there a function in R that sequentially tests each column a matrix for linear dependence?  For example, one approach would be to build up a correlation matrix one security at a time and calculate the determinant at each step. When the determinant = 0 then stop as you have identified the security who is a linear combination of other securities.  Any other techniques to identify linear dependence in such a matrix are appreciated.


I have win XP with VPN client version - Cisco 5.0.01.0600  Now we want to replace the WIN XP with linux machine , red-hat version 5.x or 6.x ,  My question is , what the equivalent VPN version that I need to install on the new Linux machine , ( in order to get full compatibility as it was on the WIN xp machine )  Please advice also where I can download the cisco VPN version for linux

Does anyone know of a good VPN client that is not the official one from Cisco for Linux?


I am creating a JavaScript constructor. Consider this example:  function Student(name) {     this.name = name; }  Student.prototype.printName = function(){     console.log(this.name); }  var s = new Student("Eden"); s.printName();   This above code works all well. But I can write the same this way also:  function Student(name) {     this.name = name;      this.printName = function(){         console.log(this.name);     } }  var s = new Student("Eden"); s.printName();   I feel the second method is correct way because printName should be own property of new object not an inherited property. Adding to prototype makes it an inherited property.   Why do developer prefer the first method?

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Let us say that the polynomial is $x^2 + 5$ and the field is $\mathbb F_{25}$. Hereby $ax+b$ denotes any element of $\mathbb F_{25}$ with both $a$ and $b$ in the field $\mathbb F_5$.

We need to construct a field of 25 elements.  By using a result : For a prime p and a monic irreducible polynomial $p(x)$ in $\Bbb F_p [x]$ of degree $n$ , then the ring $(\Bbb F_p [x] / <p(x)>)$ is a field of order $p^{n}$.  So , for the question problem above , we need a irreducible polynomial of degree $2$ in $\Bbb Z_5 [x]$.  Solution says , $x^{2} + x +1$ does our job , since it's irreducible in $\Bbb Z_5 [x]$.  My question : Can't we take $ x^{2} + 2$ , it has no zeroes in $\Bbb Z_5$ , and is irreducible. In every solution I've gone through , the polynomial $x^{2} + x+1$ is taken. Can't we consider $ x^{2} + 2$ ?


Recently I heard from a senior student that the celebrated adaBoost  was originally rejected by a conference.   Are there any other instances of seminal papers (in any field) which initially could not warrant a publication?

If I am not wrong, turbo codes was submitted to the ICC conference and rejected but accepted later on.  I want to know if there are other similar works (strong works) that were rejected at first but then accepted and considered revolutionary.


Can there be a continuous non-constant function with only rational values defined on an interval in R?           Or is the whole property meaningless?

Let $f\colon[0,1]\to\mathbb{R}$ be continuous such that $f(x)\in\mathbb{Q}$ for any $x\in[0,1]$. Intuitively I feel that $f$ is constant, since $\mathbb{Q}$ is dense in $\mathbb{R}$.  How can I formally write this down?


This problem asks to explain why the method used is overcounting or undercounting cards in a 7-card poker hand that contains at least two 3-of-a-kind (3-of-a-kind means three cards of the same rank) and calculate the correct probability.For example, this would be a valid hand: ace of hearts, ace of diamonds, ace of spaces, 7 of clubs, 7 of spades, 7 of hearts and queen of clubs. (Note that a hand consisting of all 4 aces and three of the 7s is also valid.). The $P_1(E)$ answer is given and basically we have to refute it. My answer is that the correct answer is $P_2(E)$ but cannot really grasp why the first one is wrong and if it is overcounting or undercounting cards. $P_1(E) = \frac{{13\choose 2}{4\choose 3}{4\choose 3}{46\choose 1}}{{52\choose 7}}$ or $P_2(E) = \frac{{13\choose 1}{4\choose 3}{12\choose 1}{4\choose 3}{46\choose 1}}{{52\choose 7}}$ . Any explanations on this would be really helpful.

What is wrong with my method of find the probability of a 2 pair?  For the first card we have 52 choices, one this is picked( call it A) we have 3 choices(different suite than A but this same value) for the second card, ( lets call this card B). Now we have AB, to we have to throw away 2 more cards so we don't have 3 of a kind or a four of a kind. Therefore one our third card we have 48 choices and on our fourth card we have 3 choices again similar to above.  On our last card we only have 44 choices left. So the probablity of getting a 2 pair should be (52*3*48*3*44)/(52 choose 5).  But this isn't correct.     Note: I edited this to "2 pair"; the original version was wrong.


Intuitively this makes sense but I don't know how to formally show that this is true. I tried using induction but that got me nowhere .

Show that if $n \geq 0$ and $x>0$, then   $$ e^x > 1 + x + \frac{x^2}{2!} + \dots + \frac{x^n}{n!}.$$  Not sure where to get started with this induction proof.


From the standpoint of the mathematical framework behind Lagrangians and their corresponding action, is there a method to invert the process?   If not, is this an open question or is there some aspect of the formalism that does not allow this?

We see variational principles coming into play in different places such as Classical Mechanics (Hamilton's principle which gives rise to the Euler-Lagrange equations), Optics (in the form of Fermat's principle) and even General Relativity (we get Einstein's equation from the Einstein-Hilbert action). However, how do we explain this very principle, i.e., more mathematically, I want to ask the following:      If I am given a set of generalized positions and velocities, say, $\{q_{i}, \dot{q}_{i}\}$, which describes a classical system with known dynamics (equations of motion), then, how do I rigorously show that there always exists an action functional $A$, where    $$A ~=~ \int L(q_{i}, \dot{q}_{i})dt,$$    such that $\delta A = 0$ gives the correct equations of motion and trajectory of the system?    I presume historically, the motivation came from Optics: i.e., light rays travel along a path where $S = \int_{A}^{B} n ds$ is minimized (or at least stationary). (Here, $ds$ is the differential element along the path). I don't mind some symplectic geometry talk if that is needed at all.


Now, i just heard that the particle anti particle pairs that zip in and out of existence every planck second both have positive mass. if that is so, how does hawking radiation work? black holes lose mass when the particle with negative mass falls into the black hole and cancels out some of the positive mass in it? but, if both particles are positive, the black hole should gain mass instead of losing it. what exactly is going on here?

I was reading Brian Greene's "Hidden Reality" and came to the part about Hawking Radiation. Quantum jitters that occur near the event horizon of a black hole, which create both positive-energy particles and negative-energy particles, produce the so-called Hawking radiation. However, I do not understand why only the negative-energy particles are being absorbed into the black hole, while the positive-energy particles shoot outward. Shouldn't there be 50/50 chance that each type of particle is being absorbed by the black hole? Also, the book mentions that a negative-energy particle would appear to an observer inside the black hole as positive. Why?


I have to rotate a portion of a sector of the circle at an angle θ and then move the region along the tangent for a distance 'lateral offset' as given in the following image.  I used the below logic:  Rotate the tangent point at angle θ. Calculate start and end angle of the sector using the width of the sector. Translate the the center of the circle with lateral offset in the direction of our target point Apply start and end angles from the new center point to filter out the translated sector region.  The idea is to move the center of the circle parallel to the tangent to identify the translated sector points. Is this approach correct? Is there any other optimal way to solve this problem?

We have to rotate a rectangle along the circle at an angle $\theta$ and then move the rectangle along the tangent for a distance 'lateral offset' as given in the following image  I calculated the lateral offset factors to be applied on the rectangle (after rotating it) coordinates as given below. Reference -          Slope = tan(θ);         SlopeLateralOffset = -1.0 / Slope;         LateralOffsetTranslationFactor = LateralOffset / sqrt(1.0 + SlopeLateralOffset  * SlopeLateralOffset);          LateralOffsetTranslationX = LateralOffsetTranslationFactor ;         LateralOffsetTranslationY = SlopeLateralOffset  * LateralOffsetTranslationFactor ;  Is the logic that I applied correct? I think that the formula SlopeLateralOffset = -1.0 / Slope, will not work always as I cannot form a right triangle with radius r and lateral offset What changes should I make it to work? Can you please help me?


I'm trying to understand what exactly this power circuit is doing. The schematic below shows 5V in from USB. It is run through a fuse, and then there's some tricky PNP transistor stuff happening I can't sort out with the DMMT5401. I don't understand the interaction it is having with the P-channel MOSFET DMG2305UX.  Since its a ptype MOSFET, then I think the DMMT is cutting off the flow of 5V using C2 under a certain circumstance. I don't know what circumstances can be derived from E1 (the 5V in) and E2 (the 5V destination) though.   Associated datasheets are shared here:   Schematic here:   The 5V eventually runs out to a DC/DC converter PAM2306AYPKE which provides 1V8 and 3V3 to a device.  What I don't understand is the role of the Transistor and MOSFET in the first place. Why not just use the 5V from the fuse? Secondly, since is does exist, how does the transistor work together with the MOSFET?  (My question may derive from a hard time understanding P type devices, and the fact that this is a paired transistor, and it's modulating the performance of yet another P type device.)

The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board.  They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse.  I understand why this is the recommendation, but I'd like to understand more about how this circuit works.  I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors.  What are they doing for this circuit?  Also, is this primarily using the body diode?  In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application?  In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.


I am using sharelatex aps journal template to write a paper.      \documentclass[%  reprint, %superscriptaddress, %groupedaddress, %unsortedaddress, %runinaddress, %frontmatterverbose,  %preprint, %showpacs,preprintnumbers, %nofootinbib, %nobibnotes, %bibnotes,  amsmath,amssymb,  aps, %pra, %prb, %rmp, %prstab, %prstper, %floatfix, ]{revtex4-1}  \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math %\usepackage{hyperref}% add hypertext capabilities %\usepackage[mathlines]{lineno}% Enable numbering of text and display math %\linenumbers\relax % Commence numbering lines  %\usepackage[showframe,%Uncomment any one of the following lines to test  %%scale=0.7, marginratio={1:1, 2:3}, ignoreall,% default settings %%text={7in,10in},centering, %%margin=1.5in, %%total={6.5in,8.75in}, top=1.2in, left=0.9in, includefoot, %%height=10in,a5paper,hmargin={3cm,0.8in}, %]{geometry}  \begin{document}  \preprint{APS/123-QED}  \title{Exact Solutions of Einstein's Field Equations in TOV Formulations}% Force line breaks with \\   \author{U.A. Mofiz*}  \author{Tazkera Haque}%  \affiliation{Plasma Astrophysics Laboratory}% \affiliation{Department of Mathematics and Natural Sciences, BRAC University}%  \affiliation{66 Mohakhali, Dhaka-1212, bangladesh}%  \affiliation{Email:mofiz@bracu.ac.bd}%  \end{document}    the output creates an "and" before the email address. Without using affiliation multiple times, how to write things in one place?

I am using sharelatex aps journal template to write a paper.   \documentclass[%  reprint, %superscriptaddress, %groupedaddress, %unsortedaddress, %runinaddress, %frontmatterverbose,  %preprint, %showpacs,preprintnumbers, %nofootinbib, %nobibnotes, %bibnotes,  amsmath,amssymb,  aps, %pra, %prb, %rmp, %prstab, %prstper, %floatfix, ]{revtex4-1}  \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math %\usepackage{hyperref}% add hypertext capabilities %\usepackage[mathlines]{lineno}% Enable numbering of text and display math %\linenumbers\relax % Commence numbering lines  %\usepackage[showframe,%Uncomment any one of the following lines to test  %%scale=0.7, marginratio={1:1, 2:3}, ignoreall,% default settings %%text={7in,10in},centering, %%margin=1.5in, %%total={6.5in,8.75in}, top=1.2in, left=0.9in, includefoot, %%height=10in,a5paper,hmargin={3cm,0.8in}, %]{geometry}  \begin{document}  \preprint{APS/123-QED}  \title{Exact Solutions of Einstein's Field Equations in TOV Formulations}% Force line breaks with \\   \author{U.A. X*}  \author{Y Hauqe}%  \affiliation{Plasma Astrophysics Laboratory}% \affiliation{Department of Mathematics and Natural Sciences, Z University}%  \affiliation{66 Mohakhali, Z-1212, D}%  \affiliation{Email:mofiz@bracu.ac.bd}%  \maketitle  \end{document}    I wish to erase that "and" before email address. how can I do it without using affiliation multiple times?


I'm trying to compile a file with a shared library using the following command:  g++ -L. -lsubmit main.cpp   It outputs:  /tmp/ccRFpx1v.o: In function `main': main.cpp:(.text+0x5): undefined reference to `Submit_test()' collect2: error: ld returned 1 exit status   I have main.cpp and libsubmit.so in working directory. Here's my main.cpp  void Submit_test(); int main() {     Submit_test(); }   Here's nm -D --demangle libsubmit.so:  ... 0000000000000e0e T Submit_test() ...   How should I compile that code?

Why does the order in which libraries are linked sometimes cause errors in GCC?


I have Ubuntu 20.04 and I have a text document file at my desktop. When I double click it, this error is displayed:  So I tried unchecking Allow executing file as a program.  This solved my issue, but I noticed that this setting is applied to all text documents on my laptop. How can I save this setting for this specific text file only?

Is there any way to create a text file without using the terminal at all?


Users,  i am new to LaTeX and i found something that is really strage.  When i create a PDF from the following code, the text is not vectorized while formulas and tables are. I am using MiKTeX 2.9, TeXMaker 4.3 on a Windows 7 Notebook. To view the PDF i am using Acrobat Reader.   \documentclass[12pt,a4paper]{scrartcl}  % language \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} % font \usepackage[T1]{fontenc} % math \usepackage{amsmath} \usepackage{amssymb} \usepackage{etoolbox} \usepackage{geometry} \usepackage{graphicx} \usepackage{subcaption}  \geometry{a4paper,left=25mm,right=25mm, top=2cm, bottom=2cm}   \title{Testpage} \author{Max Mueller} \date{11.09.2014}  % begin of printed stuff \begin{document}  %\tableofcontents  %Überkapitel %\part{Name of Part} %\chapter{Name of Chapter} \section{Abc abc abc} \subsection{Abc abc abc} Text is not vectorized ... but formulas and tables are vectorized $ \exp{ix} = \cos{x} + i\sin{x}$ \end{document}   Thank you for your suggestions :).

I use MikTeX as my compiler for Windows. The problem is that it uses Type3 (raster) fonts even though I've stated:  \usepackage[T1]{fontenc}   in the preamble.  As far as I've understood, this will force the compiler to use vector fonts instead.  Have I misunderstood something? Can I reconfigure my installation to always use vector fonts?


We have a set of communities where unauthenticated users are submitting forms, and we want to set trace flags for the behavior done by these users, i.e. we want to observe what the guest users are doing in the logs.   For some time, we had logs being created properly using the method in this post:   However - we deployed some small patches to the org, and logs are no longer being printed for the guest user.   Steps we've taken to attempt to fix:    deleted and recreated the trace for the guest user flushed all existing debug logs through the tooling api deleted and recreated the sharing settings that allow our user records to view the guest user's user record   Looking for anyone that has experienced this before, or has any advice on things to try,

Normally, you can put debug monitoring on a user by name to see the details on the error they're getting (especially for the non-descript Error Loading a Visualforce Page).  But when you are trying to debug a site page, how do you get a debug log for the guest user?  Update  As of Spring '18 Salesforce has dropped the requirement to include the debug_logs cookie to get debug logs for the force.com site requests.     In Winter ’17, we introduced a change that required guest users to set   browser cookies to activate debug logging. We had the best of   intentions: All your public site visitors share one guest user   license. Thus, when you enable logging for the guest user, the   visitors’ collective activities can fill your debug logs quickly,   hitting the log-size limit and causing log truncation. Sadly, people   didn’t like the Winter ’17 change. Setting cookies is complicated, and   the change made collecting debug logs for public users’ asynchronous   activity impossible. We’ve seen the error of our ways. Your public   users no longer need a debug_logs browser cookie to trigger logging.   This change applies to both Lightning Experience and Salesforce   Classic.


I'mm trying to prove that with Lagrange sentence,  $F(x)= \tan(x)$  $G(x)= x$  I was trying to show that for any $x\in(0,π/2)$, $F'(x)=G'(X)$.  Then according to Lagrange: $G(X) = C\cdot F(X)$ which means that $F(X)\lt G(X)$ for any $x\in(0,π/2)$.

In proof of $\displaystyle\lim_{x\rightarrow0}\frac{\sin{x}}{x}=1$ is assumed that $\sin{x}\leq{x}\leq\tan{x}$ while $0<x<\frac{\pi}{2}$. First comparison is clear, arc length must be greater than sine value, but how about $x\leq\tan{x}$, why tangent is longer than arc?


I have a complex custom object like public class MySortedObject {   private static class Employee {         public String name;         public String ssn;                  public Employee(String name, String ssn) {             super();             this.name = name;             this.ssn = ssn;         }     }  public static void main(String[] args) {          Map<Integer, List<Employee>> map = new HashMap<>();          Employee empl1 = new Employee("XYZ", "22DEC2019");     Employee empl2 = new Employee("ABC", "22DEC2019");                                                          Employee empl3 = new Employee("GHI", "18APR2019");     Employee empl4 = new Employee("DEF", "18APR2019");                                                          Employee empl5 = new Employee("WXY", "15OCT2019");     Employee empl6 = new Employee("JKL", "15OCT2019");          List empList1 = new ArrayList<>();     List empList2 = new ArrayList<>();     List empList3 = new ArrayList<>();          empList1.add(empl1);     empList1.add(empl2);          empList2.add(empl3);     empList2.add(empl4);          empList3.add(empl5);     empList3.add(empl6);          map.put(1, empList1);     map.put(2, empList2);     map.put(3, empList3);  }  My object is a map of <Integer,List>. The list is having objects which contain a value(i.e. ssn). I want to sort my map based on this ssn value. The order of the map should be "1,3 and 2"

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


When I open task scheduler in windows 7 it gives an error saying:    The selected task "{0}" no longer exists. To see the current tasks click refresh.   Then another error comes like this:      Task scheduler service is not available.Task scheduler will attempt to reconnect to it. Then task scheduler shows nothing like this:

When I start my task scheduler on Windows 7 I get a dialog with the following error:     The selected task "{0}" no longer exists.  To see the current tasks,   click Refresh     Also there's a UUID, that is displayed as the name and when I try to delete it I cannot, it just hangs around.  Is there a fix for this?


My HTML input is created in jQuery so no handlers by default comes with it. I am trying to get onproperty change  $('#input').delegate('input propertychange', function() { console.log('Hello World'); });   or   $('#input').on('input propertychange', function() { console.log('Hello World'); });   The expected behavior is that when I type into the input that is generated in jQuery, console.log returns the message. Both examples above don't work, any suggestions?  Thanks!  EDIT:  I generate the input this way:  $('#container').append('<input type="text" id="inputidhere" value=""></input>');

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


! LaTeX Error: File `beamerbasemodes.sty' not found. I have this error in latex. How can I risolve it?

This is about MiKTeX Revision 2.9.6360.  Immediately after the latest MiKTeX update, my Beamer files stopped compiling.  When i tried to compile a file that had been working fine I got a Package installation popup saying:  tex\latex\beamer\beamerbasemodes.sty  Is missing.  It is part of the following package  beamer   So i clicked to have it installed.  All that achieved is that i got an error message  ! LaTeX error: File 'beamerbasemodes.sty' not found   I repeated this a few times with minor changes to the file, and then went to the MiKTeX Package Manager to see what parts of Beamer are installed.  It said none were.  Either the update had removed Beamer, or the attempt to install beamerbasemodes on the fly had done it.  So I reinstalled it by hand.  In fact i did this several times in various ways.  It made one difference.  Sometimes the problem package was identified as  translator.sty  In case it would help, I ran Update FNDB and restarted my machine.  Each time I installed Beamer, the Package Manager then reported that Beamer was installed.    But when I tried to compile the file, the same things happened all over.   And when i went back to the MiKTeX Package Manager it reported Beamer is not installed.   Is Beamer now out of date?  Or is this a problem on the new update?  Is there a simple fix i can use?


here is a small test I ran, to try and move me back to root:  #!/bin/bash pwd cd / pwd   It returns the current working directory, and then the correct new one, but when the script finished executing, I am still in the original directory and haven't moved. Is there any way to achieve this?  Thanks.

I want to run a script to simply change the current working directory:  #!/bin/bash cd web/www/project   But, after I run it, the current pwd remains unchanged! How can I do that?


I'm using spring-boot with SPring data.And just trying to create a simple create of username with hashed password to db via command line.  I'm getting this error and says that my service is null?. As I was looking of how my values are being passed, they seem to be all passing the correct values anyway. I just don't get where and why it says null pointer exception, all the while I my JPA repo save function is receiving the proper attributes.  My Entity is..   @Entity  @EntityScan  public class Users {   @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id;  @Column private String username; @Column private String password;   @Override public String toString() {     return new StringJoiner(", ", Users.class.getSimpleName() + "[", "]")             .add("id=" + id)             .add("username='" + username + "'")             .add("password='" + password + "'")             .toString(); }  public int getId() {     return id; } public void setId(int id) {     this.id = id; } public String getUsername() {     return username; } public void setUsername(String username) {     this.username = username; }  public String getPassword() {     return password; }  public void setPassword(String password) {     this.password = password; } }   And my main class is.  @SpringBootApplication public class HashingexerApplication {      @Autowired     UserService userService;      public static void main(String[] args) {         SpringApplication.run(HashingexerApplication.class, args); //        Scanner input=new Scanner(System.in);         String username, password;         System.out.println("Enter a username: "); //    username = input.nextLine();         username = "josh";         System.out.println("Enter a password: "); //    password = input.nextLine();         password = "pass";         String salt = "_Hello_World";         System.out.println("Password before encryption: " + password);         System.out.println("Salt to be added is: " + salt);         String saltedPass = password + salt;         System.out.println("Unencrypted Salted Password is: " + password + salt);         String passwordEncrypt = BCrypt.hashpw(password, BCrypt.gensalt(12));         System.out.println("Encrypted Salted Password is: " + passwordEncrypt);         Users users = new Users();         users.setId(1);         users.setUsername(username);         users.setPassword(passwordEncrypt);         System.out.println("Object:: " + users);         HashingexerApplication d = new HashingexerApplication();         d.save(users);     }     public String save(Users users) {         System.out.println("method: " + users);         userService.save(users);         return "Done";     } }   Error Details:     Exception in thread "restartedMain"   java.lang.reflect.InvocationTargetException   at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at   org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)   Caused by: java.lang.NullPointerException     at   hashingexer.hashingexer.HashingexerApplication.save(HashingexerApplication.java:61)     at   hashingexer.hashingexer.HashingexerApplication.main(HashingexerApplication.java:51)     ... 5 more

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?


Let $X$ be a metric space. If every infinite subset of $X$ has at least one accumulation point, then $X$ is compact.  Does anyone know how to prove that?

If $(X,d)$ is limit point compact, show it is compact.  I have found multiple proofs of this that first show that limit point compact implies sequential compact, which in turn implies compactness. I was wondering if there is a direct proof showing that limit point compactness implies compactness in a metric space.


So I've got this table  Email                     Username ------------------------- ------------------------- a@a.com                   a1                        a@a.com                   a2                        a@a.com                   a3                        a@a.com                   a4                        b@b.com                   b1                        b@b.com                   b2                        b@b.com                   b3                        b@b.com                   b4                        c@c.com                   c1                        c@c.com                   c2                        c@c.com                   c3                        c@c.com                   c4                         (12 row(s) affected)   But I want each e-mail address to appear once, then all associated Usernames to be listed after it, if that's possible..  Any help whatsoever is appreciated,  Cheers.  Edit  Ok, so apparently, all the usernames will come under one column, all concatenated together, sounds kinda dumb, but that's what I've been asked for.  The output I want would be  Email                     Username ------------------------- ------------------------- a@a.com                   a1, a2, a3, a4 b@b.com                   b1, b2, b3, b4  c@c.com                   c1, c2, c3, c4  d@d.com                   d1, d2, d3, d4

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


I can't log in into Minecraft because it says 'invalid username or password'.  What can I do?

We just got a new laptop (ASUS) though we did have a mac.  We are trying to log onto Mojang to download Minecraft and it keeps saying, "The username and password are not recognized."   We have done all the usual procedures; we have reset the password, we are using the email, not the username to sign in, and it looks like the minecraft login servers are working etc. etc.  We quit Minecraft on the old computer and shut off that computer thinking that was the issue.   Still, we can't get onto Mojang.  We are accessing mincraft through firefox and trying to download it to the new computer but we can't get into the account to do that!  What in the world could be the issue?


Can someone please suggest me on how can I replace my android phone os with Ubuntu?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I understand that calling new in C++ is equivalent to calling malloc in C, and the pointer returned by the malloc function can be freed when free is called. Array obtained by calling 'new' int[length] are stored in heap. However, what if a static array such as int x[3] = {1,2,3}; was declared? Where will such an array be stored at? Stack?

In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision? For example:   foo.c:                         bar.c: static int foo = 1;            static int foo = 10; void fooTest() {               void barTest() {   static int bar = 2;            static int bar = 20;   foo++;                         foo++;   bar++;                         bar++;   printf("%d,%d", foo, bar);     printf("%d, %d", foo, bar); }                              }   If I compile both files and link it to a main that calls fooTest() and barTest repeatedly, the printf statements increment independently.  Makes sense since the foo and bar variables are local to the translation unit.  But where is the storage allocated?  To be clear, the assumption is that you have a toolchain that would output a file in ELF format.  Thus, I believe that there has to be some space reserved in the executable file for those static variables. For discussion purposes, lets assume we use the GCC toolchain.


$E$ is a splitting field of $f(x)=x^3-3x+1$ over $\mathbb Q$.Then determine the group $G(\frac {E}{\mathbb Q})$  MY try : Actually I don't Know how to relate splitting field to group,But I found something like $Gal(E/\mathbb{Q}) \simeq S_3$

The polynomial $f(x) = x^3 -3x + 1$  is irreducible, and I'm trying to find the splitting field of the polynomial.  We've been given the hint by our lecturer to allow an arbitrary $\alpha$ to be a root and then to check that $\alpha$ is a root, then $2-\alpha^2$ is also root. I've done this with no problem.  My issue is since this is a polynomial of degree $3$, there must be another root that is somehow related to $\alpha$ so that I can create the splitting field and in turn the Galois group of my polynomial but I have no idea what this last root could be.


I have a Samsung Series 7 Ultra laptop with the latest update to Windows 8.1. I am using an additional digital monitor with the same nominal resolution (1080p) as the laptop, but much larger in size (13'' laptop vs 22'' external monitor). The two screens are set up to "Extend these displays", meaning that my desktop spans both of them showing different content.  I am aware of two option for controlling the size of elements on the screen:    Choose one scaling level for all my displays Let the system scale displays while maintaining the physical size of on-screen elements (thereby changing their nominal pixel resolution when I move them from one screen to another)   If I choose option 1, I am able to specify a scaling level but item appear either two small or two big on one of the two monitors. I have no way to change the ratio of the scaling factor between the two screens.  If I choose option 2, I can specify how large item appear for both, but again I have no control over the ratio of the scaling factors for the two monitors. While the auto-selected ratio provides for similar size of elements on the two screens, it results in visibly blurry text in most software on one or both screens.  A similar question was asked several moths ago:   However, there has been at least one major update to Windows 8.1 since, targeting screen scaling among other things (Windows 8.1 Update for x64-based Systems -- KB2919355).  My question following this update is:  Is it now possible on Windows 8.1 with KB2919355 installed, via the GUI or registry, to directly specify percent scaling separately for each attached monitor?

One of the new features in Windows 8.1 is the new "Desktop display scaling", which allows user to configure scaling per monitor. I've been trying to get this working in preview but with no success. If I configure the scaling, it always affects all of my monitors.  I have two monitors, the main one with a higher resolution and the secondary with "normal" resolution. The secondary monitor is used in portrait mode. I would like to configure the main monitor's scaling as the text is currently too small.  Here's how things look at the configuration screen by default:    Now if I adjust the scaling, click apply and do relogin, everything is bigger. On both of my monitors. I haven't clicked the "Let me choose one scaling level for all my displays", but still the slider seems to affect both of them.  If I check the "Let me choose one scaling level", the UI changes to look similar to what we have in Windows 8:    Still the problem persists. The scaling is applied to both of my monitors. So, it doesn't matter if I check the box or not, the scaling is always applied to all the displays.  Any idea how I could get this to work in Windows 8.1? I've read some comments which seem to indicate that this should work, though  that he either didn't get this to work.


I'm new to Ubuntu and Linux in general and coming from Windows I was wondering how to upgrade Ubuntu from one version to another. A new version is released each six months, right? So let's say I'm now running 13.04. When 13.10 will be released in october, how will I upgrade my system?  Will I have to reinstall my whole Linux, loosing all my programs or is there a way to simply replace 13.04 by 13.10?

How can I safely upgrade an Ubuntu installation from one release to another? What should I do before upgrading to ensure it goes smoothly, and is there any clean-up I need to do afterwards?  In particular, do I need to do anything special if I am using packages from PPAs, if I have a graphics card that needs drivers, or if I'm running a custom Linux kernel?  This is a general question , but as example we take Ubuntu 12.04 and Ubuntu 12.10


I am trying to learn Java. The Eric Roberts text, "The Art and Science of Java" has a programming assignment where we simulate a flight booking console. I wanted to 'class it up' by using a City class where just a City String would do. It only has one field, name, which is a String, but I am trying to learn how to use classes.  Anyway, so then I had to override the equals method in the City class to avoid getting duplicates. So then I had to override the hashCode method.  Now my HashMap<City,ArrayList<Flight>> isn't working. It can't find certain values and it still permits duplicate keys.  My City equals and hashCode overrides are as follows. Can anybody see why my HashMap is going wrong?  /* (non-Javadoc)  * @see java.lang.Object#equals(java.lang.Object)  */ @Override public boolean equals(Object that) {     // TODO Auto-generated method stub     if ( this == that ) return true;     if ( !( that instanceof City) ) return false;     City aThat = (City) that;     return (name == aThat.name ); }  @Override public int hashCode() {     // TODO Auto-generated method stub     return name.hashCode(); }

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?


I work in Finland for a Finnish company. Due to covid, I work remotely all the time. Given this situation, I would like to work from another Schengen country for couple of weeks. What are the laws that allow or ban me from working couple of weeks from another Schengen country? Edit: I'm a non-EU national and I have a resident permit A.

I'm currently working in Canada as a Canadian citizen and planning on travelling to a few places in Europe for six weeks.  I am also going to continue working remotely full time.  Is there any legal problems with this that I should know about?   Do I need to apply for a visa or is six weeks a small enough time that it's not necessary?  The countries I'm planning on visiting are:  Greece, Croatia, Hungary, Czech Republic, and Germany.  Though I might cut one or two of these to simplify things a bit


I am currently having some trouble on display errors. When an error occurs, it is called from a method in another class.  public void foomethod(Foo foo, Fuu fuu) {     if(foo.getMethod() == 0) {          if(engine.placeMethod(foo, fuu) == true) {             foo_view.removeCurrentError();             engine.rollFoo(foo, frame.getInitialDelay(), frame.getFinalDelay(), frame.getDelayIncrement());         }         else {             foo.placeMethod(0);         }     }     else {          foo_view.displayCurrentError("Foo has already placed a method");      }    }   And this is the thread  @Override public void actionPerformed(ActionEvent e) {     new Thread() {         @Override         public void run() {             try {                 int fuu = Integer.parseInt(frame.getGameView().getFooView().getMethod());                 Foo bet_foo = frame.getGameView().getFooView().getFoo();                 foomethod(bet_foo, fuu);             } catch (NumberFormatException excpetion) {                 System.err.println("fuu is not an integer");             }                    }     }.start();   }   The error it displays is  Exception in thread "Thread-3" java.lang.NullPointerException at controller.FooListener.rollFooDice(FooListener.java:31) <-- this is foo_view.removeCurrentError(); at controller.FooListener$1.run(FooListener.java:57) <-- this is .start();   The problem is when I call foo_view.removeCurrentError(); the error shows up and the error display shows the same exception.

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?


Problem: Let $R$ be a ring with $1$ and $e\in R$ such that $e^2=e$. If $R$ is finite and does not contain any nonzero nilpotent element then show that $Re=eRe$.  I think I solved the problem yet I do not use the finiteness of $R$. Thus, I doubt that my solution might be wrong.  Solution:   Claim 1:  $R=ker(f)\oplus im(f)$ where $f$ is a homomorphism (with respect to $+$) from $R$ to $eR$ by $f(r)=er$.  For any $r\in R$, we can write $r=(r-er)+er$ where $r-er\in ker(f)$ and $er\in im(f)$. Thus, clearly we have $R=ker(f)+ im(f)$. Now let $k\in ker(f)\cap im(f)$ then $k=ex$ for some $x\in R$ and $ek=0$.  $$0=ek=eex=ex=k.$$  Thus the sum is direct as claimed.  Claim 2: Set $K=\{r-er \mid r\in R\}$. Then $K=ker(f)$.  Note that $K\leq ker(f)$ as $r-er\in ker(f)$ for each $r\in R$. Thus, the sum $K+im(f)$ is also direct. On the other hand, $r=(r-er)+er$ for all $r\in R$, and hence $R=K\oplus im(f)$.  Now pick $x\in ker(f)$. Then $x=k+i$ where $k\in K$ and $i\in im(f)$. Then $i=x-k\in ker(f)$, and hence $i=0$. We obtain $x=k$ and $ker(f)=K$ as desired.  Claim 3: $eR=eRe$.  We have $R=ker(f)\oplus eR$, and hence $Re=ker(f)e\oplus eRe$.  Pick $t\in ker(f)e$ then $t=re-ere$ for some $r\in R$.  $$t^2=((re)^2-re^2re-erere+ere^2re)=0$$  and hence $t=0$ by hypothesis. Then $ker(f)e=0$, and $Re=eRe$ as desired. Similarly, we would have $eR=eRe$.

Reading the class notes I stumbled upon an unproved lemma that I am having issues proving.  The lemma is, if $R$ is a ring with no non-zero nilpotent elements and $e$ is idempotent then $e$ is central.  In other words, if $e$ is idempotent in such a ring, then $ex=xe$ for all $x\in R$.  I am however not sure how to actually prove the statement.  So far I have been playing around trying to find polynomials that can be factored into linear identical factors (e.g (x+e)^2) to see if I can make them be zero by converting an $e^k$ coefficient into $e$.  But something isn't fully clicking about this lemma.


How to upgrade xubuntu 14.04 LTS to xubuntu 16.04? I don't want to lose my application data.

Question is about Ubuntu release process. Are migrations from n to n+1 releases expected?  Assuming we have server with installed Ubuntu 14.04 LTS. Will it be smoothly upgradable to Ubuntu 16.04 LTS via apt-get upgrade ?  Assumptions:   scope is software therefore we assume that given hardware is supported on both releases (upgrading from and to) that's why, always before upgrade you are asked to make backup to be able to revert in case of failure


sorry if this been asked already...  Why and when Should I use linked lists over vectors? I just don't like all those pointer overheads...  From my knowledge: vector is faster, more compact because there's no extra pointers, and is easier to implement; also I think that linked lists do not exploit the principle of spatial locality because nodes are in totally random memory locations so your code becomes slower... so when you are using linked lists you are increasing your cache misses which you don't want to do...  Of course the advantage of lists is that you can avoid overflows with dynamic memory allocation...  In summation, my question is: where should you use, if ever, linked lists over vectors? which data struct do you prefer more?

I use a lot of lists and arrays but I have yet to come across a scenario in which the array list couldn't be used just as easily as, if not easier than, the linked list.  I was hoping someone could give me some examples of when the linked list is notably better.


Nina: Ky, look at this photo! It's of a dinner my parents went to called 'Dinner in the Sky'. Ky: Cool! The restaurant is so high above the ground!  What does this OF a dinner mean? Can I say 'It's a dinner my ...'? Is there any difference if OF added?

In facebook, in the photos page, you will see:    I know the difference in facebook, the first tag "Photos of Someone" will show photos you are tagged in, the other tag "Someone's Photos" will show the photos you uploaded.   Is there a difference in English between "Someone's Photos" and "Photos of Someone"? or was facebook out of words so they just used this?


Please note, similar question to this particular one is Not present here already. But different ones present. So posting the question for suggestions. Its for removing the Duplicates from Individual List item from the Nested List and preserving the order. Please see below question for more details and suggest. list_1 = [['A1', 'B1', 'A1'],           ['A2', 'B2', 'B2'],           ['A3', 'B3', 'C3']]  First item in list_1 has 2 'A1's and Second item has 2 'B2's and no dupes in Third item. So need to eliminate the dupes from First & Second items and also order needs to be preserved. Expected output list as below: list_op = [['A1', 'B1'],            ['A2', 'B2'],            ['A3', 'B3', 'C3']]  Note: Below solution is removing the Dupes as required from Nested List, but Not preserving the order within Individual List items, after dupes removal. [list(set(sub_list)) for sub_list in list_1]

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


well title says all most everything. I am using ubuntu 12.10. Installed using windows installer. Is there anyway to upgrade it? Any how much data i will lose? I have installed some softwares and there is some docs.

I am using Ubuntu 12.10.  Please outline the different ways I can upgrade to 13.04.


Also do I need to test the normality for the categorical data?  Thanks

I'm examining a part of my dataset containing 46840 double values ranging from 1 to 1690 grouped in two groups. In order to analyze the differences between these groups I started by examining the distribution of the values in order to pick the right test.  Following a guide on testing for normality, I did a qqplot, histogram & boxplot.       This doesn't seem to be a normal distribution. Since the guide states somewhat correctly that a purely graphical examination isn't sufficient I also want to test the distribution for normality.   Considering the size of the dataset and the limitation of the shapiro-wilks test in R , how should the given distribution be tested for normality and considering the size of the dataset, is this even reliable? ()  Edit:  The limitation of the Shapiro-Wilk test I'm referring to is that the dataset to be tested is limited to 5000 points.  To cite  concerning this topic:     An additional issue with the Shapiro-Wilk's test is that when you feed   it more data, the chances of the null hypothesis being rejected   becomes larger. So what happens is that for large amounts of data even   very small deviations from normality can be detected, leading to   rejection of the null hypothesis event hough for practical purposes   the data is more than normal enough.      [...] Luckily shapiro.test protects the user from the above described   effect by limiting the data size to 5000.   As to why I am testing for normal distribution in the first place:  Some hypothesis tests assume normal distribution of the data. I want to know whether or not I can use these tests.


Is this right?  How do I show ownership by the group of three of us?

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


If i do cat /proc/asound/cards it lists all the sound card details from where proc gets this information.This file is continuously updating what if i want to make a manual entry

How frequently is the proc file system updated on Linux? Is it 20 milliseconds (time quantum)?


Running Debian, when transferring files from the server to my pc, the transfer is suddenly interrupted. Some smaller files (couple of MB) seem to work most of the time, but bigger files mostly fail at random points. After the transfer fails, the entire TCP/IP stack seems to be out on the server, even ping doesn't work anymore (every host is unreachable).   I tried the follwing: - Connecting my PC directly to the server, ruling out errors with switches etc in between. - Trying different client pc's, ruling out a problem with the client pc - Trying different files from different hard drives on the server, ruling out hard disk issues - Trying different protocols (ftp, scp, smb), ruling out a problem with a specific protocol or server  The problem appeared in any of the above configurations. So I'm leaning towards either a software issue are a hardware issue with the NIC. However, syslog and dmesg doesn't indicate any problems. Ethtool results also seem normal...  I'm really out of ideas on what's broken and how to proceed...

I'm looking for advice on diagnosing ethernet connectivity issues under Linux. I suspect it's a hardware issue, though I am not entirely sure. It's an nVidia chipset and ethernet adapter.  The device shows up when I run lspci and the forcedeth driver has been loaded.  I have assigned a static IP address and specified the gateway (router) IP address. However, -when I ping the router, I get no response. Using the same setup but with a USB->ethernet adapter, everything works as it should. This is why I think it's a problem with the port.  Do I just have to assume it's a hardware problem or are there some more diagnostics I can perform? I am particularly interested in tools which give more detailed information about the state of the hardware, if such things exist.


I just downloaded Linux type WPS Office from WPS Community. After I downloaded it, I opened it using the software center, then I clicked the install button but nothing works. This problem also happens in some cases (updating Firefox)

How do I install a .deb file via the command line?