File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode     return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 796: ordinal not in range(128)   My goal is get the text  from a text file and save it as a variable in my program. I do not know how it is encoded. If someone could tell me how to find out how it is encoded, that may also be helpful
I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.
How do I free up more space in /boot? My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel. Taylor's polynomial uniqueness proof - why are these limits inferable? So I'm viewing a short proof on the uniqueness of Taylor polynomials.     Uniqueness of Taylor polynomial:   Let $f:]a,b,[ \rightarrow \mathbb{R}$ $n$ times continuously   differentiable and $x_0 \in ]a,b,[$. If $p$ is $n$th degree polynomial   function for which       $$f(x)-p(x)=o(|x-x_0|^n), \space \text{when} \space x \rightarrow x_0$$  then      $$p(x)=T_{n, x_0} f(x)$$   Proof starts like:  $$\frac{p(x)-T_{n, x_0}f(x)}{(x-x_0)^n} = \frac{p(x)-f(x)}{(x-x_0)^n}+\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n}$$  then   $$\frac{p(x)-f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  $$\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  Now my problem is, how can one actually say that the above approach $0$ if the denominator approaches $0$? Does Java Connection.close rollback? How to plot ROC curves in multiclass classification? In other words, instead of having a two class problem I am dealing with 4 classes and still would like to assess performance using AUC. Why {are you / you are} making noise? What is the difference between ubuntu-18.04-server and ubuntu-18.04-live-server? On the  there is a download link for ubuntu-18.04-live-server-amd64.iso, and on the  there is a download link for ubuntu-18.04-server-amd64.iso. Before 18.04, there is only a server version. What is the difference between these 2 images? Linux Bulk/Remote Administration Beside our internal IT infrastructure, we've got around 500 Linux machines hosting our services for the on-line world. They are grouped in a bunch of clusters like Database A-n, Product A-n, NFS, Backoffice and so on. Furthermore, they are administered by an external provider, according to our specifications and requirements.  However, we face a lot of trouble during (web-) software development, roll-out and deploy - especially because the dev- and staging-environments have almost nothing in common with the live systems (I spare out the nasty details..).  Thus, I've tried to create virtual machines, copied the various live-systems as exactly as possible and prepared them to connect to e.g. the development-databases instead of the "real" ones transparently for developers (they aren't root). This works pretty well, but...  I was wondering how one could administer those systems remotely and in bulk? Is there some software family I'm not aware of? Or, at least, some techniques or principles one should be familiar with?  We would provide every developer with a bunch of images to be run locally (VirtualBox). The QA dept. would get virtual clusters (XEN or Hyper-V). If I need to provide an additional server-module, re-route a new database connection or just want to update everything provided by the package manager... how could I possibly do that without being forced to log on to every system and/or ask my colleagues to download and run some fixture-script?  I believe there are plenty of solutions. Well, somehow I'm too stupid to enter the correct keywords into the search engines... Or isn't this issue as trivial as it sounds?  For the record:   Almost all systems are running Debian GNU/Linux 6.x "squeeze" No developer is forced to use a particular OS at his/her workstation The budget is limited, of course, but not too small to buy proprietary software A solution that would involve our aforementioned provider is preferred Why do we use the Lagrangian and Hamiltonian instead of other related functions? There are 4 main functions in mechanics. $L(q,\dot{q},t)$, $H(p,q,t)$, $K(\dot{p},\dot{q},t)$, $G(p,\dot{p},t)$. First two are Lagrangian and Hamiltonian. Second two are some kind of analogical to first two, but we don't use them. Every where they write that using them can cause problems. But why? Same gravatar is displayed for different users in stackexchange.com filters Same gravatar is displayed for different users in the stackexchange.com , under the Top Network Askers in the right side bar.   The red circled image's source (&lt;img src=) are from   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30                                ^   Seems the gravatar id is missing here in the image source.  For an example from the list, the user  gravatar id should be    https://www.gravatar.com/avatar/66c66c4d97a7bc3859a85253f003e1fb?s=18&amp;d=identicon&amp;r=PG&amp;s=30   but it is mapped with   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30   which caused the display issue. I was about to reconfigure some of my code to use the newer Schema.describeSObjects(types) method that I had heard was faster than using a globalDescribe.   I made some code to quickly check this and I was dismayed to find that the newer technique is not only not faster, it's about twice as slow as using a global describe. Here's the code I used :  New DescribeSObjects() method  //each block was run separately for timing purposes String obj = 'Account'; String[] types = new String[]{obj}; System.debug('START DESCRIBE SOBJECTS');  for (Integer i = 0; i &lt; 50; i++) {   List&lt;Schema.DescribeSobjectResult&gt; results = Schema.describeSObjects(types);  } System.debug('FINISH DESCRIBE SOBJECTS');   Old getGlobalDescribe() method  String obj1 = 'Account'; System.debug('START DESCRIBE GLOBAL');  for (Integer i = 0; i &lt; 50; i++) {    Map&lt;String,Schema.SObjectType&gt; gd = Schema.getGlobalDescribe();    Schema.SObjectType sobjType = gd.get(obj1);    Schema.DescribeSObjectResult describeResult = sobjType.getDescribe();  } System.debug('FINISH DESCRIBE GLOBAL');   Over 5 runs of each, the getGlobalDescribe() method took an average of 337ms for 50 describes and the describeSObjects() method took and average of 658ms. This is basically twice as long.  Does anyone have any insight as to why this would be? Any improvements that will significantly improve the accuracy of the resulting data?  As this data stands, I'm sticking with the old method.  One final note: the old technique uses 3 times a much heap (67kb vs 27kb) Dear Academic SE advisers,  I am a college sophomore in US with double majors in mathematics and microbiology. My algorithmic biology research got me passionate about the number theory and analysis, and I have been pursuing a mathematics major starting on this Spring semester. I have been independently self-studying the number theory textbooks written by Niven/Zuckerman/Montgomery, Apostol, and Ireland/Rosen on this semester. As this semester progressed, I discovered that I am more interested in the pure mathematics than applied aspects (computational biology, cryptography, etc.). I want to pursue a career as analytic number theorist and prove the Collatz conjecture and Erdos-Straus conjecture.   I have been thinking about doing the number-theory research on my university (research university; huge mathematics department). I have been self-studying the NT by myself and also regularly attending the professional and graduate seminars on number theory but I did not do any pure mathematics research as an undergraduate. Should I visit NT professors in my university and ask them about if I can do undergraduate research under them? If research is not possible (perhaps due to my lacking maturity), should I request of doing independent reading under them and later proceed with the research? How should I ask them? What should I address? If even independent reading is not desirable to them, what should I ask to them or do in my own?   As for my mathematical background, I have been taking Calculus II (computational) and discrete mathematics. I will be taking calculus III (vector calc.) on Summer, followed by Analysis I, Probability, Theoretical Linear Algebra on Fall 2015. As for my self-studying on this semester, I have been studying NT textbooks (mentioned above), proof methodologies, and basic linear algebra.   Thank you very much for your time, and I look forward to your advice!  Sincerely,  PK In 2018, Kyle Reese (a normal civilian who wasn't part of Resistance) was on the top in the hit list of Skynet. It means that Skynet of that time had information from future about Kyle Reese being father of future leader of human resistance. Right?  Why didn't Skynet kill Kyle Reese instantly after his detection kicking John Connor out of existence? How can i limit the character length in excerpt? Possible Duplicate:          I have a question after reading this post (). I like this function(Search Term Without Plugin) very much but the character length is too long. What php code should i add to make the excerpt shorter? Would appreciate if someone can suggest it. Thank you! How to enable or disable a user? I'm uing ubuntu 12.04 desktop. I have 3 users: user1(administrator), user2(standard) and guest. I wanted to disable user1 and enable user2 which auto logs on with no password but after I did that I can't login to user1 and user2 accounts except the guest session user. I'm striped off every administrative privileges. I don't know which options are available to me and how do I enable root or user which is an administrator? TOC entries and labels for included PDF pages I am embedding full pages from another PDF document (using the pdfpages package), but I would like to be able to declare my own section headings before each embedded document (for e.g. hyperlinking / TOC purposes). pdfpages has an experimental feature which lets me do this, but the problem is that I want to put all of these embedded documents inside a section, so I need to insert a section heading and a subsection heading on the first document I embed. Unfortunately pdfpages doesn't seem to be able to do this. Is there a way for me to do this?  Edit: Thank you for the suggestions. I am also in need of something similar for general labels — at the moment I am abusing the addtolist option of \includePDF but the objects I'm labelling aren't really figures or tables. Double integral with transformation; possible error in limits I'm asked to show that the following integral is true with the transformation $u = x+y$ and $y=uv$:  $$\int_0^1 \int_0^{1-x} e^{y/(x+y)} dx dy = \frac{e-1}2 $$  I found the determinant of the jacobian of the transformation is $-u$, and the exponent is just $v$ so the integral becomes $$\iint_R |-u|e^v du dv = \frac {u^2}2 e^v|_R$$ $$=\frac{(x+y)^2}2e^{y/(x+y)}|_{x=0}^{1-x}\;|_{y=0}^1$$ And plugging it all in doesn't work (AFAICT). For one, the x's don't all cancel.  I've looked at it 100 times. It's definitely written dxdy not dydx even though there is definitely an x in the integral. Maybe this is a typo and why my calculation isn't working out? I tried reversing the order to dydx and it didn't work. I tried changing the limit of integration to $1-y$ and it didn't work out.  I'm not even sure how to figure out the domain of integration in the uv-plane. Flipping things around yields y=uv and x=u-uv. But if my domain is bounded by x=0 and y=0 and y=1 (ignoring the last limit for now), then I have uv=o=u and uv=1. !?!  Am I just making an algebra mistake plugging everything in? Is there a way to handle a variable in it's own integral that I'm unaware of? How to make `sudo` preserve $PATH? I have a program that is installed in a custom directory under /opt. To make it easier to run it, I edited my bashrc to add said directory to my path: export PATH=$PATH:/opt/godi/bin:/opt/godi/sbin  This works fine if I want to run the program without sudo. However, if I try to run it with sudo it fails with a &quot;command not found&quot; error. $ sudo godi_console sudo: godi_console: command not found  Inspecting the PATH variable after using sudo reveals that its not including the same PATH I have as a normal user: $ sudo sh # echo $PATH                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  Why is the PATH not the same? Am I doing something wrong? I'm on Debian Jessie, if it makes a difference. One thing I tried was to invoke /opt/godi/sbin/godi_console directly, passing the absolute path to the executable. Unfortunatelly, that didn't help in this particular case because godi_console itself depends on the PATH being correctly set. How do you read C declarations? I have heard of some methods, but none of them have stuck. Personally I try to avoid complex types in C and try to break them into component typedef.  I'm now faced with maintaining some legacy code from a so called 'three star programmer', and I'm having a hard time reading some of the ***code[][].  How do you read complex C declarations? I read about the new fancy progress bar which was added to apt 1.0 in  and how to enable it . However on running sudo apt-get update, I did not see the fancy progress bars. On reading the second link again, the solution explicitly requires you to use sudo apt update.  Hence my question is the difference between apt and apt-get. I thought they were one and the same. Nautilus does not show the left bar, how do I turn it back on? When I open nautilus does not open the left bar where it says computer and down markers such as music, documents, videos, downloads. I reinstalled nautilus from the synaptic package manager but nothing happened. What I can do to make that bar visible again?