Does relativity in any way "disprove" Newton?

I was reading a science magazine and it claimed that  disproves all of Newtonian physics. I was highly skeptical because all we have been learning at school is Newtonian physics and we haven't even touched on relativity yet. Does that mean that the school is teaching me things that in reality are not true?  Additionally, by "all of Newtonian physics" does that include Newton's 3 laws of motion? Gravity?   The magazine also mentioned that quantum physics is also somehow disproving these previously held "theories".  Support would be appreciated.


I have the following topology : $$\tau= \Bigl\{U\subseteq \mathbb{R}^2: (\forall(a,b) \in U) (\exists  \epsilon >0) \bigl([a,a+\epsilon] \times [b-\epsilon, b+\epsilon]\subseteq U\bigr)\Bigr\}$$  Are these a basis for the previous topology:  $\beta_1= \{[a,a+\epsilon] \times [b-\epsilon, b+\epsilon]\subseteq \Bbb R^2: (a,b)\in \Bbb R^2, \epsilon>0 \}$  $\beta_2= \{[a,a+\epsilon) \times [b-\epsilon, b+\epsilon)\subseteq \Bbb R^2: (a,b)\in \Bbb R^2, \epsilon>0 \}$  I have asked this question before here:  And I got stuck for $\beta_2$, considering e $a,b=0,\epsilon=1$ this set is not open in our topology. They gave me the advice to look at the point $(0,0)$.What is the problem here?  Thank you


Why am I unable to add lines from a text file to an ArrayList in Java?

I have the following code below. If I comment out the stringList.add(row); I can get it to print the lines of the document (5 lines of text with spaces). If I don't comment it out, I get one line printed and the null. I have looked up everything I could online but I am not understanding why this is happening!   package examples.files;  import java.io.File; import java.util.ArrayList; import java.util.Scanner;  /**  * @author   *  */ public class ReadFileUsingScanner {     static ArrayList<String> stringList = null;     /**      * @param args      * @throws Exception       */     public static void main(String[] args) {         Scanner scanner = null;          try {             scanner = new Scanner(new File("customers.txt"));              while (scanner.hasNext()) {                 String row = scanner.nextLine();                 System.out.println(row);                 stringList.add(row);             }         } catch(Exception e) {             System.out.println(e.getMessage());         } finally {             if (scanner != null) {                 try {                     scanner.close();                 } catch (Exception e) {}             }         }     }  }   You don't have to solve the code but I want to understand the fundamentals as to why it doesn't work.


how to tell ubuntu to use python 3.4 instead of 2.7?

I have python 2.7 and 3.4 versions installed. But when I say say "python -V", it shows version as 2.7 not 3.4  How to tell ubuntu to use newest python? where is this setting configured ?


Frequency Response RLC circuit - Current against Frequency graph - Symmetry?

I understand that in a Frequency Response experiment dealing with an RLC circuit, the graph of Current against Frequency is supposed to be symmetrical about the resonant frequency theoretically.  However, experimentally it is not the case.  Could anyone explain why this happens?


How to hide particle system original object?

I am working on a very complex scene, including areas that have particle systems (grass, flowers, etc.), mostly created with the Botaniq and Graswald addons. Because the scene is so heavy, I have broken it down in sections and I am linking each area into the main file, instead of appending. The problem is, when these areas come into the main file, the particle systems' collections (instancing objects) are visible and on ground level, meaning they are are showing up on the render. Is there any way to hide these things or what is usually the procedure? Bonus question: For such a heavy file, is it better to work with linked files or just appending? Does anyone know what is more optimized?


Unable to edit ribbon to display custom tabs on Word 2013

I have been trying to customize the ribbon with more options like smart tool tabs, chart tool tabs, add-ins, blog post etc. But the only tabs that appear on the ribbon are view and developer. Anything after that won't appear on the ribbon at all. Any help would be appreciated as I have tried everything possible. The version of Office I am using is Office Standard 2013. I have already tried the options in a similar question, but the problem is that it doesn't create a grouping which I expect would be created if I use Customize the Ribbon option.


Multiple flavors, one external hard drive?

I got a 1TB HDD, is it possible to partition it in say 128GB sections and install a different Linux in each (i.e 8 different flavors on 1 hard drive) and be able to carry it around?   If so, what are the steps?


Integrating numeric scales into a text or HTML box in QGIS print composer.

I am trying to embed the scale of a map in the print composer expression builder or HTML frame. Effectively the value of the scale in the map item properties would come through into the text and be used as part of a standard text or HTML. This seems to be related to question:         In QGIS 2.6 (and earlier versions) there is an option to use the scale as part of an expression, however, it isn't possible to use this function in the Print Composer - I think it is probably to do with the need to stipulate which map item you are interested in the scale of (this doesn't seem to be possible using the scale function in the expression builder).   Can anyone suggest an alternative way of doing this or is what I suggest not possible and one to be captured as an enhancement request?   I am using QGIS 2.6 in Windows 7.


BASH String concatenation adds "^M" character

I have the following script that reads through a file line by line  _PATH=$(pwd) LOCATION_PATH="$_PATH/inventory.sh" LETTER="l" while IFS='' read -r line || [[ -n "$line" ]]; do     echo $line >> file2.test     CALL="${LOCATION_PATH} ${line} ${LETTER} 1234"     echo $CALL >> file.test     echo =========     RESULT=$($CALL)     #echo $RESULT done < "$1"   But while the input file for each line has NO ^M (carriage return) character in it, the output of the file.test file has them as follows:     /.../inventory.sh 00000e99-bce9-11e4-8418-06e8ce2b06d8^M l 1234   /.../inventory.sh 0001688b-bce7-11e4-8418-06e8ce2b06d8^M l 1234    The output to file2.test alos has no ^M character.   I have tried substituting as follows:  SP=" " LE="l" ...         CALL="${LOCATION_PATH}${SP}${line}${SP}${LE}${SP}1234"   To no avail.


As per the title, comments which are truncated in the feed end abruptly*:    There should be an indication that there's actually more text in the comment; the main site uses an ellipsis for this purpose.  *They also can get truncated mid-word, which the main site is guilty of too, but bonus points if we can have a smarter truncation so you don't have the comment ending on the first letter of the next word


What happen when Ubuntu is repeatedly shutdown and restarted?

I recently installed Ubuntu 12.04 LTS on my system dual boot with XP . My computer teacher at school used to tell that if a linux system is shutdown repeatedly it corrupts. I wanted to know that does same thing happen when it is done in ubuntu. Thank you.


Staggered Indices ($\Lambda^\mu{}_\nu$ vs. $\Lambda_\mu{}^\nu$) on Lorentz Transformations

I have some open-ended questions on the use of staggered indices in writing Lorentz transformations and their inverses and transposes.  What are the respective meanings of $\Lambda^\mu{}_\nu$ as compared to $\Lambda_\mu{}^\nu$? How does one use this staggered index notation to denote transpose or inverse?  If I want to take any of these objects and explicitly write them out as matrices, then is there a rule for knowing which index labels row and which labels column for a matrix element? Is the rule: "(left index, right index) = (row, column)" or is it "(upper index, lower index) = (row, column)" or is there a different rule for $\Lambda^\mu{}_\nu$ as compared to $\Lambda_\mu{}^\nu$?  Are there different conventions for any of this used by different authors?  As a concrete example of my confusion, let me try to show two definitions of a Lorentz transformation are equivalent.  Definition-1 (typical QFT book): $\Lambda^\mu{}_\alpha \Lambda^\nu{}_\beta \eta^{\alpha\beta} = \eta^{\mu\nu}$  Definition-2 ($\Lambda$ matrix must preserve pseudo inner product given by $\eta$ matrix): $(\Lambda x)^T \eta (\Lambda y) = x^T \eta y$, for all $x,y \in \mathbb{R}^4$. This implies, in terms of matrix components (and now I'll switch to linear algebra notation, away from physics-tensor notation): $\sum_{j,k}(\Lambda^T)_{ij} \eta_{jk} \Lambda_{kl} = \eta_{il}$. This last equation is my "Definition-2" of a Lorentz transformation, $\Lambda$, and I can't get it to look like "Definition-1", i.e., I can't manipulate-away the slight difference in the ordering of the indices.


I am working on a problem and I am confused if exponents can be split up in the manner below.   $$x^{k+2} = x^{k+1}+x^{k+1} = 2x^{k+1} $$  I apologize if this is a simple question I tried to look up exponent rules but I couldn't find exponents + a number.


Let $V$ be a vector space. Given $U\le V$, define $U^\perp=\{f\in V^\ast\mid f(u)=0\,,\;\forall u\in U\}$ and given $W\le V^\ast$, define $W^\perp=\{u\in V\mid f(u)=0\;,\;\forall f\in W\}$. This defines a Galois connection between subspaces of $V$ and subspaces of $V^\ast$. If $V$ is finite dimensional, why is $\dim U+\dim U^\perp=\dim V$? Unfortunately, I am not very comfortable with linear algebra. Any hint will be appreciated.


How do I pin my favorite folders in Ubuntu dock like in Windows?

I miss those pins I make in Windows.     How can I do the same in Ubuntu 17.10 with GNOME 3?


Where is links__system_main_menu defined?

I searched for links__system_main_menu, but just find usages of this theme. Where is it defined?


Let $u\in\mathcal{C}^2(\Omega)\cap\mathcal{C}^0(\overline{\Omega})$ be a classical solution of $\Delta u=u^3-u$ on a bounded domain $\Omega\subset\mathbb{R}^2$. Assume that $u=0$ on $\partial\Omega$. Then it holds that $|u|\leq 1$ on $\Omega$. Does someone know how to prove that?


Interlocking shapes with clipping mask and stroke

I'm trying to create something like this:  (Ignore the gray diagonal line) I have the female symbol and the rainbow flag. I know how to add stroke, create clipping masks, and create interlocking solid-color shapes with the live paint bucket, but I can't put everything together to make this design. The logical way, I think, would be to "bring forward" or "send backward" a part of a shape by selecting nodes, but I don't think that's possible. How should I go about doing this?


How to append a bezier curve from another .blend

When I try to append nothing happens. Tried 2.79, 2.81 and the latest 2.82 I just downloaded 5 minutes ago.  Steps: 1. start blender 2. try append a bezier curve called hhh_hhh (datablock is named hhh_ggg) from the file I added to this post 3. nothing happens, what am I doing wrong?  Here is a sample file you can try append a bezier curve from:


My Internet connection has been slow lately, and I think it might be a possible attack. A friend has told me to use , but it is a big install, and I do not have the time to learn how to use it. Is there an easier way to see all the connections on my PC so I can take further action?


When I used Linux Mint earlier I never faced a problem with printing on GIMP (because it was installed and configured by default).  When I used Ubuntu 18.04 LTS, I installed GIMP 2.10 from the software center. Everything is working fine on GIMP except printing.  The GIMP print window does not list my printer (or any other printer). I can only see:     Print to File   Print to LPR     I tried couple of troubleshooting tips without any success. I'm sure that the problem is from GIMP because I can print from Chrome /Firefox and from PDF reader without any problems.  PS: I don't know if this help but in the software center I found printing documents permission disabled for GIMP. I tried to enable it, but it gets automatically disabled again every time.    Any info/tips are highly appreciated.


Say I have an open circuit with a battery. I have a wire connected to the negative terminal and a wire connected to the positive terminal. The wires aren't connected.  In this scenario, would their be electron flow for a very short amount of time? Would the electrons from the negative terminal flow through the wire connected to it, since the potential would decrease between the electrons?  To clarify what I mean, consider the first diagram in this image:    In the first diagram there a large amount of electrons in the negative terminal. Would the electrons in the negative terminal distribute themselves through the wire to minimize the force between them?


What font is used in the macOS Mojave GUI? I am specifically looking for the font on the Menu bar.  I did find another post here, but it only showed the fonts for the old MacOS versions.   The reason I am posting this question is because I am not sure if the font has changed after Mac OS El Capitan.


Unittest to test if a TriggerHandler calls up a class correctly

I need to write a testmethod that checks if the triggerHandler works fine. I have a Trigger on Users, a TriggerHandler that calls up a class and one of its methods, and a testclass.  But how do I check if a triggerHandler works correctly, what is the right approach?  Thank you in advance!


I am writing a memoir with a lot of chapters using the memoir class.  When generating the pdf, everything works perfectly fine except for the outline of the document.  In the following example:  \documentclass{memoir}  \usepackage[english]{babel} \usepackage{blindtext} \usepackage{hyperref}  \begin{document}  \frontmatter  \tableofcontents   \mainmatter  \chapter{Introduction}  \blindtext  \part{First part}  \chapter{At first}  \Blindtext  \chapter{Then}  \Blindtext  \part{Second part}  \chapter{Second first}  \Blindtext  \chapter{Then again}  \blindtext  \chapter{General conclusion}  \appendix  \part*{Appendix} \addcontentsline{toc}{part}{Appendix}  \chapter{First appendix}  \Blindtext  \chapter{Another important appendix}  \backmatter   \chapter{Bibliographie}  \blindtext  \chapter{Glossary}  \blinditemize   \end{document}   (bibliography and glossary are of course managed with adequate packages)  I get the following outline:   Table of contents Introduction First part   At first Then  Second part    Second first Then again General conclusion  Appendix   First appendix Another important appendix Bibliography Glossary    While I'd like to have:   Table of contents Introduction First part   At first Then  Second part    Second first Then again  General conclusion Appendix   First appendix Another important appendix  Bibliography Glossary


I need to calculate if someone is over 18 from their date of birth using JQuery.  var curr = new Date(); curr.setFullYear(curr.getFullYear() - 18);  var dob = Date.parse($(this).text());  if((curr-dob)<0) {     $(this).text("Under 18"); } else {     $(this).text(" Over 18"); }   There must be some easier functions to use to compare dates rather than using the setFullYear and getFullYear methods.  Note: My actual reason for wanting to find a new method is length of the code. I have to fit this code into a database field that is limited to 250 chars. Changing the database is not something that can happen quickly or easily.


I'm using mysqli_query() with a dynamic variable $categoryName, where $categoryName will be dynamic where the category name will be fetch based on user submission from a form.  Within my category name submission form there are Food, Vintage clothing, Leisure, Angel's etc...  I'm still quite new to querying content from database, currently managed to come out with using mysqli_query() for querying from the database, like so:  $sqlCommand = mysqli_query($conn, "SELECT * FROM products WHERE category='$categoryName'");   Everything works great and I managed to query the db with my existing category names, however there's only one which doesn't work is the Angel's category with ' apostrophe symbol in it.  Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in.......   I suspect there is some sort of method like filter that need to be called before mysqli_query()?


Pendrive is not detecting in any computer

I used my usbdrive to install software in many computer of lab  but when i plugged it in a computer then due to virus now it is became unreadable or can not be detected now in any other computer . what to do


$|x_{n + 1} - x_n| < \frac{1}{2^n} \Rightarrow (x_n)$ is Cauchy

Let $(x_n)$ be a real sequence with the property that for all $n \in \mathbb{N}$,  $$|x_{n + 1} - x_n| < \frac{1}{2^n}$$ I want to show, using the definition of a Cauchy sequence, that $(x_n)$ must be Cauchy.  I have found that the property implies that for any $(m, n) \in \mathbb{R}^2$, assuming without loss of generality that $m > n$, it must be true that $$|x_n - x_m| \leq \sum\limits_{i = n}^m \frac{1}{2^i}$$  How can I proceed from there ? Is this even the right way to approach this problem?


Create polygon symbology from attribute?

I have shapefile with polygons and lines. There are attributes for: layer, lineweight, colour: Red, colour: Green, colour: Blue. (colour values are from 0-255).  Is there a way to read values from attributes, and assign colour and lineweight to polygons and/or lines? After that I would like to use the save layer option to save symbology.  I'm using ArcMap 10.3.


How would I mathematically prove that 1+1=2?

Everyone knows that 1+1=2, but how would one mathematically prove that this equation is true? Or can you?


How to fix bra strap marks... during production

I work with many first-time models and often do boudoir.  On the checklist I give them it says DON'T do this, but sometimes there will be someone who shows up to the shoot wearing a tight push-up bra.  Of course, this means any nudes or other photos we do without the push-up will have heavy marks on their body. These are a pain to edit in post.  How do I fix this DURING production?


My question is as follows: $a,b \in L$ where $L$ is a ring. We are given that $ab=1$.  I need to prove or disprove that $a$ is invertible (meaning, there is an element $x \in L : ax=xa=1$).  But how can we say that for sure? just because $ab=1$ doesn't mean that $ba=1$, ba could be something else altogether, we werent given that this is a commutative ring.  Please give advice on how to solve, thank you.  Word by word translation of the question to make it clearer: Prove or disprove that if $a$ and $b$ are elements of $L$ and $ab=1$, then $a$ is invertible.


Calculating the average of variably sized blocks of numbers within a column?

In column A I have a set of numbers (over 1,000), and I want to get an average of a block of them at a time, (e.g., 10, so A1:A10 then A11:A20 and so on) and write these averages into column B, such that B1 contains the average of the first block, B2 the second block and so on.  Then, in C1 I would like to have a value which defines the number of rows each average should consider (e.g., 10 = A1:A10,A11:A20... and 25 = A1:A25,A26:A50... and so on).  When I change the value of C1 I want column B to update automatically to average using the new block sizes.  How should I go about doing this?


Is there a way to create files in /proc/ without actually writing a kernel module?  This is for reverse engineering purposes, an app expects certain things in /proc/ and I do not want to write a kernel module to supply it. The app simply just reads /proc/something/some_key and expects certain/known values.  EDIT: Union mount doesn't seem to work as I need a new directory, e.g. /proc/new_dir/ and some files in there and making union on top of /proc/ itself seems to break it.


What is the meaning of the term "thread-safe"?

Does it mean that two threads can't change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple threads are executing that code segment?


If $\psi$ acting on $a_+$ and $a_-$ operator just moves up and down the ladder, why is $[a_-, a_+] = 1$ and not 0?

If $\psi$ is acted upon by both the operators one by one, it should return the same wave function. Thus order in which you increase or decrease the energy shouldn't matter. Then why is it so that the order of operators matters?  $$a_\pm = \frac {1}{\sqrt{(\hbar2m\omega)}} (\mp ip + m\omega x).$$


How to prevent xlrd adding precison to float values

My issue is little bit strange. I have an excel file in which some float values are mentioned e.g. 0.0079 but when I try to read it using my code it's giving me 0.007899999999999999.  I'm not sure what's actually happening here(may be that's the original data which was entered in the excel sheet when it was originally created). I checked other questions on SO which are similar but they are all concerned about 'how to not loose the precision' and my case is opposite.  sample code:  sheet_hdl = open_workbook('file.xls') sheet = sheet_hdl.sheet_by_index(0) for row_idx in range(1, sheet.nrows):     for col_idx in range(1):         if(val == str(sheet.cell(row_idx,col_idx + 1).value)):             accuracy_val = repr(sheet.cell(row_idx,col_idx + 7).value)             print(accuracy_val)   Note: It's not a duplicate of . The question in this link involves computation, but my data in excel doesn't involve any computations.


What is the required prerequisite knowledge of QM, for starting QFT?

As a physics bsc student, I have a very limited knowledge of QM:  Dirac formalism, Schrodinger equation and simple solutions (oscillators, particle in a given potential, hydrogen-like atom etc). There are more advanced QM courses I can take, but I find more interest in QFT.  What are the prerequisite subjects of non-QFT QM courses I should learn before starting with QFT?


How to downgrade php version in ubuntu 15.04

I am working on a codeigniter project where the system requires php version < 5.6 that is 5.5, but few days ago I have installed ubuntu 15.04 with having LAMP stack installed using tasksel;the tasksel is gives me the latest update to php5.6 which is incompatible to my project;even I have uninstall tasksel LAMP server and installed lamp individually but the problem is not persisted  I have a limited knowledge in linux environment if anybody knows please help me with some resources;I will be highly obliged.  Thank You.


If $ax^2+bx+c=0$ has $2$ different solutions in $(0,1)$ then prove $a\geq 5$.

Say $a,b,c$ are integers, $a>0$. Suppose $ax^2+bx+c=0$ has $2$ different solutions in $(0,1)$ then prove $a\geq 5$. Find an example for $a=5$.   I am struggling with this for some time with no success.    I try Vieta's formula $0<x_1+x_2 = -{b\over a}<2$ and $x_1x_2 ={c\over a}<1$ so $c<a$ and $0<-b<2a$.


Words to describe a young adult or teen who behaves recklessly and won't listen to advice from older people

I'm looking for a word (formal, informal, or even slang) to describe a young person who  behave recklessly, like to mess around and often get into trouble with people, don't listen to advice from older people, and has shallow thinking.   People in my country have a word which can be translated into "bullheaded kid" but I find it a bit weird so I want to find a proper word for it.


Merge old Stack Overflow account with new one

I made this account a couple of years ago, however this email address is no longer in use (it exists, but I can't access it).  Is it possible to merge this Stack Overflow account with my new one?  P.S. The only way I can use to log in to this account (and prove it's mine) is because I'm automatically logged in in the app.  Update: I do not know the password to this account.


Relationship between binomial and negative binomial distributions (how to extend the probability space?)

I wonder a technique to extend the discrete probability space.  Here's an example from Concrete Mathematics EXERCISE 8.17:     Let $X_{n,p}$ and $Y_{n,p}$ have the binomial and negative binomial distributions, respectively, with parameters $(n,p)$. Prove that $\Pr(Y_{n,p}\le m) = \Pr(X_{m+n,p}\ge n)$.   The answer to the problem is also from Concrete Mathematics:     \begin{align} \Pr(Y_{n,p}\le m)  &= \Pr(Y_{n,p}+n \le m+n) \\ &= \hbox{probability that we need $\le m+n$} \tag{1}\\ &= \hbox{probability that $m+n$ tosses yield $\ge n$ heads} \tag{2} \\ &= \Pr(X_{m+n,p}\ge n) \end{align}   Well, (1) and (2) are describing the same thing, but they're in different probability spaces, so we should extend these two probability spaces into a unique probability space, ensuring that the probability of each event doesn't change. How can we do it? I haven't a clear idea.  And the more general problem arises: How to extend a probability space? Is there any technique to do it, at least, treat part of problems?  Thanks for your help!


After migrating page to other sandbox got error : View state size exceeded

I have VF page and a controller class working fine in my dev sandbox. The same functionality i am trying to migrate to completely different company's sandbox. I deployed all components through package. Package is installed successfully but when i try to open the VF page im getting an error :  Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 196,86KB  I dont think there is any problem with code optimization as code is working fine in one sandbox.


I upgraded to 12.04 right after it was released, and once it installed, I was eager to try the new features. After fiddling around with most of them, I forgot to try the brand new HUD. I tapped the alt key... and nothing happened. I searched around to see if I disabled it, but I didn't. Also, holding alt still showed the appmenu at the top. Is there a reason that it isn't working on my computer?


Loading JSON in PHP53: ZVAL_DELREF in Unknown on line 0

I'm trying to loading JSON into the new-installed PHP5.3.1 on a CentOS server. Previously there was a PHP5.1 or near and due to the latest version of WordPress I had to upgrade the PHP.  I tried to install JSON via yum with:      yum install php-pecl-json   But I get a "php53-common is in conflict with php-common". With --skip-broken doesn't work, either.  I've tried it manually and got the JSON package via PEAR:   pear install pecl/json   After some errors regarding certain functions that are decrapted in this new version of PHP,  I still got the following error on php -v:   # php -v  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so: undefined symbol: ZVAL_DELREF in Unknown on line 0  PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:54)    Afterwards, I've installed JSON manually, entered the folder and did phpize prior to ./configure, make and make install. I also copied the json.so to /usr/lib64/php/modules. Nothing working so far.  The json.ini in /etc/php.d states:  extension = json.so   I did replace json.so from "extension = " with /usr/lib64/php/modules/json.so. And also entered "/usr/lib64/php/modules" as extension_dir into /etc/php.ini.  No luck. Can anyone help?  Thank you.  UPDATE:   # yum repolist  Loaded plugins: fastestmirror  Loading mirror speeds from cached hostfile   * base: centos.mirror.lstn.net   * epel: fedora-epel.mirror.lstn.net   * extras: centos-distro.cavecreek.net   * rpmforge: fr2.rpmfind.net   * updates: mirrors.serveraxis.net  base                                                     | 2.1 kB     00:00       epel                                                     | 3.7 kB     00:00       extras                                                   | 2.1 kB     00:00       rpmforge                                                 | 1.1 kB     00:00       updates                                                  | 1.9 kB     00:00       repo id      repo name                                           status  base         CentOS-5 - Base                                     enabled:  3,535  epel         Extra Packages for Enterprise Linux 5 - x86_64      enabled:  6,543  extras       CentOS-5 - Extras                                   enabled:    299  rpmforge     RHEL 5 - RPMforge.net - dag                         enabled: 10,691  updates      CentOS-5 - Updates                                  enabled:    765  repolist: 21,833   UPDATE 2: JSON is already packed within php-common, so when installing PHP from REMI repo, for example, version 5.3.6 you'll already have JSON installed.  It seems that after that, trying to install JSON via pecl install json or manually will output the error I've stated above.  Thank you.


Only using three methods (including main) and an array of 10 whole numbers, I need to create a program that does these stuff:    Count how many people who passed the exam.  Print the statistics. (eg. grade A, B, C, D, E...) How many people passed or failed their exam.    Here's what I have right now. The only problem I have is that I don't know how to return multiple values.   public class Array10PassFail  public static int countPass (int [] num) {     int count = 0;     int counter = 0; for (int i = 0; i < num.length; i++)     {         if (num [i] >= 50)         {             count++;         }         else if (num [i] < 50)         {             counter++;         }     }  return count; }    public static int printStats (int [] num) {     int aTotal = 0, bTotal = 0,cTotal = 0, dTotal = 0, eTotal = 0;     for (int i = 0; i < num.length; i++)     {         if (num[i] >= 80)         {             aTotal++;         }         else if (num[i] >= 70)         {             bTotal++;         }         else if (num[i] >= 60)         {             cTotal++;         }         else if (num[i] >= 50)         {             dTotal++;          }         else if (num[i] < 50)         {             eTotal++;          }     }     return aTotal; }  public static void main (String [] args)  {     Scanner sc = new Scanner(System.in);       int [] num = new int [10];      for (int i = 0; i < num.length; i++)     {         System.out.print("Enter score: ");          num[i] = sc.nextInt();      }      int passf = countPass(num);      System.out.println("There are " + passf + " people who passed and " + ??? + " who failed. ");  }


6-digit password - a special decoding method

Consider the situation of decoding a 6-digit password that consists of the symbols A to Z and 0 to 9, where all possible combinations are tried randomly and uniformly.       Consider the following decoding method: At first a combination is chosen randomly and uniformly. At the next trial a digit from this combination is chosen uniformly at random and its entry is substituted by a uniformly randomly chosen element from $\left\{A,...,Z,0,...,9\right\}$. This procedure is repeated until the password is found.   (a) What is the probability that the correct password will never be entered?  (b) What is the probability that eventually the same combination will be entered two consecutive times?    I already asked how to get the anwers to (a) and (b) without using the here mentioned special decoding method and I got great help, see .  Now I have to answer (a) and (b) using the decoding method and again I have enormous problems! Combinatorical thoughts are not my favourite business. Nevertheless I tried to find the probabilities in an analog way as it was shown to me in the linked thread.   Additionally, I wonder if this task now maybe has something to do with Markov chains because the lecture this task is from is about Markov chains.    I think there are (at least) the two following ways to understand the described decoding strategy, which sense is meant?  Sense 1 We choose (randomly and uniformly) one of the $36^6$ possible combinations. If it is the right, we stop. Otherwise we then choose (randomly and uniformly) one of the 6 digits and substitute it (randomly and uniformly) by a symbol out of the alphabet. Then we choose (randomly and uniformly) one of the remaining 5 digits and subtitute it and so on until we substituted all the 6 digits. If this was the right password, we stop. If not, we again start substituting the 6 digits (the digits of the combination that we chosed at the beginning, that is, we stick to this combination).  Sense 2 Same as above with the difference that after we substituted all 6 digits and saw that it is the wrong password, we choose (randomly and uniformly) another combination out of the $36^6$ possibilities (it can be the same as before) and then substitute the digits of this new combination.  I think that sense 1 is meant and thus I considered the task in this sense.  (a) Anyway, my result here is $0$, because as far as I see the probability not to have reached the right password after n passages is $$ \left(1-\frac{1}{36^6}\right)\cdot\left(1-\prod_{k=1}^6\frac{1}{k\cdot 36}\right)^n $$ and this tends to $0$ as $n\to\infty$.  Remark: If we decode without this special method (see the linked thread) then the probability of (a) is 0, too.  (b) The probability that we have eventually one pair of consecutive equal guesses is - to my results -  $$ \sum_{n=0}^{\infty}\left(1-\frac{1}{36^6}\right)\cdot\left(\prod_{k=1}^6\frac{35}{k\cdot 36}\right)\cdot\left(\prod_{k=1}^6\frac{34}{k\cdot 36}\right)^n\left(\prod_{k=1}^6\frac{1}{k\cdot 36}\right) $$  Edit  I think my last result for (b) was not correct, I think instead it has to be $$ \sum_{n=0}^{\infty}\left(1-\frac{1}{36^6}\right)\cdot\left(1-\prod_{k=1}^k\frac{1}{k\cdot 36}\right)\cdot\left(1-\prod_{k=1}^{6}\frac{2}{k\cdot 36}\right)^n\cdot\left(\prod_{k=1}^{6}\frac{1}{k\cdot 36}\right). $$  If I know compute the geometrical series and use that $1-\prod_{k=1}^{6}\frac{1}{k\cdot 36}\approx 1$, then I get that (with $p:=\frac{1}{36^6}$) the probability of (b) is $$ \approx \left(\frac{1}{2}\right)^6\cdot (1-p) $$  Remark: When decoding without this method (see the linked thread) then the probability of (b) is $\frac{1}{2}\cdot (1-p)$. That is, using the method, if my result is correct, we have a much smaller probability for (b). So this decoding method is more efficient.    Would be great to get a feedback from you to know if I am right. And, as mentioned, I am interested to know if the task has something to do with the context of Markov chains.  Ciao & greetings  Salamo


How to describe statistics in one sentence?

When I first started learning statistics, procedures like the t-test, ANOVA, chi-squared and linear regression each appeared to be very different creatures. But now I realise these procedures each do more or less the same thing. And likewise, values such as the variance, residuals, standard error and mean also measure more or less the same thing.  So I reckon all of these procedures and values, and indeed all of statistics, can be described in just one simple sentence:     What is the expected value and what is the variation around this value?   The word expected could be replaced by any of these words: hypothesised, predicted, or central.  How would other people describe statistics in one sentence?


How do i detect when a player is in the nether or any other dimension to run a command?

Im new in making datapacks but, All im trying to do is make it detect when im in the minecraft:nether_1. So if im in the nether it will run the command "execute as @a at @s in minecraft:nether_2 run tp @s ~ ~ ~"


How to completely disable Airplay in Mac OS X

I'd like to cut out AirPlay entirely.  Looking for an answer, I read   But it didn't really offer a direct solution.    Here is my problem:  I have the household media room connected to an Airplay capable receiver.  Our media server is a secondary Mac that runs 24/7 for the express purpose of serving media throughout the house.  This is a headless machine that does not ever output any audio of its own, and in fact could have all audio drivers disabled and it would be perfectly fine with me.  What happens is, this machine appears to spontaneously decide that it wants to connect to the Airplay receiver, which causes my Media room to suddenly switch input sources and is seriously irritating and confusing to other members of the household.  If I could simply disable Airplay completely on this machine, then all would be well.  But I don't want to impact any other internet connectivity as I have multiple apps that need to communicate at all times in both directions to the outside internet.  Is there in fact a direct way to simply disable Airplay entirely in Mac OS X?


Currently I'm making a voxel survival game. About a month ago I embarked on procedurally generating terrain using Perlin noise. I understand how to use and apply it for the most part. However I do not understand how to vary terrain structure. Let me say that in a way you probably can understand because "me no grammar good".  By changing frequency and amplitude I know I can change the resulting terrain, varying it from rolling hills to jagged peaks. However the end result will always be the same: either never ending hills or never ending mountains. I don't understand really how I would mix those two "terrain structures" together to get area's of hills and area's of mountains.


How to rewrite $\frac{\sqrt{x}-x^2}{1-\sqrt{x}}$ so as not to get $0$ in the denominator as $x\to 1$?

How may I simplify the following so I could calculate the limit without getting $0$ in the denominator when replacing $x$ with $1$? $$\lim_{x \to 1} \frac{\sqrt{x}-x^2}{1-\sqrt{x}}$$


It would be nice if there was a method to unlink your profile for a particular site from your network profile so that you could log in just using the one account, but not have people know who you are for certain sites


In need of theorem recommendations to prove that f(z) maps $\Bbb C \setminus B$ maps to $\Bbb C \setminus \{0\}$

Given a bounded set B of the complex plane, I want to prove that $f(z)=e^z$ maps $\Bbb C \setminus B$ ont $\Bbb C \setminus \{0\}$.   I have no idea where to start with this.   Does anyone have any recommendations on what theorems would be useful here ?


Error deploying changeset in test class using Test.loadData

I'm trying to apply changeset to an org, but the following line of code in my test class:  List<sObject> cmpn = Test.loadData(Campaign.sObjectType, 'testCampaigns'); and others similar to it, gives the following error during validation of the changeset. This error does not show up in the Developer console when tests are run. System.SObjectException: ORA-20001: ORA-06512: at "DOC.CACCESS", line 4277 ORA-06512: at "DOC.SSHARING", line 7654 ORA-06512: at "DOC.CSAVEUTILS", line 202 ORA-06512: at "DOC.MCAMPAIGN", line 689 ORA-06512: at line 1 {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}  {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} Stack Trace: Class.System.Test.loadData: line 53, column 1 Class.DailyLeadTaskUpdateBatchJobTest.testDailyLeadTask: line 35, column 1


Save attachments of selected messages in Outlook

I am looking for a way in Outlook 2010 to save attachments for selected messages. How can I do that?


Help me evaluate $\int_0^1 \frac{\log(x+1)}{1+x^2} dx$

I need to evaluate this integral: $\int_0^1 \frac{\log(x+1)}{1+x^2} dx$.  I've tried $t=\log(x+1)$, $t=x+1$, but to no avail. I've noticed that:  $\int_0^1 \frac{\log(x+1)}{1+x^2} dx = \int_0^1\log(x+1) \arctan'(x)dx =\left. \log(x+1)\arctan(x) \right|_{x=0}^{x=1} - \int_0^1\frac{\arctan(x)}{x+1}dx$  But can't get further than this.  Any help is appreciated, thank you.


Imaginary line on the Earth is straight or not?

I was watching Google map. Saw a line which is joinging north to south pole. It is going between middle of China and Mexico. But, the line is not straight. Tried to search in net but not able to get anything. Can anyone check and let me know  or


While reviewing suggested edits, I can across one for  which, as the tag wiki currently states, is clearly the result of a typo.  There are no questions tagged with this, and the tag edit was approved nullifying my attempt to disapprove it.  Neither is there any way to flag the edit for moderator attention.  Is there a way for this to be removed, and if so, could somebody with sufficient power do so?


My disk have 3 partition, one for system and others for store data. I can change its label, but I can not change path for that partition. My partition have a "work" label name, but I must input /media/dd7e8652-201e-4ea6-bb9b-8469091ecb25 to access in command line.  How can I access via /media/work command?  Thank for any command and answer :-)


What Is the reason behind the fact that $\Bbb R$ is not a complete measure space? Is it only due to the cardinality of  $\Bbb R$? Or other structures on  $\Bbb R$ also play a role? Can one make every subset of  $\Bbb R$ trivially measurable by assigning them to a number of a complete ordered field of the cardinality $\aleph_2$ ?


What is a rolling shutter? When do I have to be aware of it?

In answer to , Adam Davis writes:     Your camera complicates this by using   a rolling shutter above a given speed   (usually around 1/200. This means that   only a portion of the image sensor is   exposed to the scene at any given   time, so if the light changes during   the exposure, the color change will   only affect a portion of the image   sensor.   Rolling shutters often are also mentioned in the .  However, I am yet to see a discussion of what a rolling shutter is, how it works and when it is important.  What is a rolling shutter?  What are the implications of using one for my photos?


As a PhD student I generate a lot of pages with calculations, ideas and lecture notes.  Most of them are useful only for a short amount of time, but some may be important for much longer (when writing a paper, or when having new ideas to continue a once abandoned project). Typically I work on a few project simultaneously.  The question is, what is a good practice of taking and keeping notes? (With or without computer apps.)  Writing on single sheets (even if adding date and title) makes it easy to organize by topic, but also easy to loose. Keeping in one notepad makes it harder to collect useful things of one topic in one place.


Best way to integrate $ \int_0^\infty \frac{e^{-at} - e^{-bt}}{t} \text{d}t $

Today I had an exam and I mixed up the integration by parts formula.  The question was to integrate $$ \int\nolimits_0^\infty \frac{e^{-at} - e^{-bt}}{t} \text{d}t $$  I will try solve this again with the right formula when I arrive home. I would appreciate if somebody could tell me the solution so I can double check and maybe give a hint to another way of solving this instead of integration by parts (if possible).


Finding an old command in the shell history

How can I find an old command I ran in my terminal?  I used an appengine command and wish to just find it in my local command history without researching it online again.


Which two points are we talking about in Fermat's principle? Are those points decided by light or decided by us? Can we take any two points?


How to prove two closed intervals are equinumerous?

Prove that $[0,1] \approx [-\pi,e^2]$  (The notation $\approx$ is used to denote equinumerous)  I know to prove two closed intervals are equinumerous I need to show a bijective function that will map from one interval to the other but I cannot seem to find the correct mapping.


Need help to install persistent Ubuntu on USB drive

Possible Duplicate:          I am a new user of Ubuntu. I would like to install a persistent Ubuntu 11.04 to my USB stick, and it should be able to work as a guest OS running on Windows so that I can boot it on other computers other than the one which I used for the installation. I have used several creators such as unetbootin, however from my understanding it can only create Live Linux which I am unable to save my configurations and files. If it's possible I would like to bypass the BIOS, that is to say that I can just load from the virtual machine without having to restart the computer. Thanks in advance!    Thanks for all the replies! Hi Mike, I am able to create a virtual machine and run it from my USB drive using a portable virtualbox. How do I go about from there, do I have to proceed with the installation? Could you elaborate more on the steps for the installation? Thanks again!


Code containing HEREDOC is not highlighted correctly

Not sure if this was brought before but I noticed on several occasions that code containing HEREDOC syntax will not be correctly highlighted. Example at


Intended to call a virtual function of a derived class, but wrongly called virtual function of the base class instead. The object is not sliced

I'm trying to implement a turn based game for the course project. The game has a 'status' base class and from which derived the actual statuses such as 'poisoned', 'paralyzed' or 'choke'(which is the test case that goes wrong).  A status need to be setup first before it is inflicted to a character object by a move object, and the SetupStatus() function varies between different derived classes of the status class.  The problem is, when I am trying to call the SetupStatus() function of the 'choke' class (choke::SetupStatus()), which is derived from the base class 'status', it always call the function status::SetupStatus(). The function is called in the cmove::LaunchMove(...).  Where did I do wrong?  I missed the virtual declaration in the first place. I added it, but it didn't solve the problem.  main.cpp  int main() {     cmove aqua_ball = AquaBall();     field TestField;     character Irrawa = IRRAWA();     character Mew = MEW();     aqua_ball.LaunchMove(&Irrawa, &Mew, &TestField); }   cmove.cpp  void cmove::LaunchMove(character *speller, character *taker, field *thisField) {     //some other codes...     if (slf_adStat.size() != 0) {         for (int i = 0; i < slf_adStat.size(); i++) {             status tempStatus = slf_adStat[i];             cout << tempStatus.get_information() << endl; //Output tempStatus info             tempStatus.SetupStatus(speller, taker, thisField);//Where the function call goes wrong             cout << tempStatus.get_information() << endl; //Output tempStatus info              (*speller).add_status(tempStatus);         }     }     //some other codes... };   status.h  class status{ public:     string sta_name, sta_info;     //some other codes...      virtual void SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField);     string get_information();      //some other codes... };  class choke : public status{ public:     choke(){         sta_name = "CHOKE";         sta_info = "Reduce speed by 15. Last 3 turns.";         //some codes...     }     virtual void SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField);     //some codes... };   status.cpp  void status::SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField){     cout << "General status setup..."<< endl; } string status::get_information(){ string output = "[" + sta_name + "]" + ":\n" + sta_info + "\nLEFT:" + to_string(nT) + "turns\n"; return output; } void choke::SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField){     sta_ds = -15;     cout << sta_ds << "Choke status setup..." << endl; }   Output:  [CHOKE]: Reduce speed by 15. Last 3 turns. LEFT:3turns  General status setup... [CHOKE]: Reduce speed by 15. Last 3 turns. LEFT:3turns   Since the tempStatus objects before and after the SetupStatus() function are all printed as expected, the tempStatus is a choke class object, this is not a problem related to object slicing.  All the code can be find here if necessary:


Why typing :(){ :|: & };: and pressing enter on my Ubuntu machine's terminal freezes the system?

Friend suggested to type :(){ :|: & };: and pres enter on my Ubuntu machine's terminal and I did, it gave me output as number and system hanged forever. Could anyone help me understand why did this happen?


Show that $16$ is a perfect $8$th power modulo $p$ for any prime number $p$

Show that $16$ is a $8th$ power $\mod{}$ $p$ for any prime number $p$.  I have no idea how to approach this.  I tried,  $$a^8\equiv16\pmod{p}$$  $$(a^4+4)(a^4-4)\equiv 0 \pmod{p}$$  $$a^4 \equiv \pm4\pmod{p}$$  $$a^4 \equiv 2,p-2\pmod{p}$$  But this doesn't seem to lead anywhere.


Irreducibility of $x^p-a \in \Bbb Q[x]$, where $a(>0) \in \Bbb Q $ with $ a^{1/p} \notin \Bbb Q$

Let $p$ be a prime, and $a$ be a positive rational number such that $a^{1/p}$ is irrational. Then is the polynomial $x^p-a$ always irreducible in $\Bbb Q[x]$? Intuitively it seems obvious, but I don't see how to prove it.


The decision:      you have submitted an invitation from the British army which state you   have been invitated you for an interview and assessment. I note that   the letter provided does not guarantee your enlistment. You have   provided no explaination for your apparent new interest in joining the   British army and you have nothing to indicate that you have ever   sought to join the military of your home     My question is that could there be that maybe someone removed my visa application letter? Because to my understanding it's like I only provided the invitation letter? And the bank balance from my business account show I have enough money that there is no resonable reason for me to go and do the assessment which am not sure of being enlisted. The the bank balance is 8000pounds and my budget was to use 4500 because I don't know what's out therefore I needed to be financial stable yet they have used it as I have money and I cant go to UK for just an assessment and spend that amount forgetting there is air ticket, hotel bookings, logistics plus pocket money.   And there decision I can not apeal why?


Iterating through folders in numerical order

I have a bunch of folders which are labelled in this way:   conf1  conf2  ...   But the order in the home directory is like   conf1  conf10  conf100  conf101  ...  conf2  conf20  conf200  conf201  ...   Because each folder contains a file named "distance.txt", I would like to be able to print the content of the distance.txt file, from each single folder, but in order, going from folder 1-->2-->3... to the final folder 272.   I tried several attempts, but every time the final file contains the all set of values in the wrong order; this is the piece of code I set:     ls -v | for d in ./*/;       do (cd "$d" && cat distance.txt >> /path/to/folder/d.txt          );      done   As you can see I tried to "order" the folders with the command  ls -v   and then to couple the cycle to iteratively save each file.  Can you kindly help me?


every time I try to upgrade my system it keeps telling me to check my internet connection as if there's no internet when there obviously is, since I'm using it to post this. I honestly don't know what to try or do. even the partial update doesn't work. is there any way I can just wipe 14.04 and install a newer version?


Revert to older version of password database

Is there a way to revert to a previous version of a file that has been changed by a program different from a text editor?  In my case I was using KeePassX and after adding a new password and saving the database, its size was '0 bytes' and couldn't be opened anymore. So all my passwords are now inaccessible.   Is there a way to access the previous, non-destroyed version of the database? Unfortunately, I never made any backups of it.  I am using Ubuntu 14.04 with KeePassX 0.4.3.  I am aware of this question  but its focus is on command line actions such as copy or move.


Name of book about a man who was genetically modified during prehistoric times by aliens

I read a book about a man who was geneticall modified during prehistoric times by aliens, and lived forever. I keep thinking it was Ben Bova or Greg Bear story but I cannot think of it. I read it as a kid and now I cannot remember name or author. It seemed to follow his life through out history into modern times. I have googled this to no end. Anyone recall this book?


$X$ and $Y$ are independent random variables,then density function of $\frac{X+Y}{3} $?

$X$ and $Y$ are independent random variables each having the density $f(t) = \frac{1}{\pi(1+t^2)} , -\infty < t < \infty$.  Then the density function of $\frac{X+Y}{3}$ is?  Let $Y =U$ and  $X+Y = V$  then I was thinking of calculating the Joint distribution of $ U , V $ and then calculating the marginal density function $f_{V}$!  So $f(u,v) = |J| . f(x,y)$ where the Jacobian is $-3$ hence $|J| = 3.$  So that $f(u,v) = 3 . f(x,y) = 3. f(x) . f(y) = 3 . \frac{1}{\pi (1 + x^2)}\frac{1}{\pi (1 + y^2)} =3 . \frac{1}{\pi (1 + (3v - u)^2)}\frac{1}{\pi (1 + u^2)}  $  And finally $f(v) = \int_{-\infty}^{\infty} \frac{3}{\pi^2 (1 + u^2)(1 + (3v - u)^2)} du$  Now, are my above steps correct?.  Also, it is becoming a bit complicated any other simpler method?  EDIT  It's a problem from  previous year competition in our institute which had four options as answer -   $a) \frac{6}{\pi (4 + 9t^2)}$  $b) \frac{6}{\pi (9+4t^2)}$  $c) \frac{3}{\pi (1 + 9t^2)}$  $d) \frac{3}{\pi (9 + t^2)}$  and usually there is a small amount of time for each question any reverse mathematics procedure or any tricks may be there apart from a few lengthy calculations, yes from answers I now know that characteristic functions are important to know about various properties of distributions but to a beginner in probability if unaware of  Cauchy Random variable?


Applying a keras model working with greyscale images to RGB images

I followed this  using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe, etc...). The tutorial uses a simple model:  model = keras.Sequential([     keras.layers.Flatten(input_shape=(28, 28)),     keras.layers.Dense(128, activation='relu'),     keras.layers.Dense(10) ])   This model reaches 91% accuracy after 10 epochs.  I am now practicing with another dataset called CIFAR-10, which consists of 50,000 32*32 pixels RGB images, also split into 10 classes (frog, horse, boat, etc...).   Considering that both the Fashion MNIST and CIFAR-10 datasets are pretty similar in terms of number of images and image size and that they have the same number of classes, I naively tried training a similar model, simply adjusting the input shape:    model = keras.Sequential([      keras.layers.Flatten(input_shape=(32, 32, 3)),      keras.layers.Dense(128, activation='relu'),      keras.layers.Dense(10)   ])   Alas, after 10 epochs, the model reaches an accuracy of 45%. What am I doing wrong?  I am aware that I have thrice as many samples in an RGB image than in a grayscale image, so I tried increasing the number of epochs as well as the size of the intermediate dense layer, but to no avail.    Below is my full code:  import tensorflow as tf import IPython.display as display from PIL import Image from tensorflow import keras import numpy as np import matplotlib.pyplot as plt import pdb import pathlib import os from tensorflow.keras import layers #Needed to make the model from tensorflow.keras import datasets, layers, models  (train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()  IMG_HEIGHT = 32 IMG_WIDTH = 32  class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',                'dog', 'frog', 'horse', 'ship', 'truck']   train_images = train_images / 255.0 test_images = test_images / 255.0  def make_model():       model = keras.Sequential([          keras.layers.Flatten(input_shape=(IMG_HEIGHT, IMG_WIDTH, 3)),          keras.layers.Dense(512, activation='relu'),          keras.layers.Dense(10)       ])       model.compile(optimizer='adam',                    loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),                    metrics=['accuracy'])       return model  model=make_model() history = model.fit(train_images, train_labels, epochs=10)     EDIT: In order to address colt.exe's suggestion below, I converted the CIFAR-10 images from RGB to greyscale, using:  rgb_weights = [0.2989, 0.5870, 0.1140] train_images = np.dot(train_images, rgb_weights) test_images = np.dot(test_images, rgb_weights)   However, using the same model with 10 epochs yields an accuracy of about 38%, even worse than before!  I am starting to think that the Fashion MNIST is "easier" to work with since all images have a light background, whereas the CIFAR-10 consist of pictures taken outdoors in a wide variety of contexts.


Let T = {1000,1001...,9999}. How many numbers have at least one digit that is 0...

Let T = {1000,1001...,9999}. How many numbers have at least one digit that is 0, at least one that is 1 and at least one that is 2. For example, 1072 and 2101 are two such numbers.  I have no idea to solve such probability question, I should use Permutation or Combination? why the answer is 150.  Thanks you guys.


Copy selected text with links appended in plain text?

Is there a way for a link to be copied with the selected text?  "Some selected text with this  somewhere in the paragraph"  To be copied as:  "Some selected text with this { link |  } somewhere in the paragraph"  If there is anything like that it would be great help.


$su(2) $ and $ sl(2;R)$ are not isomorphic?

As real Lie algebras, both are three-dimensional. The basis of $su(2)$ is   $$ \left( \begin{matrix} i & 0 \\ 0 & -i  \end{matrix} \right), \left( \begin{matrix} 0 & 1 \\ -1 & 0  \end{matrix} \right),\left( \begin{matrix} 0 & i \\ i & 0  \end{matrix} \right) . $$  The basis of $sl(2;R)$ is   $$ \left( \begin{matrix} 1 & 0 \\ 0 & -1  \end{matrix} \right), \left( \begin{matrix} 0 & 1 \\ 0 & 0  \end{matrix} \right),\left( \begin{matrix} 0 & 0 \\ 1 & 0  \end{matrix} \right) . $$  But how to prove that there is no isomorphism mapping between the two algebras?


How do I bypass or remove the iCloud activation lock on iPad2?

I found an iPad at my working office which was owned by the former director. Unfortunately, he locked it with his Apple ID. I restored the iPad via iTunes because I thought it would wipe everything out alongside with the Apple ID on it but it was not working at all. After restoration , the iPad asks me for language, country and Wi-Fi. Then it asks me for the Apple ID of former director. I can't find or contact that person. Plus, I don't have any information about that ID. I want to unlock that iPad for office purposes. How do I unlock it? The model is iPad2, A1395.  I found IMEIUnlock sites but it asks me for 39.99$. Is it really reliable?  P.S - Trust me, I'm not a thief.


I'm trying to use the reference of a figure, but numbering is not correct. Every  figure that I use as a reference, account as Figure 3 and I dont know why.  I'm using \documentclass{article} and this code to insert fist figure:   \FloatBarrier  \begin{figure}[!htp] \includegraphics[width=1\linewidth]{figura} \label{fig:fig2} \caption{Componentes do Sistema Elétrico} \end{figure} \FloatBarrier   And this code to call figure reference into the paragraph:  \paragraph{} Os sistemas [...] elétrica. \figref{fig2} Estes [...] pela Figure~\ref{fig:fig2}.   I inserted other figures but always referred to as Figure 3 like I show in picture.  Please, What can I do to solve this  ? =(


How To Open Apps in Full Screen on Yosemite?

There used to be a way where if you opened an app in Full Screen and then quit, it would reopen in full screen. However in Yosemite, I don't know how to do this for full screen apps. Is there a way to do this in Yosemite?


What is $i^i$ and $(i^i)^i$. I fond some answers  but is there a clearer explanation of this? Maybe something help me to understand.


Disabling Chrome tab groups in Chrome v91

A while back, I asked  about disabling tab groups in Chrome v85. And that worked. Now in Chrome version 91 they're back, with a vengeance. Trouble is, the flag that let me solve it last time is gone. The only flag that relates to tab groups is Tab Groups Continuation. And that's still disabled. Is there a way of disabling them hiding away somewhere, or is this a lost cause?


Find the limit of a series of fractions starting with $\frac{1}{2}, \, \frac{1/2}{3/4}, \, \frac{\frac{1}{2}/\frac{3}{4}}{\frac{5}{6}/\frac{7}{8}}$

Problem  Let $a_{0}(n) = \frac{2n-1}{2n}$ and $a_{k+1}(n) = \frac{a_{k}(n)}{a_{k}(n+2^k)}$ for $k \geq 0.$  The first several terms in the series $a_k(1)$ for $k \geq 0$ are:  $$\frac{1}{2}, \, \frac{1/2}{3/4}, \, \frac{\frac{1}{2}/\frac{3}{4}}{\frac{5}{6}/\frac{7}{8}}, \, \frac{\frac{1/2}{3/4}/\frac{5/6}{7/8}}{\frac{9/10}{11/12}/\frac{13/14}{15/16}}, \, \ldots$$  What limit do the values of these fractions approach?  My idea  I have calculated the series using recursion in C programming, and it turns out that for $k \geq 8$, the first several digits of $a_k(1)$ are $ 0.7071067811 \ldots,$ so I guess that the limit exists and would be $\frac{1}{\sqrt{2}}$.


I read that TeX was written in SAIL and re-writen in .  Do we still use that version today? In my Linux distribution, I use TeX-Live.  Does that also use the Pascal version?  Wikipedia says the last major revision was in  and that it's quite stable.  So only a  changes have been necessarily over the years.  I don't quite totally agree, since certain layout features are quite difficult to execute, and what if I don't like Pascal?  For my first issue, it may be possible to learn TeX (rather than ) and address these graphic design issues myself.  Still I am rather curious about to layers, thanks.      From blog :     TeX source code is full of examples of what would not be considered good programming style today, such as:         global variables   one-character variables   goto statements   procedures spanning hundreds of lines;   lots of macros;   duplicate code;   local variable reuse;   single-threaded assumption is “everywhere”;   mutability is just “pervasive”


Pointwise Convergence and Convergence in the mean of Riemann-integrable functions

Let $(f_n)_{n\in\mathbb{N}}$ be a sequence of Riemann-integrable functions on $[a, b]$.   Assume that $(f_n)_{n\in\mathbb{N}}$ converges pointwise to $f$ on $[a, b]$ and converges in the mean to $g$ on $[a, b]$, where $f$ and $g$ are both continuous. Show that $f = g$.   ($(f_n)_{n\in\mathbb{N}}$ converges in the mean to g on $[a , b]$ means that $\lim_{n\to\infty} d(f_n, g) = 0$, where $d$ is the $L_2$ metric.)  I am studying real analysis now and want to prove this statement. But I don't know how to use condition "$(f_n)_{n\in\mathbb{N}}$ converges in the mean to g on $[a , b]$." How can I prove this?


What is the downside of a cheap UV filter that is used solely for the protection of the lens?

I have a Canon EF 17-40L, and I am seeking to buy a UV filter solely intended for the protection of the front glass of the lens. I know that I have a hood for protection, but it makes the equipment bulky and it doesn’t fit my current bag, so I think that a UV filter is also a good solution.  I have seen lots of cheap and expensive UV filters, but I don’t understand the difference between them. What would be the possible downside of using a cheap UV filter in this case? Does it cause the lens flares, and/or reduces the light? I have read some related posts from SE, but they are more general, rather than explaining the differences between filters.


Finding the value of the limit  Let  $ x_{n} $ =$ \sqrt{1+\sqrt{2+\sqrt{3+....+\sqrt{n}}}}$  then  $\lim_{n\to\infty}x_{n}=$?


Prevent SQL Injection methods on this code

I was just wondering If anyone knew any good ways to prevent Sql Injections on this code. The Last thing I want is someone hacking my database. I am fairly new to this and would like to hear expert opinions. Thanks.  <?php     $input = $_GET['input'];//Note to self $input in the name of the search feild     $terms = explode(" ", $input);     $query = "SELECT * FROM content WHERE ";      foreach ($terms as $each){         $i++;         if ($i == 1)             $query .= "keywords LIKE '%$each%' ";         else             $query .= "OR keywords LIKE '%$each%' ";     }      // connecting to our mysql database     mysql_connect("localhost", "username", "password");     mysql_select_db("database");      $query = mysql_query($query);     $numrows = mysql_num_rows($query);             if ($numrows > 0){                  $i = 0;                              while ($row = mysql_fetch_assoc($query)){                               $i++;              $id = $row['id'];             $title = $row['title'];             $description = $row['description'];             $keywords = $row['keywords'];             $link = $row['link'];             $plink = $row ['plink'];             $views = $row ['views'];                  if($i == 3){             echo '

'.$title.'
Total views: '.$views.'

';                }               else{              echo '

'.$title.'
Total views: '.$views.'

'                            ;                  }                      }           }          else         echo "No results found for \"$input\"";        // disconnect     mysql_close(); ?>


Can I deep fry food in butter instead of vegetable oil?

I was wondering if it is possible to deep fry food that would normally be fried in vegetable oil in butter or lard instead? Will the result be different?


Show that the polynomials in $\mathbb C[x,y]$ that contain no terms of the form $cy^m$ form a non-Noetherian subring

I am trying to show that the polynomials in $\mathbb C[x,y]$ that contain no terms of the form $c y^m$ where $m>0$ and $c \in \mathbb C^*$ form a non-Noetherian subring.   I know that I need to find an ideal that isn't finitely generated but I am not sure how.


The question I am trying to solve is from the book Building Java Programs and is formatted as follows:     Write a method called coinFlip that accepts a Scanner representing an input file of coin flips that are head (H) or tail (T). Consider each line to be a separate set of coin flips and output the number and percentage of heads in that line. If it is more than 50%, print "You Win!".   Consider the following file: H T H H T T t    t T h  H    For the input above, your method should produce the following output:    3 heads (60.0%) You Win! 2 heads (33.3%)  When I run the code it only outputs: "0 heads (0.0)". So i'm assuming it never enters the second while loop for some reason or I am using the "next" methods wrong.  import java.io.*; import java.util.*; public class CoinFlip {     public static void main(String[] args) throws FileNotFoundException{           Scanner input = new Scanner("Series1.txt");           PrintStream output = new PrintStream("Output.txt");           coinFlip(input, output);     }     public static void coinFlip(Scanner input, PrintStream output) {         while(input.hasNextLine()) {             Scanner linesc = new Scanner(input.nextLine());             int headCount = 0;             int totalNums = 0;             while(linesc.hasNext()) {                 String letter = linesc.next();                 if(letter.equalsIgnoreCase("H")) {                    headCount++;                 }             totalNums++;             }              double percent = findPercentage(headCount, totalNums);             output.println(headCount + " heads " + "(" + percent +")");             if(percent > 50.00) {                 output.println("You win!");             }          }     }     public static double findPercentage(int num1, int num2 ) {        double percentage = (double)num1/num2 * 100;        return percentage;     } }


Cannot launch Eclipse form terminal with PATH defined

I've installed eclipse by eclipse installer downloaded from eclipse's website, then I've added it's directory adding the following line to my $HOME/.bashrc  export PATH="$PATH:~/development/eclipse"   But when I try to launch using the command eclipse it shows:  eclipse was unable to locate its companion shared library. If I go to eclipse installation folder and double click eclipse launcher it's launch without any troublle


how to ignore physics collision of some objects in box2d

I know this sounds silly but I would like some objects to follow physics while others not to collide each other.   I tried to achieve them by setting their position exclusively. But then it will ignore all physics.   Is what I am trying to do even possible?


Calculate sums of inverses of binomial coefficients

How to calculate the sum of sequence $$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{3}}+\cdots+\frac{1}{\binom{n}{n}}=？$$ How about its limit?


Attempt to invoke virtual method null reference object

I ran this app on my phone just fine and then, after changing nothing, I changed out to install on my nexus 7. Now I am receiving this error.  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at com.th3ramr0d.tc3studyguide.MainActivity.onCreate(MainActivity.java:37)   This is the code at line 37.  rateMe.setOnClickListener(new View.OnClickListener() {   This is the entire block of code for the setOnClickListener  Button rateMe = (Button)findViewById(R.id.rateMe); rateMe.setOnClickListener(new View.OnClickListener() {         public void onClick(View v) {             Intent intent = new Intent(Intent.ACTION_VIEW);             intent.setData(Uri.parse("market://details?id=com.th3ramr0d.app"));             startActivity(intent);         }     });   XML File  <Button         android:id="@+id/rateMe"         android:text="Rate Me"         android:layout_width="match_parent"         android:layout_height="wrap_content"         />   This worked just fine on my phone. I then tried to install it on my phone and it gives me the exact same error now. I have tried:  Gradle Sync  Rebuild app  Clean app  Uninstalled app on phone and tablet  Restarted both devices  Restarted Android Studio  Restarted computer  OnCreate Method  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     getSupportActionBar().hide();       boolean firstTimeRun = getFirstTimeRun();      if (firstTimeRun == true) {         firstTimeRun();     } else {         run();     }       Button rateMe = (Button)findViewById(R.id.rateMe);     ImageView prt = (ImageView)findViewById(R.id.prt);     ImageView pfp = (ImageView)findViewById(R.id.pfp);      rateMe.setOnClickListener(new View.OnClickListener() {         public void onClick(View v) {             Intent intent = new Intent(Intent.ACTION_VIEW);             intent.setData(Uri.parse("market://details?id=com.th3ramr0d.tc3studyguide"));             startActivity(intent);         }     });      prt.setOnClickListener(new View.OnClickListener() {         public void onClick(View v) {             Intent intent = new Intent(Intent.ACTION_VIEW);             intent.setData(Uri.parse("market://details?id=com.th3ramr0d.prtmanagerfree"));             startActivity(intent);         }     });      pfp.setOnClickListener(new View.OnClickListener() {         public void onClick(View v) {             Intent intent = new Intent(Intent.ACTION_VIEW);             intent.setData(Uri.parse("market://details?id=com.th3ramr0d.poundforpoundfree"));             startActivity(intent);         }     });  }


How to recover a file overwritten with another in Linux?

I did this on the command line (Ubuntu 12.04 , ext4)  mv some_arbit_file required_file   Is there any way I can recover required_file? I had put so much work into this. I usually backup files but I forgot this time.


I was trying to solve up this equation but couldn't move ahead. $$\sum_ {n=1}^{\infty} \cot^{-1}(2n^2)$$ I wrote the expression as $$\sum_ {n=1}^{\infty} \tan^{-1}\left( \frac{1}{2n^2}\right)$$  I wanted to change the expression into such a form such that it can take up the form of $\tan^{-1}A-\tan^{-1}B$ so that all the terms except the second one get cancelled up but I am unable to think of any manipulation through which I can get the thing done.  Can anybody give me a hint on how to go ahead?


Is it possible to make a partition in my laptop and run Ubuntu and Windows 8 side by side. and if it is then what should i do to make a partition in my laptop


In November we will be arriving at CDG in Paris from the US on Delta using a US passport.  We have 1 hour 20 minutes before our flight out of CDG to Prague on Air France.  Delta says this is enough time to connect but I am concerned about passport/immigration/customs issues.  Will we have to get our luggage or will it be checked through to the flight out?  Is 1 hour 20 minutes sufficient time to connect to our flight out?


Desktop environment won't show up when a wrong password has been entered before entering the right one

My system is Ubuntu 18.04 LTS, with GNOME 3.28.1. In the login screen, if I enter the wrong password, it shows me the the message "Sorry, it didn't work", and then I continue to enter the right one. Then the login screen fades away but continue to show me the purplish background but not the desktop environment. However, if I enter the right password on the first try, everything goes normal. Also if I press cancel button after the "Sorry, it didn't work" message was shown and reenter the login screen, everything works fine. Does anyone knows how to fix that?


Is there any simple way to access installed programs?

Just installed Ubuntu for the first time... Is there any simple way to browse installed programs?  On Mac there is the Applications top-level folder... here I see Desktop, Documents, Downloads etc but no Apps? That'd be a good idea, no? (is there some way to create this myself?)  On Windows there is the Start menu...  Here it seems like I have to click the 'Dash Home' and then I can see 'Recent Apps' ... I can search for them (I'd rather not)  ...or I can click the ruler/pencil icon at the bottom and see 'Recent Apps' and click to expand 'Installed Apps' ...ok that's all of them - is it possible to get a straight list view instead of the hard-to-scan wrapped rows?  Also, is there any way to get rid of the pointless random selection of 'Apps available for download' at the bottom?


I need to specify a boot order for processes to start. I have 389 Directory Server and Samba running on Fedora 18. How can I have the network services boot, then 389 DS, then Samba? Is there a GUI to manage this in Fedora?  I have enabled Samba to start with systemctl enable smb.service. I have also enabled 389 DS with systemctl enable dirsrv.target.


GNU/Linux: overlay block device / stackable block device

GNU/Linux has union mount that overlays dirs. So you can mount a writeable dir on top of a read-only dir. When the writeable dir is unmounted the read-only dir is untouched.  I am looking for the same functionality for block devices - preferably with the writeable part stored in a file. So I would like to run something like:  device-setup /dev/newdevice /dev/read-only-device overlayfile   If I write to /dev/newdevice the changes should be stored in overlayfile. If I read the sectors written to, I should get the data from overlayfile. If I read sectors not written to, I should get the data from /dev/read-only-device.  Does such a tool exist?


That downvoted questions make you lose reputation limits diversity of opinion in Meta

I have posted different suggestions in the recent days, that many users didn't like. Although some are common practice in other forums, and some even if you don't agree are true (ie, new users get "bullied" by higher rep users many times).  I see that if users with a different way of seeing things, come and ask something here, and it gets downvoted, how is this different way of seeing things will ever affect this forum? I have been downvoted so much, I have each time less "voice" in here. I am not sure even if you can run risk of being banned here.  SO is a highly developed site, many things already implemented, it is hard to suggest something that everyone that has been here for long while will agree, something ground breaking. I suggested things that I as a responsible SO user, but with low reputation, I haven't asked many questions.  I think people on SO should be nicer to new users, I am not saying to allow them do whatever they want. Just be nicer.  So what should I do —    Quit in my attempt to participate in Meta because I will continue being downvoted?  just never propose any new idea, try to harvest Reputation by posting bugs, trying to answer things that are not too controversial so I don't get downvoted? Then when I finally have tons of reputation I can go and shutdown the reputation of new users that suggest new Ideas.   I think it is fine not to agree with me. But why do I lose reputation on meta because of a question that is proposing something new? If most people deem something not good for SO, well my question was useful. I mean my very downvoted ideas got attention, it was a useful discussion. The result was "we don't want that here", but it was useful, in the future other people won't need to ask the same. So is it really right to lose reputation because of that?  Edit:  I am adding this, because I think that by putting myself as example my point was a bit lost.  The FAQ says:     Are upvotes and downvotes different on meta?      Voting here works a bit differently from other Stack Exchange sites.   On Meta Stack Overflow, voting is often used to express agreement or   disagreement, not to point out a lack of quality or helpfulness.   Please don't be concerned if you receive downvotes – members of the   community may simply disagree with your bug, feature request, support   issue, or the nature of the discussion.   Some people in the comments have stated they don't even look at the reputation because of this very reason, which totally makes sense. But basically it means they are ignoring a part of the website's functionality, because it is not useful for that.  So does it make sense to lose reputation for something that people doesn't seem to consider?  I mean it is not the same to be downvoted on SO for posting "nonsense" and to be downvoted here for posting something others don't agree with. And I am not even talking about me, I am sure this has happened to everyone.  If it worried me that I am losing reputation, as it is I would have deleted the posts that are making me lose reputation. That is not my point.


Badges look differently on each SE site, as per the unique themes of each site.  However, when looking at the Summary of Accounts in a user's profile, the badges for all sites use the icon for the site that the viewer is viewing the page from at that time.    I think it would be an aesthetic improvement to keep the badge icons consistent with their site of origin, and not where they are being viewed from.    The effect of this change would be subtle, but I think it would help reinforce the appealing idea that the badges from the different sites are unique, different types of rewards, and make it more engaging to collect from all over SE as opposed to focusing on single sites.


I am new to SQL and I am trying to create a Perl script to run a simple SELECT statement on a MSSQL Database I have access to.  The database I am connecting to authenticates with SQL Server Authentication. I found  but I don't think it applies because it is for ODBC.  Any help would be appreciated


Does a wolf have to hit in order to get the knockdown?

My DM says that the wolf's bite attack causes a Str save or be knocked prone regardless of whether it hits or not.   The attack is:     Bite. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 7   (2d4 + 2) piercing damage. If the target is a creature, it must   succeed on a DC 11 Strength saving throw or be knocked prone.   I thought it was implicit in the reading that the attack must first hit?


How do I pass variable data into an asynchronous xlm request

I have a variable that I'm using throughout my scripts.  I've been passing it into functions using closures.  var options = { etc };  I need to use an asynchronous XMLHttpRequest to get the html text from another page.    var xhr = new XMLHttpRequest(); xhr.open("GET", this.options.messageUrl, true); console.log(this.options.branded) // returns true  xhr.onreadystatechange = function () {      if (xhr.readyState === 4 && xhr.status === 200) {         console.log(xhr.readyState, xhr.status) // returns 4 and 200          console.log(xhr.response); // do something with this response     } } xhr.send(null);   I want to use the options object within the async so I tried to pass it in with a closure like so  var xhr = new XMLHttpRequest(); xhr.open("GET", this.options.messageUrl, true); console.log(this.options.branded) // returns true  xhr.onreadystatechange = function (ops) {      ops.branded // returns true.       // I'm able to get pass this info in,      // but now my ready state is no longer returning the 4 and 200      if (xhr.readyState === 4 && xhr.status === 200) {         console.log(xhr.readyState, xhr.status) // returns 1 and 0          console.log(xhr.response); // I'm not able to get here     } }(this.options) xhr.send(null);   How do I accomplish passing the data in AND getting a correct response?


Can ReLU replace a Sigmoid Activation Function in Neural Network without needing to change other parameters/functions of Network?

I am making a Neural Network with data that has images as input and a 4 possible labels as output. I created a 3 Layer Network with 1 hidden layer. The output layer uses the Softmax Activation Function and the Hidden Layer was using Sigmoid. The network uses Adam Optimizer and Cross-entropy loss function.  This network with Sigmoid activation function in hidden layer was achieving approximately 50% accuracy on test data. But when I replaced it with ReLU Activation Function, the network was achieving 85% accuracy. Am I achieving accurate results? Or is it not right to use ReLU in this case. Or must I calculate the accuracy differently?? And what properties of ReLU can cause this boost in accuracy?  Here is my Tensorflow code for this:  Line 2 is Sigmoid, and Line 3 is ReLU (commented out)  hiddenOut = tf.add(tf.matmul(x, W1), b1)  hiddenOut = tf.nn.sigmoid(hiddenOut) #SIGMOID --> gets ~ 50% accuracy ##hiddenOut = tf.nn.relu(hiddenOut) #RELU ---> gets ~ 85% accuracy  logits = tf.add(tf.matmul(hiddenOut, W2), b2);  cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=y)) optimizer = tf.train.AdamOptimizer(0.001).minimize(cross_entropy)  #define an accuracy asessment operation correct_prediction = tf.equal(tf.argmax(y,1), tf.argmax(logits, 1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))


What is the use of the \hbox in a \newcommand command?

In page 90 of Grätzer's More Math into LaTeX (5th edition), he uses a \newcommand command to define a binary mathematical operation as follows:  \newcommand{\circwithdot}{\mathbin{\rlap{$\mspace{2mu}\cdot$}\hbox{$\circ$}}}   What is the use of the \hbox here? Why does not he use the \mbox command? Are they the same in this case?


As I was learning (teaching myself) to use grep, I ran into a problem, some examples I was testing didn't work as I expected. I decided to try to figure out the problem on my own. First I would check that I was using the most up to date version of grep available. I searched for hours to no avail. I saw grep 2.5 & 3.0 referenced a few times and I have 2.25. So, my simple question at this point is;   Is grep 2.25 the most recent version available for ubuntu 16.04?


Manually specify language for syntax highlighting

This is a follow-up to a question I answered earlier ().    For most questions that have more than one language-related tag and those with fuzzy languages (for instance !), there should be an option to specify which language to use in syntax highlighting because sometimes (and quite often too!) the language inference is wrong.  Take for instance the scenario I describe below.  When an answer is given in a language other than the "primary language" (which happens to be C#), the code is still highlighted as C# even if it isn't in that language!   Scenario     Take any question that has multiple explicit language-related tags. For example:  which is tagged tagged , ,  and .   Try to answer the question with code that is different from the 'major' language. In this case, try answering the question with VB.NET code.   Expected Results: Code should be highlighted in VB.NET. Actual Result: Code was highlighted in C#!  Suggested Solution There should be a way to explicitly set the language for syntax highlighting.  Edit  It also turns out that asking a question with multiple explicit language-related tags can also give you wrong syntax highlighting! You can try creating a new question with the following and observe the preview:       //This is C#     var someValue = GetValue();  some text to separate the two languages      'This is VB.Net     Dim someValue = GetValue()   Tag the question as follows (in the specific order) ,    You'll notice without fail that the C# code gets highlighted properly and the vb.net code doesn't.     Disclaimer   All observations are based on the preview you get while entering the question or answer so my observed result might not be wholly right.


Extract even-numbered and odd-numbered pages of a PDF into two separate PDFs

I have a PDF that consists of several hundred pages of bilingual text. Since I need to use OCR on each language separately, I want to grab the even and odd pages and make two separate PDFs, using convert or ghostscript. The language I want to do first is on the odd-numbered pages. What convert or ghostscript command can I use to grab these and write them to a new file?


Can "Free" be a noun? And what does it mean?

I saw this sentence when I was studying British Culture. "William Shakespeare composed plays that broke FREE of England's past style of plays and theatre." I was quite confused about the meaning of "Free" in this situation. I looked up the dictionaries but couldn't find any meaning.


Pokemon Go has stopped working for me and whenever I catch a Pokemon they give 1 or 2 shakes in the Pokeball. It then 100% poofs in a cloud of smoke. WHY?


What is the best place to ask an opinion about which CMS is the most appropriate for my task?

I want a professional opinion about which CMS is the most suitable to my purpose, I am doubtful about choosing Wordpress or Drupal because I have some specific requests from the client, I wanna summarize them in a question, but which Stack Exchange site is the most appropriate? I was thinking at Programmers, but what is your opinion?


is there a syntax that allows using a line as a node in tikz? In the following example: \documentclass{standalone}   \usepackage{tikz}  \begin{document}     \begin{tikzpicture}     %dummy nodes     \node (A) at (0,0) {};     \node (B) at (5,0) {};     \node (C) at (2,-5) {};         \draw (A)--(B);         \draw (C)--(2,0);     \end{tikzpicture} \end{document}   I'd like to write something such as \draw (C)--[(A)--(B)] instead of \draw (C)--(2,0). Of course in this example I know the nodes' coordinates explicitly, but in my actual diagram I don't, and whenever I add something that changes the size of it, I have to trial-and-error adjust the coordinate of the explicit node. Thanks


I am trying to creating a logo that resembles this one shown below, but I do not know the best way of going about it. I know of a fonts package that may be useful, but not sure how to overlay the letters on top of each as so. Would anyone know a neat way of accomplishing this?  Picture of Logo:


I'm looking for something to concatenate all files with given extension within a directory, except one. Like:   cat *.txt !(DISCARD.txt)  > catKEPT   This should concatenate all *.txt files in directory, except DISCARD.txt.


Windows 7's PATH and environment variables are corrupted

I have no clue, but lately I've been having this problem. After running my workstation suddenly something destroys PATH and lots of stuff stops working. Initially, my path had MANY directories listed (I use Windows 7 as a development box) and after some time, I only had 3-4 directories listed in my path left.  I can't even open the System Properties dialog where I can see environment variables (because it uses shell variables to start it and it doesn't work). In short, I reboot every time.   Any ideas what might cause that problem? I didn't run anything new/unusual lately. Only VmWare (but I've been using it in the past and didn't have that problem back then).  I just checked, even %WINDIR% is not defined. WTF?!


Evaluate $\int_0^\infty \frac{\ln^2(z)}{1+z^2}$dz by contour integration

Background: This is part b of problem 12.4.3 from Arfken, Weber, Harris Math Methods for Physicists to show that $\int_0^\infty \frac{\ln^2(z)}{1+z^2}$dz$=4(1-\frac{1}{3^3}+\frac{1}{5^3}-\frac{1}{7^3}+\dots)$.   Part b of the question asks to show that this series evaluates to $\frac{\pi^3}{8}$ by contour integration. Where is my mistake: $\lim_{z \to 0}zf(z)=0$ and $\lim_{z \to \infty}zf(z)=0$ so the big and little circle equal 0.$   Drawing a branch cut along the positive x axis and integrating counterclockwise along the positive x-axis around a big circle the negative x-axis from infinity and the little circle:  Assume $I=\int_0^\infty \frac{\ln^2(x)}{1+x^2}\text{dx}$  We can add the components of along the contour and set that equal to the value of $2\pi i \text{Res}[f(z),i]$ evaluated at the poles $\pm i$ $$\int_0^\infty \frac{\ln^2(z)}{1+z^2}\text{dz}+\int_{\infty}^0 \frac{\ln^2(z)}{1+z^2}\text{dz}=2\pi i \text{Res}[f(z),\pm i]\tag{1}$$  $$\int_0^\infty \frac{(\ln^2 \mid x\mid}{1+x^2}\text{dx}-\int_0^{\infty} \frac{(\ln\mid x\mid+2i\pi)^2}{1+x^2}\text{dx}=2\pi i \left (\lim_{z \to i}\frac{\ln^2(z)}{2z}+\lim_{z \to -i}\frac{\ln^2(z)}{2z}\right )\tag{2}$$  $$\int_0^\infty \frac{(\ln^2\mid x\mid}{1+x^2}\text{dx}-\int_0^{\infty} \frac{(\ln^2\mid x\mid+\color{red}{4\ln|x|i\pi}-4\pi^2)}{1+x^2}\text{dx}=2\pi i \left (\lim_{z \to i}\frac{\ln^2(z)}{2z}+\lim_{z \to -i}\frac{\ln^2(z)}{2z}\right )\tag{3}$$ $$0I+\color{red}{0}-\left[\tan^{-1}(x)\right]\mid^{\infty}_0(4\pi^2)\text{dx}=(2\pi i)  \left (\frac{-\pi^2/4+9\pi^2/4}{2i}\right )\tag{4}$$ $$0I+2\pi^3=\frac{8\pi^3}{4}\tag{5}$$  For explanation of the red integral ,  or .   I found my error. It was a negative sign, and the two sides cancel to zero so you can't evaluate it this way, but I found an answer which evaluates it from negative to positive infinity so I'm marking the question as a duplicate. See dustin's answer at the link for the contour integration.


E: gdebi: Package is in a very bad inconsistent state - you should  reinstall it before attempting configuration.  E: photostory: subprocess installed post-installation script returned error exit status 1  E: pyscreenie: subprocess installed post-installation script returned error exit status 1


Best books for differential forms with geometric approach

I'm looking for a good book on differential forms with geometrical approach.   Could you kindly recommend some book??   Thanks advance


How to prove that the sequence $x_n= \frac{\ln(n)}{\sqrt{n}}$ is converging

Consider the sequence $x_n = \frac{\ln(n)}{\sqrt{n}}$. It seems that the sequence tends to $0$ because $\sqrt{n}> \ln(n)$ for all $n$. I need to prove this by definition or otherwise. Can anyone give me some hints helping me proving this?  Thanks is advance.


How does RStudio 'lm' know my data is a polynomial equation?

I'm following along with a "learn R" course, and we ran the following multiple linear regression: regressor = lm(formula = Profit ~ ., data = training_set)  Then a bit later, we added some columns to a different data set: dataset$Level2 = dataset$Level^2 dataset$Level3 = dataset$Level^3 dataset$Level4 = dataset$Level^4  And ran identical line... regressor = lm(formula = Profit ~ ., data = training_set)  And somehow now lm knows not to fit a multiple regression linear line? It's modifying the original data set before it's even passed into lm, so unless lm is somehow trying to interpret my data to figure out which actual model to use, I don't see how it's knowing to do this...?


I'm using Jelastic with nginx 1.6.1 and would like to use friendly urls without the .php extension. So if someone visits for example  nginx should rewrite it to  and displaying the content.  I spent a few hours to get this working by trying solutions like:  location / {     try_files $uri $uri.php $uri/; }   without success and I always get an 404 error if I try to access for example domain.com/faq  Does anybody have a working solution? Here's my default nginx.conf file:  worker_processes  1; error_log /var/log/nginx/error.log;  events {     worker_connections 1024; }   http {      server_tokens off;     include mime.types;     default_type application/octet-stream;      log_format  main  '$http_x_forwarded_for - $remote_user [$time_local] "$request" '         '$status $body_bytes_sent "$http_referer" '         '"$http_user_agent" "$http_x_forwarded_for"';      access_log /var/log/nginx/access.log  main;     sendfile on;     keepalive_timeout 65;      server {          listen 80;         server_name localhost;         include /etc/nginx/aliases.conf;         index index.php index.html index.htm;         error_page 500 502 503 504  /50x.html;          location / {             root /var/www/webroot/ROOT;             index index.html index.htm index.php;              location ~ \.php$ {                 location ~ /\. { deny all; access_log off; log_not_found off; }                 include /etc/nginx/fastcgi_params;                 fastcgi_pass 127.0.0.1:9000;                 fastcgi_param SCRIPT_FILENAME /var/www/webroot/ROOT$fastcgi_script_name;                 fastcgi_param PATH_INFO $fastcgi_script_name;                 fastcgi_param DOCUMENT_ROOT /var/www/webroot/ROOT;             }          }          location = /50x.html {             root   html;         }          location ~ \.php$ {             location ~ /\. { deny all; access_log off; log_not_found off; }             include /etc/nginx/fastcgi_params;             fastcgi_pass 127.0.0.1:9000;             fastcgi_param SCRIPT_FILENAME /var/www/webroot$fastcgi_script_name;             fastcgi_param PATH_INFO $fastcgi_script_name;             fastcgi_param DOCUMENT_ROOT /var/www/webroot;         }          include /etc/nginx/conf.d/*.conf;      } }


Commutator of $\hat {L}_x$ and $\hat{V}(\hat{r})$

Consider the angular momentum operator $\hat{L_x}=\hat y\hat{p}_z-\hat{z}\hat{p}_y$ and the potential operator $\hat{V}$ where the potential $\hat{V}=\hat{V}(\hat{r})$ is spherically symmetric.  It can be shown that $[\hat {L}_x, \hat {V}] = \hat y [\hat {p}_z, \hat V]-\hat z [\hat {p}_y, \hat V]. $ I tried showing this myself and found that this is only true if $$[\hat y, \hat V]=0  $$ and $$[\hat z, \hat V]=0. $$  Why are the last two equations equal to zero?


Why can't I reassign the size of an array by replacing the variable with an array of different size?

This is my first post here, so please be friendly! :)  Let's say I have this code:  public static void reassign (int[] nums) {   int[] A = {10,11,22};   A = nums; }  public static void main(String[] args) {   int[] nums = {0,2};    reassign(nums);   System.out.println(nums[1]); }   Why is my answer 2, and not 11? Does it have something to do with the relative sizes of the arrays?


I actually do want to know how to generate the multiplication inverse (M.I) table, I mean the calculation how the M.I been generated.. such as the M.I of 22 is 5A regarding to the table.. Do you know how to calculate M.I how the 22 will become 5A


Is it possible to extend a commutative ring to have a unity?

Let $R$ be a commutative ring.  Then, is it possible to extend this to have a unity?  That is, is there a commutative ring with unity $R'$ such that $R$ is a subring of $R'$?


Check if an Element is deleted from list

simply, I want to check if an Element is deleted from a list, and than do some actions after that. Here is a snippet of my code:  (...) private CollectionUtils removed;         public void subscription() {                 if (CollectionUtils.isEmpty(save)) {                 System.out.println("blabla");                 JsfUtils.addTranslatedMessageToTarget(FacesMessage.SEVERITY_INFO, null, "bla");             } else if (CollectionUtils.subtract(save, removed)){ //Check if element is deleted                 System.out.println(removed + " blablaca");             } else {                 System.out.println("blabla");             }          }   I edited and cut some code because its for a company I work for. At subtract he suggest to cast the Collection Type on "Collection", which doesnt make any sense for me. As Exception it points out an nullpointer exception.  Thanks


Changing the color of the path in Terminal.app

I would like the CasebashMac:bfgenv chris$ part of the following line to appear in a different color in my terminal.  CasebashMac:bfgenv chris$ python


What do various property highlight color overlays mean?

I have downloaded a free model for my current project and spotted those different colors on Scale, Rotation, Location, and other properties. What do these different colors signify? What is the meaning of various possible color overlays on UI properties buttons? The very same model after Ctrl + C Ctrl + V to my project file disappeared after a while.


Is it possible to write commands to text file and then loaded it into terminal as file? If yes, how is the command for loading the file? Thank you.  For instance file_commands:  awk -f program.awk d01.active > out1 awk -f program.awk d02.active > out2   It is because of a problem with running an awk program that doesn't work with command   awk -f program.awk d??.active > out   I need to use program.awk for lots of files and this seemed to me as easier solution when I am not able to repair program for that command with ??.  It is related with this question


This is the way we are currently converting a UTF-16 to UTF-8 on Ubuntu 18.04.  The input is a const wchar_t* (UTF-16) and the output is a const char* (UTF-8):  const char* to_string(const wchar_t* input)  {     std::wstring w(input);     std::string s(w.begin(), w.end());     return strdup(s.c_str()); }   However, it doesn't seem to be working because I'm still seeing non UTF-8 encoded characters in my string. Example:     Adobe® Flash® Player   Is there a problem with the to_string function above?


When I execute following command to get cpu usage , I get nice + user cpu usage.  top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}'    Output:  14.5   Here I am getting problem is that the output depends on top command thus it doesn't change instantly as top command. So I am not getting correct cpu instantly. It gives same output and not changing.  I want to get real-time cpu usage in output. Please help me to improve my command.