Cloned Ubuntu won't launch without original drive

I have Ubuntu 14.04 LTS installed on a partition of an external HDD, with bootloader placed in my sata SSD /dev/sda (Win10)  I wanted to clone the linux system for use on another pc, I succeeded in cloning but grub was broken/not installed properly, ran boot-repair, got that sorted and now I've run into another issue that I can't seem to find anywhere else.  I plugged out my SSD and EHDD, attempted to boot from the usb drive I cloned into, grub appears, I choose Ubuntu, and it gets stuck at "Starting Up"(Grub Legacy) or a Black Screen with flashing underscore(Grub2). The second I plug in my EHDD, the system boots and I'm running linux off my USB and I can plug my EHDD out.  Boot Log (I plug EHDD in at 105):   Boot Repair Info Log:   USB's UUID is 917cebdf-ce75-4113-a8cf-0d9c999d1910 , EHDD has a different one.  EDIT:(1 Month Later) I have quite literally POINTED out that I have changed the UUIDs, but apparently some people choose to be ignorant and mark this as a duplicate.   For those who may run into the issue I have in the future, please thank those that marked this as a duplicate as I sincerely doubt anybody will click this question now. I have yet to find a solution to the problem.


How to correctly write the thousands separator in American English?

I am not a native speaker and I must write a scientific document in American English. How would you correctly write "10000" using LaTeX ?   with a space only (10 000): $10\,000$ with a coma and no space in either side (10,000): $10{,}000$ with a coma and a space on its right (10, 000) : $10,000$   I have seen the second a few times, but I do not know if there is a consensus. Thanks for your help!


Birthday line to get ticket in a unique setup

At a movie theater, the whimsical manager announces that a free ticket will be given to the first person in line whose birthday is the same as someone in line who has already bought a ticket.  You have the option of choosing any position in the line. Assuming that you don't know anyone else's birthday, and that birthdays are uniformly distributed throughout the year (365 days year), what position in line gives you the best chance of getting free ticket?


During the events of the Harry Potter series what is the total population of Wizards/Witches globally?

The question "" got me to wondering how many wizards and witches there were on the planet during the events of the Harry Potter series.    Was there any information given regarding this, either in the books or from JK Rowling herself? If there is not, then a best guess calculation would suffice.


Can we supply 2A DC current at 5V in the pair of ethernet CAT 5e cable?


Nvidia driver updated - mixed versions of 304.88 and 319.32

My problem is that after trying to update my driver through the additional drivers GUI I can't boot Ubuntu with GUI anymore, since Xorg says the kernel module is of version 304.88 (The old version before I updated) but the driver components are of version 319.32 (The new version)  This is the output of dpkg -l | grep nvidia  dkpg -l | grep nvidia ii nvidia-304 : 304.88-0ubuntu0.0.3  NVIDIA binary Xord driver, kernel module and VDPAU library ii nvidia-319 : 319.32-0ubuntu0.0.1  NVIDIA binary Xord driver, kernel module and VDPAU library ii nvidia-common : 1:0.2.44.2  Find obselete NVIDIA drivers ii nvidia-current : 304.88-0ubuntu0.0.3  Transitional package for nvidia-current ii nvidia-settings : 304.88-0ubuntu.0.0.3  Transitional package for nvidia-settings ii nvidia-settings-304 : 304.88-0ubuntu.0.0.3  Tool for configuring the NVIDIA graphics driver ii nvidia-settings-319 : 319.32-0ubuntu.0.0.1  Tool for configuring the NVIDIA graphics driver   That's the output of that file.  The message startx gives me is:  NVIDIA: API mismatch: the NVIDIA kernel module has version 304.88, but this NVIDIA driver component has version 319.32. Please make sure that the kernel module and all NVIDIA driver components have the same version.     Fatal server error:    no screens found   I understand that something went wrong during the update, so I wonder how to fix this so that the remaining parts of 304 are removed and replaced with 319. I don't know hwere to start because I thought that nvidia-current was the one that would update to 319 and so reinstalling that didn't work. And I googled and found that somebody said to try to install/reinstall/uninstall this package: nvidia-current-updates-dev  But I didn't have that package installed so it did not help. Other than that, I am clueless. I hope the information I provided will be enough so I can get an answer soon.  EDIT:  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.3 LTS Release: 12.04 Codename: precise  uname -a Linux SQuad 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:21:44 UTC 2013 x86_64 x86_64 x86_64 GNU/LINUX


Call subprocess "ls -l folder | wc -l" in python can't be done

I want to run this command using call subprocess  ls -l folder | wc -l   My code in Python file is here:  subprocess.call(["ls","-l","folder","|","wc","-l"])   I got an error message like this:  ls: cannot access |: No such file or directory ls: cannot access wc: No such file or directory   It's like command |wc can't be read by call subprocess.  How can i fix it?


database in txt format with special characters

I have a database that is stored in txt format.`        I would like to transform it to a MySQL database so that the special characters like ā or ă remain. It does not work if I just export it.


Why are some network interfaces named eth1 or wlan0 while others are named wlp4s0?

I watched a few tutorials for wireless hacking and everywhere they have network interfaces called wlan0, eth0, ... but my interface is called wlp4s0. Does that mean, I have to use another tutorial, because simply replacing wlan0 with wlp4s0 does not seem to work?  oussema@super-computer:~$ sudo airmon-ng start wlp4s0   Found 2 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to kill (some of) them!  PID     Name 2463    avahi-daemon 2470    avahi-daemon   Interface   Chipset     Driver  wlp4s0      Broadcom    wl - [phy0]mon0: ERREUR en récupérant les signaux de l'interface: Aucun périphérique de ce type (translated from french to english: ERROR when retrieving the signals from the interface: No device of this type)              (monitor mode enabled on mon0)


Evaluating the integral $\int \frac{x^2+x}{(e^x+x+1)^2}dx$

Evaluate $$\int \frac{x^2+x}{(e^x+x+1)^2}dx$$    I tried converting in the form of Quotient rule(seeing the square in the denominator), neither am I able to make the denominators' derivative in the numerator. Some hints would be great. Thanks.


How can I force Google Calendar to sync/update my Tripit iCal feed?

I have had my TripIt feed registered in my Google Calendar for several years, mostly without issue.  However, sometimes, entries that a clearly and accurately registered in TripIt just don't show up in Google Calendar.  I currently have a trip that has both hotel and air reservations in TripIt; it's been in there for weeks, and the trip starts tomorrow, but it still hasn't shown up in Google Calendar.  Oddly, I have past trips, in the last few weeks that are correctly in Google Calendar.  And I have future trips that are correctly in Google Calendar.  But this one just isn't.  I've manually examined the XML and iCal feeds, and the trip is present.  Google Calendar just isn't respecting/reflecting it.  Is there any way to "force" a Google Calendar sync?  I've tried adding/removing the feed, to no avail...


Is there a definitive answer to the problem of free will as follows: How can free Will exist while physics laws tell us (as well as causality) that every state at any given time is the result of the previous states and governed by unchangeable physics laws of nature? I understand in the field of quantum mechanics, there exists uncertainty principle, but it, at best, results in unpredictable states and still does not give us a proof for freewill. Also, some scholars have pointed out “chaos theory” to address this problem and justify the co-existence of freewill and predetermined physics states, but I have seen some good criticisms on this reasoning as well. I am not sure if I am lost in these arguments or there is no definitive accepted answer yet. Thank you all


Consider the experiment of keeping flipping a fair coin until two heads are flipped consecutively. The outcome is the sequence of the flipped result. Possible examples of the outcome include HTHTHH and TTTHTHTTHH. The random variable X is defined to be the number of flips of an outcome. For example,  and X(HTHTHH)=6 and X(TTTHTHTTHH)=10. Find E(X).


I have finished my artwork in Illustrator. It is a logo for my company. It is a horizontal rectangle. I am ready for exporting it so I can use it as part of the header in my Word template. I have got some questions to the process.  Currently the document is 512 x 512 points. However the logo is a rectangular shape, it is placed in the center. Should I create another document with the exact dimensions of the shape so there are no space on the sides before exporting?  And should I export it as a PDF and use that in the Word template? Or as PNG?  I tried exporting the logo as a 512 x 512 point PDF (with no background) but when I open it in Word it shows with the spaces on the side. So how would I deal with this the correct way?


Start tomcat at startup with administrative privileges

I need one process run before log in  to system. How to run it like services? how do I make services in Linux?  In Ubuntu and Fedora? The service is customized tomcat


Getting error "f:\ is not accessible, the request could not be performed because of an i/o device error" when connecting old hard drive to xp machine

Background:  we had an old pc that was connected to some old label printers but that pc does not boot up anymore.  That pc was 32bit windows xp and the software for label printer only works on 32bit xp. So I install xp on a old windows 7 pc that had a serial port for the printers, and I got the old label software and printer drivers installed.    But I want to get the templates off the old hard drive  for the label printer software.  So I tried to connect the old HD to replacement pc as a slave ( on the same connection as the CD drive).  The pc/ Bios recognises the HD and when windows xp boots up it see the drive but i get an error when I try to open the drive "f:\ is not accessible, the request could not be performed because of an i/o device error  This is the old pc HD i'm trying to add.   This is the HD in replacement PC    This is the error msg   Update : The 250 drive is working fine, it's the 40gb drive I'm trying to access, but the they r 2 different types of HD (different connections, the bad drive has the same connections as the CD drive so I had to put it as a slave to that, as the other drive 250, had a different connection). The 250 is a sata HD (had to change the settings in the bios to get xp to install on it) could it be a issue because they r 2 different types of HD? On the old broken pc does not even boot to bios, think its unlikely both the motherboard and the HD broke at the same time


I am trying to do this:   Below is the screenshot taken from eclipse  package com.stack.tests;  import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile;  public class PerformanceTesting {        public static void main(String[] args) {             FirefoxProfile profile = new FirefoxProfile();             WebDriver driver = new FirefoxDriver(profile);             driver.quit();         } }   Below is the error code taken while running:  E:\stackoverflow\src\test\java\com\stack\tests>javac -cp selenium-serv er-standalone-2.52.0.jar PerformanceTesting.java  E:\stackoverflow\src\test\java\com\stack\tests>set classpath=%classpat h%;.;  E:\stackoverflow\src\test\java\com\stack\tests>java -cp .;selenium-ser ver-standalone-2.52.0.jar PerformanceTesting Exception in thread "main" java.lang.NoClassDefFoundError: PerformanceTesting (w rong name: com/stack/tests/PerformanceTesting)         at java.lang.ClassLoader.defineClass1(Native Method)         at java.lang.ClassLoader.defineClass(Unknown Source)         at java.security.SecureClassLoader.defineClass(Unknown Source)         at java.net.URLClassLoader.defineClass(Unknown Source)         at java.net.URLClassLoader.access$100(Unknown Source)         at java.net.URLClassLoader$1.run(Unknown Source)         at java.net.URLClassLoader$1.run(Unknown Source)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(Unknown Source)         at java.lang.ClassLoader.loadClass(Unknown Source)         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)         at java.lang.ClassLoader.loadClass(Unknown Source)         at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)   Does somebody know how to fix it?


Cant list custom type posts based on category

Hi, I want to list posts which belong to custom type "news" under a certain category. This is my code: <?php $news = get_posts( array(     'post_type'      => 'news',     'category' => 83 ) );   if ( $news ) {     foreach ( $news as $post ) {         setup_postdata( $post );         the_title();     }     wp_reset_postdata(); } ?>  I get nothing from this and I checked the category ID and its correct. If I use a 0 instead then it lists all posts regardless of their category but any other number will list nothing. Why is that? Please notice that these custom type posts are categorized under a custom taxonomy called news_category. Thank you.


Is there any way for a non-US person to get a US-based bank account?

I live in the EU. After signing up with various brokers across the pond, I noticed that some have decent low-cost deposit/ withdrawal fees, while others' are abnormally high.  For instance, Interactive Brokers charges nothing for SEPA deposits and the first withdrawal is free of charge, but TastyWorks requires you to deposit via CurrencyFair, which takes a ~$20 cut, and then international wire withdrawals are $25 a piece. Which is insane.  I would love to have access to multiple brokerage services, but this requires me to have a US-based bank account to reduce the deposits/ withdrawal fees to 0 (by using the ACH payment network).  Is there any way an EU resident could obtain this, assuming that they have no American family member?


i'm new to this forum. I have the following problem. After i boot my ubuntu 16.04 i can't use the ntfs formated windows partion in the Terminal.  ls /media/xxx/BE309CB8309C79DB   Error file or directory not found. At first I have to click on the partition in nautilius. After this i can also use the command above.  I know it's probably a beginner's question, but how is it possible to get to a status where i can use the path in the terminal right after startup?  Thanks


Search question and answer Hyperlinks for a hostname?

Recently the URL www.antlr.org was changed from pointing to www.antlr3.org to www.antlr4.org. Needless to say there are links that use www.antlr.org for referring to www.antlr3.org that are now wrong.   While I know that search with www.antlr.org will find if www.antlr.org is in the text, it will not find it in the hyperlinks. How do I search the hyperlinks?


I know this was asked , but nothing was ever changed in the system. Why should I be locked out from reviews for a week for trying to improve something? Although I know in  that the edit was not salvageable, some original posts need editing, which I would do, unchecking the "helpful" box.  When you are presented with an edited post audit and you click "Reject," you must give a reason before you pass/fail. Why should this be any different?


Given two Martingale processes $(X_t)$ and $(Y_t)$, are their sum $(X_t+Y_t)$ and their product $(X_t \times Y_t)$ also Martingale?  If not, will the two $(X_t)$ and $(Y_t)$ being independent grant their sum and product Martingale? Thanks!


Gnome Tweak Tool is no longer allowing to move the Gnome Application Menu out of the Top Bar on Ubuntu 20.04

Using GNOME Tweak Tool to disable the  (reference: ) is no more working in Ubuntu 20.04.   How do I get the same effect now?


Windows 10 input languages hot keys or key sequences keep being reset

There are other posts mentioning involuntary keyboard layout change, but none talks about reseting all the user defined key sequences to change those layouts.  The problem: Very often now - the keyboard language key sequences I manually configured (my CTRL + number settings) keep being reset to None.  Does not seem to have anything to do with accidentally pressing the key sequence to cycle between languages - CTRL + SHIFT (which by the way does seem to happen anyway. Like mentioned in other posts, some programs, like Visual Studio, may have shortcuts using ALT + SHIFT - the default key sequence for keyboard layout change windows uses - but I on purpose changed it to something else, to avoid such problem).    How do I fix this ?


Is it possible to restart a display driver?

Is it possibe to restart the display driver during a normal desktop session ?   In the driver section of "Computer Management" there is no option.   But possibly there is some tool or command line to do so?


Elegant proof that maximum of sums is, at most, sum of maximums

I'm looking for an elegant way to show that, among non-negative numbers, $$ \max \{a_1 + b_1, \dots, a_n + b_n\} \leq \max \{a_1, \dots, a_n\} + \max \{b_1, \dots, b_n\} $$  I can show that $\max \{a+b, c+d\} \leq \max \{a,c\} + \max \{b,d\}$ by exhaustively checking all possibilities of orderings among $a,c$ and $b,d$.  But, I feel like there should be a more intuitive/efficient way to show this property for arbitrary sums like the one above.


Problem installing steam in Ubuntu 16.04

I have just install steam from the terminal as you can see:    But when I try to open steam as you can see:    And finally, if I continue with it I get this:    I have already install the Canonical packages from software update, I have tried use the .deb file from steam website but it also didn't work, it always shows me the same. Also, if I click on steam icon it shows me the same image 3.  So, what should I do?


Linear regression with log transformed data - large error

I have a set of data which is has a very large positive skew, and has been transformed using a logarithm. I wish to predict one variable from another using the lm function in R. Since both variables have been transformed, I am well aware that my regression will output the equation:  ln(y) = b*ln(x) + a, where a and b are the coefficients.  The model fit is good, with an R squared of almost 0.6, producing a range of predicted y values.  Now, i have 'back-transformed' the variables using the following equation:  y_predicted = exp(a)*x^b   However, the predicted values for the larger x and y are significantly lower than they should be. Since I am going to be using the mean and sum of all of the y_predicted values in comparison with the y_actual values, this makes my model under predict by around 75%.  Due to the logarithmic scale, a small deviation from the line of best fit in the log domain, has resulted in a very large deviation when back-transformed.  My question, is how to adequately deal with this? I can come up with my own regression coefficients, which ensures that the line of best fit over-predicts some of these larger values, and makes the sum more aligned. However, this would  go against the point of using a linear model in the first place, which optimises the model.  Also, i am not sure how 'statistically' valid this would be, as the method could not be replicated, as the coefficients were determined by eye.  Thoughts welcome!


OpenSSL remains vulnerable after update to 14.04

We have an AWS server running OpenVPN which was built using Ubuntu 13.10. After the announcement of the Heartbleed vulnerability, we updated the server. This morning, we upgraded the server to 14.04. The current output of "openssl version -a" is:  OpenSSL 1.0.1f 6 Jan 2014  built on: Mon Apr  7 21:22:23 UTC 2014  platform: debian-amd64  options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)   compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM OPENSSLDIR: "/usr/lib/ssl"   I verified the fact that the server is still vulnerable using the following:  :~$ openssl s_client -connect openvpn.example.com:443 -tlsextdebug 2>&1| grep 'server extension "heartbeat" (id=15)' || echo safe TLS server extension "heartbeat" (id=15), len=1   Attempts to run "sudo apt-get install openssl" return that the current version is already installed. What are the best options to resolve this issue? Does it appear there was a problem during distribution upgrade; i.e. is the 14.04 OpenSSL package actually outside the danger range? Or is there a possible issue with the repository itself?


Show original question during editing a question

I found some questions that are not very well-worded, and I want to clarify them. So, I went, and edited one of the questions.  As I have poor short-term memory, after editing, I wondered what I have edited.  I cannot find any easy way to see the original version, or a diff.  Of course, I could just click "Back" button to see the question, but I risk losing my edit (in case I just happen to navigate away and lost the "Next" button.) It is inconvenient too. I wish I could make a comparison to ensure the original meaning remains unchanged.  Did I miss anything? I looked around and found , but I cannot just submit the (suggested) edit, which defeats the point that I want to review my edit before submitting/suggesting.  It shows the original question when editing answers, but not editing questions themselves.    In short, may the edit question page shows the original, or a link to it? (I don't find it, I do not have edit privilege if that matters.)  This is what I have, can anyone point out how to access the original question?


Performance of memory-mapped-file and file streams when constant writing and reading to the file are required in C

I have a big binary file (which can be as large as 2^32 bytes). I intend to perform multiple writing and reading operations on it constantly throughout my program (the contents of the file are constantly being updated). I am considering both performance and ease of use.  I looked up a bit and found that people have quite different opinions on it. Some people say that memory-mapping is not beneficial in this case, the others say that memory-mapping is more efficient.  I haven't written any code yet. I am still considering which approach I should use.  I would like to know which approach is more efficient and easier to use. I know that if I use memory mapping I can use memcpy, memset etc. to modify my memory and they will be reflected in the actual file. However, I am new to C so there might be counterparts of these function when using a stream.


How To Disable Action Animations When Firing?

It feels like the firing animations take a ridiculously long time, and although I don't have hard data, I think they take the majority of my missions. The sniper animation is especially egregious, I don't want to watch a guy take 5+ seconds to line up a shot and then miss it.


Whiles reading An Introduction To Statistical Learning under linear regression (Chapter 3), I found:  $$E(Y - \hat{Y})^2 = |f(X) - \hat{f}(X)|^2 + Var(ε)$$  where $E(Y - \hat{Y})^2$ represents the average, or expected value of the squared difference between the predicted and actual value of $Y$, and $Var(ε)$ represents the variance associated with the error term $ε$.  What does $Var(ε)$ mean? Can we just write $ε$ rather than $Var(ε)$?


space of riemann integrable functions not complete

Define norm as $\int |f|$ (Riemann integral) on  $\mathcal R^1[0,1]$, the space of riemann integrable functions on $[0,1]$ with identification $f=g$ iff $\int |f-g|=0$.  Let $\{ r_1,r_2,\cdots \}$ be the rationals in $[0,1]$, and let $f_n=1_{\{r_1,\cdots,r_n\}}$. Then $f_n$ is a cauchy sequence in $\mathcal R^1[0,1]$. I want to show that there is no $f\in \mathcal R^1[0,1]$ such that $f_n$ converges to $f$ in norm. How can I show it?  Obviously the pointwise limit $f=1_\mathbb{Q}$ is not contained in $\mathcal R^1[0,1]$, but can I use this fact? I think that there can be other candidates, since convergence in norm and pointwise convergence are different.


What is the correct punctuation for a question that in itself contains an explanation as to why it was asked? For example:  "Is the book long - I might read it just for fun?" "Is this dress new - I really like it?"  Should there be a comma or a semicolon instead of a dash? Is it considered bad style to break up such sentences into two? Like this:  "Is the book long? I might read it just for fun."  The two-sentence version changes the rhythm, it adds a break between the question and the explanation. Sometimes you want to say (or read) it in a single breath. Is there a special name for these type of questions?


Do dropped items in Minecraft decay, and if so, after how long?

Possible Duplicate:          New Minecraft player and I am trying to dump my wooden tools and rock tools now that I am smelting iron.  My solution so far is to dig a hole away from my dwelling and dropping the items down in it.    Do the items eventually decay?


I read that there are labs that can produces the spikes of the coronavirus. I wonder can they also synthesize ACE2 receptors or parts of them? If yes, can they be used as drugs?


I'm considering purchase of a refurbished Lenovo ThinkPad T510 with Intel Core2 Duo i5-520M processor.  4GB RAM,  250GB HDD,  Intel integrated Graphics  I know it meets minimum hardware requirements. Which Ubuntu version (32 or 64 bit?) would be best for this machine? The Ubuntu desktop certified hardware page for the Thinkpad T510 only mentions Ubuntu 12.04 LTS 32-bit.   Thank you for your help.


I have a page on a site I'm developing titled 'Athletics.'  If I mistype the url as /athletic (instead of /athletics), then my site redirects me to /events/athletic-banquet.  How can I control this behavior?


I have Ubuntu 14.04 desktop machine that VirtualBox installed on it. I make two virtual machines, one Ubuntu server, the other is Lubuntu client. The default setting allow me to get Internet from guests to Internet through 3G modem connected to the host machine cause the guests use NAT by default, but I can't reach from client to server.  I want to put the two guests in separated network and let the guest server to connect to Internet through NAT with another network interface, and make the guest client connect to Internet through the guest Server.  I did the following:   On guest server I added two network interfaces, one for local network and the other for NAT. On guest client I added local network interface only.   What should I do to make the guest server reach the Internet and then make the guest client reach also to Internet but through the guest server?


Better using a variable or invoke always a method?

I have a method that return an object and I need to call multiple times two methods. All of this has to be written in a performed action event.  Which one according to you is the better solution? Which one consume less resources and it's faster?  public void actionPerformed(ActionEvent e) {      Object obj1 = getObject().getSomething1();     Object obj2 = getObject().getSomething2();      doSomething1(obj1);     doSomething2(obj2);     doSomething3(obj1); }   or it's better  public void actionPerformed(ActionEvent e) {     doSomething1(getObject().getSomething1());     doSomething2(getObject().getSomething2());     doSomething3(getObject().getSomething1()); }


why can't I edit /proc/sys/kernel/perf_event_max_sample_rate with vi

I'm root, running Centos8 on bare mental and permissions on /proc/sys/kernel/perf_event_max_sample_rate are as follows  -rw-r--r--. 1 root root 0 Oct  3 14:00 perf_event_max_sample_rate   I want to change the sample rate by opening this file with vi, making the change and then writing it with either w or w!. When I do so it comes back with  perf_event_max_sample_rate" E667: Fsync failed  When I try to quit, it tells me  E37: No write since last change (add ! to override)   So I can't change the value with vi.  However I can change the value with   echo 4000 > /proc/sys/kernel/perf_event_max_sample_rate   Is this simply because /proc is not a real file system and that all changes to things in /proc would have to be made using echo with a redirect, or maybe sed?  Is this behavior documented somewhere?


How to cat file with limit of printed characters from each line?

I would like to cat file, but with limit to max length to each line. For example I a have file with 10 lines each have 10000 characters and I would like to print first 100 characters from each line. Is something like that possible with cat or some alternative? thx.


Custom template file to use themes html/page.tpl

I have a custom module (using Drupal 7) that adds a page using hook_menu(). Its callback just prints the value returned from theme('mytheme_hook').  If the content of my template file is simply 'hello world' I get only a white screen with the text output.  Is it possible for this page to extend the theme's html.tpl (and even page.tpl) with 'hello world' inserted in the 'content section' of the page?   looks like a similar thing I am trying to achieve, but it doesn't offer a solution.


Why do bread companies add sugar to bread?

I have a client who is on a sugar detox/diet. She can't eat any bread because all the bread companies added sugar. Why do bread companies add sugar to their breads?


Any time I open sub folders of the Music folder on this system containing MP3s with Explorer, they always have the music customization, but I tend to use file-naming conventions that don't make this customization necessary... I'd rather just see a general view.   I'm using Windows 7 Home Premium, Compaq CQ2014 (2011).  How do I avoid "music" customization in music sub folders?


How can do I install any software using ubuntu terminal by knowing their name only

Installation Any Software On Ubuntu I want to install any software usinh sudo and apt from terminal. If I know only the software name from their official site, then is it possible to perform this action?


How do I make man pages open in a web browser?

How can I make manpages (from the man command) open in a web browser for easier navigation?


Is there a systematic way of finding the matrix of a quadratic form?

For example i have this quadratic form $q(x_1,x_2)=8{x_1}^2-4x_1x_2+5{x_2}^2$ , here it's a simple factoring:  $q\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix}=\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix} \cdot \begin{bmatrix}8x_1 &-2x_2\\-2x_1&5x_2\end{bmatrix}=\vec{x}^{T}A\vec{x} ,A=\begin{bmatrix}8 &-2\\-2&5\end{bmatrix}$.  But this is not always the case where one can simply see how the matrix is going to be ,so is there a certain method of finding this matrix?


Show that if C $\subseteq$ D then $D^*$ $\subseteq$ $C^*$  where * is dual cone operation. Can somebody explain it.


Python script for identifying duplicate records (follow up)

I am trying to calculate a field that marks duplicates and sequentially numbers them.  I am using the code below that I found here: .  It works, but I get a duplicate starting value before it begins sequentially numbering unless I only run the field calculator on the selected values.  When I calculate after manually selecting the duplicate rows and running it on only those values, it works fine.  Here's the code:  prevFieldValue = '' counter = 0 def GetDuplicateCounter(myFieldValue):   global prevFieldValue   global counter   if myFieldValue == prevFieldValue:     counter += 1   else:     counter = 1     prevFieldValue = myFieldValue   return counter   Results running it on all roads (nothing selected):    Results running it after manually selecting the duplicated fields (not too efficient!).


Why won't closing the lid sleep my MacBook Pro with external monitor attached after upgrading to Lion?

Up until yesterday (with Snow Leopard), closing the lid would cause my MacBook to sleep whether or not the external monitor was connected.  Since upgrading to Lion last night, closing the lid when the external monitor is attached just tosses all windows to that screen and keeps going.  I realize I can sleep via the Apple menu or keyboard before closing the lid. I'd rather not have to, and I'm wondering if there's a setting to restore the sleep-on-close behavior.


It is often stated that masses fall at the same rate towards the Earth at the same rate (barring things like friction), and this seems to be quoted as the Equivalence Principle. Is this statement correct? I was thinking that the force of $M$ on $m$ causes $m$ to accelerate towards $M$ with $a_m = GM/r^2$, and similarly the force of $m$ on $M$ to accelerate towards $m$ with acceleration $a_M = Gm/r^2$. Isn't the relative acceleration $a_m + a_M = G(M+m)/r^2$, and if you're stationary on $M$ it will appear that $m$ is accelerating towards you with an acceleration that depends slightly on $m$? If correct, I assume the correct statement should be something more like "objects of different masses fall in a constant gravitational field at the same rate"? (It may even be that it is?)


Find the value of $\sin x+\sin 3x+\sin 5x....\sin 29x$

This was a part of a larger question. I have the solution with me, but I have a problem with the way they wrote it.   The expression was written as  $$\frac{\sin (\frac{x+29x}{2})\sin(\frac{2x.15}{2})}{\sin\frac{2x}{2}}$$  Is this a formula that I am not aware of, or was it somehow derived from the specific information


I've the follwing enum:  public enum eFlexCreateMode {     Man = 0,     Auto = 1 }   which I convert into a dictionary in order to use inside my wpf page (binded as combobox)  Dictionary<int, string> EnumCreateMode = Enum.GetValues(typeof(eFlexCreateMode)).Cast<eFlexCreateMode>().ToDictionary(t => (int)t, t => t.ToString());  <ComboBox Grid.Column="10" Width="70" ItemsSource="{Binding Path=EnumCreateMode, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ViewerFlexConfig}}" SelectionChanged="Combo_SelectionChanged" DisplayMemberPath="Value" SelectedValuePath="Value" SelectedValue="{Binding ConfigObject.Create_Mode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />   Now I put the summary tag of each items of my enum and I would use it as tooltip for my combobox. Is it possible to achieve a task like this? There's no doc available


Random matrix theory impact on covariance matrix analysis

Framework: From RMT, eigenvalues have a semicircle distribution for symmetric matrices each with i.i.d normally distributed entries as the size of the matrix grows. The restrictions on i.i.d have recently been shown to not matter so we can proceed nevertheless. Example: If we take a covariance matrix of all stock tickets beginning in A comparing the average daily return over a period of time (or any process with no underlying relation), each we can assume lognormal distribution forming a, lets say 10000 by 10000 symmetric matrix. Thus we get a sequence of random covariance matrices. Each of the entries we assume to be i.i.d since the stocks have 'nothing' to do with each other (although a weaker results holds for non-i.i.d entries). Now this series of matrices forms a chain of covariance matrices tending towards the underlying covariance matrix of the entire history of the stocks (if we sampled correctly). Random Matrix Theory implications: We known from RMT that once we decompose these matrices into their eigenvalues, the eigenvalues tend to the semicircle distribution. Since this distribution is continuous, there's a spread in results i.e. there is some underlying variance to the eigenvalue decomposition of covariance matrices. Conclusion: Thus when we use covariance matrices shouldn't there be some sort of hypothesis test that's able to filter out this underlying distribution, similar to comparing normal distributions where we need to account for variance when comparing two mean values. This would be dependent on how i.i.d the random variables are, the size of the matrix, the number of samples taken, and the mean/variance of the random variables themselves. What would be weird about this hypothesis test is that we'd expects as $n$ gets larger so does the error bound, captured by the asymptotic relationship between the size and convergence to the semicircle distribution. TLDR: Is there some sort of hypothesis testing for PCA, or any eigenvalue method, that filters out the underlying tendency of random matrices to share similar eigen-distributions? Similar to how when you compare the mean of two normal distributions you need to perform a hypothesis test to account for the variance.


Which prepositions are followed by accusative pronouns instead of reflexive pronouns?

I have read answers to questions like  but I couldn't find a general rule for using "you" or "yourself", "him" or "himself" that could explain things I see in some examples.  For example, I think that one normally say (according to examples I see in ):   You bring something with you. You have something in you. You have something on you. You pressed her to you.   But on the other hand one would say:   You draw attention to yourself. He killed himself. You can try it out for yourself.   As a general rule, it seems that the reflexive pronoun is used when the object is the same as the subject of the verb. But for prepositional phrases, it seems more complicated. Do some prepositions (like "with", "in", "on") always come with the accusative form of the pronoun, and some other (like "for") don't? What about "to", that seems to be followed by both in different circumstances?


I think my problem should be able to be solved with combination of multisets, but for some reason I do not get the right solution.  Example:   My Number List:(1,1,1,1,1,2) = (5*1, 1*2) Example of a number of 3 combinations Solution = 2 = (1,1,1) (1,1,2) as it is combination the order does not matter   If I am right (which I am sure I am not) I should use: $n=2$ $k=3$  $\binom{n+k-1}{k} = \binom{4}{3} = \frac{4!}{3!1!} = 4$ which is wrong.  I saw a few different solutions for the same problem which does not seems right for me, and there are some definitely wrong solutions. Is there a generic formula?  Edit 1:  After JMoravitz suggestion I spent a bit of time looking into the inclusion exclusion theorem. So these are my assumptions now:  Say I build a table for numbers I can use for simplification:  \begin{array}{|c|c|c|c| C | } \hline 1& 2 & 3 & 4 & list\\ \hline 5 &1  & & &1,1,1,1,1,2\\ \hline 4 &2  & & &1,1,1,1,2,2\\ \hline 4 &1  &1 & &1,1,1,1,2,3\\ \hline 2 &2  &2 & &1,1,2,2,3,3\\ \hline \end{array}  In all the cases $k = 3$ I assume at the first and second problem I should use the same calculation: $|A ∪ B| = |A| + |B| - |A ∩ B| $  The third and forth I assume should be this: $|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C|  - |B ∩ C| + |A ∩ B ∩ C|$  So in my head the first addition is always all the possibilities which should be calculated from the model above. I am wondering what would be $k$ and $n$ in the rest of the calculation like $ |A ∩ B ∩ C|$.


How do I calculate this sum in terms of 'n'? I know this is a harmonic progression, but I can't find how to calculate the summation of it. Also, is it an expansion of any mathematical function?  1 + 1/2 + 1/3 + 1/4 +.... + 1/n


This question has hunted me for a long time, I can only find this Medical proposal on . why don't we have SE medical? Maybe there are some histories I am not familiar with?


what happens and what should happen when an asker accepts a wrong answer?

In , they answer accepted by the asker, as been commented by multiple people, as not being neither standard, nor the recommended method.   What should be done in order to correct that ? (The asker seem to have been inactive for nearly the last 10 years)  Obviously, this is not a duplicate of «». I don't care about the why. What I'm looking for is a way to solve the problem.  Here we have a situation where  : 1/ It has been documented by multiple users, why the answer should not be the accepted one. It works, but the standards do not accept it as the recommended way of doing. And 2/ Since it is tagged as being the accepted answer, it receives supplementary likes from people which are glad with the first solution they find and won't even check comments or other answers  It is quite obvious than normal users won't be able to do it and that it requires help from someone with administrative rights. My question is about how we do that.


I recovered a different system's $MFT file to my desktop for data recovery analysis, but the software named it "$MFT" - a reserved system name. Windows refuses to show it in a directory listing (even if I use \\?\ or \\.\ to prefix the path) so I can't rename it or delete it.  The file does exist on my desktop; I can see it in data forensics programs.  How can I rename the file from the CLI or some other way?


I want to align the axes in (a) and (b) which I've marked on the picture, like they do in (c) and (d)?      The main code is below：  \begin{figure}[!t] \centering \subfloat[]{\includegraphics[width=1.5in]{pre_coherent_a.eps}% \label{pre:a}} \hfil \subfloat[]{\includegraphics[width=1.5in]{pre_coherent_b.eps}% \label{pre:b}} \hfil \subfloat[]{\includegraphics[width=1.5in]{pre_coherent_c.eps}% \label{pre:c}} \hfil \subfloat[]{\includegraphics[width=1.5in]{pre_coherent_d.eps}% \label{pre:d}} \caption{Main processing stages of pre-coherent processing.} \vspace{-10 pt}  % adjust the vertical spacing \label{fig_sim1} \end{figure}


Why gravity decreases as we go under ground?

We all know that gravity decreases as we go upward, we also know that gravity decreases as we go inside the earth? I don't know why gravity decreases as we go downward or inside the Earth? Please explain?


How to upgrade windows 10 os build version to 14393.0 or later?

I want to install the Ubuntu sybsystem on windows 10. But, I found that the os build version required is 14393.0 while I have the build 10586 here what I get when I go settings > system > about    for that,the Linux subsytem is not available for installation on my system.     I have installed the updates before. As a result the version was updated to 1511 but the OS Build remained as it is   the question:  Is their any way to upgrade the OS Build to a higher version that support installing Linux subsystem without reinstalling windows ?


how to get the archieved version of 2.79b which WON'T install?

I want to run 2.79 and 2.8 on the same machine, but 2.8 destroyed my 2.79. I need a link to the UNINSTALLABLE v 2.79b.


Why does a copyright on a website include?

I'm designing a new site and I take ideas from sites but mix them around a little bit. All companies have the copyright on their footer, what does the copyright include?  For example, can you copyright the flow and structure of a site? Or, just the concept and logo?


Can anyone help me to find a latex manuscript template for European Journal of Operational Research with exactly in this format?


I receive the error 'grub-install /dev/sda failed' while attempting to dual boot Ubuntu along with Windows 10

I've looked into other answers for this error, but none of them works. So, marking this question as duplicate is futile.   Partition Details:    Output of sudo fdisk -l:    Output of Boot-Repair:     Output of sudo parted -l:   I am trying to dual boot Ubuntu 16.04 with Windows 0. I've tried both Try Ubuntu and using desktop shortcut and installing directly. No improvements.  The details of the errors and log files are


Mathematical Olympiad Treasures Problem 3.27 how many ways to fill a table such that product of entries equal -1

The question is:  In how many ways can one fill a $m × n$ table with $±1$ such that the product of the entries in each row and each column equals $−1$?  So far I believe that $m,n$ must have equal parity, but have not made much progress past that.


Array of generic LinkedList (NullPointerException)

I always get an NullPointerException, why??? When I run debug the int i is set to -1.... But I don`t understand it because the array is getting initialized with a LinkedList and something is added.  For notice this is the test I`m running:  Dictionary<String, String> dict = new HashDictionary<>(3); System.out.println(dict.insert("gehen", "go") == null); System.out.println(dict.insert("gehen", "walk").equals("go"))   and this is my code:  private static final int DEF_CAPACITY = 31; private int size = 0; public LinkedList<Entry<K,V>>[] tab;  @SuppressWarnings("unchecked") public HashDictionary() {     tab = new LinkedList[DEF_CAPACITY];     for(int i = 0; i < tab.length; i++) {         tab[i] = new LinkedList<>();         size++;     } }  @SuppressWarnings("unchecked") public HashDictionary(int n) {     if(isPrim(n)) {         tab = new LinkedList[n];         for(int i = 0; i < n; i++) {             tab[i] = new LinkedList<>();             size++;          }         return;     }     System.out.println("Keine Primzahl!");     return; }  public int h(K key) {     int adr = key.hashCode();     if(adr < 0)         adr = -adr;     return adr % tab.length; }  @Override public V insert(K key, V value) {     Entry<K,V> eintrag = new Entry<>(key,value);     if(search(key) != null) {         V old = search(key);         int i = tab[h(key)].indexOf(key);         tab[h(key)].get(i).setValue(value);         return old;     } else {         if(tab[h(key)] == null)             tab[h(key)] = new LinkedList<Entry<K,V>>();         tab[h(key)].add(eintrag);         return null;     } }  @Override public V search(K key) {     int i = tab[h(key)].indexOf(key);     if(i >= 0){         return tab[h(key)].get(i).getValue();     }     return null; }   Thanks for your help!


Fourier sine series convergence in the interval $(0,l)$

Will the fourier sine series of $\frac1{x^2}$ converge pointwise in the interval $(0,l)$ for any finite $l$? I think no. It is easy to see that the fourier sine series will not converge uniformly due to the function not being continuous at $0$ (in the extended interval). But, what about pointwise convergence. I think, as the function is not of bounded variation on $(0,l)$, the convergence will not be there pointwise. Am I right? Thanks beforehand.


How to specify Linux Architecture in a Qt project(.pro) file?

I'm trying to build a MultiArch Application for Ubuntu. I have to compile it separately on different Architectures. However I have to do a lot of manual changes Each time the Architecture changes. For Instance-  #linux-g++:LIBS += $$DESTDIR/lib32/libusb-1.0.so      #arch-specific changes linux-g++:LIBS += $$DESTDIR/lib64/libusb-1.0.so  Here I have to comment and uncomment a line every time I'm compiling for a different Architecture. I have to do this on a number of places. However if there is a way to specify the Linux Architecture in the .pro file itself then my task will become much easier. I know that we can use win32 and macx scope variables and linux-g++ for Ubuntu. But I want to distinguish between ubuntu 32 bit and 64 bit Architectures. Is there any way this might be achieved a little more elegently? I have already seen  and I just want to specify that I'm looking to distinguish between linux32bit and linux64bit .


How do I change the background color of a column in Beamer? (the entire column)  (This is a simple question, but for the life of me, I cannot not find an answer.)  Example:  \documentclass[t]{beamer} \setbeamersize{text margin left=1em, text margin right=1em} \begin{document}  \begin{frame}{Test} \begin{columns}[t,onlytextwidth] \begin{column}{0.5\textwidth} Some text. \end{column} \begin{column}{0.5\textwidth} Some question. \[1+1=2\] \end{column} \end{columns} \end{frame}  \end{document}   What I would like:


Every group of order $150$ has a normal subgroup of order $25$

Let $G$ be a group of order $150$.  I must show that it has a normal subgroup of order $25$.  The hint says to show that is has a normal subgroup of order $5$ or $25$.  Now from Sylow, I know that the number $n_5$ of Sylow-$5$ subgroups (which each have $25$ elements) must be either $1$ or $6$, since $n_5$ must also divide $6$.  Now clearly if $n_5=1$ we are done, so I can assume that $n_5=6$.  My problem is I haven't figured out how to use this information (I am going for a contradiction, just based on what the problem asks me to prove).  I know by Cauchy's theorem I can get a subgroup of order $5$, but I don't see immediately if it must be normal.   Any direction I should try to be moving?


I'm working on a module in Drupal 7. I've added a hook_menu implementation:  $items['admin/config/content/mymodule'] = [   'title'            => 'MyModule',   'description'      => 'Configure MyModule settings.',   'page callback'    => 'mymodule_get_form',   'page arguments'   => ['mymodule_admin_settings'],   'file'             => 'mymodule.admin.inc',   'access arguments' => ['administer mymodule'],   'menu_name'        => 'mymodule', ];   ...and a configure line to mymodule.info:  configure = admin/config/content/mymodule   A Configure link for MyModule now appears the admin/modules page, but how can I also have the module listed on the admin/config page? Or is the admin/config page reserved for only core modules?


PhD applications and explaining poor results

I had a couple of bouts of depression during my masters degree which resulted in very bad grades. Is it a good or bad idea to mention this in PhD applications to explain my grades?


Object looks fine in rendered mode, but appears black in material mode

So I'm trying to learn, but I have a really hard time understanding the relation between materials, textures, UV maps and so on. So right now I have the following problem: I'm trying to make a simple red texture be a bit grainy using a noise texture. The node setup can be seen in the screenshots below. It works fine if I view it in rendered mode (I'm using the cycles engine) or export a screenshot, but the object appears completely black in material mode:   So this is probably a very stupid question, but do you mind telling me how I can fix this? Thanks!


Xcode 6.1 won't let me create a new project

I'm running Xcode 6.1 on OS X Yosemite and I'm unable to create a new project, as you can see below it just says 'loading'.  I've removed the product and org name for the purpose of this image. I have tried uninstalling but that didn't work. I am new to Xcode and coding in general so I would appreciate it if any solution could be given in lay terms.


Why does muggle-born Hermione call Voldemort “You-Know-Who”?

She also winces and jumps when Harry uses his name.


Evaluate: $\lim_{n\to \infty}\sqrt{n}\int_{0}^1 \frac{1}{(1+x^2)^{n}}dx$


How to assign same Data to multiple object copies

I made many copies of an object, then I thought it would've been better if I made them to share the same Data (being an instance of the same original object), I know how to do it one by one, is there a way to do it for all of them at once? I tried Copy Attribute add-on but didn't find what option can do that, or even if this is possible in the first place.


I am trying to do a practice problem where I have to write a method that takes a string of curly brackets and returns true if the brackets match up and false if they don’t. If I'm passed the empty string, it needs to return true. We can also assume that the given string can have { and } in it or be empty.  Matching has to be in the correct order of pairs like "{}" not "}{" These are examples of brackets matching: {} {}{} {{}} {{{}{{}}}}  These are examples of the brackets not matching: { }{ {{} {{}}}{}  This is what I currently have (Keep in mind I'm relatively new to coding):  public boolean bracketsMatch(String brackets) {     int count = 0;     if (brackets.length() % 2 == 1){         return false;     }     for(int i = 0; i < brackets.length(); i++){         if ((brackets.charAt(i)+"") == "{"){             count++;         } else if ((brackets.charAt(i)+"") == "}"){             count--;         }         if (count == -1){             return false;         }     } return count == 0; }   Inputs like this }{ and {}}{}{ this still dont return the right output.


If you were using a plane as a terrain, how would you add grass to the plane and make it bend and flow like there was wind. Also, how would you make the grass color vary in shades of green so you would get yellow, dry patches of grass.


Is it possible to snatch a weapon directly from an enemy/monster?

As a point of clarification for , I'm just trying to figure out if it's actually possible to take an enemy's item directly from them during combat, all in the scope of one turn. Since Disarm doesn't technically allow you to directly steal an item (it falls to the ground and opportunity attacks also seem debatable), is there an action or feature that allows you just take an enemy's wielded item and put it in your hand in one fell swoop?


I would like to colorize in a special color all my constant which are all in capital letters in my code and all my method variables which begin with an @.  Is it possible to use Regex to define keywords with listings package ? It will help me for a lot of things !  For example, I actually have in a \lstdefinestyle:  keywords=[3]{@someName,@anotherName,@aboutOneHundredMore} keywords=[4]{SOME_NAME,ANOTHER_NAME,ABOUT_ONE_HUNDRED_MORE}   --> If I could replace this by:  keywords=[3]{/@.+/} keywords=[4]{/[A-Z_]+/}   it will save me from a lot of work !  If not, is there another way to have all my constant in a special color without defining all of them one by one in a keywords list ?  I first think about using morecomment or moredelim for the @ part but the ending character is problematic: it can be a space, a dot or a lot of other characters...


How to use Nullable variable in generic method

This is a method in an interface. It gives me an error that I can't make my string nullable (string?), but why? My method will return an IEnumerable no matter what.  IEnumerable<Cars> GetAvailableCars(Vendor carVendor, string? someAdditionalInfo);


Test if iptables would pass a given ip/ip-range

I am currently trying to debug problems relating to our firewall configuration and found myself in the situation where I would like to test a config. Ideally I would like to take the iptables config and give it an IP or an IP range and get the decision iptables is going to make. i.e.  >> my-iptables-test /etc/sysconfig/iptables 54.91.251.226 Action: DROP   or something similar. I had a look for existing solutions, but I was not able to find anything. Probably just searching for the wrong words.  Just to be clear: I do not have access to the machines I would like to test, so "telnet" from that machine is not available. The iptables config is also sufficiently long to get lost.


Extending stay in the US beyond 90 days under the Visa Waiver Program ("ESTA Visa")

I am going to be in the US for 100 days. As a european i am allowed by ESTA visa to be in the US during 90 days. For these extra 10 days is it possible to do an extension or to do another application through the ESTA visa without leaving the US?


Regex to select and replace as title case value

I'm new to this regex part. My functionality is to replace every first character in a word as uppercase and remaining part in lowercase. I can easily loop through an change. But it might be costlier. To simplify it i'm trying Regex. I changed all the first character in a word to uppercase, But stuck on changing the remaining part to lowercase. How can i achieve. Refer the code below    var txt= document.getElementById('txt'); var result = document.getElementById('result'); result.onclick = titleCases; function titleCases(){        txt.innerText = txt.innerText.replace(/\b[a-z]/g,function(f){return f.toUpperCase();}) } <div id="txt">     replace The tExt </div> <button id="result">   Result </button>


Liouville's Criterion and Integration of $\sin(z)/z$ using elementary functions

Liouville's Criterion: $\int fe^g$ is elementary iff there is rational function $q$ in $\mathbb{C}(z)$ such that $$f=q'+qg'$$ where $f\neq0$ and $g$ is a non constant function in $\mathbb{C}(z)$.  Now using this fact: How should I proceed to prove that $\int \dfrac{\sin z}{z}dz$ cannot be written using elementary functions?


infinite series of the form $\sum\limits_{k=1}^{\infty}\frac{1}{a^{k}+1}$

Is there a method for evaluating infinite series of the form:  $\displaystyle\sum_{k=1}^{\infty}\frac{1}{a^{k}+1}, \;\ a\in \mathbb{N}$?.  For instance, say $a=2$ and we have  $\displaystyle\sum_{k=1}^{\infty}\frac{1}{2^{k}+1}$.  I know this converges to $\approx .7645$, but is it possible to find its sum using some clever method?.  It would seem the Psi function is involved. I used the sum on Wolfram and it gave me  $$-1+\frac{{\psi}_{1/2}^{(0)}\left(1-\frac{\pi\cdot i}{\ln(2)}\right)}{\ln(2)}$$  I am familiar with the Psi function, but I am unfamiliar with that notation for Psi. What does the 1/2 subscript represent?


How do I merge two dictionaries in a single expression (taking union of dictionaries)?

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


Upgrading from ubuntu 11.04 to the latest version

I'm trying to fix an old laptop. The CD-ROM drive can only read CDs and I have only Ubuntu server 11.04 on a CD. I wasn't able to boot from USB.   So I installed Ubuntu server 11.04 on the machine and now i'm trying to make it up-to-date with the latest version of ubuntu. However, when I write do-release-upgrade I get that there is no new release!  I couldn't find ubuntu-desktop when I tried to install it with apt-get. Any solutions please?


Does the attributes/properties of Cloak of Protection and Ring of Protection stack?

Does the AC and Saves properties of Cloak of Protection and Ring of Protection stack in D&D 5E?


I am trying to print out a simple picture (below) that is composed of sections of the following RGB colors:  255,0,0  255,0,255  0,255,0  0,255,255  0,0,0  I am using this image for color sensing (with a sensor that measures intensity of red, green, and blue light) and need these values to be accurate.    The problem is, when I convert this image to CMYK for printing using an online tool, the equivalent RGB values are not accurate.   I was wondering if there's any way to convert an image like this to CMYK for printing while maintaining the RGB values.


Printing a poster (over several sheets of paper)

I have a poster I would like to print.  It is far larger than a single sheet of paper that can fit in my printer.  What is a program that I can use to print it out on separate sheets of paper (to assemble later)?


Short story about artificial intelligences that take years to develop

People can buy some small, baby AIs, that live inside a virtual world. Initially, the AIs cannot do much, have an intelligence similar to a puppy, but as the years pass, they gain more and more capabilities.   People eventually get bored of raising them, so most of the virtual worlds are abandoned, so the protagonist has to hire programmers to do custom upgrades to the virtual world, so that the AIs can continue to live.    I think there were some playgrounds in the virtual world, where the owners could take AIs and play with them. When the AIs start speaking, at first they use some sort of baby language, unable to speak in fully correct sentences and they use simplified words.   I read the story about 10-15 years ago in English.


What can be considered as "Home ties" for a UK Standard Visitor visa (PLAB)?

I am an Indian national who recently cleared his PLAB1 examination and has booked to sit PLAB2 in UK (which can be given only in UK). Before applying for a visa, I would like to know about the how one can prove home ties. Of course, I have read about the Family, Job, Property being used as ties but...  I haven't worked since my graduation (two years now) as I wasted a lot of precious time on USMLE. After that IELTS and then PLAB1. So can't show job as tie.  I don't have any property in my name but my father does have residential plots and agricultural lands worth a few crores on his name.    Does an affidavit that I am his only son and heir to all that bla bla bla, serve the purpose?  I do have few life insurance policies in my name.  Can they be used as an indicator of some kind of active Indian society member thingy?  I am unmarried but do intend to show my parents as family ties.   I did my medical studies in China (6-7 years). I have also traveled to a few countries like Russia, Thailand, Philippines, HK, Macau etc etc (though not a single Western country).    Can that be used in my favour in home ties that I have always obeyed country's laws and returned to India upon completion of the purpose of the trip?


Ubuntu Control Center is gone from Application menu & Desktop. I have Ubuntu 18.04. Please help.


Installing MySQL workbench on 10.04 or 10.10 is not a problem, as the deb packages are available on MySQL's website.  But there is no 11.04 deb package available.  So, how do I install MySQL workbench on 11.04 and keep it updated automatically when updates become available to ubuntu via apt-get update.


Do ArcGIS SpatialReference object factory codes correspond with EPSG numbers?

I've got a project where I'm reading in geometry objects from text files to put them in ArcSDE. These geometry objects have an associated EPSG code, and I'm looking for a way to ensure they're in the right projection when I've finished with them.  Having taken a look at the factory codes that I'm interested in, (GCS GDA94; EPSG:4283, and VicGrid 94; EPSG:3111) for a project I'm working on it appears that the EPSG codes correspond directly to the ESRI factory codes for the spatial reference ( and ). This is great, as it means I don't have to worry about navigating to projection files to create  objects, for example in the code below:  import arcpy  # Create a spatial reference object using a factory code # sr = arcpy.SpatialReference() sr.factoryCode = int(epsg_code.lstrip("EPSG:")) sr.create()   Unfortunately I can't find any reference in the ESRI documentation to say whether this holds true all the time or not - I'm guess it does, but I'd rather know for sure. Does anyone know where I'd be able to find out?


Lamp is installed on my home machine and will never be for public viewing. I'm learning to program.   When I code in Notepadqq and try to save the file var/www/html/ I get permission denied. So, I used this command in terminal:  sudo chmod 766 -R /var/www/html    In the example I was copying, this command was given:  sudo chown pi /var/www/html    I got this from terminal in response.  chown: invalid user: ‘pi’    I then realised pi was not my name, so I then tried  sudo chown Bobby /var/www/html   as Bobby is my name. But I still got  chown: invalid user: ‘Bobby’   So I tried this  sudo chmod 766 -r /var/www/html   as per the example. But I got  chmod: cannot access '766': No such file or directory   Eish.  All I would like to do is to be able save the programming I am learning in that file so I can load it through the apache server which is up and running.   Help please


Stop custom villagers from generating new random trades on their own

So lately I've been working on a minigame map with command blocks and I wanted to create a villager shop. However when I set up some custom trades whenever you traded with him it unlocked new random trades, I don't want this to happen is there a way to prevent this?  (Btw I know this similar has been asked before however the answers didn't quite help me so I decide to ask it myself :D )


Storing datetime values in Shapefiles using QGIS?

I have a shapefile with date in a string field. I create a new field with date type and use the calculator to make the conversion. But the result only provide the date part, the time part is removed. Even when the preview show the correct conversion.  Here you can see the original string field time and the result date time2. And the use of the conversion function to_datetime() and the preview result at the end    If you go to the layer properties you can change the edit mode to date/time. Then if go to the data and try to edit time2 you get the current date/time. So is possible save date and time in the same field. But the update tool still doesn't work as expected      As J.R said. Even when you can change QGIS edit to allow Date/Time the save to shapefile will discard the time.


Git command displays changed files between two commits

I need to see the files changed between two commits. Currently I am using   git diff commit_id_1 commit_id_2    this command also displays contents in the files. I just need to see whats are the files changed between two commits. What will be the command for this ?


Problem with gummy-bears being too much like jelly

I've been trying a simple recipe I found on the internet, which is a simple recipe consisting mostly of gelatin.  The problem is that the end result is basically just a fruit-flavoured jelly (Jell-O?), rather than the more chewy gummy-bears (Haribo) style of jelly confectionery.  Can anyone suggest what I need to do to make them less springy and more chewy.  It's all difficult to articulate!  Here's what I used for the first test-batch:   12 tbsp sugar 12/3 cup fruit juice 8 tbsp Golden Syrup 8 tbsp gelatin   soften the gelatin in 1/2 cup of cold water. place sugar, syrup and the juice in a pan and gently heat until sugar dissolves. Stir in the gelatin and stir until dissolved. Pour into moulds and wait until set.    Thanks


The boot files of [The OS now in use - Ubuntu 16.04.6 LTS] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (  I got that message after using boot repair. My issue is that on powering up my pc and selecting "windows 10 loader" it boots ubuntu.


How do I 'subscribe' to user event creation, so I can run my own code when a user is created?

In Drupal 7, this was done with a hook. And there also seems to be a hook available in Drupal 8/9:   Is this still the way to do it or is it being deprecated and  is the way forward? If it is Event Subscription, is there an example code snippet for adding custom code on user creation please? Thank you.


Should a shunt in an ammeter be changed when the voltage changes?

Supposing I want to measure 1-5A over a range of 1-40V on an ammeter, should I change the shunt resistor every time the voltage changes so that the voltage drop across the shunt resistor stays the same?  If yes, how do ammeters on lab bench power supplies work over a wide range of voltages?


Youtube embedding doesn't work in HTTPS site

While using HTTPS site, all YouTube embedded videos turn into big blank spaces on the page as seen in the image below. Even if the source link is HTTPS, the parser turns it into HTTP for the embedding.    If I edit the elements and replace HTTP with HTTPS within the embedded code, however, the video shows fine:    The embed code should match the protocol used to open the page.


what is the canon 18-55mm IS lens good for?

is the canon 18-15mm lens good for self portraits and nature pictures {trees, leaves, DETAILED rain or snow} ?


Question is pretty self-explanatory. Either way, a date on a calendar is a date. When it becomes unexpected, it sounds right to me to say an unexpected date instead of a unexpected date. Same for when using expected.  Which one is it?


Why is $a=e$ the smallest number such that $a^x\ge 1+x$ for all $x$?

Calculus book:     Find all numbers $a$ such that $\forall x, a^x \ge 1+x$    I immediately thought of the inequality $e^x\ge 1+x$ and guessed that the answer was any number $a$ in $[e,\infty)$. After playing around with a graphing app I can see this is definitely true, although I can't explain why.   Why is $e$ specifically the smallest number such that the inequality holds? To my untrained eye, a quick scan of the equation does not give rise to anything involving the constant $e$. Maybe because $1+x$ is only a tangent to the equation $a^x$ when $a=e$? Thanks.


Can I migrate a Windows installation between two laptops?

I have a laptop which I'm going to return due to battery defects. As I have already configured everything on this laptop, I'd like to migrate the installation on the new laptop (when I'll get it). The one to replace has a 128 GB eMMC, and two USB 3 ports. So, I was thinking to   Boot from a Linux live USB from port 1 Make an image with dd of the eMMC, saving it to a external HDD on port 2 Do the reverse on the new laptop   My question is, will it work fine with Windows? Does migrating this way have any issues? Would I be able to restore the installation if the new laptop is a different model with at least 128 GB?


Evaluate the limit $\lim_{x\to 0} \left(\frac {\tan x}{x}\right)^{\frac {1}{x}}$

Evaluate the limit $\lim_{x\to 0} \left(\dfrac {\tan x}{x}\right)^{\dfrac {1}{x}}$  My Attempt: $$\lim_{x\to 0} A= \lim_{x\to 0} \left(\dfrac {\tan x}{x}\right)^{\dfrac {1}{x}}$$ Taking $\ln$ on both sides, $$\ln (\lim_{x\to 0} A)=\lim_{x\to 0} \dfrac {1}{x}\cdot \ln\left(\dfrac {\tan x}{x}\right)$$


Understanding the variance of random effects in lmer() models

I'm having trouble understanding the output of my lmer() model. It is a simple model of an outcome variable (Support) with varying State intercepts / State random effects:  mlm1 <- lmer(Support ~ (1 | State))   The results of summary(mlm1) are:  Linear mixed model fit by REML  Formula: Support ~ (1 | State)     AIC   BIC logLik deviance REMLdev  12088 12107  -6041    12076   12082 Random effects:  Groups   Name        Variance  Std.Dev.  State    (Intercept) 0.0063695 0.079809  Residual             1.1114756 1.054265 Number of obs: 4097, groups: State, 48  Fixed effects:             Estimate Std. Error t value (Intercept)  0.13218    0.02159   6.123   I take it that the variance of the varying state intercepts / random effects is 0.0063695. But when I extract the vector of these state random effects and calculate the variance  var(ranef(mlm1)$State)   The result is: 0.001800869, considerably smaller than the variance reported by summary().  As far as I understand it, the model I have specified can be written:  $y_i = \alpha_0 + \alpha_s + \epsilon_i, \text{ for } i = \{1, 2, ..., 4097\}$  $\alpha_s \sim N(0, \sigma^2_\alpha), \text{ for } s = \{1, 2, ..., 48\}$  If this is correct, then the variance of the random effects ($\alpha_s$) should be $\sigma^2_\alpha$. Yet these are not actually equivalent in my lmer() fit.


How do I install and dual boot Windows 8 Pro alongside Ubuntu 16.04 LTS (installed first)?

I have Ubuntu 16.04 LTS installed on my Acer E5-473G-399E machine with a non formatted 1 Terabyte HDD.  How do I install and dual boot Windows 8 Pro alongside Ubuntu 16.04LTS, (I already installed Ubuntu first)?


How did it all started VS how did it all start?

I wanted to know if the first one is correct:  How did it all started?  Everybody mentioned to me that "How did it all start?" the correct form is but I always thought both ways are correct?


I need to typeset some very large numbers that span a number of lines, is there a way in LaTeX to do this?


Space invaders 2d array to represent scene

For code optimization purposes, I want to create a 2d array that contains 40 equal squares (10x10px). Each square represents 1\40 of the displayed window (400x400px).  I populate the 2d array with the standard double for-loop methodology.      int col = 40;     int row = 40;     int boxSize = 0;     Integer[][] boxes = new Integer[40][40];      for (int i = 0; i < col; i++) {         for (int j = 0; j < row; j++) {             boxes[i][j] = boxSize;             boxSize += 10; //Creates a 10px box.         }         boxSize = 0; //Resets box size for next column     }   There are several circles in this program. We have a ship(circle) that fires missiles(circles) toward enemies(circles).  I want to run collision detection ONLY when there is a bullet + an enemy in one of the squares. This will greatly optimize the code.  The question is... how do I create these squares off of a 2d array? How do I select each square? How do I test if the missiles and the enemies are inside the same square?  Thanks.


Why is id variable not passed to this file?

i need to pass this id  <a href="edit.php?id=<?php echo $row['user_id']; ?>">  in here <?php if (isset($_POST['id'])) {      $id = $_POST['id'];  } else {      echo "user not find";      die();  }   its echo "user not find". why?


How do I map special paths in my home directory to a path on another drive?

I just got a new computer (windows 8.1) and I have two drives.  The main C drive is an SSD and the D drive is a regular drive.  I want to move some of the less important data to the secondary drive, such as Downloads.  I know I can do it using MKLINK but I can't remove the Downloads folder as I get an Access is denied error, and I think that it may be a special folder anyway (a folder that may have some 'magic' attached to it).  Is there a clean way of doing this?  Does it have 'magic' attached to it?


Where should a complete novice start to learn logic?

Where should I start when learning logic? Should I start with syllogistic logic, predicate logic, etc?


I have 1900 files that I'd like to edit their name. The files contain the title of the file but also have unneeded characters that I'd like to remove. For example, one file might be titled Hello [U].txt.   Another might be Bye [U].txt. Is there a program that can remove that [U]?   Thanks!


refresh changed content of file opened in vi(m)

I have a config-file that I keep open in vim, but that sometimes gets changed on disk, without these changes being reflected on the terminal. Can I refresh the content on the screen without closing and re-opening the file? If so, how?


Why won't a 3G router do port forwarding when on the 3G interface?

I noticed my TP-Link MR3220 3G/WiFi Router port forwarding will only work when I use the WAN port and not the 3G connection (modem).  Technically the router offers an option to use the Internet from 3G, WAN or both (given a priority). In my case I am only using 3G and apparently, the router features such as remote management and port forwarding don't work on this interface.  Can anyone confirm this? If so, is there any workaround (static routing or something)?


Should flawed questions be closed immediately?

Possible Duplicate:          Given a question that is not clear at first, which satisfies the criterion for being "not a real question":      "It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot   be reasonably answered in its current form."   should that question be closed immediately, or should the OP get a chance to improve the quality of his question.  My modus operandi is this: When I encounter a question which is "not a real question", I respond via a comment - I might ask one or more counter-questions (about the issue), I might comment that I don't understand the question. So, I let the OP know that his question should be improved. I then give the OP say 15 minutes to respond (and in most cases the OP does respond). However, if the OP doesn't respond, then I consider voting for "not a real question".  Is this how SO should work?   I have witnessed in the past several questions for which I saw potential, being closed immediately, and I wonder if that is appropriate.   Edit: Of course, questions that are duplicates should be closed immediately, and off-topic questions should also be moved / closed immediately. In this question I am specifically referring to those questions which "have potential" (which could be corrected / improved)..


The spell  specifys  (incense and a vial of holy or unholy water)  obviously, holy water and incense have a definition but I couldn't find a definition or cost for "unholy water". Since it is assumed that a component pouch/focus ignores material components without a GP cost, would you have to pay for the incense and holy water?   related to the definition of unholy water however no RAW answer


I typed firefox -v in my console. The output was  firefox -v  (process:5516): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Mozilla Firefox 33.0   What is that failed assertion? Something serious?


Can forensic DNA analysis be used to generate a visual approximation of a suspect?

In light of the , I'm curious if enough information can be teased out of a DNA sample to get a "reasonable" approximation of the suspect (never mind the legality). I realize the term reasonable is subjective, so characteristics, such as skin color, hair color/texture, approx height, eye color, freckles, etc. I came across  article a few years ago, but the company that made the test went bust in 2009. It could detect race (how accurately?). I seem to recall reading an article a few years ago stating that "soon" we'd be able to get an approximation of appearance from a DNA sample that was better than a sketch artist could provide, though I can't recall now where I read it.


How to integrate acceleration due to gravity with height?

If I project a body at a very large velocity such that it reaches a height h which is comparable to Earth's radius, then how to derive an equation for 'h' in terms of initial velocity 'u' and other constants.   This is where I ended up with this problem  S = u²/2g  But g is variable with height as h approaches R  So dg = GM/(R+dr)²          --- this is where I think I might be wrong  Hence dS = u²(R+dr)²/GM  So how do I go ahead?


Proving an inequality involving real powers

Q: For $p\in\mathbb{R}$ such that $2<p<\infty$, and $a,b>0$, prove the following  $$a^p+b^p<(a^2+b^2)^{p/2}$$  My attempt: I say it's equivalent to proving that $(a^p+b^p)^{1/p}<(a^2+b^2)^{1/2}$. Then I did binomial expansions on both sides of the inequality. Both the expansions have $a+b$ so I canceled them. For the rest of the terms, I thought I'd get geometric series on both sides and show that the series on the left is smaller than that of the right by using related sum formulas. But what I found were not quite geometric. For the left side  $$\frac{1}{p}a^{1-p}b^p+\frac{1-p}{2p^2}a^{1-2p}b^{2p}+\frac{(1-p)(1-2p)}{6p^3}a^{1-3p}b^{3p}+\ldots$$  While for the right  $$\frac{1}{2}a^{-1}b^2-\frac{1}{8}a^{-3}b^4+\frac{1}{16}a^{-5}b^6+\ldots$$  How to proceed to prove the inequality?


Can I leave South Africa before my 90 days expire, and return after a few days to stay for another 90 days?

How many times can an Australian leave and re-enter South Africa (90 days at a time without a visa) in a year, and do they need to be out of the country for a certain period of time before they re-enter?  I want to be in South Africa for as long as I can, however as an Australian without a visa I can only stay for 90 days at a time. What I would like to do is simply leave South Africa and go to another country in Africa for a few days, before returning with a new 90 day allowance.    Is this possible, or must I wait a certain period before re-entering South Africa/is there a limit to the amount of times I can do this in one year?


What's the better proof for $|a| - |b|$ $\leq$ $|a - b|$

Theorem. $|a| - |b| \leq |a - b|$.   Are the following two proofs equivalent?     Proof I.   $|a| - |b|$ $\leq$ $|a| + |b|$ by the triangle inequality. This is equal to   $$|a| - |a| - |b|\leq|a| - |a| + |b|$$ which is equal to    $$-|b|\leq|b|,$$ which  is true. QED.      Proof II.   Using the trick that $|a| = |a + b - b|$.   Then $$|a| \leq |a -b| + |b|$$ by the triangle inequality and moving $|b|$ to the left side gives us    $|a| - |b|\leq$ $|a - b|$.   Now the first one was my way and the second one was the official answer. Is mine considered wrong because my final statement wasn't the statement they wanted me to prove? If so, how would I know that I needed to use this little algebra trick to start my proof? Or can I just write my proof backwards at least?   Just a little confused on some formality, thanks!


What would happen if you used the hair of a metamorphmagus in Polyjuice potion?

This is a question I've been thinking about a while now. If a Metamorphmagus doesn't have a set form, and someone takes their hair for a Polyjuice potion, what exactly happens to the person drinking the potion? Do they turn into the form that the magus had at the time, or to the original way that the magus looked before their form started shifting?


Why intra-word ** highlighting is broken to protect programming_underscore_usage?

The similar case was discussed here: . Though quick help on formatting proposes to use _italic_ and **bold**, in fact you can use *italic* and __bold__ with the same effect. But when double asterisk is used inside the word, one pair of asterisks (or underscores) is not converted to formatting, but is kept as is: it_a_lic, italic, b__ol__d, bold. If I understand correctly the double-asterisk bold highlighting doesn't work inside words to make simpler programming_style_underscore_usage. Actually my question is because of , where I tried to indicate difference in stress between two words: , but after posting I've got: . So, I have two questions here:  On programming-related sites - why underscore-protection should influence asterisks as well? Can this feature be disabled on non-programming-related sites?


How to align the camera in a solved motion tracked scene?

I have been having an issue with my floor plane and object when using a solved camera after tracking some footage. I get a solve error of between 0.05 and 0.4 on my solves which is good and not the issue I've been having. However when I go to orient the camera I will snap it to an origin and adjust the scale. The plane and object are not aligned, but could be fixed if I could just rotate around them (much like in PF Track). I would think the pivot point for the camera, if I have it locked to view, would be the origin (where my plane and object are), but it seems to be just some arbitrary point out in space which makes manually fixing the alignment very difficult. I'm wondering if there is any way to fix this so the pivot point is in fact in the center, or if there are any other suggestions to go about this problem.


ArgumentNullException or NullReferenceException from extension method?

What would you consider to be the best exception type to throw when an extension method is called on a null instance (where the extension method does not allow it)? Since extension methods are nothing but static methods you could argue that it should be ArgumentNullException, but on the other hand they're used like instance methods so it might be more natural to use the NullReferenceException. Let's take the following example:  public static string ToInvariantString(this IFormattable value, string format) {     return value.ToString(format, CultureInfo.InvariantCulture); }   This way a NullReferenceException will be thrown if the value parameter is null.   The other example would be:  public static string ToInvariantString(this IFormattable value, string format) {     if (value == null) throw new ArgumentNullException("value");     return value.ToString(format, CultureInfo.InvariantCulture); }   EDIT: In some of the answers you have pointed out that an extension methods can be called like a static method and in those cases a null reference exception would be wrong, which is a great point, and actually one of my concerns, not sure why I forgot to mention that in the question in the first place.   Someone also pointed out that it's wrong to throw a NullReferenceException, and yes, it is. That's why I don't throw it, I just let it happen (let the CLR throw it) by not guarding the method.  I think I favor the ArgumentNullException (that's what I've use so far) but I still think there is at least room to argue for an against the NullReferenceException since it seems more natural in most places where the method is going to be used.


Prove that $\{(x,y)\mid x\in\mathbb Q\}\cup\{(x,y)\mid y\in\mathbb Q\}$ is a connected subset of $\mathbb R ^2.$

In my notebook, something is very briefly, not in detail whatsoever, path connectedness mentioned, and two assumptions are made about $x_1, x_2 \in \mathbb Q.$ If anyone can prove this I would greatly appreciate it... I tried myself, but got nowhere.


What is the earliest movie in which "it all turns out to have been a dream"?

What is the earliest movie in which the status of the events as reality is doubted or denied at (or toward) the end?  I will limit the case to movies in which almost all of the movie events are subjected to such doubt or denial and exclude the ones that may start "in" some character's fantasy and then fairly soon step "out" to (the movie's) reality or go "in and out" through the movie.  A famous example is The Wizard of Oz (1939), in which the events of the movie turn out to have been a dream in the end.  I have a fairly early movie in mind and will give it as an answer if others don't.  Just to incorporate some comments:   The answer could be a movie of any length, short or feature. When "it all turns out to have been" a dream etc., it should come as a surprise to the viewer.  (The viewer may then want to have a second viewing in light of what he has learned to see the changes in his own responses.)


I'm somewhat new to Ubuntu. I have set my laptop up with a dual boot win8/ubuntu 12.04 each with their own partition and a third empty data partition with the intention of working on files between the two operating systems. After copying some files to the data partition in Ubuntu and then rebooting into a hibernating windows 8 the files had disappeared. I tried repairing the file system in windows 8 and the folder containing the files reappeared however the files themselves are no longer there.  How do I start going about diagnosing this problem? It's critical for me that the files on the data partition are stable, should I consider not using ntfs and forget sharing the files between the two operating systems?


How are IMemoryCache objects in ASP.NET Core instantiated?

I have been looking at controller classes in .NET Core with constructors that take IMemoryCache arguments but cannot see where the passed objects come from originally. For instance, this example declaration from : public class HomeController : Controller {     private IMemoryCache _cache;      public HomeController(IMemoryCache memoryCache)     {         _cache = memoryCache;     } }  Where would this constructor be called and how is the IMemoryCache object instantiated in the first place? Is this something that happens behind the scenes with .NET Core that does not have to be coded explicitly? I have seen similar examples using an ILogger object, so my question would also apply to that.


I notice the latest build is 2.77, and I only have 2.76. Do I just download the latest version from the blender website, or is there a way to update from within Blender, or what?


Non-technical reference for Bayesian probability

Could anyone suggest a good, non-technical, high-level explanation of Bayesian probability?  To clarify, since some people suggested a thread with recommendations of textbooks, that isn't really what I'm after. I'm looking for something for a friend of mine whose interest is in intellectual history. He isn't trying to learn to do Bayesian analysis, he just wants to know what it does or claims to do.


Is there any way to roll back the most recent upgrade?

This has happened to me many times in the last 5 years: an upgrade broke my system. Each time I end up with this situation, I have to reinstall the whole system, which is really annoying.  Is there any way to roll back the most recent upgrade to be able to have a functional system without reinstalling? If not, which is the best way to suggest this as a top priority idea?   I read this idea was described in brainstorm.ubuntu.com, but it feels it is dead... and the forums are full of examples of upgrades breaking things, that's why I feel something needs to be done about this topic. Thanks!


Display maximum possible count of sites in footer

New collapsing/expanding footer displays sites by catecories. E.g. Technology section is most solid and contains more then five columns each of them contains seven sites:        Other sections like Science have less items, only two non-full columns and more(10) link:        Seems there is possible to display all of science sites, so more link will not be actually needed.   Why the list of sites here is intentionally reduced? Is it possible to show all of them in this case?


What documents does a US citizen need to visit Mexico?

I am a U.S citizen. Do i need a passport and visa when flying from California to Guadalajara. I do not have a passport and I will only be visiting Guadalajara for 4 days on business.


I'm working on a project for which I have GPS points and I would like to extract the sequence of roads related to those points. I know that this is called "map-matching" and that there is a load of literature about it.  Here is my question: is there a software / library that allows to easily convert a sequence of GPS points into a road sequence, given that I have the road network, so that I don't have to (re)implement the wheel?


Backslashes in single quoted strings vs. double quoted strings

If I add a backslash+space to the start of double and single quoted strings, I get different results:  "\ text" '\ text'    In the output for the double quoted string I see only a space. In the output for the single quoted string I see backslash+space.  What's happening there? Is this because '\ ' is interpreted as a special character in the double quote string but in the single quoted string the characters are preserved as is?  If I change the strings to this, I see the same output, namely a single slash followed by a space and then the text:  "\\ text" '\\ text'    In both cases the backslash is escaped. I'm confused why they work the same way in this situation.   Is there some rule that would help to explain the fundamental difference between how single quoted strings and double quoted strings handle backslashes in Ruby?


Capital Gains Tax - rented my flat at no real profit for a number of years

I have been letting my home to lodgers on and off for a few years to friends for no profit or a considerably lower profit (30% -50% of market value).  I don't consider it a business or a money making scheme but I want to know if HMRC would before I find another place and go bankrupt after I get a huge unexpected bill from them!  For those years I shared my house would I be liable for capital gains tax?    I've owned the property for 7 1/2 years, I would say I've been on my own for about three years, one lodger for about two years and three lodgers for about two years.  During the period of lodgers I lived there on and off (mostly lived there though) and I have always considered it my only home with all my things and mail going there (I haven't rented anywhere else).  I would share when I had friends who needed somehwere to stay or when I have travelled for work purposes and two two month backpacking holidays.  It feels ludicrous if I had to pay because I would have been paying CGT for the only privilege of sharing my house!


Energy Conservation during Constructive Interference

Let's assume two waves with same phases and same wave speed $c$ in the same plane overlap, thus creating a constructive interference.  The elongation and speed of both waves is added to create the new interference wave:  $$s_{1} + s_{2} = s_{3}$$ and $$v_{1} + v_{2} = v_{3}$$  Due to energy conservation, the sum of kinetic energies and potential energies of waves 1 and 2 should be equal to the kinetic and potential energy of wave 3.  Simplifying and using the same mass each time:  $$\frac{mv_{1}^{2}}{2} + mgh_{1} + \frac{mv_{2}^{2}}{2} + mgh_{2} = \frac{m(v_{1}+v_{2})^2}{2} + mg(h_{1} + h_{2})$$ $$\frac{mv_{1}^{2}}{2} + \frac{mv_{2}^{2}}{2} = \frac{m(v_{1}^2+v_{2}^2 + 2v_{1}v_{2})}{2}$$ $$0 = mv_{1}v_{2}$$ Obviously I'm forgetting something here, but what?


I am thinking about buying couple powerline networking adapters. It all sounds good however I am wondering about one particular issue.  Given that this stuf works over the electrical lines, can someone at the power company or someone who access the lines coming to the house access the network? Considering that all these lines are somehow connected, it might be true. I am more worried about the security implications naturally.  Are there encrypted connection adapters?   thanks


How to send an email with attachments using SmtpClient.SendAsync?

I am using a service component through ASP.NET MVC. I would like to send the email in a asynchronous way to let the user do other stuff without having to wait for the sending.  When I send a message without attachments it works fine. When I send a message with at least one in-memory attachment it fails.  So, I would like to know if it is possible to use an async method with in-memory attachments.  Here is the sending method       public static void Send() {          MailMessage message = new MailMessage("from@foo.com", "too@foo.com");         using (MemoryStream stream = new MemoryStream(new byte[64000])) {             Attachment attachment = new Attachment(stream, "my attachment");             message.Attachments.Add(attachment);             message.Body = "This is an async test.";              SmtpClient smtp = new SmtpClient("localhost");             smtp.Credentials = new NetworkCredential("foo", "bar");             smtp.SendAsync(message, null);         }     }   Here is my current error   System.Net.Mail.SmtpException: Failure sending mail.  ---> System.NotSupportedException: Stream does not support reading.    at System.Net.Mime.MimeBasePart.EndSend(IAsyncResult asyncResult)    at System.Net.Mail.Message.EndSend(IAsyncResult asyncResult)    at System.Net.Mail.SmtpClient.SendMessageCallback(IAsyncResult result)    --- End of inner exception stack trace ---     Solution      public static void Send()     {              MailMessage message = new MailMessage("from@foo.com", "to@foo.com");             MemoryStream stream = new MemoryStream(new byte[64000]);             Attachment attachment = new Attachment(stream, "my attachment");             message.Attachments.Add(attachment);             message.Body = "This is an async test.";             SmtpClient smtp = new SmtpClient("localhost");             //smtp.Credentials = new NetworkCredential("login", "password");              smtp.SendCompleted += delegate(object sender, System.ComponentModel.AsyncCompletedEventArgs e)             {                     if (e.Error != null)                     {                             System.Diagnostics.Trace.TraceError(e.Error.ToString());                      }                     MailMessage userMessage = e.UserState as MailMessage;                     if (userMessage != null)                     {                             userMessage.Dispose();                     }             };              smtp.SendAsync(message, message);     }


An identity involving the derivative of a scalar function with respect to a tensor-valued variable

Let B be a tensor-valued variable, taking values from the set of second order tensors on the vector space naturally associated with Euclidean 3-space.   It is given that B is invertible.  I am looking for a proof of the following statement:  $$ \frac{\partial (\log \det \mathbf{B})}{\partial \mathbf{B}} =  \mathbf{B^{-T}} $$  Also, it seems one would need an assumption on the positivity of the determinant of B, so I am guessing this is allowed too.  Thanks.