Why is the density of a certain point in an exponential distribution not equal to zero acc. to R?

Answer: A probability is an integral of a pmf/pdf. The dexp function does not yield said integral. Thus, the question is wrong at the outset, since the density is not supposed to be zero at a point in a cont. distribution. The probability — the integral — should, which it of course is. $$\int_{{\color{blue}x}}^{{\color{blue}x}} f(x) = 0$$  I am working through  video where the "author"  the probability of someone arriving in exactly 15 minutes when one person arrives on average every 20 minutes is 0. That is, so he explains, because the exponential distribution is continuous. Thus, at any individual point the density is equal to zero. However, when I enter dexp(15, 1/20) into R I get 0.02361833. My question is now: Why is R producing this result instead of returning 0? Or alternatively: Is it wrong that the probability of a single value of a exponential distribution, $P_{exp}(X = x)$, is zero?


Is there a simple description for $\sum_{n=1}^{\infty}\frac{1}{p_n} \to \infty$?

Let $p_n$ the $n^\text{th}$ prime number.  I mean $p_1=2,p_2=3,p_3=5,...$ now consider this series $\displaystyle \sum_{n=1}^{\infty}\frac{1}{p_n}=\frac12+\frac13+\frac15+\frac17+... $  I know $\displaystyle \sum_{n=1}^{\infty}\frac{1}{n} \to \infty$ (harmonic series)  now I am looking for a simple proof to  show $$\sum_{n=1}^{\infty}\frac{1}{p_n}=\frac12+\frac13+\frac15+\frac17+... \to \infty$$ thanks in advance.


event is not defined in mozilla firefox for javascript function?

function onlyNumeric() {        if (event.keyCode < 48 || event.keyCode > 57) {         event.returnValue = false;      }  }  onkeypress=onlyNumneric();   In IE, this code is working fine. However, in Mozilla Firefox, the event is an undefined error.


Summing polygon area by category using QGIS

I have a vector layer of habitats. Each feature belongs to a category and has its area calculated. I'm trying to find out the total area of each type of habitat.  I've looked at QGIS "Statistics by categories" which gives everything but the Sum of each category.  The GroupStats plugin looks like it would do it, but I can't get the "calculate" button to activate.  I'm new to QGIS tools/scripts etc but happy to try to modify an existing tool but haven't yet found where they are or how to do this.


Use Green's Theorem to compute the value of the line integral $\int_{\gamma}ydx + x^2dy$, where $\gamma$ is the circle given by $g(t) = (\cos t, \sin t), 0 \leq t \leq 2\pi$   I have   $$\begin{align} \int_{\gamma} Fdx + Gdy = \int_{0}^{2\pi}(\sin t + \cos^2 t)dt = \bigg[\cos t - \sin^2t \bigg]_{0}^{2\pi} = (1-0) - (1-0) = 0 \end{align}$$  I get my answer as 0, but my textbook says the answer is $-\pi$.     I don't think I used the fact that $\gamma$ is a circle correctly, but not really sure what went wrong. Any help would be appreciated, thanks


I have following type  public class Parameter {    public string Name {get;set;}    public string PathType {get;set;} }   My parameter list like:  List<Parameter> params = new List<Parameter>(); params.Add(new Parameter{ Name ="A", PathType ="path" }); params.Add(new Parameter{ Name ="B", PathType ="query" }); params.Add(new Parameter{ Name ="C", PathType ="path" }); params.Add(new Parameter{ Name ="C", PathType ="query" }); params.Add(new Parameter{ Name ="D", PathType ="path" }); params.Add(new Parameter{ Name ="D", PathType ="query" }); params.Add(new Parameter{ Name ="D", PathType ="body" });   I need to find parameters that have the same Name (like: C and D) where PathType equals path and query. Sorry for my English, it is a little bit difficult to explain. I want to find   Name ="C", PathType ="path"  Name ="C", PathType ="query"  Name ="D", PathType ="path"  Name ="D", PathType ="query"   Then remove all where PathType = "query". Finally result should be  Name ="A", PathType ="path"  Name ="B", PathType ="query" Name ="C", PathType ="path"  Name ="D", PathType ="path"  Name ="D", PathType ="body"    My code  var groupedParams = params.GroupBy(a => a.Name, StringComparer.InvariantCultureIgnoreCase).ToDictionary(t => t.Key); foreach (var parameter in params) {     if (groupedParams.ContainsKey(parameter.Name)) {         var temp = groupedParams[parameter.Name];         if (temp.Count(x => x.PathType.ToLower() == "path") == 1 && temp.Count(x => x.PathType.ToLower() == "query") == 1) {             params.Remove(parameter);         }     } }   I need to group by name but remove only when there are path and query for that name. Please suggest how can I do in in other way? Thanks


Java shallow copy, not working as expected

This is probably very trivial to many of you, but I could not find the answer to it. Thanks in advance for any help.   In short, I shallow copy a list, then modify one of its elements, but the change is not reflected in the other list, despite almost every resource saying that they are just two references to the same object, and any change in one should be reflected in the other one.  P.S. I have already checked out questions like  that clarify the differences b/w shallow and deep copy. My question is why despite those theories, sometimes shallow-copy behaves like deep-copy.      List<Integer> lst1 = new ArrayList<>();     lst1.add(2);     lst1.add(6);     lst1.add(1);     lst1.add(4);     lst1.add(9);     lst1.add(5);      List<Integer> lst2 = new ArrayList<>(lst1);     lst1.set(0, 3);      System.out.println("lst1 = " + lst1);     System.out.println("lst2 = " + lst2);   result:  lst1 = [3, 6, 1, 4, 9, 5]  lst2 = [2, 6, 1, 4, 9, 5]


Novel about alien conquerers who conduct games to select servants

I read this maybe 10-15 years ago.   Aliens have conquered earth. Possibly quite some time before the time then novel is set in. They have built their own cities. They conduct periodic athletic competitions for humans similar to the current olympics. The winners are take into the city to act as servants to the masters. The protagonist is part of a human resistance movement who is competing in the games. The plan is to infiltrate the city, gather intel and escape. He wins, get in, finally has to kill his master and escape down a waste disposal system which ends up outside the city.   Anybody knows which one I am talking about?


How can I share a variable or object between two or more Servlets?

I would like to know if there is some way to share a variable or an object between two or more Servlets, I mean some "standard" way. I suppose that this is not a good practice but is a easier way to build a prototype.  I don't know if it depends on the technologies used, but I'll use Tomcat 5.5    I want to share a Vector of objects of a simple class (just public attributes, strings, ints, etc). My intention is to have a static data like in a DB, obviously it will be lost when the Tomcat is stopped. (it's just for Testing)


why ls reports a huge file and du does not?

When I run arm-none-eabi-objcopy -O binary add.elf add.bin everything seems to be ok. But, later when I run ls -lh add.bin add.elf this is the output I received:   -rw-r--r-- 1 david david 2,6G nov 23 22:49 add.bin -rwxr-xr-x 1 david david 65K nov 23 22:40 add.elf   this is a huge file. But when I run du -h add.bin the output is:   8,0K    add.bin   What's happening here?  Edit: Output of arm-none-eabi -A -t -x add.bin:    Warning: could not locate 'add.bin'.  reason: Value too large for defined data type   Output of arm-none-eabi -A -t -x add.elf:   section           size         addr .text             0x2c          0x0 .data              0xc   0xa0000000 .ARM.attributes   0x14          0x0 Total             0x4c   Output of du -bh add.bin:   2,6G    add.bin   This is how I fixed it:  Initially when I link the program with the command arm-none-eabi-ld -Tld_script.lds -o add.elf add.o the ld script file ld_script.lds contains this:   SECTIONS {         . = 0x00000000;         .text : {                  * (.text);          }          . = 0xA0000000;  /* RAM starting address */         .data :{                  * (.data);          } }   The above code fills from 0x00000000 to 0xA0000000 with 0s. This error can be solved the following way:   SECTIONS {         . = 0x00000000;         .text : {                  * (.text);          }         flash_sdata = .; /* Start data in flash right after the text */          . = 0xA0000000;  /* RAM starting address */         ram_sdata = .;          /* AT specifies the load addr. of .data section */         .data : AT (flash_sdata) {                  * (.data);          }         ram_edata = .;   /* Address of end of data in RAM */         data_size = ram_edata - ram_sdata; }   And then in the source I added a piece to copy the data from Flash to RAM. Something like this:           @ Copy data to RAM. start:         ldr   r0, =flash_sdata         ldr   r1, =ram_sdata         ldr   r2, =data_size  copy:         ldrb  r4, [r0], #1         strb  r4, [r1], #1         subs  r2, r2, #1         bne   copy    If my English is not too precise, this is the  which helps me to fix the problem. (And a good site for learning ARM embedded programming).


What is the buoyancy force act on an object when it's bottom is touching the ground?

I was taught that pressure difference in a fluid is the cause of buoyancy force, but I when I think of the buoyancy force at the bottom of a fluid, this explanation seems to give me some weird results. Suppose a have a cylindrical block placed in the middle of the fluid. Then the cause of buoyancy force is clear, since pressure exert normal to the surface, the curved surface's force add up to be 0. Only the upper part and the lower part of the cylinder contribute to the force, and by simple calculations, we have the force = weight of displaced fluid. However, suppose I keep lowering the cylinder, just until it touches the ground. Since pressure is exert by the fluid, and the bottom of the cylinder is NOT touching any fluid. It should have no pressure, and the only pressure is on the top of the cylinder. Pushing the cylinder downward, the buoyancy force turned downward! However, we know that it should not be the case. So where is the problem ? Where is thr fault of the above problem? I really confused me and any help would be appreciated


Grant READ ONLY permissions to all tables in all databases

I created new role named "support" in my PostgreSQL. Now I need grant "READ ONLY" permissions for this role an ALL exists databases/tables.  Also I need automatically granted same permissions on each DB that will created in future.  I unsuccessfully tried next queries for grant permissions in new databases (Can not select from new database tables ):  ALTER DEFAULT PRIVILEGES FOR ROLE support GRANT SELECT ON TABLES TO PUBLIC; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES to support;   I looked at , but it about all tables within single database. It not enough for me.


I want to pin and unpin entries in the dock in 18.04 desktop. I have checked out gsettings and have not found how to do this. Is gsettings even the right tool for this? Any suggestions very welcome.


I noticed yesterday, that my kernel wasn't up-to-date, even though I installed updates.  I checked the installed packages and all newer linux-header* packages were installed up to the current 4.2 kernel in Ubuntu 15.10.  I checked my /boot folder and there were no newer kernel images. After seeing that, I removed all but the current kernel which, interestingly, didn't clean up my /boot folder [old kernel images were still there, I deleted them by hand now], then installed the newest kernel, but again with no success.  I also tried to just run apt-get install --reinstall on the kernel packages, but no dice either.  I checked all logs (dmesg, dpkg, syslog) I could think of but couldn't find any errors or warnings.  So with no further information about what is happening, I hope that someone here can help me figure out what's going on with my system.  History of this system:  Original 14.04, was upgraded to 14.10, then to 15.04, then to 15.10. Kernel updates, apparently, stopped working while Ubuntu 15.04 was installed.  Partitions:   /boot is a seperate partition. GRUB is installed here (already re-installed it with no change). (SSD) /home is a seperate partition. (SSD) / is a sperate partition (SSD) /var and /tmp are seperate partitions on my second harddrive   SSD is /dev/sdb, harddrive is /dev/sda.


What's a clean way to time code execution in Java?

It can be handy to time code execution so you know how long things take. However, I find the common way this is done sloppy since it's supposed to have the same indentation, which makes it harder to read what's actually being timed.  long start = System.nanoTime();  // The code you want to time  long end = System.nanoTime(); System.out.printf("That took: %d ms.%n", TimeUnit.NANOSECONDS.toMillis(end - start));   An attempt  I came up with the following, it looks way better, there are a few advantages & disadvantages:  Advantages:   It's clear what's being timed because of the indentation It will automatically print how long something took after code finishes   Disadvantages:   This is not the way AutoClosable is supposed to be used (pretty sure) It creates a new instance of TimeCode which isn't good Variables declared within the try block are not accessible outside of it   It can be used like this:   try (TimeCode t = new TimeCode()) {      // The stuff you want to time  }   The code which makes this possible is:  class TimeCode implements AutoCloseable {      private long startTime;      public TimeCode() {         this.startTime = System.nanoTime();     }      @Override     public void close() throws Exception {         long endTime = System.nanoTime();         System.out.printf("That took: %d ms%n",                 TimeUnit.NANOSECONDS.toMillis(endTime - this.startTime));     }  }   The question  My question is:   Is my method actually as bad as I think it is Is there a better way to time code execution in Java where you can clearly see what's being timed, or will I just have to settle for something like my first code block.


Is there any way to root JB without losing all data and settings?

Is there any technique to root Jelly Bean (perhaps temporarily) without losing all data and settings? The phone is Nexus S i9020 with Android 4.1.2.   The phone has a bad case of the "Lag" problem - AndroBench reports:  Random rd 4.4 MB/s  (1127 IOPS) Random wr 0.18 MB/s 49.86 IOPS.  I have found "LagFix" as a possible solution but it requires root.    I have no other reason for root, and would be happy to have a "temporary" root that would let me run LagFix to solve that problem, and then be back to unrooted after restarting.  I checked the suggested answer (This question already has an answer here:) , but it is from 2010 and recommends a tool (Unrevoked) that only supports specific phones (not including the Nexus S).  I saw  but it appears to be for Gingerbread 2.3.3 and prior. I'm running JB 4.1.2.   So I'm still looking for a way to root JB without losing data.


Defining file paths in python with EOL string literal errors

I'm trying to save figures to a certain directory. I'm trying to define the general path via below  path=r'D:\FLGPR Akela\YPG\test\'   Which I don't quite understand. I thought the r before the string would avoid the '\' error?


I would like to draw the attached diagram, but since it contains colors and texts I couldn't get a good picture. If one can help me with code that would be great. Note, the boxes are of the same size! Thanks.


Which locations are traditionally Santa's home - i.e. where can you visit Santa Claus year-round?

Obviously around this time of the year, Santa and his minions will be out and about, finding out who is naughty and nice, and delivering presents.  However, the rest of the year he's back at his home.  Where is that generally considered to be visitable?  Yes, in some traditions it's the 'North Pole', but I know at least one other country (Finland) has Rovaniemi as his home.


Unresponsive mouse wheel on macOS Sierra

Since I upgraded to Sierra, mouse wheel scrolling has become a lot worse. When I scroll the wheel fast, it behaves like it did before and scrolls a bunch of lines, but when I scroll the wheel one notch at a time, nothing happens.  I use a Steelseries Sensei gaming mouse but I also tested with a basic Dell mouse. (There's no model number on it.) As of macOS 10.12.1, this issue affects all programs.  Are there any workarounds? Please don't suggest USB Overdrive or any other nagware.  Edit:


Middle name missing on flight reservation, API needs middle name

We are flying with Monarch, but I booked the ticket through a package holiday company and forgot to give my husband's middle name at the time of the booking (they did not ask for it). We will travel to Tunisia and will have to provide API (Advance Passanger Information) at the check-in desk and as the API requires the full name (first, middle and last name) I am worried that they will notice that my husband's middle name is missing from the flight reservation.    Is there a rule that flight tickets have to contain middle names as well? I checked Monarch's website and although the middle name is emphasised for the API, it is not specified for ticket bookings; moreover, if you book your ticket online, they only ask for first name and surname.  Do you think this could create a problem? Can he be denied from boarding? (I don't want to call the airline, as I've heard airlines love charging for extras such as a name change so I am not sure if I would be provided with accurate information.)


12.10 install overwrote my windows partition

Recently decided to switch back to Ubuntu. I have a 3TB drive which was running win7. I had 3 partitions. c: for windows d: data e: data  Have installed ubuntu before so 'thought' I knew what I was doing.  I using netbootin I installed from a usb stick. I didn't choose the default options but I didn't choose the 'manual install' either. I can't remember what option I took but I figured at some stage it would tell me how it was going to partition the disk and at that stage I would see if it had recognised the NTFS partitions and I would be able to abort if it didn't.  Unfortunately, it didn't and just went ahead and installed Ubuntu and made up it's own mind on how it was going to partition the disk. Usual story, the two NTFS data partitions weren't backed up.  Is there anything I can do to retrieve the ntfs data? I'm currently trying out testdisk and I know I can use photodisk to retrieve certain file types but all the filenames will be lost and it's going to take a hell of a lot of time to rename them all.  Any help or assistance would be more than gratefully accepted. Thanks in advance, Niall


Why is there a chgrp command if there is chown

After working 15 years with Linux, I stumbled upon the command chgrp. Until now, I always used chown to change the ownership of a file, even if I only changed the group; for example  chown :www-data index.php   So I wonder if there is anything that chgrp can do what chown cannot do. IMHO, the man pages do not point to specific advantage.


Php, Date Format throwing away the '0' in front of single digit date

When I do the below code:   date("d/m/y", $date)   It gives me      04/06/15   How can I make it such a way that it will return      4/6/15    What modifications must I do in order to get the desired output? Please advise thanks.


Create a progressbar for the next commands

I am developing backup script on linux (using bash linux [.sh]), and I need create a dialog (with command dialog) with progress bar to show to client status of the commands.  For example, I want a dialog box like:  Title: Installing required commands.  Dialog text:  We are installing required commands for Backup system. Installing sshpass command... (progress bar go here)  The same I want apply for the next commands:  sudo apt-get install sshpass #(used for example) sudo apt-get install rsync sudo mkdir sudo rsync -aAXv   Here example for I want make:   I using ubuntu desktop 16.04 LTS x64.


maas-cli login always returns 403 Forbidden

I have a test setup running with a MaaS Server, a JuJu Server and a number of Nodes in the MaaS Cluster.  After I reinstalled my MaaS Server (and subsequently the JuJu-Core Server) with Saucy  instead of Precise, certain things definitely improved while, at least one other thing  seems to be broken now. The maas-cli. I always get an error :  httplib2.socks.HTTPError, 403, Forbidden.   I also created a new MaaS Key/OAuth Token, but to no avail. I have a couple of machines,  that have different number of Disks in the cluster. But they have the same number of CPUs and the same amount of memory. According to this .  I can also use tags as constraints in the deployment process to distinguish between the nodes. As I'm seemingly unable to tag the nodes through the MaaS Web UI, I wanted to use the maas-cli. On precise it worked well, I used it to release nodes etc. But on Saucy I haven't even once been able to at least login. I always get:  Traceback (most recent call last):   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main     "__main__", fname, loader, pkg_name)   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code     exec code in run_globals   File "/usr/lib/python2.7/dist-packages/maascli/__main__.py", line 20, in <module>     main()   File "/usr/lib/python2.7/dist-packages/maascli/__init__.py", line 46, in main     options.execute(options)   File "/usr/lib/python2.7/dist-packages/maascli/cli.py", line 70, in __call__     description = fetch_api_description(options.url, options.insecure)   File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 71, in fetch_api_description     ascii_url(url_describe), "GET", insecure=insecure)   File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 60, in http_request     return http.request(url, method, body=body, headers=headers)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1569, in request     (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1316, in _request     (response, content) = self._conn_request(conn, request_uri, method, body, headers)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1251, in _conn_request     conn.connect()   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 900, in connect     self.sock.connect((self.host, self.port) + sa[2:])   File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect     self.__negotiatehttp(destpair[0], destpair[1])   File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 390, in __negotiatehttp     raise HTTPError((statuscode, statusline[2])) httplib2.socks.HTTPError: (403, 'Forbidden')   The maas.log does not hold anything regarding this issue. It holds Error messages about OAuth and that a request was unauthorized. But that's an 'old' message. No new messages seem to be written to that log.  ERROR 2013-11-22 09:35:37,592 maasserver Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response     response = callback(request, *callback_args, **callback_kwargs)   File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func     response = func(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 128, in __call__     actor, anonymous = self.authenticate(request, rm)   File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 103, in authenticate     if not authenticator.is_authenticated(request):   File "/usr/lib/python2.7/dist-packages/maasserver/api_auth.py", line 57, in is_authenticated     raise OAuthUnauthorized(error) OAuthUnauthorized   How can I resolve this ?


How is it possible to override a property with a new type?

I don't understand how this compiles and works perfectly :|  Since when is it possible to change the type of a property (from Nullable<bool> to bool and from int to Nullable<int>) when overriding it?  public class Program {     public static void Main(string[] args)     {         var testBase = new BaseClass();         var testDerived = new DerivedClass();          Console.WriteLine("'" + Convert.ToString(testBase.BaseInt) + "'");         Console.WriteLine("'" + Convert.ToString(testDerived.BaseInt) + "'");          Console.WriteLine("'" + Convert.ToString(testBase.BaseBoolNullable) + "'");         Console.WriteLine("'" + Convert.ToString(testDerived.BaseBoolNullable) + "'");     } }  public class BaseClass {     public bool? BaseBoolNullable { get; set; }     public int BaseInt { get; set; } }  public class DerivedClass : BaseClass {     public new bool BaseBoolNullable { get; set; }     public new int? BaseInt { get; set; } }   Output:  '0' '' '' 'False'


Move an off-screen window back on-screen on Mac

I met the problem on move an off screen window back on-screen on mac. The application is Adobe Element 11 Organizer. It can't be solve by adjust desktop resolution, or maximum the app window, or connect to a extra monitor.  Since I can't add a possible answer due to reputation limit, start a new question here.


Similar to , but a little less extreme..  Basically, you could "top up" the points of another users bounty (up to the current maximum, 500)  Say a question has a bounty of 100 points, I could contribute up to 400 of my points towards it it. When the bounty is resolved, 100 points would be deducted from the original user (well, 50), and 400 from me.  More than one user could contribute (again, up to the maximum limit)  If the question already has a 500 point bounty, this feature wouldn't apply. Also as cletus suggested, you should not be able to add to the bounty within maybe two days of the bounty closing.  Updated Suggestion: Acknowledging the inherent complexity, what if, when offering a second bounty, the user immediately agrees to forfeit control of who the bounty is given to <-- the original user to offer a bounty does so, and further, the bounty expiration remains unchanged. This would help lower rep users.  They might not be able to offer the astronomical +500 rep bonuses that the 10k crowd can.  These +500's certainly attract more views than the +50s.  Presumably, the 10K users also already have the ear of the Stack Exchange Gods and need not beg so arduously for a feature on Meta, or have the visibility on [so] that their questions are answered quite quickly.  Right now, if they forfeited too much rep it would relegate them to maybe barely being able to talk in chat.  They might lose: 'create tags', 'retag questions', 'view close votes', 'reduce ads', 'vote down', 'create chat rooms', 'edit community wiki', and 'set bounties'.  While none of these are huge, it also makes that hope of someday getting to 10k appear infinitely further off in the future...  As an example,  is reasonable, maybe not stellar, but reasonable, so a low-rep user could offer a larger bounty in the hopes of getting on the "someday-we'll-implement-this-when-Jeff-gives-us-Friday-off" list.


I build amazon ec2 instance as following steps given on     Also followed this:    service httpd restart  says:  [root@ip-21-31-3-19 ec2-user]# service httpd restart Stopping httpd:                                            [  OK  ] Starting httpd:                                            [  OK  ]   there is index.php file in   /var/www/html/index.php  drive but it gives error:  The connection has timed out   What can be the issue?  UPDATE  My instance was created by my friend from US. I am in India. He sent me mail he received after creating the instance.  Availability zone -     us-west-2c Security groups -     launch-wizard-1. view rules Scheduled events     No scheduled events  AMI ID - amzn-ami-pv-2013.09.2.x86_64-ebs (ami-cc293fc) Subnet ID - subnet-4f727427 Platform - Network interfaces - eth0 Key pair name - AmazonLinux01   I think security group is already created. I am handling ec2 instance first time.   Is this ec2-classic or VPC?? There has been given VPC id and AMI ID both.   I followed this document to sent the security group -  which says : Required option '-O, --aws-access-key KEY' missing (-h for usage)  where to get access key?


Why does casting out $9$ and $11$ work to compute remainders?

I found two examples that I'd like to understand:  Example 1: Find $112358132134 \mod 9$.  Solution is: $1+1+2+3+5+8+1+3+2+1+3+4 \mod 9 = 7 \mod 9 = 7$  Example 2: Find $62831853 \mod 11$.  Solution is: $(-6)+2+(-8)+3+(-1)+8+(-5)+3 \mod 11 = -4 \mod 11 = 7$  My question is: Based on what property we sum the digits of the number ( as Example 1) or subtract (as Example 2)?


I want to run git stripspace on all my source code files, on each build (or precommit or just manually), to remove extraneous whitespace, and later maybe to format the code in a standard way,      So I want to do something like    git stripspace < project/code.m > project/code.m   so I thought I should be able to use find -exec or xargs but by the looks of find does not like 'git stripspace' (maybe because of the space in between or the < or >) and I don't know how to pass the same file name, same argument, twice in a row with the proper redirections (< >) .


Are there really many continous distributions without the PDF

This is one interesting question I take some time to search if there is any distribution function that is continuous but without the PDF. After some search I found , sometimes referred as the Devil's staircase according to Wikipedia. The reason why I am asking this question are some comments I got from one member of this website saying there are many of these. There are some distributions like  with if statement inside the PDF which may be what he was referring. I am also not sure if he assumed some conditional distributions in which case it may be the PDF is possible unknown.


How To Figure Out What Lives At An IP Address

Got a weird one here.  I've got an IP address in my subnet that is alive and responds to ping requests, but I can't figure out what device actually live at that address. I've tried a couple of IP scanners that usually list hostnames and open ports / services, I've tried connecting to that address via http, https, telnet, SSH, but nothing responds and I don't have anything in DNS at that address.  We have no records or documentation of any device existing at this address and I'm at a bit of a loss because I need to expand my DHCP range, and this address is in the way.  Anyone know of a better way to interrogate that address to figure out what it is?  Thanks!  EDIT: I don't really see how this is a duplicate since that other question is from a completely different case [He has data from Advanced IP Scanner and I don't, he's using VMs, and I'm not] and that thread also has no answer. But it doesn't really matter because I found the offending device due to some great advice and good utilities in this thread. Thanks everyone!


I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong.  Here is my code:  var clientContext = new SP.ClientContext(siteUrl); var oWebsite = clientContext.get_web(); this.collList = oWebsite.get_lists();  list = collList.getByTitle('Urgent Alerts'); var items = list.getItems(); clientContext.load(items); clientContext.executeQueryAsync(Function.createDelegate(this, this.Success), Function.createDelegate(this, this.Failed))  function Success(sender, args) { var itemCount = items.get_count(); alert(itemCount); }  function Failed(sender, args) { alert('request failed ' + args.get_message() + 'n' + args.get_stackTrace()); }


Site icons in the Super Collider are not SVG format

Recently, lots of images became SVG, for example the Inbox and the Achievements icons.  However, the Super Collider site favicons are their usual blurry selves:    Note that the SE logo in the top bar is fine:    Could the favicons be vectorised?


Let $S(n)$ be the proposition "$2^n > n^2$"  Basis step: $S(5)$ is true, since $2^5 = 32$, $ 32 > 25 = 5^ 2$  Inductive step:  Induction hypothesis:   Assume $S(K)$ is true, $2^K > K^2$.  Then  $2^{K+1} = 2.2^K > K^2 + K^2$   I don't know how to proceed after this. How to complete this proof?


Redirection sends me to the same page when I press "Back"

On some websites, when you hit the "Back" button, the browser attempts to go to the previous web page, but the current page opens up again. It happens even when the original page has finished loading. Hitting the "Back" button dozens of times doesn't prevent the behaviour, and I get "stuck" on that page.  What would explain this? It has happened to me on virtually every browser I've ever used.


What is the minimum number of "cases" for minority class to perform logistic regression?

I have 6 out of 167 cases of cancer in the dependent variable. I would evaluate if three independent variables predicted the cancer. Are 6 cases enough? Is there a rule to determine this? Is there difference if the indipendent variables is nominal or numeric?


Review counter still shows number when done reviewing the maximum amount a day

I mailed the Stack Overflow crew about this problem, they said they've not heard about it before and they redirected me to meta, so here I am.  The review counter shows me the number 5, but I already finished my review tasks:   Above "Thank you" text appeared, after clicking the orange rectangle with "5" in it. Should this be fixed or is it functioning as it should?  My opinion: The counter should check if the maximum review count has been reached for that user, if not show the review counter. If it has been reached: make it invisible.


He is tired of that work   vs.     He is tired from that work.   I think the two sentences are almost the same.  If there is any difference, could anyone explain?


How to prove convergence of $\sum\limits_{n=1}^\infty \frac{\sqrt a_n}{n^\alpha}$

Assume that $a_n >0$, $n\in\mathbb{N}$, and that $\sum\limits_{n=1}^\infty a_n $ converges. Show that for $\alpha>1/2$ the series $$\sum\limits_{n=1}^\infty \frac{\sqrt a_n}{n^\alpha}$$ converges as well  I think we can use Abel's convergence test but I'm not sure if that is the way to go


Probability for completely unfair stats when rolling ability scores using 4d6 drop lowest for D&D

Players of a certain TRPG have characters with 6 ability scores, each ability score ranging from 3-18. One method of generating those is by rolling 4d6 drop lowest. That means four six-faced-dice are rolled, and the three highest results are added.   What's the probability that, given 5 players, one player will have a highest ability score equal or lower than the lowest ability score of another player?   The related question  shows how to get the distribution of 4d3 drop lowest, but how do I get from there to an answer of my question above?   A good answer would explain the result in a way that a statistics novice can follow.


If a nonnegative continuous function is positive at a point, its integral is positive

Suppose that $f(x)\ge 0$ for all $x$ in $[a,b]$ and $f $ is continuous at $x_0 \in [a,b]$ and $f(x_0) > 0$. Prove that the integral from $a$ to $b$ of $f$ is greater than zero.   Can I prove this using the bounded theorem for integrals? Any suggestions on how to get started.


It is really hard to describe my problem accurately, but I try the best I can. I am using Blender to create meshes for Unreal Engine. However, this problem shows already in Blender. I don´t know the terminology, So I go right ahead and describe shortly what is wrong about the picture attached. You can see a diagonal shadow cast after I turned on the smooth shading. That does not look very good (I am sorry, that I cannot describe it any better). You would really help me out if you could explain my mistake to me!


Setting [frenchb]{babel} with biblatex puts author names in small capitals. How to get back to first letter capitalized?

I am confused by the way the authors' names are capitalized when both biblatex and frenchb in bbel are used. There is no reference to this behavior in either documentation and I don't know how to make the authors' names appear as in the "english" style. Here is a MWE:  \documentclass[a4,11pt]{article} \PassOptionsToPackage{utf8}{inputenc} \usepackage{inputenc} \input{glyphtounicode}   %  to enable ligatured letters \PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics     \usepackage{fontenc}  \PassOptionsToPackage{frenchb,english}{babel}     \usepackage{babel} %\PassOptionsToPackage{frenchpro}{babel} % inopérant  \frenchbsetup{LowercaseSuperscripts=false} \usepackage{csquotes} \PassOptionsToPackage{%     %backend=biber, %instead of bibtex     backend=bibtex8,bibencoding=ascii,%     %language=autobib,%     language=auto,     %language=french,     %autocite=inline,     %style=numeric-comp,%     style=authoryear-comp, % Author 1999, 2010     %style=authoryear,%     %style=alphabetic,%     %bibstyle=authoryear,dashed=false, % dashed: substitute rep. author with ---     sorting=nyt, % name, year, title     maxbibnames=3, % default: 3, et al.     backref=true,%     hyperref=true,     natbib=true % natbib compatibility mode (\citep and \citet still     work) }{biblatex}     \usepackage{biblatex} %\addbibresource{../Xbib.bib} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @Article{abr4,   Title                    = {Bargaining, reputation and equilibrium     selection in repeated games with contracts},   Author                   = {Dilip Abreu and David Pearce},   Journal                  = {Econometrica},   Year                     = {2007},   Number                   = {3},   Pages                    = {653-710},   Volume                   = {75}, } @InBook{bar3,    Title                    = {Mathematical theory of reliability},   Author                   = {Richard E. Barlow and Frank Proschan},   Chapter                  = {1},   Pages                    = {9-18},   Publisher                = {{J}ohn {W}iley \& {S}ons},   Year                     = {1965}  } \end{filecontents}  \addbibresource{\jobname.bib}    \begin{document} \selectlanguage{french} % if commented, authors appear with only first letter capitalized \section{First section}   This is a document.   I cite a book here: \cite{bar3}. An article here:\cite{abr4}.    \printbibliography   \end{document}   As you can see when comment out "selectlanguage=french", the names come with a first capital : Barlow and Proschan. When selectlanguage is set to french, we get BARLOW, Richard E. and Franck PROSCHAN.  It would be OK if the capital letters only appeared in the reference section. But I find it awkward that in the text the authorname also appears in CAPITALS. Any work around? Thanks.


I have this exerciose:     Let $\Omega$ be a normed space. Prove that $\Omega$ is seperable if   $\Omega^*$ is.   It is in the chapter with the Hahn-Banach theorem, so I think I should use that theorem.  My attempt:  We know that there is a countable set $K \subset \Omega^*$, such that for any $x^* \in \Omega^*$ there is a sequence of bounded lienar functionals in K, such that they converge to $x^*$ in the operator-norm.  So I need to associate the set $K\in \Omega^*$ with some set in $\Omega$, and show that this set is dense in $\Omega$.  The only thing I can think of is to start the other way around. For any $x \in \Omega$, we have the space $\{ax| a \in \mathbb{C}\}$, this is a subspace of $\Omega$, and it has a natural bounded linear functional $P_x(ax)=a$. by the Hahn-Banach theorem, this functional can be extended to a functional on the entire set $\Omega$, so we can assume that $P_x \in \Omega^*$.  Now we have a sequence in $\Omega^*$: $k_n\rightarrow P_x$, where $k_n \in K$, and the convergence is in the operator norm.  The problem now is to associate a proper element in $\Omega$ to each $k_n$, and show that this sequence converges to $x$.  Could this approach work, if so, how do I finish it? If not, could you please help me some other way?


Windows 8 & Ubuntu 12.04 Dual Boot Menu Does Not Load

I've read abt the ton of complications/problems ppl are facing with UEFI when installing Ubuntu alongside Windows, but I haven't been able to find a solution to the one I encountered.   I have a Windows 8 OS and we installed Ubuntu 12.04 next to it. However, the dual boot menu did not pop up upon reboot. It loaded Windows directly. (Secure boot & rapid technologies are disabled).   After some research & forum reading, we verified that Ubuntu was indeed present in the EFI partition and we ran boot-repair. Eventually, the boot menu appeared, but it did so at every second reboot (from a shutdown not a restart). Then, it disappeared again and the laptop goes directly into Windows.   When the dual boot menu appeared, we went into Ubuntu and life was good so the installation  -or some parts of it- worked... But how do i now get the dual boot menu to appear as it's supposed to?   Furthermore, I read that with Windows 8 the dual boot menu becomes graphical... But we just had the regular old list.   Any tips??   Thanks!


How can I access scene materials and material_slots in Blender 2,92

I have a script, which works in version 2.90, in which I get a list of materials in the scene by accessing bpy.context.scene.material_slots and bpy.context.scene.materials.  These don't seem to work in version 2.92.  Did the location of the materials in the scene change and if so, how do I find them?


Mouse pointer hides sometimes since upgrade

I think it's a bug. But I can't seem to find any information about it. The mouse pointer hides itself, but it is still possible to use it.  Whenever I start watching a video in VLC, or start playing KSP through Steam my mouse pointer disappears. But it's not returned upon exiting the application. I have not tried with other games in Steam. The mouse pointer does not disappear when watching videos online through YouTube at first, but it properly hides itself after a few seconds.  The bug came about after I updated to 13.10, it was not present with the same setup in 13.04. I've tried removing ~/.compiz and restarting the kernel module psmouse.  Going to tty1 and back to the desktop reveals the pointer, though this fix is bothering me.  How do I fix this problem?


Strange tag-related error message on visiting a per-site meta

I visited , from the supercollider, and got this cryptic error instead of a list of questions:    Say what?  I wasn't searching tags, as you can see from the URL.  This persisted through several refreshes over a few minutes, but as I finished composing this question the site returned to normal behavior.  So the site isn't currently broken, but this error message seems misplaced so I'm still reporting it.  This isn't the error we normally get for read-only mode, temporary server errors, or 404.  Perhaps something is bubbling up from lower-level code without being caught, like maybe something having to do with favorite or ignored tags?  (Of which I have none, by the way.)


nested shortcodes from different plugins. too complex?

using a combo of shortcodes-ultimate, jetpack, and my very own first shortcode, i (almost) have a nice tabbed widget with latest posts, popular pages and comments.     except the comments_list shortcode i created is showing up above the tabbed box. is this too complicated? i think i have everything nested correctly:      [su_tabs]     [su_tab title="Popular" disabled="no" anchor="" url="" target="blank" class=""][jetpack_top_posts_widget][/su_tab]     [su_tab title="Latest" disabled="no" anchor="yes" url="" target="blank" class=""]
Latest Posts
[su_posts template="templates/list-loop.php" posts_per_page="5" tax_term="1,23,24,25,2,20,26,28,35" order="desc" orderby="asc"][/su_tab]     [su_tab title="Comments" disabled="no" anchor="" url="" target="blank" class=""][comment_list]     [/su_tab]     [/su_tabs]   it's totally probabaly i did something wrong in , but can't tell what.


Requiring a question mark in the question body for new users

Stack Overflow is a question and answer site, but so many "questions" are posted here without actually asking a question!    What if there were a requirement to have at least one "?" character in every post? While there are some cases where a valid question can be posed without using the "?" character, IMHO these are few and far between.  There could even be a prominent warning if you try to submit a question without one, saying something like "Stack Overflow is a question and answer site, but it appears you have not asked a question yet! Please edit your post to include a specific and detailed question. For more information, read the FAQ."  This suggestion is mainly to improve new users' questions and teach them how to use this site without requiring someone to always ask "What's your question" over and over again.   The restriction could (should probably) be lifted after reaching a small amount of reputation, which shows you understand how the site works.    Nearly 100% of the time, a post lacking an actual question is either:   Not a real question, leading to closing and eventual deletion. These are often problem statement or requirement, of the form "I'm trying to do ..." or "I would like ...", which usually does not show any research effort. Or, an inferred question, but not truly clear. Often someone ends up commenting "What's your question?" to which the asker has to come back and clarify what they wanted to know in the first place.   In my experience, I find most people that don't ask a question to be new users - meaning they don't understand how Stack Overflow works. Whether they're too lazy to read through the FAQ or they are new to expressing their problems to other people, the end result is the same: unclear non-question "questions".  Forcing at least one question would improve the quality of posts from first-time users. It also would help guide new users before they are subjected to the would-be resulting barrage of downvotes, close votes, and comments for clarification. Specifically:   For not a real question questions it would hopefully force the poster to think about their problem and pose a question. The hope is there will at least be a small increase in the number of people who focus on one particular problem instead of an entire project. For inferred questions, if the question were clear in the first place, explicitly adding it does not detract from the post. In the case where the question is not clear, adding the question is usually all that is needed to clarify exactly what the problem is.     Would this be a good idea, or would there a significant disadvantage to requiring a question mark?  Note I mean requiring a question mark in the body of the post, and not the title.


sending message on telegram using javascript

here is my implemented try, on my question  Now the only problme am getting is when i check browser log am seeing this Uncaught TypeError: document.getElementById(...) is null and the error sends me on this line document.getElementById("myBtn").addEventListener("click", function(e) { so i dont know whats the problem <!DOCTYPE html>            <form> <input type="text" id="fname" name="fname" placeholder="fullname"> <input type="text" id="country" name="country" placeholder="country">   <button id="myBtn" type="submit">Send</button> </form>


I currently have my Time Capsule to forward all inbound requests on port 80 to my Mac Mini which runs a web server with its local ip address of 192.168.1.8. I also have DNS set up so that if I go to example.com then it will send the request to my static public IP which will in turn cause the Time Capsule to forward the request on port 80 to my Mac Mini.  However I now have a Raspberry Pi on the local network also, with the ip address of 192.168.1.5. I want to be able to access the web server on the Raspberry Pi by going to pi.example.com, but I'm not sure how I can get the Time Capsule to port forward based on the domain. What I'd like to be able to have is something that works like this:  example.com:80       -->   public IP   -->    192.168.1.8:80 pi.example.com:80    -->   public IP   -->    192.168.1.5:80     Update  I've managed to do the above with Virtual Hosts and Forward Proxies in Apache. However that is just for HTTP on Port 80, how could I do this with other services such as SSH and FTP? Like:  example.com:21       -->   public IP   -->    192.168.1.8:21 pi.example.com:21    -->   public IP   -->    192.168.1.5:21


Why using "if __name__=='__main__': main()" and not simply "main()" in Python?

Also, why do we use the underscores? After all, I define the main method as main(), not as __main__().


Combining two means and SDs of one group

I have the mean & SD of several different time points, I want to combine them into one mean and SD. Is it possible? Example;  At 1 hour; mean=5, SD=1, n=42  At 2 hours; mean=6, SD=3, n=42 and so on.  Any equation to do that?  Note: at some time points, I have different group numbers (n), due to missing one or two patients. I really appreciate your help, thanks!


I know that the structures are not saved in heap. The class is saved in heap. That is clear but where will be saved structure if it contains the field of some class? For example:  class TestClass {     public string Name; }  struct MyStruct {     public TestClass myClass; }


Link ToC page numbers instead of the sections

I need to be able to click on the table of contents page numbers and only them. I do not wish for the text to be clickable.


Width of figures in subfolders cannot be controlled with \textwidth

I am using the standard graphics package and I usually keep my figures in the current working directory. However, now I have to keep them in a separate folder.  Thus I included \graphicspath{{figures/}} before \begin{document} and I include the graphics as \includegraphics[width=0.95\textwidth]{figures/pic.jpg}.  However, the figure appears in a very large size. If I use \includegraphics[scale=0.5]{figures/pic.jpg} it appears to be able to control it but I have more than 200 figures and many of them are sub-figures which I need to control with \textwidth. It will be impossible for me to play around with the scale of each figure. I have never had an issue like this when the figures are in the same folder. Does someone know why using \textwidth for controlling the width of figures in a subfolder does not work?  Thank you!


What can a mod do about a comment posted as an answer?

In  revision of the Guidelines for reviewing low-quality posts, we can read under the sub section Comments posted as an answer     If the answer would actually be a constructive comment, consider flagging it for moderator attention.   What would a mod do that a non-mod can't do? Can they transform an answer into a comment?


I'm trying to copy the remote repository on my local system but I have this type of error:  git clone git@192.168.22.29:user1/test.git  Cloning into 'test'...  git@192.168.22.29's password:  sh: 1: git-upload-pack: not found  fatal: Could not read from remote repository.   Please make sure you have the correct access rights  and the repository exists.  I have tested the SSH with: ssh -T git@192.168.22.29  and it gives me this: $ ssh -T git@192.168.22.29 git@192.168.22.29's password:  it accepts the password and it stays as it is? What could i look for?


Sorting a list of tuples according to the first element

I have to sort a list of tuples according to the second element. I am using the function sort() to do so. However, what I did isn't working...    def sort_tuple(to_sort):         sort_tuple=((3, 'C'), (1, 'B'), (2, 'A'))         sort_tuple.sort(key = lambda x: x[1])           return sort_tuple  And if I had to sort it according to the first element, would the code be what I wrote under?:    def sort_tuple(to_sort):         sort_tuple=((3, 'C'), (1, 'B'), (2, 'A'))         sort_tuple.sort         return sort_tuple  Thank you!


Unique order $d$ subgroup of $\Bbb Z/n\Bbb Z$ if $d\mid n$

Let $G=\Bbb Z/n \Bbb Z$ and assume $d\mid n$.     There exists a unique subgroup of $G$ of order $d$.   The mod $n$ reduction of $n/d\in \Bbb Z$ generates a $d$ element subgroup of $\Bbb Z/n\Bbb Z$, so that takes care of existence.  What about uniqueness?  If $H\leq G$ is any subgroup of order $d$, then $G/H$ has order $n/d$, right? What result did I use here?  In particular $n/d\cdot g\in G/H$ is trivial, so $n/d\cdot g\in H$ for $g\in G$. Taking $g=1$ we have $n/d\in H$ and there are $d$ multiples of this in $H$, so $H$ is the same group as above. Does this argument work?


Freeze First Column of Sharepoint online List view using Jquery/javascript

i want to fix first column (ex: Title column) of my sharepoint list view, so  that whenever the user scroll horizontally the first column should be fixed.   Thanks in advance for your support.


Seeking title of sci fi book with 'bee camera' global paparazzi

Media use bee-like paparazzi cameras, one character works at a consumer research firm that uses virtual reality Matrix-style plugging into people’s heads to survey their opinions on products; this character is younger (or small), maybe named Tag? Trig? Trip? He lives in a group-home type of situation where everyone pitches in some money/currency into a box in the house (like a coin box). Some random guy on the roof in a garden shed who has special powers, can’t touch or be touched, something like that. I think the book has a key event at a ball game or stadium involving the guy from the roof? Book may or may not also have nano-viruses in the world where cities are shielded from particular nano-viruses (I might be mixing this up with something else)


I am fairly new to Stack Overflow and just stumbled across Meta Stack Overflow.  I can't seem to figure out what the purpose of the "Meta" site is. Can someone please explain it to me?


How do I run a .jar executable java file from outside NetBeans IDE? (Windows Vista).  My project has a .jar file created by Netbeans.  We'd like to run it.  Either: how do we run the file or how do we create a 'proper' executable file in NetBeans 6.1?


Why don't we see solar and lunar eclipses often?

Since we see the  at least once in a month when the Moon gets in between of the Sun and the Earth during the evening ( and as far as I know if this happens during the day, you'll get to see a . Why don't we get to see this often or in the day?   Does it mean that in some part of world there's a solar eclipse when we are seeing a new moon? I'm looking for a diagram or interactive way to understand this if possible as I'm not a native English speaker, but I'll try my best to do so.


How do I install Ubuntu alongside a pre-installed Windows with UEFI?

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


CommandButton oncomplete JS function not firing

I have run into an issue with an apex:command button, where the oncomplete part of the process is not being called, and prevents the button from completing its action.  The VF page is a component on a record page, so the refresh is JS to reload the page (not just the component vf page).  The pages class supplies the return URL ({!redirectUrl})  The VF Button  apex:commandButton  value="Reject (Entry Criteria)"  onclick="return confirm('Are you sure?');"  action="{!rejEC}"  oncomplete="refreshPage();"/>   The JS  function refreshPage(){window.top.location.href = '{!redirectUrl}';}   If I use the above setup, the Confirm dialog appears, the action does not fire and the page is not refreshed  If i remove onComplete, the Confirm dialog appears, the action fires successfully, and the page is not refreshed.  If i remove onClick, the Confirm dialog does not appear, the action fires successfully, and the page is refreshed.  So it seems you cant have onClick and onComplete in the same button??  Any thoughts?  Thanks!


Interior scene has a lot of noise, even with optimized settings

I can't figure out why my scene is still so noise after I optimized the scene / lighting settings.  I have the following settings:  1. Sampling:    I increased the Sample size to 2056 I'm clamping direct and indirect light at value 7.0     2. Lightpath:    Caustics are on. I use the preset Full Global Illumination Lowering the diffuse does not help the gain in the render.     3. Portals & Area Lights:    The windows have Portals on them. Each Portal also have an area lamp on them with a strength of 25 to create some more light. Multiple Importance is enabled.     4. Sunlamp:    The scene has an Sunlamp with a strenght of 250. Multiple Importance is enabled.     5. World Settings:    I have set the max bounces to 0. as suggested in this answer (  )     *Note: I don't use the denoiser because I'm rendering on a render farm that splits the render in parts. So the denoiser does not work. *  Update: Turning off caustics did not improve the render.  Question is: Can I reduce the noise in other ways then increase the sample size?


Old science fiction book about flying spheres that want to destroy all technology

I am desperately looking for an old science fiction book, I only remember this much:  A woman (I believe) observes an ancient statue of an extinct race that indicates a point in deep space. After much research they arrive on a planet (perhaps frozen) where they are attacked by flying spheres that seem to want to destroy everything technological. After many investigations, at the end of the book they discover that these beings will arrive in 7000 years. I remember the phrase: "is what even the extinct thought"


Can you get acheivements in Offline Mode?

In offline mode, I can't even look at my acheivements. But say I make a lot of progress in a game in offline mode anyway. Do I still obtain them?


Can someone give a simple explanation of ISO?

Can someone please explain to me what ISO means in the camera settings?  In , I was told to use ISO 1600. What does that number really mean? When should I play with ISO settings, only on night pictures, or also during the day?  I get that it's the sensitivity of the sensor. What I don't understand is: why the higher ISO, the more noise? I am confused; if the sensor is more sensitive, shouldn't it get more color or more quality?


How to unlock device when I forgot my password?

I've read  which states that there is an option to disable the lock using my Google account information. However I did not noticed such an option when I entered my password five times wrong. (Although there was also a 20s or 30s delay to complicate brute force attacks.) I use Android 4.0.3 on a Asus Transformer Prime TF201.  Would factory reset work?


Origins of $\frac1{r^2\sin(\theta)}$ term for curl of vector field in spherical coordinates

The curl of a vector field $\vec A$ in spherical coordinates is given by $$\nabla \times \overrightarrow{\mathrm{A}}=\frac{1}{r^{2} \sin \theta} \left| \begin{array}{ccc} \widehat{a}_{\mathrm{r}} & r \widehat{\mathrm{a}}_{\theta} & \operatorname{rsin} \theta \widehat{\mathrm{a}}_{\phi} \\ \frac{\partial}{\partial r} & \frac{\partial}{\partial \theta} & \frac{\partial}{\partial \phi} \\ \mathrm{A}_{\mathrm{r}} & \mathrm{rA}_{\theta} & \mathrm{r} \sin \theta \mathrm{A}_{\phi} \end{array}\right|$$ Source , screenshot . What is the mathematical reasoning behind the $\frac{1}{r^2sin\theta}$ when finding the curl of a vector in spherical coordinates? How would we derive it?


Why does a time series have to be stationary?

I understand that a stationary time series is one whose mean and variance is constant over time. Can someone please explain why we have to make sure our data set is stationary before we can run different ARIMA or ARM models on it? Does this also apply to normal regression models where autocorrelation and/or time is not a factor?


does anyone know how to (a) and (b) into (A) and (B) in the following example?   \documentclass[11pt]{article} \usepackage{caption} \usepackage{subcaption} \usepackage[demo]{graphicx}  \begin{document}  \begin{figure}[hbtp] \centering         \begin{subfigure}[b]{0.49\linewidth}             \centering                   \includegraphics[scale=.23]{}             \caption{Picture one}         \end{subfigure}         \begin{subfigure}[b]{0.49\linewidth}              \centering              \includegraphics[scale=.23]{}               \caption{Picture two}         \end{subfigure} \caption{Two pictures} \end{figure}  \end{document}   Thanks!   Best   Thomas


C# member variable initialization; best practice?

Is it better to initialize class member variables on declaration  private List<Thing> _things = new List<Thing>(); private int _arb = 99;   or in the default constructor?  private List<Thing> _things; private int _arb;  public TheClass() {   _things = new List<Thing>();   _arb = 99; }   Is it simply a matter of style or are there performance trade-offs, one way or the other?


How to obtain a subject's measurement from image

I am trying measure real object height from an image. I'm using the below formula  real height = (object px height * pixel size * distance)/(focal length)   my camera is Canon_EOS_550D, my values are below  sensor size=22.3 x 14.9 mm focal length=30mm distance to object =1000mm pixel height =1201 I applied values in this equation but I cannot measure object, can you please help me


Brute-force attacking One Time Pads feasible?

I have a ciphertext encoded with One Time Pad. I do not know the key. How can I find the possible keys which when decoded, will result in a meaningful plain text?


How to evaluate the integral $\int_{0}^{1} \frac{\log x}{\sqrt {1+x^2}}dx$

$$I=\int_{0}^{1} \frac{\log x}{\sqrt {1+x^2}}dx$$  My attempt:$$I=\int_{0}^{1}\log x d(\log(x+\sqrt{1+x^2}))$$ $$=\log x\log(x+\sqrt{1+x^2})|_0^1-\int_{0}^{1}\frac{\log(x+\sqrt{1+x^2})}{x}dx$$ I don't know how to proceed below, please help me. That is different to me.


Advertisement error - HTML error visible to user

Sometimes I see this error on this site.   width=0 height=0 style='position:absolute;left:0px;top:0px;'>


I deleted a folder in Ubuntu, how can I recover it?

The folder is massive (390GB) and contains many different files. The file system is ext4  I was about to copy this file to another hard drive using gksudo nautilus so I didnt have do a massive chmod operation on the destination hard drive, but then I accidentally hit move to trash, which in gksudo nautilus means permanent deletion. I checked the trash but it's not even an operation...  I have seen tools like testdisk and other recovery tools but none that can recover and whole folder because its made up of different files.   I don't think that this would work but if I deleted the partition could I just recover the whole partition at once?  Or would this be wrong because i have already deleted the partition's content? This is my first job in Linux IT.  I don't have a backup... I was trying to make one because the old backup drive died :(


Do I need Transit Visa to visit London for 4-5 hours during layover?

I am an Indian citizen. I am going to study in Canada with a study-permit. I am planning to have my flight via London. I've a layover there at London for almost 9 hours. Is it wise to visit the city for 4-5 hours during the layover? Additionally do I need a Transit Visa to visit the city? or do I need a General Visitor Visa for this short-trip at London?  Edits: Arriving and departing both the flights are from London Heathrow airport.  DATV suggests that if I am heading to Canada, I don't need DATV.   Visitor in Transit Visa suggests that I can pass border control with this Visa. I may also get a Transit without Visa concession if I satisfy this three:   you arrive and depart by air have a confirmed onward flight which leaves within 24 hours have the right documents for your destination (eg a visa for that country)   And I am also heading to Canada, this also can help me to get this concession.  So, do I need a Visitor in Transit Visa to visit the city? At least website suggests that. However, I'm not sure as no one can tell it with confirmation. Hope someone helps out here.


The sub-surf modifier is causing a weird indent around the end of my sleeve right next to where I have the sleeve thicken a little and I was wondering why it was causing that and what I can do to fix it?


Prove $4p-3$ is a square knowing that $n\mid p-1$ and $p\mid n^3-1$, $p$ prime

I really need some help at this problem:     Let $p$ be a prime number and $n$ a natural number, $n\ge2$ such that $n  \mid  p-1$ and $p \mid  n^3-1$. Prove that $4p-3$ is a square.   So $p \mid (n-1)(n^2+n+1)$  What if $p \mid n-1$?   Treating the cases wasn't too efficient. I was thinking about Fermat's theorem but it didn't helped really much.   A hint would be really apreciated. Thanks!


i'm using volley library to receive data from json file I have this problem i don't know the reason for this error     Attempt to invoke virtual method 'android.content.Context.getResources()' on a null object reference     private void fetchRemoteData(final DataStatus callback){     StringRequest stringRequest = new StringRequest(Request.Method.GET,             URL_DATA,             new Response.Listener<String>() {                 @Override                 public void onResponse(String s) {                      List<Post> listItems = new ArrayList<>();                     try {                         JSONObject jsonObject = new JSONObject(s);                         JSONArray array = jsonObject.getJSONArray("bgs");                         for (int i = 0; i < array.length(); i++){                             JSONObject o = array.getJSONObject(i);                             Post item = new Post(                                     o.getString("img")                             );                             listItems.add(item);                         }                         callback.onSuccess(listItems);                     } catch (JSONException e) {                     }                  }             },             new Response.ErrorListener() {                 @Override                 public void onErrorResponse(VolleyError error) {                     callback.onError(error);                 }             });     RequestQueue requestQueue = Volley.newRequestQueue(getActivity());     requestQueue.add(stringRequest); }   error exist here :  @Override                 public void onErrorResponse(VolleyError error) {                     callback.onError(error);                 }


Am I eligible for transit without visa at Heathrow Airport?

I will be traveling from Chicago to Copenhagen on 15th December with an overnight layover at Heathrow airport (Terminal 3, American airlines). I'll be reaching UK at 10:45 pm and will be leaving the next day at 8:45 am from Terminal 5.  After going through the official UK government visa site I understand that I should be eligible for transit without visa at UK since I have a US visa (F1). I am an Indian citizen.  I do not have enough time to apply for a visa at this point and I really hope I do not need to. I have tried to contact the embassy and have also tried getting in touch with an immigrant advisor but to no avail. They are either unreachable or cannot appropriately reply to my queries. So any information regarding this would be greatly appreciated.  Also if anyone faced a similar situation please let me know what happened.


How to get space component of weak field (linearized) metric?

For Minkowski space with a weak gravitational field the metric takes the form $$ ds^2 = (1+2\phi/c^2)c^2dt^2 -(1-2\phi/c^2)(dx^2+dy^2+dz^2), $$ where $\phi$ is the Newtonian gravitational potential. You can get the $(1+2\phi/c^2)$ factor in front of the $dt^2$ by starting with the geodesic equation and going to the "Newtonian limit" of slow speeds and a slowly changing field. But is there a way to get the $(1-2\phi/c^2)$ factor for the spatial part of the metric by a similar procedure? What about some clever thought experiment?


If $E$ has Lebesgue measure $0$, must there exist a translate such that $E\cap E+x=\varnothing$?

If $y\in E\cap E+x$ then $y=h=h'+x \implies x=h-h'$ for $h,h'\in E$. Likewise, if $x=h-h'$, then $h\in E\cap E+x$. So that $E\cap E+x$ is non empty iff $x=h-h'$ where $h,h'\in E$. Thus, if there exists a real $x$ which cannot be expressed as above, the result is proven. The problem is I cannot prove that such an $x$ must exist. I have tried assuming that all real $x$ are of that form, but that gives me nothing except that $E$ must be uncountable and unbounded. Any hints?


I have a text file, i want to search for tags such as the following:  <category="SpecificDisease">Type II human complement C2 deficiency</category> <category="Modifier">Huntington disease</category> <category="CompositeMention">hereditary breast and ovarian cancer</category> <category="DiseaseClass">myopathy</category>   and produce the following  and write them to a new text file.  Type II human complement C2 deficiency Huntington disease hereditary breast and ovarian cancer myopathy


How can you use optional parameters in C#?

Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).  We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking query params like &a=foo &b=bar.   The classes needs to support optional parameters, which isn't supported in C# the language. What's the best approach?


Material won't apply to mesh with UV map

I'm tryning to apply a Texture Image to an object, but it don't work. I unwrapped the object and created the image in the UV/Image Editor. If i try to assign any other simple materials with just color, it won't work either. In the material preview it's showing nicely. As you can see   Thanks!


Will “Erase Ubuntu16.10 and reinstall” keep my Win7 installation?

I want to install a new Ubuntu on a drive where a previous Ubuntu system is already installed beside Windows7.  The first option says that only Ubuntu will be replaced.   The second says that all will be erased.  I only want Ubuntu replaced with the  new one while keeping Windows7 untouched.  Is the first option (“Erase Ubuntu16.10 and reinstall”) the good one in this case?


Code is not updated without hard reload or clear cache

I have tried to solve browser cache problem using cachebuster value appended to javascript file referemce, tried to use combination of meta tag for cache control, force browser to clear cache using version no in filename, but none can lead to final solution. Breaks in between in random manner. Code is not updated without hard refresh or clear cache. Can anybody help on this?


Is it important to use the word "I' in this sentences

I've read how the use of the word I isn't always necessary when writing a resume as the employer already knows that the resume belongs to the job applicant. However some of these sentences sound incomplete without the word I, So i would like to know if its really necessary to include the word I in the beginning of these sentences.   1.I have maintained a clean record, both at school and work, by always acting with honesty.   2.I grew up in a respectable household and was brought up to appreciate and uphold moral values.  3.I strictly  adhere to instructions and devote undivided attention to details.  OR  1.Maintained a clean record, both at school and work, by always acting with honesty.   2.Grew up in a respectable household and was brought up to appreciate and uphold moral values.  3.Strictly adhere to instructions and devote undivided attention to details.  Note: I am not asking anyone to proofread my sentences , I just want to know if i can use the sentences with or without I in the beginning.


I have recently completed a manuscript and I want it to submit to the arXiv. But there I find that there is an endorsement requirement. But since I am quite new in this field (and this is my first time wanting to submit to arXiv), I don't know how to find an endorser myself. I have mailed the admin also but in reply they also told me that searching for an endorser is a responsibility of the author himself. So, can anyone help me regarding the process as to how to find an endorser?


I am attempting to access a variable in a view in django. It works in one view but it doesn't work in the other one, although it is not passed as a parameter in both.  The variable is imported from .apps and is called botlist_root. It contains a list of the bots running on the server.   This is the view where it does work:  @login_required def bot(request, name):     if request.method == 'GET':         for bot in botlist_root:             if bot.getname() == name:                 context = {'bot': bot}                  return render(request, 'bot_manager/details.html', context)          context = {'name': name}         return render(request, 'bot_manager/error.html', context)     else:         for bot in botlist_root:             if bot.getname() == name:                 context = {'bot': bot}                 bot.start()                  return redirect('./', context)   And this is the View where it does not work:  @login_required def index(request):     if request.method == 'GET':         namelist = []         for bot in botlist_root:             namelist.append(bot.getname())         context = {'bots': botlist_root}         return render(request, 'bot_manager/index.html', context)     else:         botlist_root = listbots()         namelist = []         bots = botlist_root          for bot in bots:             namelist.append(bot.getname())         context = {'bots': bots}         return render(request, 'bot_manager/index.html', context)   These are all the import statements:  from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .apps import botlist_root, listbots from django.template import TemplateDoesNotExist   I do not understand why I can access botlist_root from the bot view but not from the index view.


In JavaScript nested functions are very useful: closures, private methods and what have you..  What are nested PHP functions for? Does anyone use them and what for?  Here's a small investigation I did  <?php function outer( $msg ) {     function inner( $msg ) {         echo 'inner: '.$msg.' ';     }     echo 'outer: '.$msg.' ';     inner( $msg ); }  inner( 'test1' );  // Fatal error:  Call to undefined function inner() outer( 'test2' );  // outer: test2 inner: test2 inner( 'test3' );  // inner: test3 outer( 'test4' );  // Fatal error:  Cannot redeclare inner()


What prevents ships firing phasers and photon torpedoes through a cloak? I have yet to see a episode where this is brought up. It may have been mentioned in The Undiscovered Country, as I know there is a kingon ship that does it, but I have not seen that movie in years. Is it addressed there or somewhere in one of the series'?


Let's say we are categorizing people in a photograph. Which of these is correct?   Artists with hats Artists with a hat   No artist has multiple hats.  The first option sounds better to my ear, but I'm not sure. Is either one definitely wrong? Why? Is there a name for this rule?  To make my example, a full sentence, I might say: "Please identify the artists with hats."


What is wrong with this deduction to show that within a multiplet different state has different square angular momentum?

I am watching Susskinds's lecture , in which he introduced square angular momentum operator $L^2$, which can be written as $$ L^2=L_z^2+L_-L_++L_z $$ where $$ L_\pm=L_x\pm iL_y $$  Besides, he argued that the spectrum of $L$ can only be $m,m-1,\cdots,-m+1,-m$ in which $m$ is an integer or half-integer. If we denote $|m\rangle$ the eigenvector corresponds to eigenvalue $m$, we have $$ L_\pm|l\rangle=|l\pm 1\rangle\;\text{or}\;0 $$  In the lecture he showed that $L^2|m\rangle=m(m+1)|m\rangle$ for $m$ the highest eigenvalue, by $$ \begin{align*} L^2|m\rangle&=L_z^2|m\rangle+L_-L_+|m\rangle+L_z|m\rangle\\ &=m^2|m\rangle+0+m|m\rangle\\ &=m(m+1)|m\rangle \end{align*} $$  Then he left an exercise to show that for any $-m\leqslant l< m$, we also have $|l\rangle$ is an eigenvector of $L^2$ with eigenvalue $m(m+1)$.  In the lecture, he hinted by showing that it suffices to show that $L^2$ commutes with $L_i$ for $i=x,y,z$, which gives us $$ L^2|m-1\rangle=L^2L_-|m\rangle=L_-L^2|m\rangle=L_-m(m+1)|m\rangle=m(m+1)L_-|m\rangle=m(m-1)|m-1\rangle $$  I believe it is true since I find the   online.   However, my question is that, why the following proof is wrong.  I tried to mimic the proof for $|m\rangle$ to have that  $$ \begin{align*} L^2|k\rangle&=L_z^2|k\rangle+L_-L_+|k\rangle+L_z|k\rangle\\ &=k^2|k\rangle+L_-L_+|k+1\rangle+k|k\rangle\\ &=k^2|k\rangle+|k\rangle+k|k\rangle\\ &=(k^2+k+1)|k\rangle \end{align*} $$  which shows that $|k\rangle$ does not have eigenvalue $m(m+1)$ but $k^2+k+1$ for $k<m$.


"A rose by any other name would smell as sweet" but with a more negative connotation

"A rose by any other name would smell as sweet" is from Shakespeare's Romeo and Juliet. It means: what matters is what something is, not what it's called.  I feel like this phrase has a very positive connotation to it: what matter is not what this fantastic thing is called, it matters what it is. Is there another common phrase, metaphor, or idiom I can use that has a more negative connotation? I'm looking for a phrase that says that it doesn't matter what this bad thing is called, it's still the same bad thing.  An idiom like, "lipstick on a pig" or "sugarcoating" means making a bad thing seem less bad. This is not what I'm trying to convey.


How to change root password back to DEFAULT

I already set-up my root password in Ubuntu. But for some reasons now I need to set it back to default as when Ubuntu is freshly installed. I no more need my set root password. How can I set it back to default? I know my root password. When I supply with empty password to set it back to default it says "Cannot be empty"


For:  $hello="hello > world"   Why does echo not print the newline for:  echo -e $hello   But if I put $hello in quotes it does.   $ echo "$hello" hello world   Is this because of ANSI-C Quoting? Shouldn't echo -e interpret the newline I inputted?


If $(a_n)\subset[0,\infty)$ is non-increasing and $\sum a_n<\infty$, then $\lim{n a_n} = 0$

I'm studying for qualifying exams and ran into this problem.  Show that if $\{a_n\}$ is a nonincreasing sequence of positive real numbers such that $\sum_n a_n$ converges, then $\lim_{n \rightarrow \infty} n a_n = 0$.  Using the definition of the limit, this is equivalent to showing \begin{equation} \forall \varepsilon > 0 \; \exists n_0 \text{ such that } |n a_n| < \varepsilon \; \forall n > n_0 \end{equation} or \begin{equation} \forall \varepsilon > 0 \; \exists n_0 \text{ such that } a_n < \frac{\varepsilon}{n} \; \forall n > n_0 \end{equation} Basically, the terms must be bounded by the harmonic series. Thanks, I'm really stuck on this seemingly simple problem!


What if two twins flew off in opposite directions and were reunited in a perfectly symmetric way, would they have aged same?

If No, well this can't be, as there is perfect symmetry, you can't tell one from the other.  If Yes, they had relative velocities all along, then their times must have dilated and somehow they must not agree with each other.  P.S I know I am wrong, please help me find out where.  P.P.S For all those who are marking this as a duplicate question of , I think this is not same as plain old twin paradox because its made symmetric and the essence of the question is not how do you solve twin paradox, instead it is why is this not like twin paradox?


How do I stop textures from blurring when rendering small images

EDIT: This question is different from  because I am not rendering a low-resolution texture into a high resolution image. I am rendering a high resolution texture into a low resolution image. The same solution to that question does not apply here. This is what the texture looks like:    I was hoping to use Blender to render sprites for a little game I am making. I started working on tiles and I noticed something weird.  In this example image, the left half is just a stretched out plane that has UV mapping to a texture. The right half is a completely separate object using the same material/texture, except that it is not UV mapped. You will notice that I am getting a pretty weird effect. Here is the un-edited raw rendered .png that I got from blender:    On the left half, the image is being blurred, blended, interpolated(?). The right side without the UV mapping seems confused, part of it is blurred but on the far right the image remains pixelated! The next image is blown up preserving the pixelation so it is easier to see:    Is there a way to intentionally get this effect? I tried turning off interpolation but that didn't seem to do the trick. After looking through the settings and googling around, I don't see anyone else having this problem. Note: Right now I am not using material/texture nodes. I am still a blender noob and not sure how to set those up let alone do advanced things with them...yet.  If there is an easy solution that does not require nodes, can I please have that solution first?  If I cannot avoid using nodes, would someone mind helping guide me to how I may get this done with the use of nodes?


Mechanism by which a moving single electron generates a magnetic field

It is possible to generate a single flying electron (S. Hermelin, et.al., "Electrons surfing on a sound wave as a platform for quantum optics with flying electrons", Nature, 21 Sept 2011, 477 (7365)).   What is the mechanism by which such a single electron moving in free space generates a magnetic field?


Interpreting 2D correspondence analysis plots

I've been searching the internet far and wide... I have yet to find a really good overview of how to interpret 2D correspondence analysis plots. Could someone offer some advice on interpreting the distances between points?   Perhaps an example would help, here is a plot that's found on many of the websites I've seen that discuss correspondence analysis. The red triangles represent eye colour and the black dots represent hair colour.    Looking at the graph above, could you make a few statements about what you see in these data. Points of interest about the different dimensions and relationships between triangles and dots?   An explanation of row-points verses column points, and the use of the word "profile" with particular focus on the example would be instrumental.


Is $R=K[|x^3,x^2y,xy^2,y^3|]$ a Gorenstein or a regular ring?

Let $K$ be a field and $R=K[|x^3,x^2y,xy^2,y^3|]$ the ring of formal power series. Is  $R$ a Gorenstein ring?  $R$ is Cohen-Macaulay of dimension 2.   So, I have to check if $\operatorname{Ext}^2_{K}(K,R)=K.$ I  need  some  hints  about  that.


I need to restart from the root command line

I need help restarting/shutting down from the root command line, any commands I could use? I don't like hard resetting


I accidentally downvoted a , which I didn't mean that.  It must be because I used my iphone this afternoon and I didn't close my browser when I put my iphone back to my pocket.  I want to undo it but it was done more than 5 hours ago.  I feel really sorry for the person who asked the question.  How can I undo it?


I never saw anyone work as hard as he did, many a time I saw him on the weekends working to his highest standards to give the best research he could give.   From the context, I understand many a time equals many times. My question is when we can use this structure. Can we, for example, say many a person in place of many people?  A link explaining this structure will be appreciated.


Choosing a Stackexchange Subsite to Ask a Question At

Is there a tool that will help me decide? I think there should be one. There two many interrelated stack exchange sites, and it is in the best interest of the network that post be well categorized (unless some sort of grand unification is planned, which might not be a bad idea--aren't these subsites just another type of tag after all?). At the same time, humans shouldn't be expected to be deeply familiarized with the intricacies of what makes a post more suitable for "Stack Overflow", "Ask Ubuntu", "Web Applications", "Server Fault", "Unix and Linux", "Webmasters", "Super User", "Programmers", etc. when you well may have a question that touches each label.  I think those intricacies are well embedable in a piece of software that could direct/redirect me to particular subsite based on the text content of my question, its title, and possibly my answers to a couple of questions, if I choose to answer those.


I recently installed a USB with a windows 7 bootable, the USB now says the disc is write protected. I Cannot appear to find any way to fix this so i can use the USB again, apart from programs found on google, which i have a bad expirence with.


What languages to get by with in most of the world?

When traveling it is a great experience to talk to locals and make friends. Sometimes also emergencies and unforeseen situations require one to ask for help and seek assistance.  In most cases of course, the official language of a country is the safest bet if one wants to be sure to be well-prepared for any situation and make the most of one's stay in a country.  On the other hand, it is unreasonable to assume tourists would learn the official language of each country they visit. Language acquisition takes a large amount of motivation, time and resources, which a holiday trip in general doesn't allow.  From a general point of view, what (approx.) 3 languages are the most useful to learn to communicate in the most places in the world?    Some of my thoughts on this:   English is the most obvious choice, since it has the most L2 speakers and is spread over most of the world, i.e. it is not concentrated in one country. Mandarin or Cantonese might have the most L1 speakers, but the use is quite limited to China itself. Unless the trip goes to China, it might not make much sense to spend the time to learn those languages. German for example might be useful, since it is spoken in several countries. However, most German speakers (or Europeans, for that matter), have a good knowledge of foreign languages and are likely to know English or French. Therefore, German is probably also not necessary to learn. Russian is a language I could see make the list; it widely spoken in many countries, especially in places where English is not prominent and the official language has few speakers (Estonian, Bulgarian, Tajik, etc.)


Ubuntu randomly freezes after bootup after switching to nvidia proprietary drivers

After a minimal install of Ubuntu 18.04, I switched to using NVIDIA's proprietary drivers. Recently, I've noticed that the screen would randomly freeze after boot up. Nothing works, I can't even enter text mode, till I hard reset. Right now it is working fine but I'm typing this after restart. This typically occurs when I'm on Firefox. I can't figure out what might be causing this.


I want to know if a sentence like this is possible: "After leaving school, John became a barrister, Alex a judge and Mark a writer." In the last two instances, "became" is omitted to avoid unsightly repetition. But it is grammatically correct to omit verbs in cases like these? Most of the examples I can find online deal with parallel constructions rather than list-like examples like these. Any help much appreciated, thanks!


I have a Dell Latitude e6410 what has i5-520M processor.  It's running between 1.2-2.4 GHz. I think my turbo is switched off. How could I turn on to achive ~3 GHz? In my previous laptop I simply used that command to turn on the turbo, but now I don't have that directory.  echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo    about my computer.


What Sci-Fi book around 2010s about aliens on earth?

The story is about a girl who was able to see ghosts(?) (not sure which term was used) and had been captured by government and was given to aliens lived in an underground city near London(?) (also not sure) to become a slave. She was claimed by a male alien and became  mystically connected with him. In the end (as I recall) she was able to escape with some slaves.  I read it in English somewhere around 2010. Does anyone recognize the book I'm referring to?


You are given a string of $10$ characters, that can either be 'A' or 'B'. How many of them do not contain the string 'ABA'? What I thought was to adopt a recursive approach. Supposing we know the number $n_7$ of strings of $7$ characters that don't contain 'ABA', then we have a choice of 8 places to put that string in, so there will be $2^{10}-(8 \cdot n_7)$ strings that satisfy the request. Similarly, we can find that $n_7$ is equal to $2^7-(5 \cdot n_4)$, and that $n_4=2^4-(2 \cdot n_1)$. Since $n_1$ is obviously equal to $2$, we can subsitute that in and get $n_4=2^4-4=12$ $n_7=2^7-60=68$ $n_{10}=2^{10}-544=480$ Is my reasoning correct?


How do we find the antiderivative of $x^x$

Can we find the antiderivative of $x^x$? I  know that $\int x^xdx$ is not an elementary  expression, but can we find another expression？


Possible Duplicate:          please help me with this  $$\sum\limits_{k=0}^{\infty}\frac{k}{3^k}$$  I need just a hint, not a full answer. Thanks!


Anime in which the hero is a kid and his ace monster is a lion who becomes a giant when the hero throws a gemstone in its head

Here's what I remember:  The gemstone was dropped by a guy in the forest who was carrying a big bag full of other gemstones that summon other monsters by the same way (putting the gemstones in the monsters' heads).  The kid saw the gemstone and used it. The hero and the lion fought many battles against lots of monsters. I remember that one battle was against a two-headed snake.


Ubuntu 17.10 not recognizing Broadcom wireless adapter BCM 4360 [14e4:43a0]

I have just installed Ubuntu 17.10 and my ASUS wireless adapter is not found.  The result of lspci -v:  Network controller: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter (rev 03) Kernel driver in use: bcma-pci-bridge Kernel modules: bcma   I do not have an internet connection on the system. I have never had an issue with this system and the wireless adapter on previous versions of ubuntu (as far back as 16.04). Have the necessary drivers been removed from the linux kernel? How do I get the drivers installed without an internet connection?


Windows equivalent of the Linux command 'touch'?

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


How to Mysqli Escape string without access to the db connection?

I am trying to modify some code and I wanted to use mysqli instead of mysql if possible.   Here is what it looks like today.  $query = sprintf("select * from table where column = '%s';",mysql_escape_string($value)); $result = do_query_mysqli($query, __FILE__, __LINE__);   the function do_query_mysqli is in another file and I don't want to modify that file if possible.   That function also includes $link to connect to the DB.  I do not have access to $link in the file I am modifying.  What is the best alternative to the code below if I want to achieve a similar result but I don't have access to $link?  $value = mysqli_real_escape_string($link, $value);   Thanks!  Edit --  None of the answers and comments address my issue which is I am trying to reduce the risk of sql injection without having to change the function that executes the queries.  But I will look into the solutions suggested anyway.  Thanks.


Access a variable in VF page from Controller without using get set method

I have a visual force page as below:  <apex:page standardController="Interview__c" extensions="SkillReviewExtension">    <apex:form >        <apex:pageBlock title="Candidate Skill Evaluation" id="skills_list">  <apex:pageBlockButtons location="top"> <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Edit" action="{!Edit}"/> </apex:pageBlockButtons>          <apex:pageBlockTable value="{! SkillReview }" var="ct" >         <apex:column value="{! ct.Skill__c}"/>        <apex:column headerValue="Level">          <apex:selectList value="{!Level1}" multiselect="false" size="1" rendered="{!isEditMode}">                 <apex:selectOption itemValue="1" itemLabel="1"/>                 <apex:selectOption itemValue="2" itemLabel="2"/>                 <apex:selectOption itemValue="3" itemLabel="3"/>                  <apex:selectOption itemValue="4" itemLabel="4"/>                  <apex:selectOption itemValue="5" itemLabel="5"/>             </apex:selectList>              <apex:outputText value="{!Level1}" label="You have selected:"/>        </apex:column>         <apex:column headerValue="Description"/>        <apex:column headerValue="Comments">        <apex:inputTextarea value="{!inputValue}" id="theTextInput" />         </apex:column>         </apex:pageBlockTable>    </apex:pageBlock>       </apex:form>   </apex:page>   I have a controller extension as below:  public class SkillReviewExtension{      private final Interview__c review;     private boolean isEditMode;  public String Level1{get;set;}   public SkillReviewExtension(ApexPages.StandardController stdController) {         this.review= (Interview__c)stdController.getRecord();      }      public List<Skill_Review__c> getSkillReview() {          List<Skill_Review__c> results = [SELECT Id,Name,Skill__c FROM Skill_Review__c where Interview__c =:review.id];          return results;      }           public List<SelectOption> getCountriesOptions() {         List<SelectOption> countryOptions = new List<SelectOption>();         countryOptions.add(new SelectOption('','-None-'));         countryOptions.add(new SelectOption('1','1'));         countryOptions.add(new SelectOption('2','2'));         countryOptions.add(new SelectOption('3','3'));         countryOptions.add(new SelectOption('4','4'));         countryOptions.add(new SelectOption('5','5'));          return countryOptions;     }      public String inputValue {get; set;}      public PageReference save(){         isEditMode=false;         return null;     }      public PageReference edit(){         isEditMode=true;         return null;     }      }   I am trying to access the varibale named isEdit in my Visualforce page from controller. I can't do this by get and set method. How can the isEditMode variable can be accessed in rendered="isEditMode".


On the HTTPS version of Stack Exchange, all links are HTTPS, except some links on the topbar. I am mainly concerned about links in the inbox.


What is the "substantial difference" that might occur in the google shares?

What is the "substantial difference" that might occur between the google shares?


What is mean "x" in second field of /etc/shadow file


AggregateException during debugging forces restart of ForAll body

I'm experiencing really strange behavior, which I cannot neither understand nor explain. I was able to create a really simple sample to demonstrate that. That was reproduced on VS.Net 2013 & 2015 on different machines with several target .Net versions.  using System; using System.Linq;  namespace Sample {     internal static class Program     {         private static void Main(string[] args)         {             ExecuteInParallel(new[]             {                 new Tuple<string, Action>("Task1", () => { }),                 new Tuple<string, Action>("Task2", () => { throw new Exception("Exception"); })             });         }          private static void ExecuteInParallel(Tuple<string, Action>[] tasks)         {             tasks.AsParallel().ForAll(x =>             {                 Console.WriteLine("Starting " + x.Item1);                 x.Item2();             });         }     } }   When you just run that code without debugging, you receive what expected: two task started, one failed, and AggregateException details in console:  Starting Task1 Starting Task2  Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Exception: Exception    at Sample.Program.<Main>b__1() in d:\temp\ConsoleApplication40\ConsoleApplication40\Program.cs:line 13 ...   But when you start the same code with debugging, results are really weird. First, you receive AggregateException:     But when you click Continue, it just starts both tasks again and again - here is sample output from Console:  Starting Task1 Starting Task2 Starting Task1 Starting Task2 Starting Task1 Starting Task2 Starting Task1 Starting Task2   I was using two tasks to demonstrate that they are both restarting; you can comment out empty one and receive the same confusing results.  My question here - is this a VS.Net bug, or some feature I don't understand?  Is there a way to debug in a "normal" way here?


And just like that, I have 150k rep. Umm.. What?

I just noticed this on the  on Area 51:    This is wrong on so many fronts:   I don't have anywhere near 150k network rep It shows to other people (I've checked this) that I do It cheats others out of their rightful place in the total reputation list.   I honestly don't know how/why it happened, but I do know I don't have 150k rep. About 30 minutes before it went to 150k, I noticed it was at 148k, if it helps anything.  As mizo pointed out in the comments, the 150k seems to be the combination of my rep + my two referred users:     125831 (Rory Alsop) + 5673 (RhysW) + 18472 (Undo) = 149976


What would happen to a wizard / a witch if they never find out they can do magic?

For instance, what would have happened to Harry if the Dursleys never told him anything, if he never received a letter from Hogwarts, or if no one ever told him he was a wizard? Would he just live his live wondering why he sometimes does something strange?