Why do I get two different indefinate integrals for the same integrand? (u-substitution)

Using u-substitution I'm able to integrate the following two integrands:   $$\int \frac{1}{2x+3}dx = \frac{1}{2}\ln|2x+3|+C$$  $$\int \frac{1}{2x+5}dx = \frac{1}{2}\ln|2x+5|+C$$  Following this pattern I would assume:  $$\int \frac{1}{2x+4}dx = \frac{1}{2}\ln|2x+4|+C$$  However when I enter this expression into wolfram alpha I get:  $$\int \frac{1}{2x+4}dx = \frac{1}{2}\ln|x+2|+C$$  I can even arrive at this result myself by factoring out the $\frac{1}{2}$ before integration like this:  $$\int \frac{1}{2}\cdot\frac{1}{x+2}dx = \frac{1}{2}\int \frac{1}{x+2}dx$$  But I don't understand how this can be the case? How can two different techniques give me different results? Is there a property of logs that I don't understand?   I would think that  $$\frac{1}{2}\ln|x+2|+C \neq \frac{1}{2}\ln|2x+4|+C$$  Or are they actually equal somehow? PLEASE help me understand what's going on here.


If I shoot directly in to the (sun)light, I get a green reflection in my photos. Is this because of the UV filter? How should I solve this?  Camera: Sony A7ii Lens: Sony 55mm 1.8 UV filter: Hoya HMC UV (C) Lens (49mm filter) [Amazon link][1]


How to describe two different objects: (Assume: one apple and one banana here)  "There are an apple and banana here." or "There are an apple and a banana here." ??


I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


A scroll appears on some posts in real time questions tab on stackexchange.com

When using Chrome 62.0.3202.94 (Official Build) (64-bit) on Windows 10 Pro Fall Creators Update, I get a scroll on some of the posts in the .  Also tested Firefox 57.0 (64-bit), Edge 41.16299.15.0 and IE11, and no scroll appear on those.


I keep seeing this: s[::-1] in Python and I don't know what it does.  Sorry if this is a question but I'm new to python and generally programming.


Help in identifying a mystery wall socket

I am trying to identify a mystery wall receptacle that I have in my house (built in the 60s, USA).  I have one in the living room next to a fireplace, another in a bedroom.  It looks somewhat like the C8 socket, but is more rectangular and rough-looking.  Does anybody know what this is?  EDIT: added opened picture


How to prove that $1^n+2^n+...+(p-1)^n \equiv 0\pmod p$?

I have a homework for the university and I am 'on this' for the entire week, so I really need help. The question: let $p>2$ be a prime number and $n\in \Bbb N$, $\ p-1\nmid n$. Prove that $1^n+2^n+...+(p-1)^n \equiv 0\pmod p$. I thought:  it is pretty clear that $p-1$ is composite so I can write $p-1=q_1^{t_1}q_2^{t_2}...q_k^{t_k}=\prod_{i=0}^{k} q_i^{t_i}$ and I know that $2 \le q_i\le p-1 \ , \ \ 0 \le i \le k \ $ and that $ \ 2\mid p-1$ so $ \ p-1=2k$. The sum is $\sum_{i=0}^{p-1} i^n=1^n+2^n+...+(p-1)^n \equiv 0\pmod p$ but I don't know what can I understand from that.  I really need help. Thank you


How to change the label of title field bydefault its showing Title I need to change it to "Custom-title" of node edit form programatically.  I tried    function mymodule_form_alter(&$form, FormStateInterface $form_state, $form_id) { if ($form_id =="slices_slices_cta_5_edit_form") {     kint($form[title][widget][0]['#title']);     dpm($form[title][widget][0]['#title']->jsonSerialize());    $form[title][widget][0]['#title']->jsonSerialize()==t("Custom-title");      //dpm($form[title][widget][0]['#title']->getArguments());  }     I just want to change [string] property of class TranslatableMarkup's object of above screen shot.  How to access the value of a Drupal\Core\StringTranslation\TranslatableMarkup object within a form  I want to do something like below example:  $form[title][widget][0]['#title']->string = t('New-title');   Not working above solution.


I tried to choose a answer for a question on SA and someone immediately answered with the correct response. I try to click the check box and it says wait 2 min. I keep clicking until it changes from 2 min to 1 min. I wait 60 seconds on my watch and click again and it says please wait 59 seconds.  The 2 minute mark should have said 3 and the 1 minute mark was really 2.  It seems that this has , which is a lot more inconvenient than 59 seconds.


SimpleScreenRecorder does not work with wayland

I have upgrade from ubuntu 17.04 to 17.10, but now i can not use simplescreenrecorder. I have found a way around it: Use Xorg! but my experience is that wayland is faster. So does anyone know how i can use simplescreenrecorder in wayland?  It does not matter if i use sudo or not. It just does not work! I do not want an alternative, just SimpleScreenRecorder.


Will adding more RAM speed up my system?

I am using Dell Inspiron 15 R:   4GB RAM  500GB hard drive i5 processor   While using Android studio I generally use these three programs    Firefox browser Genymotion emulator Android studio   While doing this I end up using ~3.7 gb of my physical memory. Will adding more RAM make the system faster?


What would I use a MATCH SIMPLE foreign key for?

What I understand:  In addition to valid references to the referenced table, a column with a foreign key is also allowed to hold a NULL value. The SQL standard defines several match modes for foreign keys, like MATCH SIMPLE and MATCH FULL. For multi-column foreign keys, MATCH SIMPLE allows a wrong (= not referencing) value in any of the columns as long as at least one column of the foreign key holds a NULL value.  Multi-column foreign keys are rare (because multi-column primary keys are), but I can imagine valid use cases. For example a translation of a blog post might have a primary key (post_id, language_id). Now something that references such a translation (for example which translation a user is currently editing) would have a multi-column foreign key.  What I don't understand:  Why would I ever use MATCH SIMPLE for my foreign key?  In above example it doesn't make sense to have a "currently editing" entry that only references by post_id and not by language_id.  What would be an example where it does make sense?


Xparse's new e-type argument (replacement for k-type argument)

Accoring to Joseph Wright's answer at   The k-type argument has recently been adjusted: you now want e-type  Questions:  What is the functionality of the new e-type argument and how does it differ from the previous k-type argument?  The 2016-11-21 version of the xparse documentation does not mention the k-type argument at all. Is the plan to leave the earlier k functionality intact (but deprecated so no documentation) or will it eventually be removed and any usage of that should eliminated? If the plan is for it to be removed, how long will the older k-type argument functionality be kept in xparse.   Code: Example of the k-type argument from . Would be useful to see how this would be modified to use the new e-type argument. \documentclass{article}  \usepackage{amsmath} \usepackage{xparse} \usepackage{xcolor}  \NewDocumentCommand\MyMacro{k_}{%     \IfNoValueTF{#1}{%         \mathbf{A}     }{%         A_{\textcolor{red}{#1}}     }% }  \begin{document}  With a subscript: $\MyMacro_{\pi}$   Without any subscript: $\MyMacro$   \end{document}


Here's my writeToFile() method:  public void writeToFile(String string){     x.format("%s", string); }   And this is how I use this method:  private class HandlerClass implements ActionListener{     public void actionPerformed(ActionEvent event){         string = tekstPole.getText();         tekstLabel.setText(string);         f.writeToFile(string);     } }   When I try to compile I get     Exception in thread "main" java.lang.NullPointerException       at Files.readFile(Files.java:30)       at Bicycle.(Bicycle.java:34)       at Hristijan.main(Hristijan.java:10)   What could be the problem?


Connection between Group of Schrodinger equation and energy level degeneracy

I am recently study group theory and its application in quantum mechanics, but got stuck at a very important point that how group theory can be applied to analyze energy level degeneracy.  In many textbooks, the statement what I understand is like this: if you find all symmetry operations that leave Hamiltonian invariant (the group of schrodinger equation) and get all the irreducible representations of them, then the dimension of each irreducible representation corresponds to the degeneracy of an energy level, though the order of different energy level cannot be predicted.  It is proved in many textbooks that the wave functions of an energy level can form a basis, and the matrices representing the symmetry transformation among them are indeed representation of the group. But why is that an irreducible representation of the group? (in the case of finding all the symmetry operations, so no accidental degeneracy argument) Or in other words, can an energy level degeneracy correspond to addition of several irreducible representations?  For example, in Jorio's book 'Group theory, application to the physics of condensed matter', it mentions that what if a representation under eigenfunctions of an energy level can be broken into smaller irreducible representations. It says 'But if this happened, then the eigenvalues for the two subsets would be different, except for the rare case of accidental degeneracy.' But why different irreducible representations correspond to different energy eigenvalues?  It is different from the question 'What is the relationship between symmetry and degeneracy in quantum mechanics?' because the problem why cannot an energy level degeneracy correspond to addition of different irreducible representations (even in the case all symmetries have been found) is not answered.


I have a string b = "25/06/2013"; And I want to convert it to stored in SQL Server (data type=date) June, 25, 2013.  Please advise me.


Only now you can even get them on top of wrinkles.   Only infrequently does it happen.      As one of our members has said, inversion happens when a sentence starts with "only" and never otherwise. So why does no inversion happen in the first sentence?


How to clone Ubuntu server via .iso for bootable usb?

I am trying to clone whole Ubuntu system(server) to another. It can be done via backing up hard disk. But, Can it possible to make iso for making a clone to make bootable usb?


Invisible space when trying to remove file (but exclude all files in a list)?

I'm trying to accomplish a simple task using the excellent post : I would like to remove all files from a folder except those listed in a .txt file contained in the folder. The syntax works fine, but for some reason all files are removed - basically the script is saying that there are no correspondences between the filenames in the folder and those in the .txt file - but I can see that there are!   I thought maybe there might be some invisible white space after my file names that I cannot see (in the folder or the .txt file). But I don't think so...Is there another solution that I am not thinking of?


I have a database which contains 5 tables. Each table contains 24 rows and each row contains 4 columns.  I want to display these records in Excel sheet. The heading of each table is the name of the table, but I am unable to merge the columns for heading.  Please help me.


I am trying to get from a particular point more informations about the surroundings (which are also points). So I wrote this:  SELECT *    FROM osm_point    WHERE ST_DWithin(way,(ST_SetSRID(ST_MakePoint(12.2385578688105, 51.8435615931295), 4326, 1000);   But there is an error     ERROR: FEHLER:  LINE 3: ...T_MakePoint(12.2385578688105,   51.8435615931295), 4326, 1000) ^ SQL state: 42601 Character: 133   What is wrong?


Supposed $a,b  \in \mathbb{Z}$. If $ab$ is odd, then $a^{2} + b^{2}$ is even.  I'm  stuck on the best way to get this started. My thinking is that I could use cases. i.e.   Case 1: a is even and b is odd Case 2: a is odd and b is even Case 3: a is odd and b is odd   Would this be my best approach? Or is there an easier way to look at it? Thanks.


Conditions on cycle types for permutations to generate $S_n$

Consider the following result of Dedekind:     For any polynomial $p \in \mathbb{Z}[x]$ and any prime $q$ not dividing the discriminant of $p$, if $p$ factors modulo $q$ into a product of irreducible polynomials with degrees $d_1, \ldots, d_s$, then the Galois group $\text{Gal}(p)$ contains a permutation with cycle structure $(d_1, \ldots, d_s)$.   In particular, it is known that in $S_r$, $r$ prime, is generated by a $2$-cycle and an $r$-cycle, so if one can find appropriate primes, one can use Dedekind's result to show quickly that a given polynomial of prime degree has full Galois group $S_5$. This condition is rather limited, however, and this motivates the following question:     Suppose we know the cycle types of some elements of a group $G \leq S_n$. Under what conditions on those cycle types can we conclude that $G$ is actually the full group $S_n$?   This line of thinking was motivated, by the way, by , which asks about the solvability of the polynomials $$p_n(x) := x^n - \sum_{k = 0}^{n - 1} x^k$$ that arise when studying the so-called $n$-nacci sequences. Two of the answers there report CAS computations giving that the Galois group of $p_n$ is $S_n$ for $n \leq 12$, and one speculates that that holds for all $n$. For $n = 5$, one can use the primes $q = 3, 5$ to show that the Galois group contains $2$- and $5$-cycles, and hence by the above fact $\text{Gal}(p_5) \cong S_5$. One can do the same, for example, with $n = 13$ and $q = 5, 17$ to conclude that $\text{Gal}(p_{13}) \cong S_{13}$, extending the other answers there.


I am using ArcGIS 10.1.  I inserted a legend however the items in the legend are too large because of the size i set them in the data view.  How do i scale the items in the legend so they will be the same size in the layout tab as they are in the data view tab.


Text Box(Asp.net) value with 3 decimal places handle by Javascript - Regex

I have a asp.net Textbox control which is tagged to accept amount values. It should not accept any value more than 3 decimal places.  123.1 - True  123.12 - True  123.123- True  123.1234 or 12.1234 - False  <asp:TextBox ID="Amount" runat="server" Width="500px" Visible="false" onkeypress="return isNumber(this,event)"/>   Javascript code below.   <script type="text/javascript">          function isNumber(txt, evt) {             var charCode = (evt.which) ? evt.which : evt.keyCode;              if (charCode == 46) {                 //Check if the text already contains the . character                 if (txt.value.indexOf('.') === -1) {                     return true;                 }                 else {                     return false;                 }             }             else {                 if (charCode > 31              && (charCode < 48 || charCode > 57))                      return false;             }              return true;          }  </script>    The JS will validate numerics and .(dot) to be only once. I've tried various combinations of regex which fails. Needs a regex to be handled in JS functions appropriately. Among the various regex I've applied, here are few "\d+(.\d{1,3})?$", "/^\d+(.\d{1,3})?$/"...


Add a separate site to discuss posts in a more relaxed manner

StackExchange / Stack Overflow were built on the premise that serving the developer community at large would lead to a better, smarter Internet but in my opinion the path that you have chose to reach that goal is a terribly slow one.  The Stack communities are full of great knowledgeable answers. To make the Internet better and smarter it’s going to take more than just answers. It’s going to take understanding and comprehension of those answers. The Internet is full of young and old minds yearning to comprehend. Isn’t discussion part of learning? How do people discuss some of the answers they find on the Stack sites? Isn’t discussion contributing?  My feature request is to expand your website to a sister website called discussion.stackexchange.com, a place to discuss posts found on Stack sites in a more relaxed manner.  By adding “Discuss this post on discussion.stackexchange” to the end of every thread like this mock up image:    You have the site where you talk about unicorns, and the meta site where you talk about the site where you talk about unicorns. What is needed is a place where the common user can talk about the knowledge represented on unicorns.   Currently, there are two main option to "discuss" a post: the chat and comments.  The chat, while more open to discussion, requires 20 reputation points to take part in. Adding comments on the question itself, if it's not your question, would instead take 50 reputation points, and that is not even considering that comments aren't meant for extended discussion in the first place. The spur-of-the-moment users will never reach that because they don’t strive to gain a reputation on the site. The site is just there for them as a means to comprehension, nothing more.  What is my definition of the spur-of-the-moment user? The spur-of-the-moment user is a general person just that is here to find comprehension to a question, someone that is busy doing their own project but needed understanding on some topic. They are not here to gain reputation and probably won't interact a lot with votes or by posting new content. How can someone gain reputation on a subject they are just learning? Especially if they are in competition with other more qualified users.  This community is the place  for the discussion of this knowledge, since this is where the knowledge is located, not Quora or reddit.  You don't have to participate in it if you don't want to. Lots of people will participate because they want others to learn.  There is entire market of people that will participate. The experts don't have to moderate the forum. Forums themselves attract the type of people that love to moderate them. The experts aren't required to participate but they will.   As a side notice, I would like to point out that  comments are still one of the most abused feature here, often being used as a way to discuss over a post in a more "forum like" way.     Honestly, comments are the single most abused feature of Stack   Exchange. However, they are also a very important part of stack   exchange.      I think that people are heavily abusing your comment feature to try to have a voice. They will continue to abuse it if you ignore them, but give them an outlet to speak and you will resolve one of your huge problems. The abuse will drop drastically and you can continue doing the others things you love, with much less hindrance.   For those that feel this request is unclear I'll break it down for you.  "My feature request is" that statement means that following it will be some words that state my request  "to expand your website to a sister website called discussion.stackexchange.com" means start a new web site that is called discussion.stackexchange.com  "a place to discuss posts found on Stack sites in a more relaxed manner" This web site will be a place where posts can be discussed in an atmosphere not as militarized as this site.  "By adding “Discuss this post on discussion.stackexchange” to the end of every thread" I think this sentence is very self-explanatory if you look at the mockup picture.


How can spell checking be turned off for a portion of a OneNote page?  The set language form does not have a checkbox (like the one for Word 2010 has). There are over 100 languages to choose from, but all of then will perform some sort of proofing.


How to create polygon automatically with coordinates

I have some bunch of points in an area and I want to draw connecting lines with the help of points to create a closed polygon. But all these needs manual efforts. Can any one explain to me how to create polygon automatically in QGIS with the help of outermost points.


Trying to show that the inequality holds for $$n^2 \le 2^n$$ So far I have: $$\text{Assume }k \text{ is arbitrary. Our inductive hypothesis is: } k^2 \le 2^k \text{. Show this is true for } k+1\\ (k+1)^2 = k^2+2k+1 \\ k^2 < k^2+2k+1$$ Stuck here and wondering if I could get some hints.


How can I do macro photography with canon 700d kit lens?

I bought my canon 700D a month ago. Now, I want to do some macro photography, but I do not want to purchase any expensive lens for this at least at this stage. I came to know about some accessories like extension tubes, which are not very expensive but claim to provide the required magnification. Are they really useful? Are there any other accessories( not expensive ), that I can use for macro photography?


If a is self-inverse, then the group is abelian

Let $\langle G; \star, \hat, e\rangle$ be a group. Show that if for all $a\in G$, we have $a\star a=e$, then G is abelian.  What I did:  Assume G is abelian, then we have $a\star b = b\star a \quad \forall a,b\in G$  We also know that $ a = \hat a$, so:  $a\star b = b \star a$  $\Leftrightarrow a\star a \star b = a \star b \star a$  $\Leftrightarrow b = a \star b \star a$  $\Leftrightarrow b \star b = (b \star a ) \star (b \star a)$  $\Leftrightarrow e = e$  and since $e\in G$ we are finished.  I'm very unsure about this proof. I know that there's a way better proof using $\widehat{a\star b} = \hat b \star \hat a$  Does what I did actually work?


What does 1 morgan (or 100 centimorgan) mean?

I'm used to seeing genetic drift measured in centimorgan units. The presence of the "centi" prefix implies there is a morgan unit equal to 100 centimorgan. However, looking at lists showing the centimorgan scale, there appears to be nothing special about 100 centimorgans. What is a morgan?


Are .fon kind of fonts supported in ubuntu?

I had a problem with libre office (overlapping text with images) as mentioned in my previous  . So I copied Fonts from windows and placed it in /usr/share/fonts . Some fonts from windows are of .fon and some are of .TTF type .  I found a similar question  but I am not aware of using  project.I am expecting a detailed answer.


I have SQL Server 2005 which is installed on server machine.  I was working fine on SQL server before I change the server machine IP. I changed server machine IP to host the Web Service on it.  But now when I enter the Login and Password information SQL Server displays this error message:     A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)   I also tried to remove Server machine IP, Still I can't able to access the SQL Server. My all database stucked in it. Or can I recover my SQL server database?


Using PnPListItem command doesn't display all the columns of the list

I am uising Powershell with SharePoint Online. I have a list with 3 columns: Name, Emailadres, Title When I use the command to display the list:  Get-PnPListItem -List "test"  I get only the Id, Title and GUID columns  How to I get the columns Id, Name, Emailadres, Title of the list test displayed in PS.  Gr.p


How to disable integrated webcam and still be able to use an external one

I am looking for a way to disable the webcam that is integrated into my laptop. The webcam is using uvcvideo module but I do not want to blacklist it since it is also being used by an external webcam I have.  Is there any way of disabling the device itself without touching the modules list?  This is how the webcams are listed by lsusb. The first one is an integrated one (It is identified by some apps as BisonCam NB Pro), the second one is the external Logitech C525:  Bus 002 Device 004: ID 5986:0361 Acer, Inc  Bus 003 Device 002: ID 046d:0826 Logitech, Inc.    I have already checked BIOS - there is no way of disabling the webcam from there. Besides I would love to learn how to disable the device by ID anyway.  Thanks!


Java HashMap: why getting values from small HashMap takes more time than getting values from big HashMap

I decided to make an experiment. I created two hash maps in Java. One hash map with 100 entries and a second hash map with 10000000 entries.  public class MainJava {  private static int NUMBER_OF_ITERATIONS = 1000000; private static int SMALL_MAP_SIZE = 100; private static int BIG_MAP_SIZE = 10000000;  public static void main(String[] args) {     Map<Integer, String> smallMap = createSmallHashMap();     long start = System.currentTimeMillis();     for (int i = 0; i < NUMBER_OF_ITERATIONS; i++) {         smallMap.get(i % SMALL_MAP_SIZE);     }     long end = System.currentTimeMillis();     System.out.println("small: " + (end - start));      Map<Integer, String> bigMap = createBigHashMap();     start = System.currentTimeMillis();     for (int i = 0; i < NUMBER_OF_ITERATIONS; i++) {         bigMap.get(i % BIG_MAP_SIZE);     }     end = System.currentTimeMillis();     System.out.println("big: " + (end - start)); }  private static Map<Integer, String> createSmallHashMap() {     Map<Integer, String> smallMap = new HashMap<>();     for (int i = 0; i < SMALL_MAP_SIZE; i++) {         smallMap.put(i, "small-map" + i);     }     return smallMap; }  private static Map<Integer, String> createBigHashMap() {     Map<Integer, String> bigMap = new HashMap<>();     for (int i = 0; i < BIG_MAP_SIZE; i++) {         bigMap.put(i, "big-map" + i);     }     return bigMap; }   }  I retrieved values from both hashmaps and measured the time it took in both cases. I ran the code several and saw that the time to retrieve values from the big hashmap was almost ALWAYS longer than the small hashmap.   How is it possible? Retrieval time complexity of a hash map is 0(1). I'd expect similar time values for both maps.


disconnect wireless LAN immediatly after established connection

0: phy0: Wireless LAN Soft blocked: no Hard blocked: yes 1: asus-wlan: Wireless LAN Soft blocked: no Hard blocked: no 2: asus-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: no Hard blocked: no   above is list of rfkill list.. when i unblock hard block of wireless LAN..my connection is established but within 2 seconds it disconnect automatically..what should i do?


Exact meaning of radial coordinate of the Schwarzschild metric

In  as well as on Wikipedia the radial coordinate of the Schwarzschild metric is described as follows:     ...the r co-ordinate is the value you get by dividing the circumference of the circle by 2π.   This circumvents (no pun intended) the problem of talking about the path outwards from the singularity, but what about the circle itself: does it have the length we would measure when flying around it (however this is done) or is it a virtual circle assuming flat space, i.e. no mass at the center.


Restore Ubuntu 16 dualboot after Windows 10 update, after succssfully booting back to Windows 10

I had a dual-boot with Ubuntu 16 and Windows 10. I just updated Windows 10 and everything got messed up. I was getting the grub rescue screen but I managed to fix it by booting into Ubuntu from a USB and using the boot repair tool:  sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair   Now I can boot into Windows 10 directly, but I can no longer boot into Ubuntu 16. I tried the answer on this question:   But it doesn't do anything at all. Is it even possible to restore Ubuntu now?


I am Relatively inexperienced in regex. I am playing around with various java classes that are used for regex. Below is an example I am trying out -   import java.util.regex.*;  public class Regex {     public static void main(String[] args){         Pattern p = Pattern.compile("\\d*");         Matcher m = p.matcher("ab34ef");         while(m.find()){             System.out.println(m.start() + m.group());         }     }    }   When I run this I get -   0 1 234 4 5 6   The m.start() function returns the position of the character the match was found on. The pattern follows a 0 based index.  So here is my interpretation of the output -   0   (index = 0 , no matching group) 1   (index = 1 , no matching group) 234 (index = 2 , matching group = 34) 4   (index = 4 , no matching group) 5   (index = 5 , no matching group) 6   (Why does this happen?)   Why would m.start() return 6 ? The string is 6 characters long so the last index should be 5. I think I am missing something very basic here. Any pointers or suggestions are welcome.


Why does the Equivalent resistance decrease when we connect resistors in parallel? I know current divides and potential difference is constant but my question is that if Equivalent resistance have same flow of current as indiviual resistance then why parallel equivalent resistance is smaller than smallest indiviual resistance. I dont want derivation of parallel resistance formula.


How would I shift my whole set of equations/calculations at the left, to be aligned with "Example"?        \documentclass[11pt,a4paper]{report} \usepackage{amsmath,amsfonts,amssymb,amsthm,epsfig,epstopdf,titling,url,array} \usepackage{parskip}   \theoremstyle{plain} \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem*{cor}{Corollary}  \theoremstyle{definition} \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers \newtheorem{exmp}[thm]{Example} % same for example numbers \newtheorem{conj}[thm]{Conjecture}  \theoremstyle{remark} \newtheorem*{rem}{Remark} \newtheorem*{note}{Note}   \title{My Thesis Title} \author{My Name} \date{\today} \renewcommand\labelenumi{(\theenumi)} \renewcommand\theenumi{\roman{enumi}} \setlength{\parindent}{1em}  \begin{document}  \chapter{Addition}  \begin{exmp}  Here is an example. \begin{align} \nonumber (a+b)^3 &= (a+b)^2(a+b)\\ \nonumber &=(a^2+2ab+b^2)(a+b)\\ \nonumber &=(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)\\ \nonumber &=a^3+3a^2b+3ab^2+b^3 \nonumber \end{align} \end{exmp} \end{document}


Convert milliseconds into day,hour,minute and second iOS?

I need to convert an milliseconds into Days, Hours, Minutes Second.  ex: 5 Days, 4 hours, 13 minutes, 1 second.  Thanks


When I try to change a sudo password, it say it doesn't work even running the  mount -rw -o remount / When you run that command it would say i worked from the root menu but would still be invalid when you logged in.


Understanding stratified K fold cross validation results (for LSTM binary classification model)

I am performing a Binary Classification task with LSTMs.  Data_size (205, 100, 4)  - Out of 205 samples 110 belongs to class 0 & 95 belongs to Class 1, all data were shuffled inside a list.  train_test_split : (train : 85 % & test : 15 % , random_seed = 7) Fixed train data shape = (174,100,6) Fixed test Data = (31,100,6)   MODEL TRAINING  I trained my LSTM model   1.1) for model Structure   1.2) for Acc & Loss graph (both train & Validate)  – No Overfitting observed  1.3) Prediction result : 3 out of 31 testing data were wrong. (91 % correct prediction)  1st STRATIFIED K FOLD CROSS VALIDATION (CV)  2.1) Fold – 7 ; random seed = 7 ; data_size = (205,100,6)  2.2) Plot acc & loss graph for every folds. Some folds results in Over fitting    2.3) Calculated accuracy for every fold and mean acc value is 79.46 % (+/- 5.60 %)  2nd STRATIFIED K fold Cross Validation (CV)  Changed the model structure by reducing the units/neurons in the layers and performed 7 fold CV again with same data size  3.1) Acc and loss plot. Only some folds were over fitted   3.2) Calculated accuracy for every fold and mean acc value is 79.00 % (+/- 3.81 %)  Questions  Q.1) Is that fine to chose 7 folds arbitrarily or should i go for 10 folds ? Will that make any difference ?   Q.2) Is there any limit, if my mean acc value should be > than some %, is considered as a good performing model where the hyper parameters chosen is the best ?  Q.3) On comparing 1st and 2nd CV results, 2nd CV results outperforms  1st CV in std deviation but my mean acc is almost common. Also, prediction accuracy is good for model 1 than model 2. In that case, which model hyper parameters should i fix as final ?   Q.4) My friend suggested me to try LOOCV, but will that make any difference ?


Let $f$ be a positive and continuous function on $[0, 1]$ . Compute $$\int_{0}^{1}\frac{f(x)}{f(x)+f(1-x)}dx$$  Is it even possible to compute this without using King's Rule? I have no clue at all about where to start for computing this one. I found a solution that uses the King's Rule, and the answer is $1/2$. But, what I could show was the fact that $ \frac{f(x)}{f(x)+f(1-x)}$ is integrable on [0,1] with a given fact that $f$ is positive and continuous. I could also show that if $g(x)=f(x)+f(1-x)$, then $g(a)=g(1-a)$ for any $a$ in $[0,1]$ Can I get some hints for this problem?


I am making a songbook, using the songs package. The book is in norwegian, and thus we need the norwegian letters æ,ø,å to be indexed after z. As far as i understand, this is only possible with the xindy package. Creating the index is no problem, but I want to customize how it looks. As pr. now, it looks like this:     Using makeindex, I was able to make it look correct   Here is the code for makeindex  \usepackage[makeindex]{imakeidx} % Normal LaTeX indexing \makeindex[columns=1, title=Sangregister,program=makeindex,intoc=true,options=-s idxconf.ist] % Properties of index   This is for xindy  \usepackage[texindy]{imakeidx}  \def\xindylangopt{-M lang/norwegian/latin1-test } \makeindex[columns=1,name=master,title =Sangregister,intoc=true,options=\xindylangopt]   The layout-options, is in the file idxconf.ist, which works on makeindex looks like this  headings_flag 1 heading_prefix "{\\bfseries " heading_suffix "}\\nopagebreak\n" delim_0 " \\dotfill " delim_1 " \\dotfill " delim_2 " \\dotfill "   Is it possible to use the idxconf.ist file with xindy? If not, how do I customize xindy to look like the last picture.  Here is a minimum working example:  xindy:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[norsk]{babel} \usepackage[texindy]{imakeidx} \def\xindylangopt{-M lang/norwegian/latin1-test} \makeindex[columns=1,name=xindytest,title =Sangregister,  options=\xindylangopt] \begin{document} start \index{a}\index{æ}\index{ø}\index{å} end blabla \printindex \end{document}   makeindex, which looks correct, but æøå is treated as symbols.  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[norsk]{babel} \usepackage[makeindex]{imakeidx} \makeindex[columns=1, title=Sangregister,program=makeindex,intoc=true,options=-s idxconf.ist] % Egenskaper til indeks \begin{document} start \index{a}\index{æ}\index{ø}\index{å} end blabla \printindex \end{document}


I want to copy all pdf files into another directory

Linux users! I'm having a issue:  I have all pdf files in directoryDownloads, but I want it to copy all the files in subfolder \Download\BOOKS\. How would I copy all files with for loop?  for files in ...


NullPointerException in array of class Hut

I'm trying to design a pretty simple simulation civilization game for school. Right now I'm trying to make it so when you click this button on the control bar you make a new hut instance. I will put error report below and code where the error occurs.  Error Report:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at controls.Sidebar.clickBuildHut(Sidebar.java:102) at screen_window.Game_Window.mouseClicked(Game_Window.java:248) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)   Code where error occurs:  public void newHut() {         numOfHuts++;         hut[numOfHuts] = new Hut(mouseX, mouseY, 0, numOfHuts); }   Hut declaration at top of class:  Hut[] hut = new Hut[9999]; int numOfHuts;   Sidebar.clickBuildHut method:  public boolean clickBuildHut(int mouseX, int mouseY){     if (viewConstruction){         int topLeftX = x + 2;         int topLeftY = y + 50 - 14;         int selectionWidth = width - 10;         int selectionHeight = 17;         for (int i = 0; i <= width; i++) {             for (int h = 0; h <= height; h++) {                 if (mouseX == topLeftX + i && mouseY == topLeftY + h) {                     first_map.setEditMode(true);                     game_window.newHut();                     return true;                 }             }         }     }     return false; }   first_map.setEditMode:  public void setEditMode(boolean editMode) {     this.editMode = editMode; }   Although I don't think that this is the problem because when this is switched to true I see the picture change correctly. If you want me to give you more information on this I can but, I don't think that it would be of any use since it isn't where the problem lies.


so I'm finishing up with my project and realized that I have to change the style of my citations to something like this:  % Biblatex {{{ \usepackage[     style=alphabetic,     backend=biber,     %backref=true     ]{biblatex}               % Biblatex mit alphabetischem Style und biber. \addbibresource{\jobname.bib} % Dateiname der bib-Datei. \DeclareFieldFormat*{title}{     \mkbibemph{#1}}         % Make titles italics % }}}   Which should produce something like this in the text:    Now I have been apparently working with a complete different solution which looks like this:  \documentclass[   fontsize=12pt,   headings=small,   parskip=half,      % Ersetzt manuelles setzten von parskip/parindent.   bibliography=totoc,   numbers=noenddot,    % Entfernt den letzten Punkt der Kapitelnummern.   %open=any,        % Kapitel kann auf jeder Seite beginnen. %  final          % Entfernt alle todonotes und den Entwurfstempel.   ]{scrreprt} \usepackage[   a4paper,   margin=2.54cm,   marginparwidth=2.0cm,   footskip=1.0cm   ]{geometry}   \usepackage[utf8]{inputenc} \usepackage[german,ngerman]{babel}  %%gegen möchliche Warnmeldungen bezüglich underfull \hbox wenn in der *.bbl file zu lange URLs sind \usepackage{etoolbox} \apptocmd{\thebibliography}{\raggedright}{}{}  %   % fuer Literaturverweise \usepackage[numbers,square]{natbib} \bibpunct{[}{]}{;}{a}{}{;} % Natbib konfigurieren, so da� im text [M�ller 2006] erscheint und keine runden Klammern o.�.     \renewcommand{\cite}{\citep} % \cite zu \citep umwandeln, so dass im Text \cite{Mueller.2006} f�r Referenzen verwendet werden kann. % %   %% Verhindert, dass im Literaturverzeichnis nach der Nennung von [Mueller 2006] die Seite umgebrochen wird und die Autoren + Buchtitel etc. auf der n�chsten Seite landen %   %% Es wurde daher \noparagraphbreak in der natdin.bst bei der Ausgabe der Elemente erg�nzt %   %% siehe http://groups.google.de/group/de.comp.text.tex/browse_thread/thread/9ca4c681e2063fbd/f7eb3eec044b058e     \makeatletter     \def\noparagraphbreak{\interlinepenalty10000      \@itempenalty-\@highpenalty}     \makeatother    \begin{document} \newpage \begin{singlespace} \chapter{Einleitung} \label{chap:Einleitung} \end{singlespace}   Some text \citep[S.27-29{Magnusson2007}.   \phantomsection % benötigt für korrekte pdf-darstellung \addcontentsline{toc}{chapter}{Literaturverzeichnis} \bibliographystyle{natdin} % Din 1505 nach Lorenzen (Das konkrete Aussehen des Litverzeichnisses ist im header festgelegt) \interlinepenalty=10000 %sorgt dafür, dass Liteinträge nicht Seiten übergreifend sind \bibliography{bibliography/library} % Pfad zur *.bib-Datei (Dateiendung wird weggelassen)  \end{document}   Which gives me citations in the text looking like this:    My problem is that I have tried to change it and simply use biblatex....but unfortunately I'm getting only errors....what am I missing? Maybe its important to mention that I've been using the \citep[S.27-29]{some citation} command like this and have tried to include the pages where to find specific citations....  Any help is appreciated :)


Change appearance of natbib \cite locally

I am sorry if this question has already been addressed somewhere; it appears my Google Fu is weak with respect to this question.  The Problem  I am trying to create a table that compiles experimental data. My aim is to include the reference in a separate column, so as to distinguish it from the values in other columns. The problem that I now have is that the references generated still are formatted the same as in normal text (superscript). This is highly unpractical for use in the table, as the font size in it will also be smaller than normal text.  Minimum working example  Here is a MWE that demonstrates the problem:  \documentclass[english,12pt,oneside]{scrartcl}  \usepackage[english]{babel}         \usepackage[T1]{fontenc}                                                         \usepackage[hidelinks]{hyperref} \usepackage{charter} \usepackage[a4paper,left=30mm,right=20mm,top=25mm,bottom=25mm,             marginparwidth=3cm]{geometry}  \usepackage[font=small,format=plain,labelfont=bf,up,textfont=up]{caption} \usepackage[super, sort&compress]{natbib}   \begin{document} \section{Introduction} The influence of rings\cite{ref1} must not be neglected when examining this or  the other. Furthermore, acting is a career choice that should always be held in  high regard.\cite{ref2}  \section{The Table} \begin{table}[h!]     \centering     \caption{This is the table that I am talking about. All the time.}     \begin{tabular}{lrr}     \hline \hline     Field name & Value & Ref. \\     \hline     Arg1 & 122.3 & \cite{ref1} \\     Arg2 & 129.4 & \cite{ref2} \\     \hline     \end{tabular} \end{table}   \footnotesize \bibliographystyle{unsrt} \bibliography{biblio}  \end{document}   biblio.bib:  @article{ref1,     author    = {Hermann Hesse},     title     = "The Things about Annular Rings",     journal   = "Journal of Rings",     year      = "2064" } @article{ref2,     author={Julia Roberts},     title={Acting: A Career},     journal = {Journal of Acting Reviews},     pages={20--23},     year=1997 }   Output    Desired Output  I'd like the table to look like the following:    Generally it would be great to have some new type of command like \tablecite{} which would then not superscript the reference.  Thanks in advance!


How do I install XULRunner since it's a requeriment for Pencil?

I'm installing Pencil and get the following error: xulrunner: not found. XULRunner is a a requirement for Pencil. So how do I install XULRunner and it's dependencies?


Why does it look bigger when we see something in the water?


what does "SU2 is homeomorphic to the unit 3-sphere in R4 " mean

Michael Artin's book on algebra  here is a section starting from " $SU_2$  is homeomorphic to the unit 3-sphere  in $R^4$ " and then   compare the $SU_2$ to the unit 3-sphere $x_1^2 + x_2^2 + x_3^2 + x_4^2 = 1 $ I am a bit confused   this unit-3 sphere can't be drawn right? this is a super gemoetry object in my understanding what does the comparison longtitude and latitude to conjugacy classes of $SU_2$ mean on earth What does homeomorphic mean ? I cannot think of it as isomorphic or homomorphic right ?   my understanding here is that by thinking concretely in 3-dimenisonal space, we can understand the structure of $SU_2$ better. can someone help elaborate a little bit ?


What is wrong with this proof?    Is $\pi=4?$


Dividing polygon layer into multiple layers by values in attribute table column using ArcGIS for Desktop?

I have polygon layer with multiple types of area (forest, grass, and many more), and I´d like to divide this layer into many layers by the area type.  I´ve tried Split function but I receive an error 000354 - because the type of areas are in Czech and contain national characters.  Please does anybody know how to do this??  For example how to automatically rename the types of areas to valid form, or how to write an python script which creates this layer for each of the area type in with definition query  for layer?  I'm using ArcGIS 10.1 for Desktop.


How should one acknowledge assistance received via sites like SE?

I have been working for some time on a paper that I hope to submit to a mathematics journal. Buried deep in the guts of the paper is a technical lemma that I struggled with for some time before finally posting the question to MSE, where it .  What is the proper way to acknowledge this assistance in the submitted manuscript?


I have 26 lines scattered within the body of a single page that I need to make a change to via jquery in the HEAD of the file.  A B C D E F   etc.  I need to make all 26 instances anchor links. So I need them to change from 'href' to 'name'. I don't have access to change the body content directly, hence jquery.    (For demo purposes, I've manually corrected the first item - A. Make the 'result' window small in order to see the A anchor work). I appreciate anybody's reply.


How recover encrypted home when lost because user password was changed with root?

My Ubuntu-encrypted home directory was lost when I changed my user password.  This was because I did it from the command line as root. So my user password is no longer linked to my encrypted user data. How do I reunite them?


Mjolnir's timeline from Thor's perspective

In Avengers: Endgame Thor took his hammer from the Asgard in the past and brought it back to the present. So, does Thor from the past use present Thor's hammer after present Thor brought it to the present?


I am using Putty very often to SSH into Linux servers. In some cases, I won't leave the SSH session by typing exit, but by rebooting the remote machine.  Until one or two years ago, upon reboot, the OpenSSH server on the Linux machine obviously did notify Putty that the session has ended, which is what I want. Putty then used to close the session cleanly and immediately, and I could restart the session in no time (as soon as the rebooted server came back).  When I upgraded the Linux servers to Debian Wheezy or Jessie (I can't remember exactly), this useful behavior stopped. Now, when rebooting the remote servers, Putty doesn't get notified about the session end and tries to keep the session until it runs into timeout (after one minute or so).  Since I hadn't changed Putty's configuration for a long time, I suppose that the respective behavior of OpenSSH has changed. Although I have read the complete man page of OpenSSH, I could not find any option which (in my limited understanding) could be related to that problem, hence the question:  Is there a typical mistake in OpenSSH's configuration which could cause the "misbehavior"? Which option could be responsible?  EDIT:  This question might be a duplicate. But the solution / answer which is given in the duplicate does not work for me although I have the same setup as the OP. So something might be wrong with the solution given there, and I just thought it would be better to ask a new question instead of writing a comment to a question which has been asked over a year ago.


How significant is the genetic component of homosexual behaviour?

From some basic googling, I found that nobody has ever proven that people are born gay and that environment plays a great part in homosexuality.  I wish to know if there is a genetic component to homosexual behaviour. If so, how significant is that component (in some measure such as percentage contribution to the behaviour). What are other factors that play a role in homosexuality i.e. what constitutes environmental factors?


If you go to the First Posts review queue, and if there's an answer in the queue and if you hover with your mouse over "No Action Needed", then you get a tooltip "this answers seems to be valid":  But it should be "this answer seems to be valid".


Do I need a transit visa for Paris en route to Canada?

I booked an Air India flight from Amritsar to Toronto via Paris. In Paris, I have 15 hours before the flight to Canada. While booking, I was not told whether I would need a transit visa.   How can I confirm whether or not I need a transit visa for France? I have a student visa issued by Canada.


Decimal checking using Regex in javascript

I'm currently working on Regular Expression to check the decimal input in JavaScript. Below are the mock-up test case:  HTML:  <input type="text" id="checkValue" onkeypress="checkKey(event)"/>   JavaScript:  function checkKey(event) {     if(event.which == '13') {     //Enter is pressed         var checkVal = $('#checkValue').val().trim();         if(checkVal.match("(\d{1,7}\.\d{1,2})|(\.\d{1,2})|(0)")) {             alert("Matched!");         } else {             alert("Not matched!");         }     } }   Supposed I type in "123.456" will return "Not matched!", but it returns "Matched!".  The desired result would be:  Match type:  .01 1 1.01 0 1234567.89   Unmatch type:  .012 1.098 123.456   As conclusion, the value input should be in 9 digits at most, with or without decimal. And id with decimal, it only takes 2 places, such as "1234567.89".  It's my first time stepping in Regex, so any advice in getting this well?  Any help in helping fixing the Regex above would be great :)  Edited  function checkKey(event) {     if(event.which == '13') {     //Enter is pressed         var checkVal = $('#checkValue').val().trim();         alert(checkVal.match(/^\d{0,7}\.?\d{0,2}|\.\d{0,2}|0$/));     } }   Same, the input I typed "123.456", but the alert message I get was "123.45"...  Second edit  function checkKey(event) {     if(event.which == '13') {     //Enter is pressed         var checkVal = $('#checkValue').val().trim();         alert(checkVal.match(/^\d{0,7}(\.\d{0,2}|\d{0,2})$/g));     } }   I've changed from  /^\d{0,7}(\.\d{0,2}|\d{0,2})$/g   to  /^\d{0,7}\.?\d{0,2}$/g   , which is simplified :)  And it works for numbers, but how if I would like when user key in only "." and is not acceptable? Also, zero as starting is not acceptable as well. Do I need to separate into 2 regex checking?


How to add a frame around a float with caption?

I've created a new float element to define examples:  \usepackage{float} \floatstyle{plain} \newfloat{example}{thp}{lop} \floatname{example}{\textsc{Example}}   I want to set my example in an frame. Usually I use the mdframed or framed environment to set figures in frames.  The current problem is that I can't wrap my example with the caption. I can only wrap the example.  \begin{example}     \begin{mdframed}{         My example         \caption{content of the caption}     }     \end{mdframed} \end{example}   Is there a way to set the example and the caption in a frame like with a figure or a table ?  With a minimal example to see the difference between a figure and my example :  \documentclass[a4paper,twoside,12pt]{article}  \usepackage[francais]{babel}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[labelsep=endash]{caption} \usepackage{mdframed}  \usepackage{float} \floatstyle{plain} \newfloat{example}{thp}{lop} \floatname{example}{\textsc{Example}}  \begin{document}  % The figure \begin{figure}     \begin{mdframed}{         My figure         \caption{content of the caption}     }     \end{mdframed} \end{figure}  %The example \begin{example}     \begin{mdframed}{         My example         \caption{content of the caption}     }     \end{mdframed} \end{example}  \end{document}


Add coloring rules for specified language keywords in lstinputlisting

I would like to add coloring definition for e.g. @Override in java files. How can I do that ?   So far I have the following coloring definitions :   \documentclass[a4paper,11pt]{article} \usepackage{color} \usepackage{courier} \usepackage{listings} % for code snippets  \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82}  \lstset{frame=tb,   language=Java,   aboveskip=3mm,   belowskip=3mm,   showstringspaces=false,   columns=flexible,   basicstyle={\scriptsize\ttfamily},   numbers=left,   numbersep=4pt,   numberstyle=\scriptsize\color{gray},   keywordstyle=\color{blue},   commentstyle=\color{dkgreen},   stringstyle=\color{mauve},   breaklines=true,   breakatwhitespace=true,   tabsize=2 }  \begin{document} \lstinputlisting[label={lst:sourcefile}]{codefile.java} \end{document}


I am working in the field of neuroscience with a background in computer science. I try to find new ways of analyzing brain imaging data (mostly MRI, EEG, MEG, fMRI) with modern machine learning methods.  I would like to take a step up by adding genetics to the data arsenal. My work this far has found connections between some X and Y but not really shed insight to why things should be like that. I hope I could get a partial answer from biology.  To get started, I would need some good material to read. It does not matter if the content would be difficult in mathematical/statistical/technical aspects, but it should be approachable with limited knowledge in biology and/or chemistry and physics.  Suggestions?


Comparing text always comes up as incorrect

I am puzzled as to why the below code always comes up with the toast incorrect even when the two views return the same text.   @Override      public void onClick(View view) {          int intID = view.getId();          Button button = (Button) findViewById(intID);          CharSequence message = button.getText().toString();          Log.i(LOGTAG, (String) message);          TextView textview = (TextView) findViewById(R.id.correct);          CharSequence answer = textview.getText().toString();          Log.i(LOGTAG, (String) answer);          if (message == answer) {                 Toast.makeText(getApplicationContext(), "Correct", Toast.LENGTH_LONG).show();             } else if (message != answer);{                 Toast.makeText(getApplicationContext(), "Incorrect", Toast.LENGTH_LONG).show();             }       }   The Log  06-04 18:56:25.752: I/APP(1972): Germany 06-04 18:56:25.752: I/APP(1972): Germany   The button is of course a button and the textview is an invisible textview. As you can see from the LOGCAT both "message" and "answer" give the same text however the answer to the  " if message == answer" is always incorrect. Does anyone why and how to fix this. Kind Regards, Derek


Issue with filenames with .php in the name image.php.jpg

Just moved a site from a Windows server running IIS to a Linux server running Apache, there are some images titled, for example, image.php.jpg (they are images).   When accessing them, I get this error:  A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.   From reading a little, I need to put something in the .htaccess file, of which there isn't one as it was a site on a Windows server.  Could someone please kindly indicate what I need to put in the .htaccess file to avoid the server processing 'anything' with .php in the filename as a .php page?  Thank you in advance.


Limit of Stirling's approximation as n goes to infinity.

I would like to see some detailed solution for $$\frac{n!}{\sqrt{2\pi n} \left(\frac{n}{e}\right)^n}$$ as $n\to\infty$. I know that the answer is 1 but i am not sure why? Here is what is tried:   I rewrote the stirling's formula like this. $$\frac{(e/n)\cdot (2e/n)\cdot (3e/n)\cdots (ne/n)}{\sqrt{2\pi n}}\to 0$$ as $n\to \infty$. I am not sure where I went wrong.


How to solve $y'(t) = a y(t) \cdot (b - y(t))$?

I have given following differential equation:     $$y'(t) = a y(t) \cdot (b - y(t))$$   where $y(0) = y_0$ and $a,b,y_0 > 0$. How can I solve this differential equation?  I have tried to separate the variables and ended up with $$ \int a ~dt = \int \frac{1}{y(t)(b - y(t))}~dy(y). $$ I don't know how to go further, because I don't know how to solve the right-side integral. I would appreciate if you could help me solve the integral or solve the equation with another approach.   Note: I have the methods of a first year physics student available.


I have a HP e9300z, Have Windows 7 on it currently. x64 bit. I wish to Dual Boot Ubuntu with Windows 7, when i do  the windows setup , do not even get the options to Install Alongside with, Just install or Something else. Someone in another forum said something with the HP BIOS, can not find where to change anything. So what do i have to do so Ubuntu sees my HDD with Windows? Manually make partition? Only have 1 partition my C: Windows. Thanks.


I can't solve this problem, spent a lot of time, just no result  $$ x^4-7x^3+14x^2-7x+1=0 $$  PLEASE HELP


How can I set the DPI of an image made with EEVEE? I want a 300DPI render for printing thanks


How is the gravitational potential energy of an object different from that of a system?

If we consider two objects of masses $m$ separated by a distance $r$, and the potential at infinity is assumed to be zero, then $-Gmm/r$ is the potential energy. But is it of the system or of the individual objects? Also, suppose we were to apply conservation of mechanical energy, if the objects are released, then would we use gravitational potential energy of both the objects separately in our equations?  Also, when we say potential at infinity is zero, what do we mean exactly?


How many distinct rhythms can a musical measure have?   Obviously the answer is not "$\infty$", so to answer this question we set a minimum rhythm  $\frac{1}{4}$. We will consider both notes and rests and not consider irregular groups like triplets and others. So we'll consider notes and rests as $\frac{1}{4 }$, $\frac{2}{4}$, $\frac{3}{4 }$ ... As regards musical measure we'll consider $\frac{L}{4}$ where $L$ is the length of measure and consider only $L>0$. Then calculate the number of combinations of rhythms in a measure:     So the sequence found is: $1,2,5,13,34,...$ and this is a possible relation with Fibonacci's bisection: $$ F(0)=1 $$ $$ F(1)=2 $$ $$F(L)= 3 \cdot F(L-1) - F(L-2); \quad L>1$$ How is it possible to proof that this recurrence relation is valid for each $L>1$?  IMPORTANT EDIT: Sorry i have forgotten to write that we consider rhythms from the acoustic view point, so we consider for example that two rests of $\frac{1}{4}$ acoustically equal to a rest of $\frac{2}{4}$ and so we will consider only the rest of $\frac{2}{4}$.  Furthermore rhythms of arbitrary duration are allowed, for example we can have a note of $\frac{5}{4}$ with a invented symbol.


Problem duplicating and separately selecting between objects

I'm wondering if there is a setting I am missing or even if I need to re-install.  I can't see what I am actually doing incorrectly.  I cannot duplicate an object and individually select between them.  Specifically in seconds 20 - 28 of this video I can't accomplish.    My steps are:   1) Make new file which opens default blender cube. 2) Click cube, shift D, drag new cube left. 3) Attempt to select original cube - I can't.  My aim is to duplicate an object I've created in another file I have, resize and edit that, and be able to separately edit both objects in that session - but I can't even dupe the default shape properly. Any direction appreciated.


QGIS 3.0: Naming layers for saving in GeoPackages programmatically

I have problems to save a vectorlayer at QGIS 3.0 with his original name in a GeoPackage.  canvas = qgis.utils.iface.mapCanvas() layer = canvas.currentLayer() writer = QgsVectorFileWriter.writeAsVectorFormat(layer, "V:/test_layer/test_gpkg", 'utf-8', layer.crs(), "GPKG")   With this code I create a Geopackage with the selected vectorlayer in it. The only Problem is that the saved vectorlayer has the same name as the GeoPackage.   Can somebody help me to save the vectorlayer in a different name than the GeoPackage and maybe how to add other vectorlayers?


I don't know if it's a problem on all sites, but on  I see that often new users just want to add a comment, but they can't because there is a 50 rep requirement. So they post an answer instead. Then this answer is flagged. Then a mod converts the answer to a comment. Then we never see the user again.  An example just now is this post:   It's a very useful comment, but it's a comment on the answer above, not an answer.  Now I understand that there are very good reasons for the 50 reputation requirement for comments and I did notice the post   but I wonder if there can/should be any accommodations.  An option might be to allow users to make only 1 comment if they have less than 50 rep, and no more comments allowed until they achieve 50 rep.   It's not a perfect solution, far from it. I'm just trying to think of ways to stop this from happening because I feel like a lot of new users are lost because of the fact that they can't comment, or comment incorrectly. On beta sites trying to grow, it's important to do everything we can to retain new users.


In Star Wars, the only person who meets a ghost of a Jedi is Luke Skywalker, who is a Force sensitive (and a Jedi).  But can ordinary people (who aren't force-sensitive) see a Jedi ghost ?  In this scene (Star Wars VI), Luke is looking at Obi-Wan, Yoda, and Anakin Skywalker, who are ghosts.    Is he the only one who can see them ?


Proving a group where every element's square is identity is Abelian

$G$ is a group with the property that the square of every element is the identity, then $G$ is abelian. Is my proof correct?  Attempt:  For every $a \in G, \space a^2 = e$ where $e$ is the identity element of $G$.  $a^2 = e \implies a = a^{-1}$**  $G$ is abelian if $\forall a,b \in G, \space ab=ba$  So we proceed:  if $ab = ba$  $ab\times a^{-1}b^{-1}=e$  By **  $\implies ab\times ab = e$ $\implies (ab)^2 = e$  By hypothesis this is true.  ~ My question is; is this correct and also why does the $a$ from the right side get moved over first? Would I be able to write   if $ab = ba$  $ab\times a^{-1}b^{-1}=e$  as  if $ab = ba$  $ab\times b^{-1}a^{-1}=e$  with the $b$ first or does the order of moving elements over matter?


Why can't a free electron absorb a photon? But a one attached to an atom can.. Can you explain to me logically and by easy equations?  Thank you..


How can I find the rank and spark relation here?

Hi, I can not get rank/spark relation correctly, I know that rank is a number of linearly independent columns of a matrix and spark is linearly dependent ones. In this question I understand option a), but I can not realize option b) and c). Could anyone explain that 2 option?


Feature Request: Comments exist, but not for users with low rep

Edit Why my post is not a duplicate As commented,     All I want is a feature to ask someone who posted a good answer to elaborate further. Because I can't do this, I don't have a solution when there's a great one that's very close to helping me. If I post to ask the same question, that will be marked as a duplicate. So what do I do?      I wouldn't consider this a duplicate. Mine is a feature-request and about asking for clarification (this is a learning site) rather than being able to write a comment.         ...It is much more restricted than what a comment allows...      Somebody posted a snippet of their code showing a great example that would have helped me quite a bit. But the code didn't show the whole picture, and if I could have had him elaborate on what he answered, I would have fixed my issue a while ago.   Original Post The Scenario I was just going through a post an Stack Overflow and wanted to ask a question about somebody's answer, but was denied from commenting for not having a 50+ reputation.  My question was not something that was worth making into it's own post; it was very short and specific to what that user had answered. Obviously, it was not another answer, so I would never post it as an answer to that question. Not that this would suffice, but I looked around for a while to find somewhere to message the user, but couldn't find out how to do that either.  My Proposal I suggest StackExchange and all descendants not allow users with < 50 reputation to comment normally, but allow those users (and everyone else) to classify a comment as 'Clarification' to preserve the integrity of keeping StackExchange a site for learning.   I understand the purpose for not allowing users with < 50 reputation to comment, as they may be abusing the purpose of commenting and have not proven themselves reliable for adding content. However, I don't think they should be prevented from asking for clarification, nor should they have to go out of their way to message the other user elsewhere. And if users abuse the ability to ask for clarification, we can flag or downvote to remove the comment.


My Macbook Pro is 15", latest version. Today I open the Terminal and typed the command uname -p, the result surprised me: i386. We all know that the processor of the MBP 15" is Intel's i7, but why the result of the command is i386? Just because the command uname is a linux command? Or it's real architecture is i386?


When writing letter to an academic professor (not necessarily from student to professor), what is the appropriate way to address his/her title?  I have seen in letters using  Dear Prof. X even when the addressee is not a full professor  Dear Dr. X though, knowing that the addressee is a full professor  Dear Mr/Mrs X though, knowing that s/he has an academic title


How do we fetch data through WebAPI/WCF Restfull service which hosted in azure, from SharePoint online site by using c# coding(httpwebrequest)?

How do we fetch data through WCF Restful/WebAPI service which hosted in azure, from SharePoint online site by using c# coding(httpwebrequest)? Can we need to create app for the SharePoint online which contain rest endpoint or any better solution than this? All the solution I got for Javascript but I need in c# coding as per business requirement like in


Can't remove Desktop icons - using Ubuntu 20.04

I have posted this question before but the people who were kind enough to answer did not address the problem as posed and the post is now dry - i.e. no-one addressing it. So, I repost the question, hopefully clarifying my problem: After recently upgrading from Ubuntu 18.04 to 20.04 I found icons on my desktop that were not there before - see attached screenshot. When using Gnome-Tweaks I can remove my personal folder and the Wastebasket but the others remain and I don't know how to remove them. I should be most grateful if someone could help. Thank you.


I need to rename a bunch of files in order to fix their sort order, therefore I need to be able to do a sort of "find and replace" so I can replace chunks of the filenames at a time.  What tools should I use? I prefer GUI but a command line tool recommendation would also be fine.


I am studying preposition related to mode of transportation (English is not my first language). Despite knowing the rule for by, on, in prepositions, I still find them confusing. Can you tell how below sentences differ?   I am in a bus. I am on a bus.  I travelled by bus. I travelled on a bus. I travelled in a bus.  Thank you.


How to create an article -> issue -> magazine hierarchical structure with Entity Reference?

I'm using the  module to  a magazine archive website.  The structure is like that: article <- issue <- magazine.  All of these are different content types.  What I want to do is to create a hierarchy while adding articles.  Each issue is referenced to a magazine.  Each article is referenced to an issue (and dependently to a magazine).  While creating an article I want to select the magazine (referenced field) and then select the issue (referenced field) based on the magazine.  How can I do this?  (I tried both the  and  modules but they do not do what I want.)


Too much RAM after load scene textures in high resolution

My current project contains many object with 2K and 4K textures. I don't have problem with RAM during render, but only when I open this scene. It take more than 20GB and it take long time to display. I understand that Blender need load all textures, but is there some method to optimize it? I even don't need see these textures in the viewport. I tried several things:   Viewport textures limit size to 2048 had no effect Change Image Display method had no effect Show object only as viewframe had no effect (object restriction)   It would be nice to have some solution for proxy (low res) textures for viewport and high res textures for render, because I can not use smaller textures during render.  My last option is a make some script to rename folder with textures, so Blender will not find it and show it pink :) And before render repair paths back.


Present Perfect vs Present perfect continuous

Could you correct the comments in parentheses, please? Are they right?        I have lived in Los Angeles. (A completed action; the person does not live there anymore).   I have lived in Los Angeles my whole life. (The person is still living there, or spent her whole life in Los Angeles, but is currently   living in another location).    I have been living in Los Angeles. (She doesn't live there anymore, but was living there recently, or is still living there).   I have been living in Los Angeles my whole life. (The person is still living there or spent her whole life in Los Angeles, but is   currently living in another location).      Thanks


I'm using fedora 16, and I use texstudio for compiling tex sources.  Now I want to install caption package, but I'm at a loss on how to install it.  I tried tlmgr on command line, but it prompots: tlmgr: command not found...  so how to check my tex distribution and how to install packages?  thanks


I happened to look upon a section of Yakov Perelman's Physics for Entertainment, part I, the author was discussing the relation with distance from centre of earth, and the attraction. When $d>r_{earth}$, his arguement matches with my intuition, that attraction decreases. The case is baffling when $d < r_{earth}$ - he argues that the weight would be still less than one on the surface, as there would be attraction from all sides. He writes:  This is because now he earth's attracting forces no longer act just on one side of body, but all around it. (The picture) shows you the weight in the well; it's pulled down by the forces below it and simultaneously up by the forces above it.  And provides this picture:    I am not sure about this, (I made some crappy (possibly wrong) thought experiments; and the results were contrary to this); Is Perelman right here ? What is the "Upward attraction"s ?


Automatically rename files when they are placed in a specific directory

Is it possible to automatically rename a file when it's placed in a specific directory?  For example I have a directory named "dir0".I move or copy a file named "file1" to "dir0".then "file1" should rename to "file1_{current timestamp}"


I would like to invite someone in a comments discussion underneath an answer to continue in Chat, but it doesn't seem to be a problem of that it is  It seems more that until now there is no possibility to create the room and invite someone before having exchanged at least 9 comments in turns (as tested below)  Please add an option to create a chatroom and link to it in a comments flow right away.


Let $X,Y$ be topological spaces and $f:X \to Y$. Prove that $f$ is continuous $\iff$ $\forall S \subseteq X, f(\text{cl}(S)) \subseteq \text{cl}(f(S))$  Here's my attempt:  $(\Rightarrow)$ Suppose $f$ is continous. Since $\text{cl}(f(S))$ is closed, then $f^{-1} ( \text{cl}(f(S)))$ is closed. Since $f(S) \subseteq \text{cl} (f(S))$, then $S \subseteq f^{-1} ( \text{cl}(f(S)))$.  A subset of a closed set implies the closure is also a subset. Hence $\text{cl}(S) \subseteq f^{-1} ( \text{cl}(f(S)))$, which means $f(\text{cl}(S)) \subseteq \text{cl}(f(S))$.  $(\Leftarrow)$ Suppose $f(\text{cl}(S)) \subseteq \text{cl}(f(S)) \forall S \subseteq X$  $\text{cl}(f(S))$ is closed, then if I prove that $f^{-1}\text{cl}(f(S))$ I would have $f$ continuous, but I can't do it. If the condition were $\text{cl} f^{-1}(A)\subseteq f^{-1}(\text{cl}A）$ as I found in other posts, I can do it. Maybe this condition I have is mispelled?  Thanks


Are all transpositions of a finite set conjugate to each other under action by inner automorphisms?

Let $X$ be a finite set. Let $S$ be the symmetric group of $X$. Suppose $S$ acts on itself by inner automorphisms. Is it true that any two transpositions of $X$ are conjugates under this action?


Windows Installed Updates - Remove grouping by program

Background  In Control Panel > Programs > Programs and Features > Installed Updates one can view all updates, sorting them by date installed. However, these updates are grouped by program before being sorted; meaning there's no simple way to find all updates installed in the last day; rather you have to look at the top few items of each program and make a note of these details.  My reason for doing this is sometimes an update to one component may affect another (e.g. .net framework, windows security, or adobe acrobat update could affect various parts of internet explorer's functionality; seeing all updates may give useful clues).  Question  Is there any way to remove the grouping by program from the Windows Installed Updates table?  Research So Far  I've searched Google, Technet and here, but no luck so far.  I've also tried removing the program column in the hope this removed the grouping - again no luck.


Was the pronunciation of “symmetry” different in the past?

First published in Songs of Experience in 1794, the first stanza of the poem “The Tyger” by William Blake is:     Tyger! Tyger! burning bright   In the forests of the night,   What immortal hand or eye   Could frame thy fearful symmetry?   It is easy to guess that  in those years that was the way tiger used to be written.  On the other hand, symmetry  is not a rhyme for  bright, night, eye by today’s  usual pronunciation.  Was it ever a rhyme?


What are the conventions for choosing the second series while Comparison Testing

Given $\sum\limits_{n=1}^{\infty} \frac {\sqrt{n+2}} {2n^2+n+1} $  The author chose $b_n$ to be $\frac{1}{n^{3/2}}$  How did she choose that?  More generally, what are the standard practices when it comes to choosing $b_n$ ?


Banshee won't connect to Amazon mp3 store

Banshee has stopped connecting to the amazon mp3 store. It used to work fine but now I get the following error message from Banshee:  Unable to load page Cannot resolve proxy hostname ()   This problem occurred while loading the URL   I'm running Banshee 2.4.1 and 12.04LTS. My internet connection is fine (I'm using it to post this). Amazon say there's nothing wrong with their server - it seems to be me...Any ideas?


Save map canvas as image with Python in QGIS

I'm trying to save the map canvas as an image in Python in QGIS. I've looked in a few places but haven't been able to get something to work. I need a function where I can specify the extent of the map and the image size. Very similar to the "snapshot" command line function that can be used with QGIS. But the problem with the snapshot function is that it has to start QGIS each time and then close it.


In using the cbind() function in R for a logistic regression on a $2 \times 2$ table, what is the explicit functional form of the regression equation?

Suppose I have a $2 \times 2$ table that looks like:             Disease       No Disease Treatment         55                67 Control           42                34  I would like to do a logistic regression in R on this table. I understand that the standard way is to use the glm function with a cbind function in the response. In other words, the code looks like: glm(formula = cbind(c(55,67),c(42,34)) ~ as.factor(c(1, 0)), family = binomial())  I am wondering why R requires us to use the cbind function and why simply using proportions is not sufficient. Is there a way to write this out explicitly as a formula? What would it look in the form of: $$ log\left(\frac{p}{1-p}\right) = \beta_0 + \beta_1X $$ where $X = 1$ if we have treatment and $X=0$ for control? Right now it seems like I am regressing on a matrix for the dependent value.


How to model effectively using exact measurements?

I always struggle when trying to create a floor plan or furniture. How do I model using exact measurements.


What are the rules regarding the use of too and also? I have read some relevant answers, but none made it clear.  If someone says "my phone is working", what should I reply?   Mine is working too Mine is working also


How to create a bootable USB stick on Ubuntu

edit OK thanks to you i found the file but now every time i put a 'iso' file it says 0.0B (like its Not weigh any..) what to do now:


How to recover partition deleted in windows and then installed ubuntu 16.04 on hard drive

I was running Microsoft Windows7 with 5 partitions naming as C(Windows Installation), D, E,F,G on 500GB hard drive. By some mistake I deleted partition D using Windows disk management tool. After that I installed Ubuntu 16.04. After installing Ubuntu I came know that I left with one partition of around ~500GB and I am not seeing any partition  present in windows OS. After some efforts I was able to recover partition E,F,G(C I don't care as it has Windows OS). But I am not able to recover D. Is there any way to get recover D?  Edit: Guys its not duplicate of any existing question. Please find uniqueness as below:  "I deleted one partition in windows then installed Ubuntu 16.04. Now in Ubuntu I am seeing only single partition. So I want to recover my that partition which was deleted in windows."  If still you see its exact duplicate then can you please provide link to original question.  Thank you


From a video lecture on quantum mechanics at MIT OCW I found that you didn't need to know Schrödinger's equation to know the momentum operator which is $\frac{\hbar}{i}\frac{\partial}{\partial x}$. This can be derived from a 'simple' wave function of the type  $$ \psi = Ae^{i(\boldsymbol{\mathbf{k}}\cdot \boldsymbol{\mathbf{r}}- \omega t )} $$  Where we require eigenvalues for $\mathcal{\hat{p}}$ to be $\hbar k$  My questions are:   I understand the complex notation is for convenience. Since it's a complex exponential it'll give us a real and imaginary wave. Does the imaginary part have any physical significance? Are we to interpret this as two waves in superposition in the complex plane? As we derive the expression for $\mathcal{\hat{p}}$ for this specific function, how does it guarantee that this is indeed the $\mathcal{\hat{p}}$ for every other arbitrary wave function? Can it be derived besides using the wave function I mentioned?


Problem on holomorphic function (Schwarz's Lemma)

Let $f$ be a holomorphic function on unit disc $D:|z|<1$.  (a) $z_1, z_2, ..., z_n$ are the zeros of $f$ on $D$. Suppose that $|f(z)|\leq M$. Show that $$|f(z)|\leq M \prod_{i=1}^{n} \frac{|z-z_i|}{|1-\bar{z_i}z|}$$ I know that $\frac{z-z_i}{1-\bar{z_i}z}$ maps the unit disc to itself, and maps $z_i$ to 0. So $\frac{|z-z_i|}{|1-\bar{z_i}z|}$ should be no greater than 1. But it's the wrong direction.  I think that Schwarz's lemma should be used(but I don't know how). Thanks for help.


Word for person always after what he does not have and not cherishing what he has

Possible Duplicate:          Is there a word for a person who is always after what he does not have and does not cherish what he has? If not, any idiom or phrase?


What to do to migrate own question to another site?

Consider this post: . I asked the question on Stack Overflow erroneously, but I want it to migrate to .  I have already raised a flag for moderator's attention to migrate this question. Is it OK?


$n!$ is never a perfect square if $n\geq2$. Is there a proof of this that doesn't use Chebyshev's theorem?

If $n\geq2$, then $n!$ is not a perfect square. The proof of this follows easily from Chebyshev's theorem, which states that for any positive integer $n$ there exists a prime strictly between $n$ and $2n-2$. A proof can be found .  Two weeks and four days ago, one of my classmates told me that it's possible to prove that $n!$ is never a perfect square for $n\geq2$ without using Chebyshev's theorem. I've been trying since that day to prove it in that manner, but the closest I've gotten is, through the use of the prime number theorem, showing that there exists a natural number $N$ such that if $n\geq N$, $n!$ is not a perfect square. This isn't very close at all. I've tried numerous strategies over the past weeks and am now trying to use the Sylow theorems on $S_n$ to somehow show that $|S_n|$ can't be square (I haven't made any progress).  Was my classmate messing with me, or is there really a way to prove this result without Chebyshev's Theorem? If it is possible, can someone point me in the right direction for a proof?  Thanks!


Why does a list outside a function get modified by something inside another function? (Python 3.4)

I am a relative python novice. I have a simple function here that takes in a list and removes an element of the list. However, I noticed that the function actually alters the list outside of the function. For example,  def test(lista):     lista.remove(1)     return(lista)  def main():     a = [1,2,3]      print(a)      x = test(lista=a)      print(a)   It turns out that the first call to print(a), I get [1, 2, 3] as expected, but the second call to print(a), I get [2, 3] which doesn't quite make sense to me because I'm not sure why the function test would remove the element from a. I understand that I pass a in as a parameter, but I'm not sure why lista.remove(1) would remove the element 1 from both a and lista.  Thanks!


Not sure if this is the correct place to pose this question but I was wandering if there's some sort of "Stack Exchange/Network" html code that I can include on my personal blog?  I think I saw one a few months ago where the user had their Stack profiles on their blog with their reputation and a link to their profile etc...  I'm looking specifically for Wordpress.


Suggestion: what is the verbal component?

The spell description states:       You suggest a course of activity (limited to a sentence or two) and magically influence a creature      Is the one or two sentence itself the verbal component, or are there some other sounds you need to make, that are the same no matter what the course of action is?


C++ Getting parrent class with pointer arithmetic

In the following code:  using Previous = std::atomic<void*>; template<class T> struct Element{     Previous previous;     T value; }   Am I allowed to do pointer arithmetic to get Element<T>* from T* ? Like this:  template<class T> Element<T>* getElement(T* value){    return static_cast<Element<T>*>(static_cast<void*>(reinterpret_cast<unsigned char *>(value) - sizeof(Previous))); }   Where T may be non-standard layout.  P.S. I clearly see that I cannot use  for this. But, may be for this special case, pointer arithmetic will work?


I have written a program that outputs a lot of text to the terminal.   I am looking for certain words in the text to see if I have done it right, but simply reading the text is impossible.   Are there any capabilities or commands that can actually enable me to lookup a word in the terminal (like Ctrl + F)?


Sometimes I can't paste into the edit box

When writing a question or answer, I usually include a couple of links to outside resources. When I do the following:    Insert an image using 'Insert image/provide a link from the web'. Paste hyperlink into the dialog. Dialog closes.  Insert a hyperlink into the edit box.     step 2 fails: I can't paste anything into the Hyperlink dialog box. From that point on, I can't past into the answer box either. I have to post the answer, then click Edit, then I can paste again.   This happened when writing this question. In the edit history you should be able to see 2 revisions, where the first revision has an incomplete hyperlink (2).  OSX 10.10.5/Firefox 56.0 (I've also seen this on Windows 7/Firefox)


Let $R$ be the quotient ring $\mathbb{Z}_3 [x] / I$, where $I= <x^2-1>$ . I need to find how many are the nilpotent elements of $R$, i.e. the elements $a \in R$ for which there exists a natural $n$ such that $a^n=0_R$ .   Let $f(x)+I \in R$ be a nilpotent element. Then, for some $n$,  $(f(x)+I)^n = 0+I = I $. Can someone tell me what's the direct conclusion of the last equality?  Is it right to imply that $(f(x))^n \in <x^2 -1>$ ? I need a clue to proceed to the solution. Thank you.


New Titan X causing infinite login loop on 14.04

I got the new Titan X Pascal GPU today installed it, and I am in an infinite login loop. Do I need to install drivers somehow? I have a 4k screen and the resolution it is showing is very low, I think 1024 x 780. Has this happened to anyone else and do you have any ideas?  I also have been trying to install the drivers in Windows, and I have been unable to do so.


Better way to write 'assign A or if not possible - B'

So, in my code I have a dictionary I use to count up items I have no prior knowledge of:  if a_thing not in my_dict:     my_dict[a_thing] = 0 else:     my_dict[a_thing] += 1   Obviously, I can't increment an entry of a value that doesn't exist yet. For some reason I have a feeling (in my still-Python-inexperienced brain) there might exist a more Pythonic way to do this with, say, some construct which allows to assign a result of an expression to a thing and if not possible something else in a single statement.  So, does anything like that exist in Python?


An increasing function $f:B\to\mathbb{R},\ B\subset\mathbb{R}$ must be continuous at every element of $B$ except for a countable subset of $B$

I am trying to prove the following statement, but I have been stuck for a while and I am looking for an hint about how to prove it: "Suppose $B\subset\mathbb{R}$ and $f:B\to\mathbb{R}$ is an increasing function. Prove that $f$ is continuous at every element of $B$ except for a countable subset of $B$." What I have tried to do: Since I wasn't able to tackle the original statement I tried by assuming that $B$ is also a Borel set so as to exploit in some way the fact that $f$ must then be a Borel measurable function. Then if $D:=\{x\in B: f\text{ is not continuous at }x\}$ and $C$ is a Borel set we have that $f^{-1}(C)$ is a Borel set and $f^{-1}(C)=(f^{-1}(C)\cap D)\cup (f^{-1}(C)\cap B\setminus D)$ and at this point I tried to go on by contradiction, assuming that $D$ is uncountable and tried to show that $(f^{-1}(C)\cap D)\cup (f^{-1}(C)\cap B\setminus D)$ is not a Borel set but I haven't succeeded so I would greatly appreciate any hint or comment or explanation that could nudge me towards a more fruitful approach, thanks.  EDIT (Proof): Let $D:=\{x\in B:f\text{ is not continuous at }x\}$: since $f$ is monotone (increasing)  so if $d\in D$ then $I_d:=(\lim\limits_{x \to d^-,\ x\in B\\}f(x),\lim\limits_{x \to d^+,\ x\in B}f(x))=(\sup_{x<d,\ x\in B}f(x),\inf_{x>d,\ x\in B} f(x))$ is a non-empty interval in $\mathbb{R}$ hence there must be a rational number $q_d$ in it which we can choose and since $I_d\cap I_{d'}=\emptyset$ for $d\neq d'$* this rational number is also unique so we can define an injective function $g:D\to\mathbb{Q}, g(d):=q_d$. Thus $\#(D)\leq \#(\mathbb{Q})=\#(\mathbb{N})$ ie the set of points at which $f$ is discontinuous is (at most) countable, as desired. $\square$  (*) Suppose $I_d\cap I_{d'}\neq\emptyset$ for some $d\neq d'$ (we can suppose wlog that $d<d'$): then there must be $y\in I_d\cap I_{d'}$ so $\sup_{x<d,\ x\in B}f(x)<y<\inf_{x>d,\ x\in B}f(x)$ and $\sup_{x<d',\ x\in B}f(x)<y<\inf_{x>d',\ x\in B}f(x)$ which implies (since $d\leq d'\Rightarrow \inf_{x>d,\ x\in B}f(x)\leq \sup_{x<d', x\in B}f(x)$) that $y<y$, contradiction.


$G$ is characteristically simple $\iff$ there is simple $T$ such that $G \cong T\times T \times \cdots \times T$

Let $G$ be a characteristically simple finite group, i.e. it has no nontrivial characteristic subgroups. Prove there is some simple group $T$ such that $G \cong T \times T \times \cdots \times T$.   No idea how to start this one. I have tried to induct on the size of $G$ to no avail. Any help would be appreciated!


I often hear some people say that "I'm wired differently from other people" or "My brain is differently wired" but I don't understand what "wired" really means. Here are several definitions of the word from OED:   Making use of computers to transfer or receive information, especially by means of the Internet. (Of a device or network) using wires or cables rather than wireless  technology to transmit signals. In a nervous, tense, or edgy state. Under the influence of drugs or alcohol.   What puzzles me is that none of the above definitions seem to fit the meaning.   Does it have something to do with their thoughts or the way they perceive the world?


How to implement a custom controller factory ASP.NET MVC

i am newbie in mvc area. so i am learning still and trying to learn lots of advance area in MVC. so i was reading a post about custom controller factory ASP.Net MVC.  a guy explain so less so i just do not understand how to implement. here is the post url   he said  You would like /Product/Index to trigger MyController<Product>.Index()  This can be accomplished by writing your own IControllerFactory and implementing the CreateController method like this:  public IController CreateController(RequestContext requestContext, string controllerName) {     Type controllerType = Type.GetType("MyController").MakeGenericType(Type.GetType(controllerName));     return Activator.CreateInstance(controllerType) as IController; }   need a bit more sample code. just do not understand where to define CreateController function. do i need to write this function in base controller ?  when request comes like /Product/Index or /Customer/Index then how index method can be invoke in base controller?  so looking for guidance for a newbie like me in MVC advance area. thanks


Zero module of differentials implies finite extension?

I am in the middle of a proof where the author asserts that for a field extension $K/E$, $\Omega_{K/E} = 0$ implies that $K/E$ is a finite extension. I am aware of results in the other direction with additional strong hypotheses (finite simple algebraic extension that is also separable). The hypotheses we do have are as follows:  Let $K/k$ be an extension of fields with finite transcendence degree $n$. Suppose $f_1, \dots, f_n$ are elements of $K$ such that $df_1, \dots, df_n$ is a $K$-basis of $\Omega _{K/k}$. Let $E = k(f_1, \dots, f_n)$.   However, here if this were true, then it would moreover imply that it is a separable extension. Therefore, by the primitive element theorem, this would imply it is a finite, separable, algebraic, simple extension. This seems rather strong from just knowing that $\Omega_{K/E} = 0$.


Don't delete comments with link to duplicate if they are modified

A user just posted his question a second time here on meta after the first was closed as a duplicate. I wrote a comment on the second post, explaining that the answer to his question is in the linked duplicate and that he shouldn't circumvent the closure process by asking a second identical question.  When the second post was closed as a duplicate my comment was automatically deleted. As far as I understand this is a heuristic that removes obsolete comments, which it considers every comment that contains a link to one of the duplicates.  This heuristic is too aggressive and removes comments that go beyond "Duplicate here: link". I suggest that it should be changed to only remove the default duplicate comment, and not any comment that was edited by the owner nor any free-form comment that happens to include a link to the duplicate.  This also triggers for any comment that contains the word "duplicate" and link to any question, not only the question being chosen as duplicate, which makes this much worse.


Suppose $X$ has two topologies $(X,T),(X,T')$ and both are compact and hausdorffs. Suppose $T \subset T'$. Prove that $T=T'$  Because of the compactness of both topologies and the fact that one is an open subset of the other, I can clearly see that we can use the same finite open coverings to cover these topologies. But how do i use the hausdorff definition in this question?  Kees Til


Order of static constructors/initializers in C#

While working on a C# app I just noticed that in several places static initializers have dependencies on each other like this:  static private List<int> a = new List<int>() { 0 }; static private List<int> b = new List<int>() { a[0] };   Without doing anything special that worked. Is that just luck? Does C# have rules to resolve this?  Edit: (re: Panos) In a file lexical order seems to be king? what about across files?  In looking I tried a cyclical dependency like this:  static private List<int> a = new List<int>() { b[0] }; static private List<int> b = new List<int>() { a[0] };   and the program didn't run the same (the test suit failed across the board and I didn't look further).


$ \lim_{n\to\infty} {\sqrt{1+{\sqrt{2+{\sqrt{\cdots +\sqrt{n}\ }\ }\ }\ }\ \ }\ } = ? $ Either closed answer or an upper bound would help.


Prove that if A has eigenvalues then determinant of A is the product of eigenvalues

How can I prove that if A has eigenvalues then determinant of A is the product of its eigenvalues?


Denmark with Schengen visa type C single entry for 21 days

I'm travelling to Denmark with a Schengen visa type C single entry for 21 days.  Can I travel to Paris or Switzerland and back to Denmark with the same visa?


Is it acceptable to edit someone else's question which entirely changes the original question OR ask a question that may be marked as duplicate?

Is it acceptable to modify a question (adding details and conditions to obtain the situation) which seems similar to the problem one encounter rather than creating a new question which might be marked as duplicate? As I encountered the same situation  but my working environment is different (system and versions) and I have applied all solutions provided to this question but that didn't help.  Should I post a new question or modify by adding details of my environment?  Can I ask a question by commenting on that post?  If I ask the question how can it be different, as I asked this question is getting down votes yet it is different from ?


In a book* I was reading, it said that a neutron star is formed when the pressure is so large that the electrons in a white dwarf interact with the protons, forming neutrons. The neutrons then collapse until the Pauli Exclusion Principle stops any further collapse.  However, my issue is with why, when the mass is even greater, how the neutron star collapses into a black hole:  The book says that the pressure is so high, and therefore the temperature is so high, that the neutrons start to move close to the speed of light. At this speed, the Pauli Exclusion Principle doesn't apply any more and the neutron star goes on to implode.  Why does the Exclusion Principle stop working at high speeds?  * The book was  by Brian Cox and Jeff Forshaw. The subject of this question can be found in the chapter Epilogue: The Death of Stars


What is the minimum size of that a segment can take in 8086?

I know that the minimum distance between any 2 segments is be 16 locations (10H) , but some say its 16 bytes , how is that possible if the the locations are of 2 bytes each. It would total to 32 bytes of minimum size for a segment.


/HVAC/ Air speed and influence on human body

I was wondering about three things:   effect. Human body perceives surrounding temperature as colder, with increasing air flow:      This is understandable, as thermal transfer "consists" of convection, diffusion and radiation.   I assume that in real world example, we are being "chilled" by fan due to our skin  not being 100% dry, and thus wind speed increases convection. Is this assumption correct?   Imagine hypothetical situation with no precondition- human is standing in vast open space somewhere on earth, naked. Air temperature is exactly 36.6℃, there is no wind and for the sake of experiment I assume that sun does not shine, so basically I assume that this is near thermal equilibrium (human body generates energy from metabolic processes). I also assume that this man's body has 36.6℃ on whole surface. Will perceived temperature to this man heavily dependent on air humidity? Why, most probably, will he/she feel that it is very hot? Same situation, but air humidity is 100%, basically a sauna. Yet, wind is also extremely strong, say 110 km/h or 70 mph. Man should feel cold according to wind chill, but how it is possible(to feel cold in such conditions), since fluid (air) that has contact with his/her skin has same temperature as his body? (Assume convection/ would be relatively small because there is no thermal gradient, and diffusion would be relatively small because of high air humidity).


Find all $n$ such that $n,n+2,n+4$ are all prime?

I am trying to solve the following problem:  Find all $n$ such that $n,n+2,n+4$ are all prime.  I know $n=3$ works but no other $n$ works. I suspect the answer is as following: If $p$ and $q$ are different primes, then $p\not\equiv 0 \pmod q$, otherwise $p$ would be a multiple of $q$. Then we have: $$n\equiv n \pmod 3\\ n+2\equiv n+2 \pmod 3\\ n+4\equiv n+1 \pmod 3  $$ So, testing for $n=3$, we see that no other possibility exists because at least one of them must be multiple of $3$ greater than $3$. Is that correct?