I know that we can use "\tableofcontents" to list all the contents of the article. However, if there are so many subsection for example, how then can I get the contents as follows:   complex nummbers....................................................................................................................3 1.1 complex numbers (3) 1.2 complex plane (5) 1.3 the modules and arguments (7) 1.4 the powers and squares (13) 1.5 conjugates (16)   Here subsection 1.1 in on the page 3, etc.


How and why does the height of water in a glass affect it's resonance? (resonant frequency)

Why does the resonance frequency of a vibrating wine glass changes with the level of water in the wine glass?


I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name):  people = [] info = 'a' # must fill variable with something, otherwise loop won't execute  while not info.empty?     info = gets.chomp     people += [Person.new(info)] if not info.empty? end   This code would look much nicer in a do ... while loop:  people = []  do     info = gets.chomp     people += [Person.new(info)] if not info.empty? while not info.empty?   In this code I don't have to assign info to some random string.  Unfortunately this type of loop doesn't seem to exist in Ruby. Can anybody suggest a better way of doing this?


I'm trying to create a list with the number of days of each month between 1901 and 2000, but I can't manage to change the values properly. Here's my code:  year = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] period = [year] * 100  for i in range(1901, 2001):     if i % 4 == 0 and i % 100 != 0:         period[i-1901][1] = 29  period[99][1] = 29 print period   When I execute it, the list that I get has 29 as second entry for every year, which I obviously do not want. What am I doing wrong? Thanks.


Would Voldemort have actually won the Elder Wand from Snape?

made me think about the movie versions of the 7th book.  In Deathly Hallows Part II      Voldemort has Nagini attack Snape because Voldy thinks that Snape has the Elder Wand's allegiance. We know that Snape didn't actually have the allegiance, Draco did (and by then Harry did) and his plan had failed.   But if Voldy's plan had succeeded with Snape, would he have gotten allegiance?      Since voldemort didn't kill Snape, Nagini did...


Modern Science Confirm that ,the Fly carries microbes and their Antidote on its wings?

According to Muslims traditions Muhammad said "If a house fly falls in the drink of anyone of you, he should dip it (in the drink), for one of its wings has a disease and the other has the cure for the disease." (Sahih Al-Bukhari: Volume 4, Book 54, Number 537) they claim that , the words of Muhammad is a scientific foreknowledge ... and backup their claim ,by the following studies,articles     now the question: Is it proven scientifically that ,what is Located on the right wing of the fly is the antidote, to the harmful microbes that exist on the left wing of the same fly?


Update Registry Key (Change starting day of week in Windows ) via Powershell - Simple and easy not fancy like mentioned below

I am updating a reg key via GPO but it fails to update (Still Dont know why, though looking into it). Is there a way to do it via powershell ? I will include this in logon script.  FYI: HKCU\Control Panel\International > iFirstDayOfWeek > 0  Can someone post a script or cmdlt to do so ?  Too complex : "Get-ItemProperty -Path HKCU:\Software\xxxxx*.mydomain.com Uri | %{set-itemproperty -Path $.PSPath Uri -Value ( $.Uri -Replace ".mydomain.com/", ".mynewdomain.com/" )}"


Where does rsync copy a file if I don't specify the remote path?

When using rsync to copy files over the network, I give a path so that rsync will know where to put the file on the remote server.  rsync -av /home/ME/myfile user@remoteserver:/home/ME/  If I leave off the remote path, where will rsync put the file? Eg:  rsync -av /home/ME/myfile user@remoteserver


Ralink RT 3290 Bluetooth Problem on Ubuntu 14.04

I recently installed Ubuntu 14.04 and everything is working good except the Bluetooth.  I have Ralink 3290 Bluetooth. tried to install the driver using the method described . The code is not compiling and giving 2 errors. Even the change in     os/linux/pci_main_dev.c is not working.  Update: Now I followed this  and after modifying some file a little bit, I was successful in compiling and installing this driver. I am certain that Ubuntu finally found a Bluetooth Adapter, and now I am getting bluetooth in:  rfkill list all 0: phy0: Wireless LAN      Soft blocked: yes      Hard blocked: no 1: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no   But now the Bluetooth is disabled error is showing and the output of  dmesg | grep Blue [   17.378741] Bluetooth: Core ver 2.17 [   17.378778] Bluetooth: HCI device and connection manager initialized [   17.378788] Bluetooth: HCI socket layer initialized [   17.378792] Bluetooth: L2CAP socket layer initialized [   17.378799] Bluetooth: SCO socket layer initialized [   17.809313] Bluetooth: hci0 sending frame failed [   20.507392] Bluetooth: RFCOMM TTY layer initialized [   20.507420] Bluetooth: RFCOMM socket layer initialized [   20.507440] Bluetooth: RFCOMM ver 1.11 [   20.669232] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   20.669237] Bluetooth: BNEP filters: protocol multicast [   20.669249] Bluetooth: BNEP socket layer initialized   is coming.


I read a book back in late 70s early 80s. I enjoyed the book but cannot remember its title.  The basic storyline is: a scientist invents a machine that can record playback and influence other people. I think at the end the mafia or similar tried to get it but he uses it to influence and beat them.


How does Berlin Transport Validation Stamp mark current date and/or expiry date?

Below is an image of my seven day unlimited travel ticket for Berlin B Section:    I have painted black on its printed serial number, and have circled the validation stamp impression in red.  I bought it on 11th Nov about 11am, from a ticket vending machine in Wedding S Station, for 30 Euros, and immediately validation stamped it to start using it. Now, I can calculate 7 days from 11th, inclusive, are till 17th, inclusive.  My question is where in validation stamp its mentioned that it was stamped on 11th Nov? What can I say to Ticket Inspector on 16th or 17th if he says its expired. (At Gesundbrunnen Metro Station the lady at info desk said its expired today, when I asked her same question, although we both struggled in German and English language. When I said I bought today, she said ok.)  So, could you please interpret the validation stamp, part by part, and/or ticket (or any other part), to prove that it is valid for 7 days.  Edit: One more sample of validation stamp I got, on different ticket, one time use, Eur 2.70, Date 10th Nov, Time somewhere 11:30ish AM, Berlin Airport TXL    Edit2: Ok,   Do means Donnerstag, Thursday. Fr means Freitag, Friday. 11:40 is time in first ticket, 11:00 in second. Looks like 45 is the week number of year 2016, from Nov 7 to 13. What does 6 mean (rotated 90°, after 45)?


Why is scaling the data needed before principal component analysis (PCA)

I recognize that there are many questions on Cross Validated about scaling and PCA, but, after reading all of them, I still can't find the answer to my question.  Several people have said that the question "PCA on correlation or covariance?" is a duplicate.  However, it addresses why BOTH centering and scaling are needed, but it does not address each operation individually.  Thus, my question is unique.  Why is scaling the data (often done by dividing by the standard deviation) needed before PCA?    The reason that I often find is the need to ensure that data from different units of measurement are standardized.  However, it seems that CENTERING the data (subtracting each data vector by its mean) sufficiently addresses this issue.    Suppose that   X1 is in kilometres X2 is in metres,  U1 = X1 - mean(X1) U2 = X2 - mean(X2)   then the effect of using different units of measurement is removed, but raw deviations are retained.  In fact, it seems to be me that scaling by the standard deviation actually removes useful information.  PCA seeks the data vectors that capture most of the VARIATION in the data set.  If you divide each data vector by its standard deviation, then the standard deviation in each data vector is 1, and you just lost all of the variation that you sought to capture in the first place.  To those who think that scaling IS necessary before PCA, please tell me why I am wrong.  Thank you.


Strong convergence due to Compact Operator

Given a sequence $u_{n}$ such that: $u_{n} \rightharpoonup 0$ in $L^{2}(\mathbb R^{n})$ & $A$ is a compact operator. The problem is to show that :  $Au_{n} \rightarrow 0$ in $L^{2}(\mathbb R^{n})$ .  What I am thinking is: since {$u_{n}$} is weakly convergent so it is bounded.  Since: $A$ is compact, & {$u_{n}$} is bounded $\implies$ the sequence {$Au_{n}$} has a convergent subsequence; say: {$Au_{n_{k}}$} . Now, does that help in someway??? Please help me to solve the problem.


Optional caption in listings (for listoflistings)

I have some cites in my captions. But I do not want to appear them in the table of figures or listings. With figures I managed to display an different caption like this:  \begin{figure}   \centering   \includegraphics[width=0.55\linewidth]{images/FIPA_Message-Transport-Reference-Model}   \caption[FIPA Message Transport Reference Model]{FIPA Message Transport Reference Model (\cite{FIPA2000}).}   \label{fig:FIPA_Message-Transport-Reference-Model} \end{figure}    But with lstlisting I have some troubles because the caption is an option of the listings and that seems not to have an optional caption label.  \begin{lstlisting}[ language=Scala, label={lst:Publisher}, caption={Publisher notify\cite{Zenger2013}}]    protected def publish(event: Evt) {     filters.keys.foreach(sub =>       if (!suspended.contains(sub) && filters.entryExists(sub, p => p(event)))         sub.notify(self, event)     )   } \end{lstlisting}   Any Ideas how to solve this? Thanks in advance!


Unity Web Player shows as uninstalled using Pipelight on Ubuntu 14.04

I am attempting to get Unity Web Player to work using Pipelight on Chromium. I've enabled the plugin, used various user agents, including Safari 5/OS X, but I continue to get 'You need to install Unity Web Player' on various platforms. I've upgraded all my packages and tried different browsers, including Firefox. What should I do next?


What are post-installation triggers?  These are executed when upgrading software.


How do I comment on Mark Zuckerberg's posts?

I want to know how to comment on Mark Zuckerberg's posts. When I see his posts the comments are either from people in his personal relation or they are employees at Facebook.  However, there are some comments by people who have no connection with him but can still comment on his post. I asked one of them by message but I haven't had any reply.  I want to know how they comment if they aren't friends with him.


Why do archery arrows tilt downwards in their descent?

In the movies, arrows shot into the air rotate so that during the descent, the arrow head hits ground first. What is the source of this angular momentum?  It would seem that the bow string exerts a force directly in line with the arrow.


What are the different roles of a sqa/sqc person at experience levels of entry/junior, mid/intermediate, and senior

I work in a company that creates websites. Currently, they do not have any description for the roles for the different levels (entry/junior, mid/intermediate to senior level) of sqa/sqc staff but would like to have one.  Any ideas on what roles or duties are assigned to the entry, mid, and senior roles?


i'm working on this question here but don't exactly know how I am supposed to answer this.  "Let f and g be two functions. Prove that if f and g are both surjective, f ◦ g is also surjective."  Am I supposed to assume $f: A ⇒ B$ and $g: A ⇒ B$?  From here I don't know how to proceed.


Let V be a finite set and let $\Omega \subseteq 2^{V}$ be a nested family of odd subsets of V. Show that $|\Omega| \leq \frac{3}{2}\cdot|V|$.

Let V be a finite set and let $\Omega \subseteq 2^{V}$ be a nested family of odd subsets of V, where subset $A\subseteq V$ is odd if |V(A)| is odd (if A has an odd amount of nodes).  Question: How do I show that $|\Omega| \leq \frac{3}{2}\cdot|V|$?  I have no clue on how I should tackle this problem, thanks in advance!


Jquery, .addMethod, undefined is not a function

I've dived into javascript & jquery for the first time and I'm having a little difficulty wrapping my head around a problem.  fieldedit.php
      <form id="edit_field_form"  class="form-horizontal" action="field.php" method="post">
             <input type="text" maxlength="10" class="form-control" name="field_name" id="edit_field" value="" validFieldName/>
     </form>

     <button type="button" class="btn btn-default" onclick="closeEdit()">Close</button>     <button type="button" class="btn btn-primary" id="editsubmit" onclick="submitEdit()">Edit</button>
   editvalidator.js  function submitEdit()  {         var formValidator = $('#edit_field_form').validate();     var success = false;      try      {         formValidator.addMethod("validFieldName", function (value, element)          {             return false;         }, jQuery.validator.format("INVALID."));          success = formValidator.form();     }     catch(err)      {         alert("Error\n\n" + err);     } }   The formValidator.addMethod throws the error "TypeError: Undefined is not a function".  I'm using jquery-1.9.1.min.js and jquery.validate.min.  Any help would be greatly appreciated.


What does "no long range" mean on the soulknife rogue subclass mean?

One of my players just hit level 3 and is taking the soulknife rogue subclass, as written in Tasha's Cauldron of Everything. The weapon granted by the class has a weird specification that it has "no long range." I'm curious how this should be interpreted, seeing as I can't find other examples of such a property. This is what Tasha's says:  You can manifest your psionic power as shimmering blades of psychic energy. Whenever you take the Attack action, you can manifest a psychic blade from your free hand and make the attack with that blade. This magic blade is a simple melee weapon with the finesse and thrown properties. It has a normal range of 60 feet and no long range, and on a hit, it deals psychic damage equal to 1d6 plus the ability modifier you used for the attack roll. The blade vanishes immediately after it hits or misses its target, and it leaves no mark on its target if it deals damage.  There are two possibilities in my mind:  The knife simply can't go beyond 60 feet, just like the range of a ranged spell attack.  The knife can go arbitrarily far, and after 60 feet the attack is at disadvantage.   I'm inclined to lean for the first choice since an arbitrary distance ranged attack seems dumb. Though I suppose there's an argument to be made that the manifested blade is a "psychic attack" so you can attack someone so long as you can see them. This is the language of ranged weapon attacks, per the PHB:  A weapon that can be used to make a ranged Attack has a range in parentheses after the Ammunition or thrown property. The range lists two numbers. The first is the weapon’s normal range in feet, and the second indicates the weapon’s long range. When attacking a target beyond normal range, you have disadvantage on the Attack roll. You can’t Attack a target beyond the weapon’s long range.


I've been given this question:     A bullet entering a target with an initial velocity of $ u $ loses $\frac {u}{n}$ of its velocity after penetrating a distance $ a $ into the target;  how much further will it penetrate?   My question is, doesn't some information about the nature of the bullet's acceleration need to given? How otherwise would I formulate the kinematic equations?


Add modifier to object created programmatically using Python API

I have created an object programmatically and want to add a modifier to it too, programmatically. Here is my current code import bpy # make mesh vertices = [(0, 0, 0),(0, 1, 0)] edges = [[0,1]] faces = [] obj_name="hello" new_mesh = bpy.data.meshes.new('new_mesh') new_mesh.from_pydata(vertices, edges, faces) new_mesh.update() # make object from mesh new_object = bpy.data.objects.new(obj_name, new_mesh) # make collection # add object to scene collection new_object.modifier_add(type='SCREW') new_collection = bpy.data.collections.new('new_collection') bpy.context.scene.collection.children.link(new_collection) new_collection.objects.link(new_object)  This returns an error: AttributeError: 'Object' object has no attribute 'modifier_add'  How would I go about fixing this?


Why friction between two smooth surfaces is high?

If we place two smooth surface one over the other why friction increases or becomes high ?


I am using a 555 IC to produce a sound in a small 8 ohm speaker. It works just fine, but the square wave sounds rather harsh. I am wondering if there is a simple way to round out the corners to make it sound better. All the circuits I have found online are rather complex. It seems to me that a simple RC circuit should do the trick, but I have not been able to figure out how to position it.  Any help would be greatly appreciated.


Remove an icon with dynamically operated function via JS

I'm making a shopping list (using HTML, CSS, and JS) I want to write down stuff on my list and I want it to be removed if I click a trash bin icon. I already added a dynamically operated function of the trash bin icon and the icon is shown up. but if I click it, stuff is not disappeared. Shopping list image  Error Message    const input = document.querySelector(".input"); const addItemBtn = document.querySelector("#addItemBtn"); const list = document.querySelector("ul");  // Add a stuff with a click btn or the Enter key addItemBtn.addEventListener("click", () => {   newElement(); }); document.addEventListener("keyup", (event) => {   if (event.key === "Enter") newElement(); });  function newElement() {   //add stuff   let li = document.createElement("li");   li.textContent = input.value;   input.value = "";   list.appendChild(li);    //add a trash bin icon   let removeBtn = document.createElement("i");   removeBtn.setAttribute("class", "fa fa-trash");   li.appendChild(removeBtn); }  //Remove the stuff clicking a trash bin icon let removeBtn = document.querySelector(".fa-trash"); removeBtn.addEventListener("click", () => {   let li = document.querySelector("li");   list.removeChild(li);   list.removeChild(removeBtn); }); body {   background-color: #c1cfe6;   display: flex;   justify-content: center;   flex-direction: column;   margin: auto;   width: 300px;   padding-top: 20px; }  h1 {   text-align: center;   background-image: linear-gradient(to bottom right, #ee9ca7, #ffdde1);   margin: 0;   font-size: 30px;   color: white;   padding-bottom: 10px; }  .deco {   background-color: azure;   padding: 150px 0; }   /* ul {     }          li {     } */   /* Trash Bin */  .fa-trash::before {   cursor: pointer;   margin-left: 180px; }  .input {   display: inline-block;   width: 100%;   height: 30px;   border: none;   padding: 0;   background-color: #e8edec; }   /* Add button */  .fa-plus-circle {   display: inline-block;   width: 100%;   height: 45px;   text-align: center;   font-size: 35px;   padding-top: 5px;   background-image: linear-gradient(to right, #ee9ca7, #ffdde1);   cursor: pointer; } <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.1/css/all.css" integrity="sha384-xxzQGERXS00kBmZW/6qxqJPyxW3UR0BPsL4c8ILaIWXva5kFi7TxkIIaMiKtqV1Q" crossorigin="anonymous" />
Shopping List

 <input type="text" class="input" />


continuous function on compact set, can be approximated by polynomial

show that if $f$ is homeomorphism of $[0,1]$ onto itself, then there is a sequence of polynomials $P_n(x)$, $n=1,2,\ldots$, such that $P_n$ converge to $f$ uniformly on $[0,1]$ and each $P_n$ is homeomorphism of $[0,1]$ onto itself.


Oracle get max element of iterating table

I'm working with a table such as this one: create table example_table (ID Number(8), Year Number(8), Data Varchar(4)); insert into example_table (ID,Year,Data) ( select 1,2008,1 from dual union select 1,2010,2 from dual union select 2,2014,3 from dual union select 2,2020,4 from dual union select 2,2009,5 from dual union select 3,2003,6 from dual union select 4,2015,7 from dual union select 4,2014,8 from dual); select * from example_table;      ID Year Data     1 2008 1   1 2010 2   2 2014 3   2 2020 4   2 2009 5   3 2003 6   4 2015 7   4 2014 8     In this case, together the ID and Year columns form a unique identifier for a specific row. I only want to pull rows where the Year is maximized for a given ID, such as     Id Year Data     1 2010 2   2 2020 4   3 2003 6   4 2015 7     I know I can do this with a correlated subquery such as select distinct         ID, Year, Data from   example_table a where  Year =         (select max(year)         from   example_table b         where  a.id = b.id);  Or I can do it with a common table expression: with tmp(ID,Year)  as (     select distinct             ID,            max(year)             over (partition by ID)     from example_table) select distinct         ID, Year, Data from   example_table        inner join tmp           on  example_table.ID = tmp.ID           and example_table.year = tmp.year;  I could technically also do it by creating another table/view, but I don't have perms on my database to do that. Anyways, this is a common task I'm having to do within my scripts and I want to reduce the number of queries I generate. Is there any way to do this with only one query? I tried using a HAVING statement like: select example_table.ID,        max(example_table.YEAR),        example_table.DATA  from example_table group by ID, DATA having example_table.YEAR = max(example_table.YEAR);  but that doesn't seem to work because HAVING statements only function on groups, and I want to manipulate elements within the group. Is there a way to do this with only one query, and if not, what's the most clear way to do it with two queries?


How to start application in specific workspace programmatically on GNOME 3

I'd like to write bash script that starts certain application on startup. I would like to have for example Firefox opened in first workspace, Slack on second, spotify on third. I know how to start these applications, but don't know how to place them in specific workspace. Is it possible in Ubuntu 17 with GNOME?


how to prove that $\mathbb Q$ is flat as a $\mathbb Z-$module

I know that $Tor^{\mathbb z}_1(\mathbb Z, N) = 0$ for any $\mathbb Z-$module, because free modules are flat. Then because $Tor_1$ is local, we have $Tor_1^{\mathbb Q}(\mathbb Q, S^{-1}N) = 0$, which is not useful at all. How should I use localization to prove this statement?


Prove that: $$\lim\limits_{m\to \infty} \frac{\int\limits_0^{\pi/2}(\sin(x))^{2m} dx}{\int\limits_0^{\pi/2}(\sin(x))^{2m+1} dx} = 1$$  I had tried to get it from inequalities like $$(\sin(x))^{2m+1} \le (\sin(x))^{2m} \le (\sin(x))^{2m-1}$$ But I always hit a wall in that regard (I integrate the sin functions and from there keep on going but there it ends).


How to exclude the hidden directory from the result of find command

I am searching for some directories in find command and if that directory is present then I need to take some action on it. But what is happening is: At some places though the main directories (for which I am searching) hidden .svn directories are present and they are populating as a result of find.   I dont want this .svn dir to be a part of find result.  Here is the find command which i am using :   find <search dir> -mindepth 3 -maxdepth 3 -type d  -regex ".*/V[0-9]+/.*+/.*+")


The voting system does not help new users

I am fairly new to programming, and I quite often require help. Being only 15 and inexperienced, I often cannot phrase questions accurately or adequately, as with my age and experience comes naivete. Four downvotes (two or three bad questions), and you're down and out for good - absolutely no coming back until you're knowledgeable enough to help other people (I am not).   This happened before, and a nice person upvoted one of my questions to get me back in again. I tried a lot harder this time to ask good questions. But then, one night, at 4:00 AM when I was tired and frustrated, I asked a question that had no example of an attempt (at that, I had absolutely no idea where to even begin and that was my question) and it got downvoted once and I was banned from asking questions. Period.   For about five days now, I've been searching desperately for questions I'm able to help with to appeal my block, and I can't find anything. This system absolutely hates beginners. It's very, very, bothersome. I, in my mediocre opinion, think that it should be nicer to newer users. Maybe a warning, an actual explanation on the algorithms, or whatever.   Sorry about the fact that I'm hating on the system, as I know so many do. But it seems to filter out anyone that isn't a bloody elitist programmer.


Create svn external relative to my current directory

I want the following situation:   trunk/my_sv_code  trunk/my_tb_code/my_sv_code    In which the copy of my_sv_code in  my_tb_code is an external.  How do I write an svn:externals property that is relative to the my_tb_code directory?  The Red Book, sadly, has few good examples of this.


I like making a habit to use the different languages I study, to keep that knowledge fresh. So I like typing in those languages when I get the chance. But swapping keyboards under OSX is just a little too cumbersome.  For example, I was just typing the name of one of my co-workers in its original 汉子 form instead of as an English transliteration. It's nice. It reminds me to pronounce her name properly, with tone, etc., which otherwise doesn't come naturally. The transliteration of her name is especially misleading. Everyone at the company is pronouncing it wrong.   But to swap into writing 汉子 I have to mouse up to the top menu bar, select a new keyboard, type, mouse back up to the top bar, and then select back into English. I know there's a keyboard shortcut, but with 5 different keyboards active in my menu, cycling through 5 to get to the one I want feels just as cumbersome.  Is there a way to attach a hotkey to a specific keyboard, or some other way to make swapping character sets lighter?


bash - get 1st argument of current command I am editing via history, or similar?

Often I'm writing a command in a bash prompt, where I want to get previous arguments, in the CURRENT line I'm typing out, and put in other places in the command. A simple example, would be if I want to rename a file. I would  type out the mv command type the filename I want to move, ~/myTestFileWithLongFilename.txt now I want to just change the extension of the file that I supplied in the first argument, without typing it again.  Can I use history or bash completion in some way to autocomplete that first argument? $ mv ~/myTestFileWithLongFilename.txt ~/myTestFileWithLongFilename.md  I know of course I could execute the incomplete command, to get it into the history, and then reference it with !$, but then my history is polluted with invalid commands, and I'm wondering if there's a better way


I am writing an article in English but I need some examples to be writen with Arabic language like this :     For example, the Arabic words دارس (student) and مدرس (teacher) share the same Arabic root.   What shold I do?


How can I change the input format for dates in Google Docs' spreadsheet?

The input string for dates in Google Docs's spreadsheet app seems to be set to en_US, which is quite unnatural to me.  How can I change the input format?


Is Energy conserved in General Relativity

I have seen a few posts here on stack exchange that suggest that energy is not conserved in general relativity on a large scale. I am a pretty confused with this. I don’t understand how such a conclusion is reached. $\nabla_\mu T^{\mu\nu}$ $=0$ Doesn’t the above equation signify that energy momentum is conserved in GR. Please note there are other questions already on such issues. But they seem to suggest that energy is not conserved in GR. See for eg:  But I am asking that when we have $\nabla_\mu T^{\mu\nu}$ $=0$ why will energy not be conserved in the first place itself Edit after the comment: I am asking why $\nabla_\mu T^{\mu\nu}$ $=0$ does not imply energy conservation


Omit page number in list of symbos using nomencl

I'm typesetting a thesis using a custom class based on book class and to meet the university requirements, all pages in frontmatter must not show the page numbers but must be counted, starting at the cover. I was able to change everything, except for the list of symbols and list of abbreviations and acronyms, that were made with the nomencl package.  I tried the solution in this post , but using that one, the entry in the toc does not show any page number. I need just to hide the page number of the lists. How can this be accomplished?


How long does a Pokémon stay in one location?

If a friend encounters a Pokémon, it doesn't disappear directly. So I should be able to catch it, as well.  My question is, how long does it stay there? Can I still expect to find it there a few hours later, or even a day later?


$f \in {\mathscr R[a,b]} \implies f $ has infinitely many points of continuity.

Claim: If $f \in {\mathscr R[a,b]}$, then $f$ has infinitely many points of continuity.   1.) I read that it is a corollary of the Lebesgue integrability criterion.  Is it possible to prove the claim without invoking the concept of measure(or using less abstraction) ?    2.) Here is attempt: Given $\epsilon > 0, \exists$ Partition, $P =  \left\{ x_0 =a,...,x_n =b \right\} $ of $[a,b]$ such that $\sum^n_{i=1} (M_i -m_i)\Delta x_i < (b-a)\epsilon$, where  $M_i= \sup \left\{ f(x) : x \in \Delta x_i \right\}$ and $ m_i= \inf \left\{ f(x) : x \in \Delta x_i \right\} $  Let $(M_j -m_j)=\min \left\{ M_i -m_i : i=0,...,n \right\} $.  $ \implies (M_j-m_j)(b-a) \leq \sum^n_{i=1} (M_i -m_i)\Delta x_i <  (b-a)\epsilon$ $ \implies (M_j-m_j)<\epsilon. $  Let $ c\in (x_{j-1},x_j)$ and $\delta$ be any positive number such that $(c-\delta, c+\delta) \subseteq (x_{j-1}, x_j)$.   It follows that $ \left| f(x) - f(c) \right| < \epsilon, $ whenever $ \left| x - c \right| < \delta $.   Since $c$ is arbitrary and $[x_{j-1},x_j]$ is an interval,  there are infinitely many points of continuity.  There is something wrong with my proof since Thomae's function is a counterexample. Could anyone point out the mistakes in my proof? Thank you.


Showing that $\sigma$-algebra is uncountable

Suppose $\mathcal{A}$ is a $\sigma$-algebra with the property that whenever $A \in \mathcal{A}$ is nonempty, there exist $B$, $C \in \mathcal{A}$ with $B \cap C = \emptyset$, $B \cup C = A$, and neither $B$ nor $C$ is empty. How do I see that $\mathcal{A}$ is uncountable?


The sequence 7, 2, 4, 1, 4, 8 has an increasing subsequence length four (2, 4, 4, 8) and a decreasing subsequence length three (7, 4, 1). It has other monotonic (increasing or decreasing) subsequences too, but none longer than four.  How long does a sequence need to be to be guaranteed to have a monotonic subsequence length k?


As a Canadian citizen, how often can I visit the US?

I'm Canadian, entering the USA for the requisite maximum of 6 months. How soon can I re-enter the USA after crossing back into Canada?


How to show $1+r+r^2 + \cdots + r^n = \frac{r^{n+1} - 1}{r-1}$ where $r \neq 1$

I want to show that the geometric series $$1+r+r^2 + \cdots + r^n = \frac{r^{n+1} - 1}{r-1}, r \neq 1$$  I first started with the following using Gauss method:  $$S = 1+r+r^2 + \cdots + r^n$$   $$S=r^n + r^{n-1} + r^{n-2} + ... + 1$$  Adding both S's:  $$2S = (1+r^n) + (r+r^{n-1})+(r^2+r^{n-2})+...+(1+r^n)$$  Am I on the right track?  PS: I initially tried to follow  question, however, there was not enough to go on, so I attempted to do this on my own.     Update:  I originally assumed that I can use Gauss method which proved (when he was 10 years old!) $$\sum_{k=1}^nk= \frac{n(n+1)}{2}$$  but from user comments below, Gauss method cannot be applied here, as my questions is regarding a geometric sum not an arithmetic sum.


What effect would the feat Dual Wielder have on a Monk primarily using unarmed strikes?

I'm trying to decide what to take as a feat for my unarmed monk build. I came across the Dual Wielder feat which says     You master fighting with two weapons, gaining the   following benefits:      • You gain a +1 bonus to AC while you are wielding a   separate melee weapon in each hand.      • You can use two-weapon fighting even when the one-handed   melee weapons you are wielding aren’t light.      • You can draw or stow two one-handed weapons when   you would normally be able to draw or stow only one.   Does the fist count as a weapon in the context of the first bullet?


I want to have something like this:  #!/bin/bash  ssh 10.0.0.1 vncviewer   However, I want "vncviewer" command to be launched at the same time, and so that it does not interrupt with SSH asking me for password.


This issue actually frustrates me for a while, but prior for finding the solution, I would like to know why this happens. In a nutshell: My TeXStudio does recognise ALL my \label, but the output does not recognise some labels.  Problem  I am writing my notes on Physics, however, sometimes I got warnings of:  LaTeX Warning: Reference `eq:pointcd' on page 196 undefined on input line 985.   This is just for example, I have other examples in the document that does not have \label recognised. There are also some weird situation where I have the same format of putting \label, but got recognised by the compiler.  MWE  \documentclass[12pt,a4paper,headinclude,openright]{scrbook} \usepackage{amsmath} \usepackage{amssymb} % ------------here comes the problem part------------ \usepackage[listings,theorems,skins,breakable]{tcolorbox} \tcbuselibrary{breakable} %======================== Ch.4 boxes ========================= \tcbset{exercisestyle04/.style={arc=0.5mm,coltitle=black,fonttitle=\sffamily\bfseries,colback=color04!50!,colframe=color04}}  \newtcolorbox[auto counter,number within=chapter,list inside=eg]% {exercise04}[2][]{exercisestyle04, title={Exercise ~\thetcbcounter: #2}}  \tcbuselibrary{theorems} \usepackage[amsthm,thmmarks,hyperref]{ntheorem} % theorem  \usepackage{regexpatch} \makeatletter \xpatchcmd*{\thm@@thmline@name}{2.3em}{5em}{}{}  \xpatchcmd*{\thm@@thmline@noname}{2.3em}{5em}{}{} \makeatother \makeatletter \renewtheoremstyle{plain}% {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2 \theorem@separator]}% {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ \sffamily{##3}  \theorem@separator]} \makeatother \theoremstyle{plain} \theorembodyfont{\normalfont\sffamily} \theoremheaderfont{\bfseries} \newtheorem{theorem}{Theorem}[section] % ------------here ends the problem part------------ \begin{document} \begin{equation} \rho\left(\mathbf{r}\right)\;=\;\sum_{k=1}^{N}\: q_k \delta\left(\mathbf{r}\;-\;\mathbf{r}_k\right) \label{eq:pointcd} \end{equation} However, one should alert for the unphysical divergence in other quantities associated with \eqref{eq:pointcd}. \end{document}   In your answer...  I am not specifying you of how to answer this question, this section is just my suspects on the issue. For example,   The pdf compiler is faulty? (I use Acrobat XI and with PdfLaTeX as compiler and using DVI -> PS -> PDF chain in TeXStudio) My compiling procedures has done wrongly? My format is done wrong (although I fairly think so because I changed my format according to many sources but no luck). TeXStudio is faulty? (Just a suspect, but did happened with other IDEs before and I am using ver. 2.8.0) I haven't read the manual carefully? (smile)   It turns out some code has obstructed the PdfLaTeX to recognise some \label.  Update  While I was omitting the parts that I have some idea why it happens, however, it is neither of the five above.   While I deleted some of the \frontmatter, by delete a section (see MWE above) become fine to recognise the referencing. I suspect the part is obstructing the compiler to recognise some \label.   Solution  See Mico's answer, but I would like to append that it was actually because of  5. I haven't read the manual carefully


Is there a difference between `;` and `&&` and `|`?

When you want to run multiple commands you can use ;, && and |  Like this: killall Finder; killall SystemUIServer, cd ~/Desktop/ && rm Caches Or: man grep | man cat for example.  But, is there a difference between |, ; and &&? If so, what is the difference?


How do I connect my potion-command to my villager's trading-system?

So I've got this command:  /summon Villager ~1 ~ ~ {     Profession: 2,     CustomName: "Aldorf the wizzard",     CustomNameVisible: 1,     Career: 1,     CareerLevel: 42,     PersistenceRequired: 1,     Silent: 1,     Invulnerable: 1,     Attributes: [         {             Name: "generic.maxHealth",             Base: 99999         }     ],     Offers: {         Recipes: [             {                 buy: {                     id: "record_13",                     Count: 1                 },                 buyB: {                     id: "skull",                     Count: 1,                     Damage: 1                 },                 maxUses: 9999999,                 sell: {                     id: "stone",                     Count: null                 }             }         ]     } }   And you can see it says "stone" (null).  Now I want to change it so that I can trade from the disc and the skull (that are already there) into this custom potion:  /give @p potion 1 16385 {CustomPotionEffects:[{Id:3,Amplifier:0,Duration:60},{Id:7,Amplifier:0,Duration:60},{Id:9,Amplifier:0,Duration:120},{Id:10,Amplifier:0,Duration:60},{Id:14,Amplifier:0,Duration:20},{Id:15,Amplifier:0,Duration:140},{Id:16,Amplifier:0,Duration:600},{Id:17,Amplifier:500,Duration:600},{Id:18,Amplifier:9,Duration:600},{Id:19,Amplifier:100,Duration:600},{Id:20,Amplifier:100,Duration:200},{Id:23,Amplifier:500,Duration:600}],display:{Name:"Poison",Lore:["Poisons anyone it is used to.","The only way to survive is to drink milk in seconds."]}}   How do I connect them? I almost got it but there are these weird "]}}" signs at the end so I couldn't do it.


Using Dropbox to Sync File GeoDatabases?

I've been able to accumulate a large free dropbox account and use it to Sync my GIS databases across several different PC's. I've just started doing this and havent had any problems thus far. But I am getting some red flags of warning that are scaring me.  There seems to be several duplicate files in the GeoDatabases. Usually something like:   a00000017.gdbtable (GIS-HP duplicate Copy)  I can manually delete these files with no problem, but I have no idea why they are popping up.  Also, instead of removing file locks, Dropbox keeps saying it is renaming them. So when I release one lock and gain another, it renames the file instead of deleting it and creating a new one. Although it still does delete the lock file when I have fully disconnected from the GeoDatabase.  Like I said, I haven't had any issues so far, but I am worried about long term data corruption while using Dropbox.   Has anyone used Dropbox and found problems using it to sync GIS data?


Why does a higher bandwidth allow a higher data rate

I have not taken any signals processing classes yet but I am interning at ATnT in the RF department. I do not understand why higher bandwidth increases data rate and the other answers did not make sense to me. For instance, in FM, why does it matter if the frequency changes over 20kHz or 20MHz. The input waveform can still be represented in both frequency ranges, but the 20kHz band would have the same amount of information compressed into a smaller range. So my question is, why does the fact that the same amount of information can be contained in a wider range of frequencies mean that more information could be sent. Can't you send the same ammount of information on a 20kHz channel as a 20MHz channel as long as your electronic components can make very detailed modulations of the smaller bandwidth carrier so as to represent the exact same waveform over a smaller range?


How can I do this? $\int\frac{dx}{x^4+1}$

I tried to integrate this: $\displaystyle\int \dfrac{dx}{x^4+1}$  I tried to do it with the partial fractions method (after factoring the denominator), but the process is really large, and I got a lot of mistakes.  Is there another way to solve this?  Thanks in advance :)  P.S. I'd put what I did, but I don't have the papers anymore, sorry :(


Due to my dataset having some values much greater than others, I tried using the log scale on Y axis. How can I display my data as is, meaning 40 on the first bar, 42.69 on the second, etc?   \begin{figure}[!htbp] \centering \begin{tikzpicture}     \begin{axis}         [ybar=2pt,         width=16cm, height=8cm,         bar width=8pt,         enlarge x limits=0.1,         enlarge y limits=0.25,         legend style={at={(0.5,0.95)}, anchor=north,legend columns=-1},         ylabel={Delay (us)},         ymode=log,         symbolic x coords={1p Bare C,1p Partikle,2p Bare C,2p Partikle,2p Bare C \& Partikle,2p Bare C Sampling,2p Bare C Queuing},         x tick label style={rotate=20,anchor=east},         xtick=data,         nodes near coords,         every node near coord/.append style={rotate=90, anchor=west}]     \addplot coordinates {(1p Bare C,40)    (1p Partikle,29)     (2p Bare C,17)    (2p Partikle,22)    (2p Bare C \& Partikle,19)    (2p Bare C Sampling,193) (2p Bare C Queuing,448)};     \addplot coordinates {(1p Bare C,42.69)    (1p Partikle,33.19)     (2p Bare C,24.25)    (2p Partikle,26.06)    (2p Bare C \& Partikle,20.63)    (2p Bare C Sampling,360.63) (2p Bare C Queuing,670.94)};     \addplot coordinates {(1p Bare C,47)    (1p Partikle,36)     (2p Bare C,45)    (2p Partikle,42)    (2p Bare C \& Partikle,29)    (2p Bare C Sampling,476) (2p Bare C Queuing,1050)};     \addplot coordinates {(1p Bare C,1.44)    (1p Partikle,1.31)     (2p Bare C,6.13)    (2p Partikle,4.48)    (2p Bare C \& Partikle,1.23)    (2p Bare C Sampling,64.66) (2p Bare C Queuing,128.67)};     \legend{Min,Average,Max,Avg. Deviation}     \end{axis} \end{tikzpicture} \caption{All test case delays for 128 byte transfers.} \end{figure}


Can 'revert' be used as a synonym of 'reply'?

I am a native speaker of American English, and I have only ever heard this usage of the word revert from one person.  This person is not a native English speaker (he is from India), so he may just be mistaken, but I'm curious if anyone else has seen/heard this usage.  He will write an email, bringing up a point for discussion.  He will explain the issue, and then end the paragraph with something like Please do analyze and revert on the status.   The best I can tell, he is asking for a response, and not asking for the something to be undone, or changed back to the way it was before (which is the meaning that I associate with the word revert).  Is revert used with different meanings outside the US?


How to prove $A^n = 0$ if $A$ is an $n\times n$ strictly upper triangular matrix

I would like to prove the statement on the title. I tried to prove it using the definition of multiply of matrices, however it seems like weak to me. Can't decide how to make a correct proof of the statement above.  Edit: Those ns are the same ns. So that, the dimension of the Matrix have to match the power to which it is raised.


How do I add a meta tag in inside the  tag?

How can I add the following meta tag inside the <head> tag? <meta http-equiv="X-UA-Compatible" content="IE=edge" />  I am trying to add it to a Drupal 8 site.


How to press buttons in a dialog window from terminal?

I don't get what to do! How do I press <Ok>? I clicked on it, typed Ok, pressed Enter, everything!


Automorphism of $\mathbb{C}$ over a subfield $K$ of $\mathbb{C}$

Assume a finite field extension $\mathbb{C}/K$ such that $[\mathbb{C}:K]>2$. Let $\varphi \in \text{Aut}(\mathbb{C}/K)$, so $\varphi \in \text{Aut}(\mathbb{C})$ and $\varphi\vert_K=\text{id}\vert_K$.  Is it possible to show one of the three:  i. that the image $\varphi(\mathbb{R})$ is a subset of $\mathbb{R}$.  ii. that $\varphi$ is also a $\mathbb{R}$-Automorphism (which would follow from i.).  iii. that $\varphi$ is continuous on $\mathbb{R}$ (which follows from either i. or ii.).  We know that $(\varphi(i))^2=\varphi(i^2)=\varphi(-1)=-1$ as $\varphi\vert_{\mathbb{Q}}=\text{id}_{\mathbb{Q}}$ and we therefore have either $\varphi(i)=i$ or $\varphi(i)=-i$.  We also know that $\varphi$ fixes $K\cap\mathbb{R}$ pointwise and due to Artin-Schreier we have that $i$ is not in either $K$ or $K\cap\mathbb{R}$ as $K \cap \mathbb{R}$ is a subfield of $K$ and $\mathbb{R}$.  As $\mathbb{C}$ has characteristic $0$, so does $K$ and $K\cap\mathbb{R}$, and therfore $\mathbb{Q} \subseteq K\cap\mathbb{R} \subseteq K \subset \mathbb{C}$.  I tried to experiment with $K\cap\mathbb{R}$ but quite unsuccesful, as it could be equal to $\mathbb{Q}$ which isn#t of much use. It's also to note, that $\mathbb{C}/K$ is a Galois-Extension.  In the first version of the post I forgot to mention, that the degree of $\mathbb{C}/K$ is supposed to be finite!  Thanks for checking in :)


Time incorrect on Ubuntu and takes a long time to update

Iḿ really satisfied with ubuntu, but for job necessities I need Windows too.  The problem for me appears when I change from ubuntu to windows7, the time is incorrect and take a lot of time to adjust itself using internet services.    Related with the time: Iĺl try to explain myself:  I am using linux, but meanwhile I need to use windows and I restart the system to boot into windows. Thereś no problem with this, but the time is incorrect.  That is:  When I am using linux, the time is correct, but if I restart to use windows, windows time is incorrect


How to imitate commercial fried chicken?

I'm trying to develop my own "secret" fried chicken recipe, something that is similar to Popeye's or Church's. I'm a LONG ways from getting there. Here's what I did in my last experiment:   Chicken was marinated in buttermilk with Cajun spices and Tabasco sauce for 24 hours I used a deep fryer and canola oil. 175C. Prior to "dressing" the chicken, I let the excess buttermilk brine drip off the chicken. I then seasoned it with Cajun seasoning I made a batter using an egg, self rising flour, milk, baking powder I also tried using just plain flour for breading   Results:   Using the batter, the chicken came out looking burned and too smooth (didn't have that crunchy look). It burned too much that I couldn't finish cooking the chicken. Using the flour, the chicken came out with a thin crust, somewhat crispy, but also too burnt. Dipping the chicken in the batter AND then flour gave a bulky & crunchy look. However, again, the result looked too burnt.   Modifications:  I then changed the the breading. I used bread flour and corn starch. I dipped the chicken in the batter again, then used the new breading. The bread flour was a bit lighter. And the corn starch was even more lighter. But they were still burn looking (just lighter shades). I also dropped the temperature to 160C.  Results:  Burnt chicken whose crust wasn't really sticking to the skin/meat.  Questions:  Any suggestions on what I can do to improve? I'm guessing something in the batter is causing the burnt coat. What flour should I use? What can I do to make the coat stick to the skin/meat? Any other suggestions on what to do?


Have you previously applied to enter or remain in Canada?

I have had a working holiday visa before and I am applying again, do I say yes to this question or no. I have to explain if I say yes


For almost every question there's a list of "related" questions on the right.  How are those questions selected? Is it based solely on tags? Can I do anything if I see a question on the list that is really not related to prevent it from being incorrectly listed?


How to solve this limit: $\lim\limits_{x\to0}\frac{(1+x)^{1/x}-e}x$?

I tried to evaluate $$\lim_{x\to0}\frac{(1+x)^{1/x}-e}x$$but all my efforts were in vain . L'Hospital rule becomes very complicated.


INSERT INTO RedBEan PHP with Placeholders

I can not understand how to use the Insert Into command with the PLACEHOLDERS REDBEAN PHP. Another ordinary SEARCH type is running an example from below an example, WORKING SEARCH EXAMPLE R::getAll('SELECT id,contact FROM rent WHERE contact = :contact',[':contact' => $contact]);  and INSERT data into the table does not working. INSERT IS NOT WORKING  R::exec('INSERT INTO rent(id, contact) VALUES (WHAT HERE???) WHERE id= :id', contact = :contact',     [':id' => $id,     ':contact' => $contact]);


How many ways to choose 4 letter words (can be nonsensical) from the following?

Problem  I am a software engineer and my friend and I are trying to pick up combinatorics. My friend asked me the following problem. How many ways to form 4 letter word from AAAADDDEEFGG  Attempt  My friend proposed $ 6 \choose 4 $. However, I felt this excluded the following possibilities:    Exclude A: $\frac{4!}{3!2!2!}$ Exclude D: $\frac{4!}{4!2!2!}$ Exclude E or G: $\frac{4!}{4!3!2!}$ Exclude F: $\frac{4!}{4!3!2!2!}$   However, when I sketched out the above I felt I was being rather silly since the answer was nonsensical. Please note that I based my approach off . I clearly think my answer is wrong.   Instead, should I exclude A and realize I have  $ 8 \choose 4$ ways to select from the remaining letters? If so, then I believe it be something like $\frac{8 \choose 4}{3!2!2!}$ when excluding A? The cases work similar for D, E, G, and F and I simply sum the results.   If not, can someone please give me a hint so I don't feel embarrassed with myself in the future :) Thanks.


How do you find $\sum_{j=0}^{p-1}\left(\frac{j(j+1)}p\right)$,p = prime, where $\left(\frac{j(j+1)}p\right)$ is the Legendre symbol?

I'm having trouble finding a pattern by calculating each step of the sum from $j=0$ to $j = p-1$.


Could .net Timer event handler modify a non-static variable

c# Timer (System.Timers.Timer) is used to periodically trigger an event within windows form application. I would like to call function (for example logger() function) within the even handler. logger() is not a static method.  The function assigned to ElapsedEventHandler is a static function and therefore cannot call non-static methods. Code example:  public partial class MainForm : Form {     //...     private MyClass myClass;     //... }   private void SomeButton_Click(object sender, EventArgs e) {     //...     System.Timers.Timer t = new System.Timers.Timer(5000);      t.Elapsed += new ElapsedEventHandler(OnTimerElapsed);     t.Enabled = true;     //... }  static void OnTimerElapsed(object sender, ElapsedEventArgs e) {     //...     // here call myClass.doSomething();     //... }   How would be the correct way to go about this task? I do know that static variables/methods are not possible to be used within the OnTimerElapsed() - that is clear. I mainly ask to check whether there is another way of calling OnTimerElapsed(), maybe a non-static method or another timer type or handler method? Or if there is a way to pass the instance of myClass to the OnTimerElapsed()   Edit: it would be preferable to keep the myClass non-static, that is why this question.


Unanswered questions have accepted answer with upvote in Android app

I see some of the questions in the Unanswered section having an accepted answer and the accepted answer having upvote also in the Android app. In the  post it is defined as  Unanswered questions have no answers with upvotes (or accepted)  But the accepted answer with upvote also still list in the Unanswered questions. Is my understanding is wrong or is it a bug? Screenshot for reference:


do I need to apply for esta if I have a b2 visa?

hi there I have a visa b2 do I need to apply for esta on line?  thanks


Install Ubuntu from ISO image directly from hard disk of a system running Linux?

I don't want to burn a CD, DVD or USB memory stick. And I don't care about saving the existing operating system (Linux Mint). I want to install Ubuntu (actually Kubuntu 12.04 LTS) to the computer directly from the ISO image. The image is for the Kubuntu Live DVD (3.5 GB).  The computer is now booted into Linux Mint. A set of command line steps would be satisfactory. In my mind, I simply need to trick the existing system into thinking I inserted a CD/DVD, right?  I know there is a similar question already but it does not have a good answer. The answer basically says, "see this link." I reviewed the link and I decided that StackExchange needs a good answer to this question. Furthermore, most answers at other places on the Internet assume the user is coming to Ubuntu from Windows. So I think this question is one that needs a good answer here. Thanks


I want to get all fields that have null values but i aint even getting any fields:    [Serializable()] public class BaseClass {     [OnDeserialized()]     internal void OnDeserializedMethod(StreamingContext context)     {         FixNullString(this);     }      public void FixNullString(object type)     {         try         {             var properties = type.GetType().GetFields();               foreach (var property in from property in properties                                      let oldValue = property.GetValue(type)                                      where oldValue == null                                      select property)             {                 property.SetValue(type, GetDefaultValue(property));             }         }         catch (Exception)         {          }     }      public object GetDefaultValue(System.Reflection.FieldInfo value)     {         try         {             if (value.FieldType == typeof(string))                 return "";              if (value.FieldType == typeof(bool))                 return false;              if (value.FieldType == typeof(int))                 return 0;              if (value.FieldType == typeof(decimal))                 return 0;              if (value.FieldType == typeof(DateTime))                 return new DateTime();         }         catch (Exception)         {          }          return null;     } }   And then i have a class :      [Serializable()] public class Settings : BaseClass {     public bool Value1 { get; set; }     public bool Value2 { get; set; } }   But when i comes to    var properties = type.GetType().GetFields();   then i get 0 fields, it should find 2 fields.  Is type.getType().GetFields() wrong to use ? or am i sending in the wrong class to the base class?


In the duplication options for the dupli verts there is a option for Rotation. Witch brings me to my question, is there anyway to rotate a vertex? Vertex's have normals, is there any way to control which way the normal of a single unconnected vertex points?


rsync "Operation not permitted (1)" error only when run in launchd

Context There is a similar question , however I feel the answer does not expand on how to "invoke the user environment profile from the launchd script"; and the alternative solution of identifying differences in the user and launchd environments shouldn't apply since I am running a launchd agent (run within user context) and not a launchd daemon (run within system context). My setup I have a run_rsync_back.sh file in my home directory with the following (note that this script runs sucessfully when manually run from the terminal): date >> ~/.cron.log && rsync --stats -hai --delete /Users/username/Documents/ username@server.net:/home/username/Documents_MacbookPro/ >> ~/.backup.log 2>&1   I have ensured the above file is executable with chmod +x And created a launchd Property List file for my agent: ~/Library/LaunchAgents/com.rsyncbackup.plist with the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">   <dict>     <key>Label</key>     <string>com.rsyncbackup</string>     <key>ProgramArguments</key>     <array>       <string>/Users/username/.run_rsync_backup.sh</string>     </array>     <key>RunAtLoad</key>     <true/>     <key>StartInterval</key>     <integer>7200</integer>   </dict> </plist>  After starting the daemon (launchctl load ~/Library/LaunchAgents/com.rsyncbackup.plist), I can confirm that nothing was transferred to the server, and the following error appears in the ~/.backup.log file: Sat Aug 29 17:19:16 CEST 2020 rsync: [sender] opendir "/Users/username/Documents/." failed: Operation not permitted (1) IO error encountered -- skipping file deletion  Number of files: 1 (dir: 1) Number of created files: 0 Number of deleted files: 0 Number of regular files transferred: 0 Total file size: 0 bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 0 File list generation time: 0.015 seconds File list transfer time: 0.000 seconds Total bytes sent: 67 Total bytes received: 70  sent 67 bytes  received 70 bytes  274.00 bytes/sec total size is 0  speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1307) [sender=3.2.2]  I have also tried the above on an out-of-the-box Mac, with exactly the same result!


Checking a list if a certain string exist in visualforce page

How can i check if a list has certain string in salesforce. For example I have : anotherList which is from controller and has  this value [NAME_A, NAME_B, NAME_C]  Then in my page:      <apex:repeat var="list" value="{!tesList}">         <input type="checkbox" style="display:{!IF(CONTAINS(anotherList, list['name']), '','none')}" value="{!list['name']}" />     </apex:repeat>   But i got an error saying that Error: Incorrect parameter type for function 'CONTAINS()'. Expected Text, received Object  So parameters should only be Strings right? But how can i do something like this in Visualforce page?  <!-- JSTL sample -->     <c:forEach var="list" items="${testList}">             <c:if test="${fn:contains(anotherList, list.name)}">                 <input type="checkbox"  value="${list.name}" />             </c:if>     </c:forEach>


I have a batch job that delete records from object that were created more than 13 month ago. Please help me to write unit test for this batch. Thanks  @IsTest private class ABI_CXC_DeleteNVMData_Batch_Test {  public String query;  @TestSetup static void setup() {     List<NVMContactWorld__InteractionEvent__c> testEvent = new List<NVMContactWorld__InteractionEvent__c>();     testEvent.add(new NVMContactWorld__InteractionEvent__c(Name = 'Test Event'));     insert testEvent;     Datetime createDate = Datetime.now().addMonths(-13);     Test.setCreatedDate(testEvent[0].Id, createDate); }  @IsTest static testMethod void positiveTestMethod() {     Test.startTest();     ABI_CXC_DeleteNVMData_Batch records = new ABI_CXC_DeleteNVMData_Batch(query);     Database.executeBatch(records);     Test.stopTest();     System.assertEquals(1, [SELECT Id FROM NVMContactWorld__InteractionEvent__c WHERE Name = 'Test Event']); }   }


Proving that the function $f(N)=\sum_{n=1}^N \cos(n^2)$ is unbounded

I am trying to prove that the function $$f(N)=\sum_{n=1}^N \cos(n^2)$$ is unbounded. Admittedly, I don't know for certain that it is, but someone told me, and I would like to see it for myself. First, I thought it might be because the square numbers mod $2\pi$ was not uniformly distributed, but numerics seem to imply that they are. My next thought is then that it has to do with the fact that we might have positive or negative subsequences in the sum of arbitrary length. However, what is a good strategy for proving this kind of statement?


Remove the last 3 characters of the string if the string has the same prefix and suffix

I want to remove the last 3 characters of the string if the string has the same prefix and suffix. eg: the string is "systemsys", it should print system. Few inputs I am trying : incgoogleinc. Not working for this input  import java.util.*; public class Main {     public  static void main(String[] args) {     Scanner s = new Scanner(System.in);     String str = s.nextLine();     if(str.length() > 3) {      if (str.startsWith(str.substring(0, 3)) == (str.substring(str.length()-3, str.length()-1))) {         System.out.println(str.substring(0, str.length()-3));         } else {         System.out.println(str); }}}   Not working for different inputs : mictestingmic, comwebsitecom


Transit visa for travel to US from India via Frankfurt and Zurich

I have a valid US visa and I will be travelling from Mumbai to US via Frankfurt and Zurich. Would I need a transit visa for either?


What are the advantages of memory-mapped files?

I've been researching memory mapped files for a project and would appreciate any thoughts from people who have either used them before, or decided against using them, and why?  In particular, I am concerned about the following, in order of importance:   concurrency random access performance ease of use portability


Migrating from Windows 2008 Domain Controller to another DC and retiring former

I don't have any proper training in Active Directory (rather I just fumble around and manage this network part time relying on experts in places such as this site), so I apologize in advance if these are really fundamentally silly questions. In other words, treat me like I'm 5. :)  Situation:  I want to migrate away from a DC (DC1) because its old hardware and likely to fail on me to DC2.  In my domain I have:  -DC1: Win 2008R2, Active Directory domain Services role, DNS Role. Global Catalog and all 5 FSMO roles. Not a VM, its a hard box. DC1 has been the first DC in our domain for many years.  -DC2: Win 2008R2, Active Directory domain Services role, DNS Role. Global Catalog. This is a VM on newer hardware. I promoted this VM to DC a few months ago when another DC2 had a full hardware failure.  Proposed actions:  What I think I need to do is:   "Transfer" the FSMO roles from DC1 to DC2:  or   Upon success, spin up a new DC #3 (a VM on different HW than DC2), promote it as a another DC alongside the current DCs. Assign Global Catalog and DNS to this new DC3.  Upon success demote DC1 and decommission the hardware, wipe the drive, etc..  Are there any steps I am missing or anything else I should consider? I think the transfer is straightforward (I have also seized roles in the past when another DC failed outright) but I feel like I am missing some steps here. I'm also not onsite but doing this remotely so I don't want to make any mistakes and make for a long day talking marketing guys through commands.  Thanks.


What would be the correct sentence and why:  He is president of Finland?  or  He is the president of Finland?


Let $G$ be a locally compact Hausdorff Abelian topological group.  Let $\mu$ be a Haar measure on $G$, i.e. a regular translation invariant measure.  Let $f$ be fixed in $\mathcal{L}^1(G, \mu)$.  Define the function from $G$ to $\mathcal{L}^1(G)$ that assigns to each $y$ in $G$ the function that takes $x$ in $G$ to $f(xy^{-1})$.  I.e. it assigns the $y$-translate of $f$.  Is this a continuous function of $y$ into $\mathcal{L}^1$?      On p.94 3.10 of  it is asserted that it is.  The usual proof of this sort of thing in cases where $G=\mathbb{R}$, say, is you use density of compactly supported continuous functions, and then dominated convergence.  The former survives, but dominated convergence does not work on nets.  In fact, a limit of a net of measurable functions need not be measurable.


Why can a field not be used to make a quotient ring?

In socratica's  video (which should be required for every abstract algebra class), she is explaining that a motivation for modules as rings allow you to do things that you can't do with fields. If you have a ring with an ideal $I\triangleleft R$ where M is an R module you can create an R/I quotient ring. Why can't you do this with a field?


Is Stack Overflow a suitable place for a WordPress question?

I know this is an odd question, but is Stack Overflow (the main site) the right place to ask a question about WordPress? I ask this because I have rarely seen any and have spent quite a bit of time looking for an answer to a question that I have.  I need to find the answer, but I am afraid I cannot, if anyone could say "yes or no" to asking a question about WordPress on S/O that would be appreciated.


I want to call a script on machine shutdown and restart. I have written code like  #! /bin/bash #chkconfig: 0 6 1 1 #description: Description of the script # processname: killfoo # this script starts and stops foo  # Some things that run always LOG_FILE="/tmp/killfoo.log"  log() { while IFS='' read -r line; do echo "$(date) $line" >> "$LOG_FILE"; done; }; exec > >(tee >(log)) # Carry out specific functions when asked to by the system case "$1" in   start)     echo "Nothing to done"     ;;    stop)     echo "Stopping script killfoo"     pkill   -9 foo >> $LOG_FILE 2>&1      ;;   *)     echo "Usage: /etc/init.d/killfoo {stop}"     exit 1     ;; esac  exit 0   I created file /etc/init.d/killfoo having executable permission.  I have enable this script for run level 0,6.  chkconfig --add killfoo chkconfig --level 6 killfoo on   But script is not getting executed on machine restart. What could be the problem ?


I have this following sql code:  $sql = "INSERT INTO data (Artist, Name) VALUES ('TF2', 'you're right behind me')";   The code itself looks normal but for some reason mysql doesn't want to allow me to save it. I get the following error:  "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 're right behind me')' at line 1"   What I know the problem is because of the word "right" being reserved in mysql but I need to save it so how should my code look like. All help is appreciated


What is the collective word in English for items that are compared with each other?

If I am comparing two or more items of certain brands, then by what single word collectively those items can be described?  I want to name the items to be compared. For example, "contestants" is the word for people who are competing with each other. So what will be the word for items/articles or things that are being compared?


Only Ctrl+c not working. I have windows 7? (Ctrl-v, ctrl-x etc work good)  This not work in all programs (Office, Firefox, Chrome etc) Thanks


How to prove $\frac{\mathrm{d}^3\vec{p}}{E}$ is Lorentz invariant?

To prove $\frac{\mathrm{d}^3\vec{p}}{E}$ is Lorentz invariant is to prove  $$\frac{\mathrm{d}^3\vec{p}}{E} = \frac{\mathrm{d}^3\vec{p}'}{E'} \qquad(\mathrm{d}^3\vec{p} := \mathrm{d}p_x \mathrm{d}p_y \mathrm{d}p_z). \tag{1}$$  Suppose reference system $\Sigma'$ is moving at speed $v=\beta$ ($c=1$) along $z$ axis of $\Sigma$. We have $$E' = \gamma(E - \beta p_z), \qquad p_{x,y}' =p_{x,y}, \qquad p_z' = \gamma(p_z-\beta E), $$  then  $$\det\frac{\mathrm{d}\vec{p}'}{\mathrm{d}\vec{p}} = \gamma \Big( 1 - \frac{\mathrm{d}E}{\mathrm{d}p_z} \Big).$$  If $$ \frac{\mathrm{d}E}{\mathrm{d}p_z} = \frac{\partial E}{\partial p_z} = \frac{p_z}{E}, \tag{2} $$  we can prove (1). However, I don't understand the first equality in (2).


Running terminal commands with a double click file

I have a program that I have to run by going into the terminal and typing "./filename". I want make an executable file that types this automatically for me.


Can I pipe output from a started process?

Say I've started program and it continues writing some output to stdout.  Is there some way to add a pipe so that I can, for example, count the number of lines it has produced with wc -l?


I've stopped my animation that was rendering at 224 frames (out of 250) and I can't find a way to start rendering again from where i left off. I've been told to change the start frame (under frame range) to where I last left off but it just starts the render from the beginning (restricted to 224-225 frames). Please help, I just need a few more frames 😭


Numerical solution to Schrödinger equation - eigenvalues

This is my first question on here. I'm trying to numerically solve the Schrödinger equation for the  and find the energy eigenvalues and eigenfunctions but I am confused about how exactly this should be done.  I've solved some initial value problems in the past using iterative methods such as Runge–Kutta. I've read that  is the way to solve Schrödinger's equation but Wikipedia also describes it as an iterative method for initial value problems.  How do I use it to solve an eigenvalue problem?  This confuses me for the following reasons:   Wouldn't iteratively solving the DE require knowledge of the energy eigenvalues to use as input to the calculation? I don't know the eigenvalues yet; they're precisely what I'm trying to calculate. If I did that, wouldn't I simply get a unique solution, instead of a family of eigenfunctions and eigenvalues?    I've seen some mention of "tridiagonal matrices" being generated somehow, but am not sure what the elements of that matrix would be or how that applies to the problem. Leandro M. mentioned that "the discretization defines a finite dimensional (matrix) eigenvalue problem". This seems like the correct road I should be going down, but I haven't been able to find anything that explicitly explains this process or how the matrix is constructed. If this is the correct procedure, how is such a matrix constructed?


Prove  $$\lim_{n \to \infty} (\sqrt{9n^2 + 2n + 1} - 3n) = \frac{1}{3}$$  I got this problem in Harro Heuser's "Lehrbuch der Analysis Teil 1". It is surely smaller than 1 because $\sqrt{9n^2 + 2n + 1} < \sqrt{9n^2 + 6n + 1} = 3n + 1$, but I cannot get closer than that, although it looks very simple...


Prove that a set A⊂ℝ is connected iff it is an interval.

I know that how to proof that the interval [a,b] is connected. But how to proof that a set A⊂ℝ is connected iff it is an interval.


How can timelapse sequences be shot without in-camera support?

How can timelapse sequences be shot without having in-camera support for it?  Which third-party tools are recommended?


Using multiple forbidden tags says about one single tag

When I try to use multiple , the message box text is the concatenated text of all the tags, as if it is one tag.        In this case the correct form could be the next:     The 'a', 'the', 'or', 'on' tags are not allowed.


Minecraft window is acting strange - can't be maximised?

I was playing Minecraft and tried to take a screenshot but pressed F11 and ever since, my window has been acting weird, not like the normal windows 8 window.  The restore/maximise button is grayed out and I can't just drag it to the top of my screen to make it bigger.     Unlike in the duplicate question, it did not return to normal when I closed out of Minecraft and reopened it. Is there any other way to fix this issue?


Mount an existing RAID 1 Logical Volume after OS upgrade

I just upgraded from Ubuntu 10.04 to Mint 16. The installer did not detect my existing RAID 1 array, and I can't access it anymore.  My drives are:  SDA - First RAID Disk SDB - Second RAID Disk SDC - Non-RAID where the OS is installed.   The disks are full of stuff I want to keep, so I don't want to create a new RAID.   On the old machine, the two raid drives became MD0, which was a physical disk for Logical Volume Management.  How do I put the two halves together and get it to mount at boot? (I know how to mount single drives and how to add fstab entries for single drives, but the part I don't know is how to mount the two drives as one disk as a RAID.


Are these desktop features or are they bugs?

Since updating to 20.04 LTS I've noticed some differences in desktop functionality compared to 18.04 LTS.  Here are a few:   Can't drag and drop a file from the desktop to anywhere else.  Drag and drop from other locations appears to work as before. Can't rename a file using F2, need to right click and use the pop-up menu. Can't open a template on the desktop. I have to create a folder on the desktop and open the template in this new folder. The Del key won't delete a desktop file or folder.  I have to right click and move it to trash via the pop-up menu.   I'll bet there are other differences that I haven't yet come across.  For my style of using the Desktop (keep a clean Desktop, do all current work there, then put things away) these changes degrade the utility of the Desktop.  Are these changes to the desktop intentional or are they bugs that will be fixed.


Let $p\in\mathbb{N}$ be a prime. Let $F=\mathbb{F}_{p^n}$, $n\geq1$, be a finite field of $p^n$ elements containing $M=\mathbb{Z}/(p)$. I would like to show that $\mathrm{Gal}(F/M)\cong\mathbb{Z}/(n)$.  Here's my work so far. It is easy to show that $F/M$ is a simple field extension (i.e. there exists an element $\alpha\in F$ such that $F=M(\alpha)$) because of the existence of a generator of the multiplicative group of the field. Then the Galois group of $F/M$ contains the automorphisms of $F$ sending such generator to roots contained in $F$ of the minimal polynomial of the generator over $M$. I don't know how to proceed from here.


Help me please. I allocate memory as follows (T is template type)  T * ptr = reinterpret_cast<T*>(operator new (sizeof(T));   And after that I want to put an element into this memory; Am I write if I do it in this way?   new (p) T(elem);   (elem has type T)  UPD: sorry, it's a mistake that I forget to write operator new


I found the following two loops yield the same output. Can you help me to understand what the differences are between the @ and * in this particular case?   #!/bin/bash  ips=(8.8.8.8 8.8.4.4)  for ip in ${ips[@]}; do     echo $ip done  for ip in ${ips[*]}; do     echo $ip done   They both yield the same result:  8.8.8.8 8.8.4.4


What is the best, fastest, safest way to surf the web anonymously, and how much anonymity can you really achieve?


What do these terms mean?   End of Standard Support End of Life   Does this mean that I can't use this specific Ubuntu version, or something else?


Why does casting a string as float in PHP change the value?

Why does casting a decimal string as float change the value by a fraction of the last decimal place?  For example, I have:  class API_something{     public function __construct($id, $name, $rank, $weight){         $this->id = (int)$id;         $this->name = strtolower($name);         $this->rank = (int)$rank;         $this->weight = floatval($weight);     } }   this object gets instantiated with a string passed to $weight. this is ultimately json_encode'd and values are as such:  {     "weight": 81.770399999999995,      "id": 6,      "rank": 1,      "name": "ommitted" }   I know I can use number_format or round to get it back to 4 decimal places, but both functions return a string.   Is there not a way to convert the original string to a float variable without PHP changing the value?


Latex to ODF/DOC using mk4ht oolatex failing on equation arrays

Title says it all.   Anyone got any ideas on what I'm doing wrong? Is this a fundamental fault with oolatex conversion? Is there an alternative math format I can use?  Same math builds fine in latex and pdflatex.  Example input (test.tex)  \documentclass{article} \begin{document} \begin{equation}               x = \begin{array}{cc}                  1, & \mbox{for } 0.5\leq p \leq 1 \\                 0, & \mbox{for } 0\leq p \le 0.5 \\                    \end{array}  \end{equation}     \end{document}   Execute:   mk4ht oolatex test.tex   Error:  ! Undefined control sequence. <argument> ...\a:mathml columnlines="\columnlines                                                    " \a:mathml equalcolumns="... l.5                 1                      , & \mbox{for } 0.5\leq p \leq 1 \\ ?


Proving an inequality on Ramsey numbers by induction: $t_{r+1} \leq (r+1) (t_r - 1) + 2$

Not sure how to proceed. I'm trying to prove that the following inequality is true. I know that $t_2 = 6$ and $t_3=17$ from the problem statement. The base case is obvious.   $t_{r+1} \leq (r+1) (t_r - 1) + 2$  ($t_r$ is supposed to be the  $R(3,3,3,\ldots,3)$ with $r$ $3$s).


Select all contents of textbox when it receives focus (Vanilla JS or jQuery)

What is a Vanilla JS or jQuery solution that will select all of the contents of a textbox when the textbox receives focus?


Why does Area 51 not show up in the 'your communities' section?

I like to quickly jump from one StackExchange site to another using the 'your communities' section in the StackExchange dropdown menu, but my Area 51 account isn't listed over there. Why's that?  (i've marked this with the tag 'bug' because i don't know why it isn't there...)


I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it?


My B1/B2 visa expires on August 14, and I have to stay in the US from August 14 to 17. I want to apply for a new visa for these dates. Will the embassy give me a new visa or they will ask me to travel with the same visa?


I want to add an alias for nedit editor   alias ne='nedit'  or  alias ne='nedit $1'   works fine   but i want to add & at its end:  alias ne='nedit $1 &'   so that if i do   ne filename  It should open filename in nedit and run it in background  but I get an error  filename : command not found  How can I pass an argument and send the process to the background using aliases?


What's the point of the \Users\Default profile?

I'm a linux user and don't really know all that much about Windows stuff. I'm changing the default \Users directory and I see that there's a Default user profile at \User\Default that's a hidden link or something. What's the point of this?


Hire experts to help out small Stackexchange sites with lots of unanswered questions

Stackexchange currently has two travel-related websites:   Travel.SE - ~30th most popular Site on the Network Expats.SE - ~60th most popular Site   The strength of Travel.SE is in having experts in given topics - US visas, UK visas, Schengen visas, experts on rail transport, etc. Visa matters are generally easy to answer and millions of people deal with them every year. Likewise lots of people can answer a general question like 'How to sleep on a train?'.  However Expats.SE is struggling with being useful as it deals with complex immigration matters and only immigration law experts can answer many of those.  of their questions are Unanswered and existing Answers often lack in quality, which makes it hard to attract new visitors.  Could Stackexchange consider hiring some experts to provide answers on struggling sites, in order to help them set-up core user bases? It won't guarantee that a site manages to 'graduate', but it might be worth a try.


How to create partition without formatting drive?

I am have some doubts in partition my external drive. I am have external drive of capacity 2TB formatted in NTFS . 1.5 TB is used in hard drive. I want to create one partition of 200 GB in FAT . But I don't want to format my drive . And I don't have system capacity to backup all of my 1.5 TB data .   I was wondering is there any way to create a FAT partition on my External HDD in Ubuntu without formatting and losing  data from hard drive.


I'm trying to seek data extension row between some datetimes variables   Is this possible?  I could figure out how this is actually works... for example, if I got two rows with this datetime field: "12/29/2016 12:30:00 AM" and "12/29/2016 12:00:00 AM" and I try to Lookup by      LookupRows(@DE, "DateEvent", FormatDate("12/29/2016", "YYYY/MM/DD"))   That function only return the row that contains "12/29/2016 12:00:00 AM" as DateEvent value but not return the other one...  How could I lookup every rows in that "day" (in that date) no matter what time?  Thank you!


How to express the paradoxical situation in idiom or proper sentences?

I would like to know how to express the situation described below either with a better paraphrase, or perhaps by using a relevant idiom.     We've introduced a something with the expectation that others profit   from it, but it is abused in an unintentional way.


Why was Hagrid's wand snapped in two when he was expelled from Hogwarts? Why was he banned from performing magic? Yes, he was expelled from Hogwarts after being framed by Tom Riddle as being responsible for Moaning Myrtle's death via Aragog the Acromantula. But why did he receive this punishment?  ‘What’ve you been feeding [the pumpkins]?’ said Harry. Hagrid looked over his shoulder to check that they were alone. ‘Well, I’ve bin givin’ them – you know – a bit o’ help.’ Harry noticed Hagrid’s flowery pink umbrella leaning against the back wall of the cabin. Harry had had reason to believe before now that this umbrella was not all it looked; in fact, he had the strong impression that Hagrid’s old school wand was concealed inside it. Hagrid wasn’t supposed to use magic. He had been expelled from Hogwarts in his third year[...] Chamber of Secrets - page 90 - Bloomsbury - chapter 7, Mudbloods and Murmurs  Why would Hagrid's wand be snapped in two and he not be allowed to do magic when:  Attendance and completion of an education at Hogwarts was not compulsory by wizarding law¹; homeschooled children were allowed to do magic for their lessons, and then do magic fully when they turned 17. The Weasley twins dropped out of Hogwarts after practically destroying parts of the castle with fireworks (and conjuring an awesome swamp on the fifth floor), yet were allowed to do magic despite not completing Hogwarts or any kind of homeschooling curriculum (that we know of). No Death Eater character that we know of was banned from using magic, despite their crimes and devotion to Voldemort. I don't recall any Death Eater wands being snapped and the owner banned from performing magic after being convicted of Death Eater crimes (please do correct me if I'm wrong). For example, Bellatrix Lestrange's wand was not snapped in Goblet of Fire when she received a life sentence in Azkaban and, as we know, her wand played a fairly significant part in Deathly Hallows.  ¹I realize in Deathly Hallows Voldemort made attendance at Hogwarts compulsory; however, by that time, Hagrid had been cleared of the charges of being responsible for Myrtle's death and was allowed to use magic again.


I see weird behaviour of the sort command (in Debian 10.6 and Fedora 32) Content of a file is ced )cd cad )cd  If I sort it (without any flags), I get cad )cd )cd ced  Now logically, either c comes before ), or after it. How are the ')' characters fitting between two 'c' characters ? This is not even using any sort flag, though :  There is no change in behaviour if I use the flag -n, for numeric sort The weirdness is resolved if I use the flag -f, for case insensitive sort, though everything in the file is lower case.


Which answer do I accept if I have multiple correct answers?

I asked  that turned out to have multiple correct answers. How do I pick between them to determine which to accept?  All of the answers were different. They were not the same answer given multiple times.


Gparted cannot increase or decrease the size when resizing a partition

I am trying to resize my partition on Gparted, but I can't increase or decrease the size of partition, here is a screenshot   What is wrong with it ?


Can't activate hardware acceleration using windows 10 family and amd processor

I would like to create a virtual device in Android Studio but I can't because hardware acceleration is disabled.  I went to the BIOS and there are two option :  AMD-SVM AMD-IOMMU   Both are enabled.  I also downloaded the HAXM installer from the SDK manager and tried to run it from the   C:\Users\%user%\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager  with intelhaxm-android file.  I got an error telling me :   This computer does not support Intel Virtualization technology VT X or it is exclusively used by Hyper V. HAXM cannot be installed. Please ensure that hyper V is disabled in windows feature   It makes sense that I can't activate Intel Virtualization technology because I have AMD Ryzen 7 2700U.  With my previous computer it worked just fine but I had an Intel processor.  Some tutorials online suggested to enable windows Hyper-V feature but it's only available for windows 10 pro.  Does anyone know a way to activate hardware acceleration with AMD processor and without Hyper-V feature?


Polar to Cartesian transform of a Gaussian RV

Let's say I have a RV, $\Theta$ ~ $N(0, \sigma^2)$. Is this analytically possible to transform this to Cartesian using the transform below:  $ X = cos \Theta $,   I mean, is it possible to calculate the pdf of $X$ analytically? If it is, what is the right way to do it?  I know that if $\Theta$ ~ $U[0,1]$, the transform leads to a Gaussian RV. But, I could not find any information when $\Theta$ itself is Gaussian.  Thanks in advance.


What is the difference between protected and private?

I don't understand the difference between protected and private members or methods, as I assumed both will hide the member or the function to access from outside the class. What is the difference between the protected and the private keywords?


How do I fix the vertical alignment of the bracketed part of this equation?

The following MWE:  \documentclass[]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}  \begin{document}  \begin{equation} \dfrac{dN}{da}=\dfrac{1}{C}\left[\dfrac{\cos\left(\dfrac{\pi a}{W}\right)}{\pi a\Delta\sigma^2}\right]^{m/2} \end{equation}  \end{document}   which is extracted from a much larger document produces the following result:   How do I fix the vertical spacing of the item within the bracket which has the huge space underneath the denominator of the fraction?


ClamAV : freshclam hangs and uses 100% CPU

I try to update the ClamAV database by running freshclam. The daily-*.cdiff is downloaded successfully, but then the process hangs. The CPU is maxed out at 100%, but the update just will not finish. I canceled the process with Ctrl+C after appr. 10 minutes. Here is the output from my update attempt:  # freshclam ClamAV update process started at Tue Nov  8 00:15:57 2016 main.cvd is up to date (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer) Downloading daily-22474.cdiff [100%]   Did anyone else observe this behavior? Is it a bug or is my system not properly configured?  PS: I am using ClamAV v0.99.2 on Ubuntu Mate 16.04.


If $G$ has only one subgroup of order $n$, then that Subgroup is Normal

How can I show that if some group $G$ has only one subgroup $K$ of order $n$, then $K$ is a normal subgroup? Would that mean that it only has one subgroup total? If so then I guess that makes sense.


I want to check it the first input argument is operator "+"  below is the code  if (args[0] == "+") {     System.out.println("good"); } else {     System.out.println("invalid expression"); }   but it always return false. something wrong with the code?


I have a JPEG image inside a PDF file, i know that it is a JPEG, because when i open the file with a hex editor i can see JFIF string present in it. How do i extract it into a separate file.  The particular file that i have only has a single image and it is on the first page.  I know that it is possible to use convert from the Image Magic package to convert the image, but this will mean that a double conversion will take place possibly making an image either worse quality or unnecesserily larger size.


Why am I notified of 87 new favorite questions when I only have five favorites?

Imagine my surprise to go looking at my user profile on mSO and find out that I've somehow added 87 new favorite questions. Yet, upon looking at the favorites tab, I see only five favorites.  What's going on here?


Draw a Gaussian curve over histogram: solution does not work

I would like to to create a histogram with an overlaying normal (Gauss) curve using PGFplots. I read some questions on this forum and I tried with \documentclass[usenames,dvipsnames]{beamer} \usepackage{pgfplots} \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} \begin{document}  \begin{tikzpicture} \begin{axis}[     ylabel = {N. students},     xlabel = {Heights (cms)},     xtick=data]     \addplot[ybar,fill=gray] coordinates {     (124,6)     (129,11)     (134,16)     (139, 10)     (144,5)     };    \addplot[domain={124:144}]{\gauss{0.71}{0.00944}}; \end{axis} \end{tikzpicture}  \end{document}  but I obtained:


which ac-dc adapter work with my device?

lets say I loose the acdc adapter of a device, like a laptop or a wireless router, how do you know that another adapter will work with my device? my assumption is that I have to match the same voltage and the amperes have to be equal or higher than the missing adapter. But I heard of people that just used an adapter that fit in the device and even with very different voltage specification the device worked, were they lying?.  And another thing: does some adapters just rectify the input making not suitable for other devices that require constant current?  I hope I am asking this in the right page, if not I'm sorry.


How to use multiple variables to be sent to Impala for SQL statements in Python

I am working on a machine learning project with big data from a hadoop based data warehouse. Therefore, I am using lots of different SQL statements during the day. Sometimes I am modifying the data according to some features and afterwards, I need to feed those variables of dataframe into SQL statement to collect other results from database.   Until now, I've done research on the web but in all related answers you have to indicate each variable as ? or %s in the query. But that method is not feasible for me as sometimes I need to feed more than hundreds of variables so I can not be like   select * from table where id in (?,?,?,.....,?)   My construction to run SQL queries is as follows:  from impala.dbapi import connect from impala.util import as_pandas conn = connect(host='0.0.0.0', port=0, auth_mechanism="blank")   impala_cursor = conn.cursor()   And to run the query   sql= '''SELECT name, id          FROM table          WHERE id in (---HERE COMES THE VARIABLES FROM PANDAS DATAFRAME---)         ''' impala_cursor.execute(sql) df_var = as_pandas(impala_cursor)   Any help is welcome. Thanks in advance!


MySQL search and replace some text in a field

What MySQL query will do a text search and replace in one particular field in a table?  I.e. search for foo and replace with bar so a record with a field with the value hello foo becomes hello bar.


Product of square of distances from vertices of a polygon of radius a

I want to find out the following product.  $\prod_0^{n-1}  (r^2 + a^2 -2ra\cos(2k\pi/n - \theta))$ I have been trying to use complex numbers but did not work out. The book I am reading the result is directly stated as $r^{2n} + a^{2n} -2r^na^n\cos(\theta)$. Please help.


Is there a way to zip a plain text file from a String in java?

I am currently creating a program, that creates a Zip file of stuff. Now, I would like to add some automatically generated "info.txt" file containing info about the Zip. Now, I would probably just generate it as a String and would like to put it in the Zip. Unfortunately, I have not found any way of doing this, so I would really appreciate some help.


Where are references and pointers enforced?

From what I understand, pointers hold the addresses of a value, and references can be thought as const pointers.  From this sample code:  int main() {     int i = 1;     int &ri = i;     int *pi = &i;     return 0; }   The disassembly, both pointer and reference look exactly the same:  main:     push    ebp     mov ebp, esp     sub esp, 16     mov DWORD PTR [ebp-12], 1     lea eax, [ebp-12]     mov DWORD PTR [ebp-8], eax     lea eax, [ebp-12]     mov DWORD PTR [ebp-4], eax     mov eax, 0     leave     ret   Are pointers and references only enforced by the compiler?


Why is Euler's totient function equal to $(p-1)(q-1)$ when $N=pq$ and $p$ and $q$ are prime in a clean intuitive way?

I had my own proof for it but I really don't like it (it feels not intuitive at all because it requires factoring!) and I feel there must be a more direct way to do it by a different counting argument.  If anyone has one it would be greatly appreciated!  My "proof":  Recall:  $\phi(N) = $ the number of elements that are relatively prime to $N$ (i.e. have a mod inverse)  $N = pq$ where $p$ and $q$ are prime.  Let's count the number of elements between $1$ to $N-1$ that are NOT relatively prime to $p$ and $q$. Those elements must have at least $p$ or $q$ as one of its factors. So let include all number that have $p$ as a factor and $q$ as a factor and are in the given range.  thus:  $0p, 1p, 2p, ..., kp, ..., p(q-1)$  and  $0q,1q,2q,...,jq,...,q(p-1)$  That gives a count of:  $N - p - q + 1 = pq - p - q + 1 = (p -1)(q-1)$  QED as required.  The reason I am not happy with this argument is that it seems to me there should be a clear intuitive way of doing it without having to factor or substitute the definition of $N$. This seems clear because multiplying $(p-1)$ by $(q-1)$ seems to be a very cute formula and it I would be surprise that its a coincidence because $(p-1)$ and $(q-1)$ also have clear interpretations. I am looking for a more intuitive clear reasoning, because it seems evident from the form of the formula that it should exist.


"Workin on ur problemz" should contain a link for retrying the request

Once in a while after I try to open a page I see . Usually this page only shows up once in a while and doesn't account for a permanent problem. So it would be nice to be able to try to open the original page again.  The URL for that page sort of contains the original URL - it looks like this  https://stackoverflow.com/error?aspxerrorpath=/OriginalSubPathITriedToOpen   so I can technically edit it in the "URL" field in my browser and try to reopen the page, but this is not very convenient (but definitely ).  Could you please provide a "you can retry this request" link the same way as  page?


Does it consider republishing(not the whole content) news with source as copyright?

Eg: According to BBC, China has said that it has successfully landed a   robotic spacecraft on the far side of the Moon, the first ever such   landing. The more information about this was published on CNN and they   clearly mentioned that it is..................   Above type of content consider as copyright or illegal?


Suppose you have a function 'normalize' which takes a list of numbers (representing a vector) as input and returns the normalized vector.  What should the result be when the vector is all zeros or the sum of its components is zero?


Are RSS and R^2 related to training error only?

While reading , I stumbled across the following (p. 210):     [...] the model containing all of the predictors will always have the smallest $RSS$ and the largest $R^2$ , since these quantities are related to the training error.   The text talks about feature (input) selection in regressive models. The reference is the following (p. 205):     The problem is that a low $RSS$ or a high $R^2$ indicates a model with a low training error, whereas we wish to choose a model that has a low test error.   I don't understand why the authors relate those error measures to the training dataset, since we can calculate $RSS$ or $R^2$ on a test dataset (given that I have enough data) too.  Is there any reason for this distinction?


The set of real numbers and power set of the natural numbers

I have learnt that the cardinality of the power set of the natural numbers is equal to the cardinality of the real numbers. What is the function that gives the one-to-one correspondence between these two sets?  I have also learnt that there exists no set whose cardinality is strictly between the natural numbers and the real numbers. Is there a proof of this or at least some intuitiveness behind it?


Is there a way to make the compiler copy-paste entire methods for performance?

I ran a quick benchmark and the overhead from calling methods is not small, especially if you have to do so hundreds of times per second.  I have been making several applications that need to run often more than a hundred times per second, so instead of making different methods when code is repeated, I just copy paste the code everywhere to avoid the overhead.  Is there a way to make the compiler do this for certain methods without me having to copy paste code everywhere? Is this even a smart thing to do and what alternatives are there to avoid branching to methods?


Double integral where inner integrand is with respect to $y$ first

My question: $$\iint_D  xy \,dA\,,$$ where $D$ is the region bounded by $y = x - 1$ and parabola $y^{2} = 2x + 6$  Quick question, what does the inner integrand represent? Anyway here's how I set up the double integral with respect to y as the inner integrand: $$\int_{-1}^{5} \int_{-2}^{4} xy \,dy \,dx$$ $$\int_{-1}^{5} \int_{-2}^{4} (y+1)y \,dy \,dx$$ $$\int_{-1}^{5} \int_{-2}^{4} (y^2 + y \,dy \,dx$$ $$\int_{-1}^{5} \left[\left(\frac{y^3}{3} + \frac{y^2}{2}\right)\right]_{-2}^{4} \,dy \,dx$$


Dashed draw with a node including a fraction

Is this intended behavior (with plain XeTeX):  \input tikz \tikz\draw[dashed] node {$3T\over4$}; \bye   It renders as: !?  The fraction line is dashed, too! Is this intentional? Is there something I can do to change that? I know I can separate the fraction into its own node, but other than that?