I have a HD display on my laptop (Dell Latitude E7250) and a Full HD one on my docking station. When I dock my laptop the window positions often (yet not always) get messed up. Sometimes (some of) the windows get minimized and sometimes they switch to different workspaces, e.g. (1,1) to (1,6), usually staying on the same row.   Running Ubuntu 16.04 / Unity with 24 workspaces (6x4) (yes, I need that much).  Is there any way to fix this? Saving the layout somehow could help as I always have certain windows open on certain workspaces (e.g. IntelliJ Idea on (2,3).  Thanks.

I'm experiencing a bug where when the machine comes back from standby a monitor connected via displayport (MST) does not come back on, however the windows are still in the area it cover if it did come on.  The only way to recover from this short of a restart is to disable and reenable the display now I can do that via the command line just fine but when the display is disabled all the windows get rearranged onto the remaining screen.  Is there a way to persist the window positions and restore them so my script could do this sequence:-   enumerate windows, store positions display off (messing up positions) display on (making the display work again, yay!)  restore position of the windows   I can do step 2 and 3 just fine but I'm lost for step 1 and 4  I know I can force a position per app but that's not what I want as I could be doing different things and have the same apps in different positions, I also have multiple terminals open, I need the current positions storing somehow and restoring.  Any help would be appreciated!


Somewhat similar to:    There's no menu for  in a 16.04 install literally days old.  In this case, unity is working, and pan has always worked sufficiently that I expect this is somewhat new.  If this is a duplicate, pardon, a search for "no menu" shows many, many results.  The menu was there yesterday.  I restarted the application, but haven't yet rebooted.

I did a fresh install of Ubuntu 16.04 and found that menus for many applications do not show on the menu bar, as it is configured in 'Settings > Appearance'. For example: menus for Filezilla, Geary, Libreoffice Writer and Software center do not show. I have not tested every app, but I can tell you that browsers (Chrome, Firefox) do have their menus on the menu bar. In addition, if I change the configuration to show menus "in the window's title bar", they don't show either.  Any clues?  Best regards.


I am using a MacBook Pro Mid 2012 with MacOS X 10.15.4. I cannot find this Keychain in the Keychain app.

I, too, am suddenly getting this message.  I don't see a Keychain First Aid option in Keychain, and the two Login Keychain Settings were already unlocked.  Any other ideas for what the error message is all about, and what I should do about it?


When i am coding in netbeans, java and mysql, in some point i couldn't insert values where db table having auto increment primary key (user_id).            String sql = "INSERT INTO `user`(`fname`, `lname`, `uemail`,          `upass`, `role_id`) VALUES (?, ?, ?, ?, ?)";         //ps.setInt(1,2);         ps.setString(1, fname);         ps.setString(2, lname);         ps.setString(3, uemail);         ps.setString(4, upass);         ps.setInt(5, Integer.parseInt(urole));   I get below error:     Exception in thread "AWT-EventQueue-0"                java.lang.NullPointerException             at mxm.MainFrame.btnURegisterActionPerformed(MainFrame.java:1365)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I get a 'Failed to load package lists' - this didn't work:  sudo rm /var/lib/apt/lists/* -vf sudo apt-get update   Here is a screenshot   I am using the live cd

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


If we write: void foo() { #warning "Danger Will Robinson!" }  we'll get a warning when compiling foo(). Now, What I want to do is for the compilation not to emit a warning, but for a warning to be emitted if foo() is called. Is that possible, using g++ and/or clang++? Note: This question is somewhat similar to , about marking functions as "deprecated" (a-la C++14's [[deprecated]] attribute). However, it's a different semantic. I do not want people to get the notion that my function is deprecated, but rather get a custom warning.

I have a method in an interface that I want to deprecate with portable C++. When I Googled for this all I got was a Microsoft specific solution;  and . A second prize solution would be to ifdef a MSVC and a GCC solution.


It's probably beginner question but I'm going through documentation for longer time already and I can't find any solution. I thought I could use implode for each dimension and then put those strings back together with str_split to make new simple array. However I never know if the join pattern isn't also in values and so after doing str_split my original values could break.  Is there something like combine($array1, $array2) for arrays inside of multi-dimensional array?


Suppose that $\text{char}(F)=p\neq\emptyset$, and let $$f= X^{p^{n}}-a\in F[X],\, \text{for some}\, n\in\mathbb N.$$ I need to prove that  The irreducible factorization of $f$ in $F[X]$ has the form $f= \big(X^{p^{k}}-c\big)^{p^{n-k}}$ for some $c\in F$.  $f$ is irreducible in $F[X]$ iff $a\notin F^p.$   Thanks for any help.

An exercise from Lang:  Let $k$ be a field. Let $n$ be a nonnegative integer. Consider the polynomial $x^{p^n}-a \in k[x]$. Assume that $\text{char}(k) = p > 0$. Prove that either the polynomial $x^{p^n}-a$ is irreducible over the field $k$ or there exists a $b\in k$ such that $a = b^p$.  How to prove this statement? I am a little bit confused with this statement.


I have php comment system like Facebook where user can post comment and reply. when I make 2 reply in a comment one after one then I cannot make 3rd reply in same comment. Also here cannot work emoticons slide and upload toggle. But can reply others comments. I cannot understand this type of jQuery behaviour!!! I also can't understand, can php create this type of problem?   For emoticons display yet I create review window behind textarea And make my textarea transparent. So here I used jQuery bind(). All comment and reply submit by AJAX.  When i going to reply 3rd time Its not work in same comment. But after refresh its work for more 2 reply only.    Here is some related jQuery:  $('.maintbox').on('keyup',function() {     $(this).css('height','auto');     $(this).css('height',Math.max(this.scrollHeight)+'px'); }); $('.replycom').livequery("click",function() {     var VID = $(this).attr('id').replace('replycom','');     $("#parent_id").attr("value", VID);     $("#replycom"+VID).bind("keyup", function() {        $("#replycom"+VID).html($(this).val());        $(".review"+VID).html(smilyMe($("#replycom"+VID).val()));     });     return false; });  $('.showhide_emobox').livequery("click",function(){     var EID = $(this).attr("id");     $("#emobox"+EID).slideToggle(); }); $(".embtno").livequery("click",function(event){     var emotiText = $(event.target).attr("alt");     var EID = $(this).attr('id').replace('','');     var prevMsg = $("#replycom"+EID).val();     $("#replycom"+EID).val(prevMsg + emotiText);     $(".review"+EID).html(smilyMe($("#replycom"+EID).val()));     $('#emobox'+EID).fadeToggle(); });   my form:  echo'

 <form action="" method="post" class="repfrm'.$rows['id'].'" id="prepfrm"> <fieldset id="cmntfs">     <input type="hidden" name="username" id="author" value="'.$_SESSION['username'].'"/>     <input type="hidden" name="url" id="url" value="" />

        <textarea name="replycom" id="replycom'.$rows['id'].'" class="replycom" placeholder="Type your comment ..."></textarea>

     <input type="hidden" name="parent_id" id="parent_id" value="'.$rows['id'].'" />     <input type="hidden" name="tutid" id="tutid" value="'.$tutid.'" />     </form>     // Image upload system here
     <button type="submit" name="submit" value="" id="repl'.$rows['id'].'" class="replyfrm">Post Reply</button>     </fieldset>

';

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Today in maths class something occurred to me. How can this be:     $\sqrt{(-5)^2} = ((-5)^2)^{1/2} = (-5)^{2(1/2)} = (-5)^1 = -5$   $\sqrt{(-5)^2} = ((-5)^2)^{1/2} = 25^{1/2} = 5$   This could theoretically prove that $5$ equals $-5$.  Is there any logical reason to explain this?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


It seems like if Stack Exchange has not registered correctly how many votes my Stack Overflow question has. From my  I see my question to have 7 votes  When if I go to the  it only has 4. Feature or bug?

post of mine has a score of 13, but the  shows that it has 14:  This seems to be a recur of  bug; @Catija's  says it's been fixed.  Can we fix that (again)?


I am trying to install this banking app from Google Play:   This app is allowed to be installed only by users in Poland. My Google account was created in Brazil, but I am in Poland since almost 7 months, so I should be allowed to install this app.  On Google Play, it says: This app is incompatible with all of your devices., further more, on my phone's tooltip, it reads: This item cannot be installed on your device's country..  That is very problematic, as this device was bought in Poland, is using a Polish SIM card and most importantly, it is physically in Poland, so how can it not be compatible?  How can I force-install this app on my device? It is a Sony Xperia Z Ultra, rooted and flashed with CM12.1.

I'm travelling to country X. I want to install an application which isn't available in my country, but is available in country X; but I prefer to download and install it in advance, while the data connection is still cheap.  Unfortunately, the Play Stores does not allow me to install this app. Is there any way to circumvent this limitation?


Let $p$ be a prime number.  up to isomorphism, there is exactly two abelian groups of order $p^2$.   It is easy to see those two are $\mathbb{Z}_{p^2}$ and $\mathbb{Z}_{p}\times\mathbb{Z}_{p}$. It is easy to see that if their exist another one then it should not be cyclic. But how to prove exactly?

The book I'm reading defines the Fundamental Theorem of Finite Abelian Groups in the usual way that a finite abelian group is isomorphic to a direct product of cyclic groups $\mathbb{Z}_{{p_1}^{e_1}} \times \cdots \times  \mathbb{Z}_{{p_r}^{e_r}}$, but then it also states that the group is isomorphic to $\mathbb{Z}_{m_1} \times \cdots \times  \mathbb{Z}_{m_t}$ where for each $i = 1,...,t-1$ we have $m_i | m_{i+1}$. How can this be if the groups orders are supposed to be relatively prime.  If anyone can give an example of how this works I would greatly appreciate it.


I Installed Ubuntu Desktop on Windows 10.  Now the grub menu is not showing windows 10 in boot menu.  Grub repair gave me the following link.    Kindly help me to recover back the Windows 10.  Regards Jayamohan.M

I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?  When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.    I ran command sudo fdisk -l and here is log ():  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xc3ffc3ff     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1953525167   976762583+  ee  GPT Partition 1 does not start on physical sector boundary.


Please explain me the meaning of "just so you know" and give some examples of  using this phrase.  What is the difference between "just so you know" and "for your information"?

“just so you know” ()   What does this mean? And what grammatical role does “so” have?


We're a software development company and previously outsourced the HW side of business but now we're looking into building our own private cloud. We recently purchased a few servers, one of which is supposed to act as a central storage. The specs are as follows:   Chassis: CSE-826BE16-R920LPB Motherboard: Supermicro X10SLL-F CPU E3-1200v3,Intel C222, 2GbE, Up to 32GB DDR3 ECC,2xSATA3,4xSATA2, 4xDDR3 IPMI 1x CPU Intel Xeon E3-1220v3 - 3.1GHz, 8MB cache, 4core, HT, LGA1150, 80W 1x heatsink SNK-0046A4 Activ 2U 4x 8GB Samsung M391B1G73QH0-CK0 1600MHz DDR3 ECC Unbuffered 2R×8  2x SSD 80GB Intel DC S3500 Series 2,5" SATA3, read 340 MB/s, write 100 MB/s  10x HDD 2TB Seagate Constellation ES.3 ST2000NM0023 3,5" SAS2, 7200rpm, 128MB   The Seagate drives are set up as RAID 6 array. The SSDs are in RAID 1 and act as maxCache container which we turn on and off using maxView Storage Manager.  My first question - does this configuration make sense for a central storage of a private cloud where we plan to have other 3 compute nodes with two CPUs and lots of RAM on them?  My second question - would a similar configuration with less HDDs make sense for a MySQL database server for a reporting system with many concurrent requests? Or would it make more sense to use the SSDs for MySQL's temp space where it creates temporary tables.  And now for the main question... I tried to measure performance of this server with and without SSD cache (maxCache). The best tool I came across was iozone (iozone -a -g 8G) which produced these charts: . I am totally puzzled as it looks like the performance with maxCache is in most cases lower than without it.  I was wondering if iozone is a good way to test for real-life scenarios or if I'm doing this all wrong.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


So im a newbie and im trying to get my game to get input from keyboard to move a fixed distance (lets say 50) so if you press up on arrow key you go up by 50 and etc. When i run the game i cant use the arrow keys to move the hexagon..      import java.awt.*;     import javax.swing.*;     import java.awt.image.*;     import javax.imageio.*;     import java.io.*;     public class SuperHexagon extends JFrame {   public static final int WIDTH = 1440, HEIGHT = WIDTH / 16 * 9;     public SuperHexagon() {     setPreferredSize (new Dimension(WIDTH, HEIGHT));     setMaximumSize (new Dimension(WIDTH, HEIGHT));     setMinimumSize (new Dimension(WIDTH, HEIGHT));      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     setResizable(false);     setLocationRelativeTo(null);      setVisible(true);   }     public static void main (String[] args) throws IOException {     JFrame frame = new SuperHexagon();     int hexX = (WIDTH / 2) - 23, hexY = (HEIGHT / 2) - 23;       Graphics g = frame.getGraphics();     BufferedImage bgImage = ImageIO.read(new File("Images/gameBG.png"));     BufferedImage hexImage = ImageIO.read(new File("Images/hexagon.png"));     frame.addKeyListener(new KeyInput());      g.drawImage(bgImage, 0, 0, null);     g.drawImage(hexImage, hexX, hexY, null);     g.dispose();      } }   The key inputs:  import java.awt.event.KeyEvent; import java.awt.event.KeyAdapter;   public class KeyInput extends KeyAdapter {    /* Coordinates that player can move (3x3 grid)    * (645,330)(720,330)(795,330)    * (645,405)(720,405)(795,405)    * (645,480)(720,480)(795,480)    */    public void keyPressed(KeyEvent e, int hexX, int hexY) {     int key = e.getKeyCode();      if (key == KeyEvent.VK_UP) {       hexY -= 75;      }     if (key == KeyEvent.VK_DOWN) {       hexY += 75;     }     if (key == KeyEvent.VK_RIGHT) {        hexX += 75;     }     if (key == KeyEvent.VK_LEFT) {       hexX -= 75;     }   }  }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


How to describe a person in a word who keeps mentioning about his own life story or about himself for every topic that is being conversed? Be it interesting or boring, he has the ability to pick out something that has happened to him or he himself creates a chance to talk about himself.   Edit: The person is not selfish. He does care for others. I am just saying that the person relates everything to his life and talks about it, that too not even in a conceited way. This person is experienced enough to relate everything to things that has happened to him.

I was trying to convey my opinion about a person I knew, when I faced this question. I had to describe a person who cared only about himself: his personal well-being, wealth, luxury, happiness are his only priorities in life. He does not really care for his family members, or spare some time or thought to alleviate their problems.  What adjective is best suited to describe such a person? My instantaneous choice was along the lines of self-important or egotistic, but these adjectives intend “thinking highly of oneself ”, which is not what I meant.   Nouns describing such a person are also welcome. I am looking for a word as little disparaging as possible.


I need to make a connection like the red one without making short circuit with  the blue connection in the following circuit.     In the answered question ,both P1 and P2 are already shifted at x-axis "cascaded", but in my case the two mosfets M1 and M4 are y-axis shifted "cascoded".   \begin{circuitikz} \ctikzset{tripoles/mos style/arrows} \draw (0,0)     node[nmos] (nmos2) {}  node[right] at (nmos2) {M2} (nmos2.G) node[nmos, xscale=-1, anchor=G] (nmos1) {} node[left] at (nmos1)          {M1}  %below left,yshift=0.3cm (nmos1.S) -- (nmos2.S) node[sground] {} (nmos2.D) node[nmos, anchor=S] (nmos3) {} node[right] at (nmos3) {M3} (nmos3.G) node[nmos, xscale=-1, anchor=G] (nmos4) {} node[left] at (nmos4)           {M4}  (nmos3.D) to[short] ++(0,2) node[inputarrow,rotate=270] {} node [right,]{$i_{OUT}$} to[short] ++(0,0.5) (nmos4.D) to[R,l=$R_1$,n=R1] ++(0,2)  to[short] ++(0,0.5) node[inputarrow,rotate=270] {} node [left,]{$i_{IN}$} to[short] ++(0,0.5)  (nmos4.D) node[circ]    {} -| (nmos2.G) node[circ] {} (R1) ++(0,1) node[circ] {} -| (nmos3.G) node[circ] {}  ; \end{circuitikz}

I'm looking for a way to cross wires in Circuitikz.    1B in the above picture shows what I'm after.


I have Ubuntu 16.04. Recently I downloaded a Nintendo DS emulator (DesmuME) with sudo apt install desmume. It seemed like I installed it successfully, but if try to search for the file desmume it doesn't show it anywhere. What should I do?

I want to know where I can find my installed application when I installed it on Ubuntu using package manager.  I installed RabbitMQ and ran locate rabbitmq which gave me following result:  /home/anupamg/.m2/repository/com/rabbitmq /home/anupamg/.m2/repository/com/rabbitmq/amqp-client /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2 /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/_maven.repositories /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar.lastUpdated /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar.sha1 /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom.lastUpdated /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom.sha1 /home/anupamg/Downloads/rabbitmq-server-generic-unix-2.4.0.tar.gz


I'm developing a single-page and I have a shared footer layout, I want to keep it at the bottom of the page always and even I would like to know if there is a way not to visualize it in some route even though it has been declared in the app.component.html   I have tested on scss all possible footer positions  app.component.html  <div class="grid-container"> <main [@fadeAnimation]="o.isActivated ? o.activatedRoute : ''"> <router-outlet #o="outlet"></router-outlet> </main> <rb-footer class="footer"></rb-footer> </div> <rb-modal></rb-modal>   app.component.scss  :host {     .grid-container {       display: grid;       grid-template-rows: auto 1fr auto;       grid-template-columns: auto;       height: 100vh;     }  .footer {   position: initia   width:100%;   height:40px;    }    }

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


how to install rsh in ubuntu ? rsh stands for restricted shell and not remote shell.   I am using ubuntu saucy.

I wanted to try out rsh (or rshell?) - the old, insecure way of logging in remotely.   On my Ubuntu 11.04, it turns out an rsh command exists:  $ which rsh /usr/bin/rsh   ... however, it turns out it is a mere symlink for ssh:  $ ls -la `which rsh` lrwxrwxrwx 1 root root 21 2011-03-25 16:07 /usr/bin/rsh -> /etc/alternatives/rsh  $ ls -la $(readlink -f `which rsh`) -rwxr-xr-x 1 root root 391580 2011-04-02 12:16 /usr/bin/ssh   Does this "old" rsh exist in Ubuntu repositories - and if so, how do I install it? Also, is rsh also split in client and server packages - and if so, which packages are those?


What I had tried till Now  string Value =""; foreach (List<string> val in L1) {    Value = Value + string.Join(",", val) + " // "; }   Where L1 is of datatype List <List<strings>>  This Works, But its take almost n half hour to complete Is there as many fastest and simple way to achieve this.

What's the most efficient way to concatenate strings?


I have been trying to figure this out for days with no luck. I am working on Sharepoint 2013 application. In my application, the fields will be validated and display the error if the input is wrong. Just like the picture below:   However, when I attach any document, the error is NOT displayed on the same page. Instead it will direct to a new page:    This only happens when there is attachment.   My code which is called by ItemAdding() is below:  private bool ShowError(SPItemEventProperties properties)     {         if (errorMsg.Length > 0)         {             string temp = errorMsg.ToString().Replace("\r\n", " | ");              properties.Status = SPEventReceiverStatus.CancelWithError;             properties.ErrorMessage = temp;              return false;         }         return true;     }   Please advise. I want the error to be displayed on the same page just like without attachment.

I am trying to display an error message in SharePoint 2013. I added the following code inside my ItemAdding() event receiver to force it to have error:  properties.Status = SPEventReceiverStatus.CancelWithError; properties.ErrorMessage = "test";   It works okay, I can see the error message.  However, when I attach any files, and try again, after saving, the attachment will disappear. When I attach again, I will get a server error:   Please advise.


I am a new user in Ubuntu and installed 16.04 LTS 64-bit. I am seeing an error when I try to update  $ sudo apt-get update  N: Skipping acquire of configured file 'partner/binary-foreign-architecture/Packages' as repository 'http://archive.canonical.com/ubuntu xenial InRelease' doesn't support architecture 'foreign-architecture'   17 times the same line repeats  I have checked and read other related questions, but they are talking about a Google Chrome issue, but I don't have it in my system, All I have is Skype installed (that even doesn't run, it just appears as an icon in dash for some time),   From another  I have tried   $ dpkg --print-foreign-architectures i386 foreign-architecture   as you see it doesn't show me amd64.

I'm a new user of Ubuntu 13.10.  I recently tried to resolve a Skype installation issue and added some PPA involving binary-1386.  Every time I run sudo apt-get update, I get the following error:  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/saucy/Release  Unable to find expected entry 'restricted/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/saucy/Release  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) ... ... E: Some index files failed to download. They have been ignored, or old ones used instead.   I have spent the last two hours trying to resolve this issue, and made changes to my sources.list file by resetting to.the default saucy settings, but these errors are still occuring.  I've also unchecked everything in Software and Updates section, but this still seems to appear.  The error messages seem to be related to the 'binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) issue as shown above.


I recently tried to instantiate a 4x4 constant (0's) array by using  a = [[0] * 4] * 4   which instantiates the array a as  [[0, 0, 0, 0],   [0, 0, 0, 0],   [0, 0, 0, 0],   [0, 0, 0, 0]]   However, this does not create an array of unique elements as altering an element in any of the arrays changes all of them, e.g.:  a[0][0] = 1   alters a to   [[1, 0, 0, 0],   [1, 0, 0, 0],   [1, 0, 0, 0],   [1, 0, 0, 0]]   I think I understand why this happens (copies of lists copy the list's pointer and do not create separate copies unless specified, unlike int's, etc.) but am left wondering:   Is there any quick and easy way to instantiate a constant array (without using any external modules, such as NumPy) with unique elements that can later be altered by simple a[i][j] = x addressing?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have the following task:  Prove, that four different square numbers can't create an arithmetic sequence(obviously, the $0,0,0,0$ case is forbidden).  How can I prove this statement? I tried to write down the numbers in their form: $a<b<c<d \rightarrow a^2 , b^2, c^2, d^2$ is my sequence, and this can't occur:  $b^2-a^2=D, c^2-b^2=D, d^2-c^2= D, D \in \mathbb{N^+}$ is a fixed number. What should I do after this? Summing the equations didn't really help me to go further.  Thanks in advance for the help.

It is easy to find 3 squares (of integers) in arithmetic progression. For example, $1^2,5^2,7^2$.  I've been told Fermat proved that there are no progressions of length 4 in the squares. Do you know of a proof of this result?   (Additionally, are there similar results for cubes, 4th powers, etc? If so, what would be a good reference for this type of material?)    Edit, March 30, 2012: The following  in MO is related and may be useful to people interested in the question I posted here.


I am trying to make an if statement to change the value of 3 variables. The problem is that i don't get any value even if the condition is true:  here I get the string that I want to check:      final String[] pos_categ ;     pos_categ = intent1.getExtras().getStringArray("categ");   Here I implement the variables that i want to change:      String[] title = null;     String[] eng = null;     final String[] dan = null;   Here is the if statement:      if (pos_categ[0]==lessons_titles[0]){         title[0] = lessons_titles[position[0]];         eng[0] = eng_version[position[0]];         dan[0] = dan_version[position[0]].toLowerCase();     }     if (pos_categ[0]==lessons_titles2[0]){         title[0] = lessons_titles2[position[0]];         eng[0] = eng_version2[position[0]];         dan[0] = dan_version2[position[0]].toLowerCase();     }     if (pos_categ[0]==lessons_titles3[0]){         title[0] = lessons_titles3[position[0]];         eng[0] = eng_version3[position[0]];         dan[0] = dan_version3[position[0]].toLowerCase();     }     if (pos_categ[0]==lessons_titles4[0]){         title[0] = lessons_titles4[position[0]];         eng[0] = eng_version4[position[0]];         dan[0] = dan_version4[position[0]].toLowerCase();     }     if (pos_categ[0]==lessons_titles5[0]){         title[0] = lessons_titles5[position[0]];         eng[0] = eng_version5[position[0]];         dan[0] = dan_version5[position[0]].toLowerCase();     }     if (pos_categ[0]==lessons_titles6[0]){         title[0] = lessons_titles6[position[0]];         eng[0] = eng_version6[position[0]];         dan[0] = dan_version6[position[0]].toLowerCase();     }      title_view.setText(title[0]);     eng_view.setText(eng[0]);     dan_view.setText(dan[0]);   Can someone tell me where I've made a mistake ?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Using standard mysql functions is there a way to write a query that will return a list of days between two dates.  eg given 2009-01-01 and 2009-01-13 it would return a one column table with the values:   2009-01-01   2009-01-02   2009-01-03  2009-01-04   2009-01-05  2009-01-06  2009-01-07  2009-01-08   2009-01-09  2009-01-10  2009-01-11  2009-01-12  2009-01-13   Edit: It appears I have not been clear. I want to GENERATE this list. I have values stored in the database (by datetime) but want them to be aggregated on a left outer join to a list of dates as above (I am expecting null from the right side of some of this join for some days and will handle this).


I'm trying to solve the following problem:     Embed $\mathbb{R^2}$ in the projective plane $\mathbb{RP^2}$ by the map $(x,y)\rightarrow [1,x,y]$. Find the point of intersection in $\mathbb{RP^2}$ of the projective lines corresponding to the parallel lines $y = mx$ and $y = mx+c$ in $\mathbb{R^2}$.    So in the projective plane the two lines correspond to $[1,x,mx]$ and $[1,x,mx+c]$I get that somehow the point of intersection is the point at infinity, but that point would have coordinates $[0,1,m]$ and that doesn't fall on our line. So I'm not sure I understand how this works

Can someone please help me solve this problem? I am a bit confused.  Embed $R^2$ in the projective plane $RP^2$ by the map $(x, y) → [1, x, y]$. Find the point of intersection in $RP^2$ of the projective lines corresponding to the parallel lines $y = mx$ and $y = mx + c$ in $R^2$ (where $c \neq  0$).  My attempt: So this transformation sends each point in $R^2$ to the line through the origin which is generated by the vector $(1,x,y)$. Then the line $y=mx$ will go to the set   $[1,x,mx],  x \in \Re, x \neq 0 $.  By the same reasoning, $y=mx+c$ will go to the set {$[1,x,mx+c],  x \in \Re, x \neq 0 $}  The problem is I can't quite understand how to define the points at infinity.I don't want to just do the question, I'd like to understand the basics and will be very grateful if someone could help me.


In the following example a bug appears which I cannot explain. in the pdf-output, the link to Theorem 1 does not work correctly, clicking it jumps to the beginning of the document BLABLA. The printed reference is correct, just the link is broken.  \documentclass{article}  \usepackage[ngerman]{babel} \usepackage{amsthm}   \newtheorem{Thm}{Theorem}  \usepackage{hyperref}  \begin{document}  BLABLA \newpage  \begin{Thm}\label{label1}       % a theorem \begin{enumerate} \item item1 \end{enumerate} \end{Thm}  blublblbu reference~\ref{label1}        %references the theorem \end{document}   Somehow it seems to be related with enumerate, since the problem vanishes when I replace   \begin{enumerate}    \item item1   \end{enumerate}   by just some text

I have the following code:  \usepackage{hyperref} \newtheorem{thm}{Theorem}  \begin{thm} \label{mythm}    \begin{enumerate}       \item     \end{enumerate} \end{thm}  \ref{mythm}   The ref prints the right number. However, when I click on it, it will lead me to a wrong page (basically, to the beginning of the document).  pdflatex also has some warning.  If I add $ $ between \begin{thm} and \begin{enumerate}, the problem disappears, but now, the enumeration starts a new line.  Is there any way to fix this?


Looking for the name of a story about a time traveler who goes back to WW2 England to prevent the development of a cure for cancer. The traveler is a well known cancer patient, who appears at a clinic where a doctor has made a breakthrough discovery that will lead to a cure for cancer. The doctor does not even know the implications of his discovery yet, and the traveler eventually morphs himself into a bomb and blows up the doctor, himself, and the lab.

The short story was part of an anthology.  A cancer clinic near a war zone receives a famous cancer patient who they attempt to cure.  At the end they find a cure, but the cancer patient reveals he doesn't want to be cured. He instead wants to destroy any cures as he is nothing but a human-shaped tumor.  According to him, cancer is the next phase in human evolution. He transforms into a bomb and blows up the clinic (the better to hide the evidence in the war zone), reforms to his original shape and walks off.


function chBody() { var color = prompt("Enter colour"); document.body.style.background = color; }   For learning purposes...   I'm trying to add an !important property after color to overwrite my css.  these are what I tried. I think the first one worked and then stopped working in codePen. maybe  color !important; color + " !important"; color + "!important";   Any help or a point in the right direction would be much appreciated.   If this method is wrong could I just use setAttribute() instead?  -- Thanks  ** The question marked as a duplicate of this isn't really a duplicate and didn't actually give what I was looking for whereas the comment in this answer did. Seems salty af

Title pretty much sums it up.  The external style sheet has the following code:  td.EvenRow a {   display: none !important; }   I have tried using:  element.style.display = "inline";   and  element.style.display = "inline !important";   but neither works. Is it possible to override an !important style using javascript.  This is for a greasemonkey extension, if that makes a difference.


Simple question (I think).  Is time infinitely divisible?  I heard that it was, although not from a particularly explanatory source. If so, are we sure that it is, without a shadow of a doubt?

I was coding a physics simulation, and noticed that I was using discrete time. That is, there was an update mechanism advancing the simulation for a fixed amount of time repeatedly, emulating a changing system.  I though that was interesting, and now believe the real world must behave just like my program does. It is actually advancing forward in tiny but discrete time intervals?


How to show that for sequence $x_1=2$, and $x_{n+1}=\frac12\big(x_n+\frac2{x_n}\big)$; for all $n$, $(x_n)^2>2$ ?   I tried using induction: let  $(x_k)^2>2$, so $(x_{k+1})^2=\frac14\big(x_k^2+\frac4{x_k^2}+4\big)>\frac32+\frac1{x_k^2}$. I can't go further!

For any $a > 0$, I have to show the sequence $x_{n+1}$ $=$  $ \frac 12$($x_n+ $ $ \frac {a} {x_n}$)  converges to the square root of $a$ for any $x_1>0$.  If I assume the limit exists ( denoted by $x$) then,  $x$ $=$  $ \frac 12$($x+ $ $ \frac {a} {x}$) can be solved to $x^2 = a$  How could I show that it does exist?


I am creating a two cloud pages. One cloud page has one email input field and two input submit fields, one for Ok and one for Cancel. When the user writes their email address in the input field, I want to run validation onClick of the OK button. I created a javascript function within my cloud page and called it on my OK button. For some reason, my validation isn't being called successfully. I tested email addresses without "@", ".", and without both "a" and ".". When I click the OK button, it redirects me to the next cloudpage where people can sign up for different event communications. How can I validate email correctly? My code: <script runat="server">       function checkEmail() {         var email = document.getElementById('txtEmail');         var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4)+$/;         if (!filter.test(email.value)) {           alert('Please provide a valid email address');           email.focus;           return false;         }       }     </script>  Email Input <input type="txtEmail" name="Email" value="%%emailaddr%%" data-field-type="Email" required="required" data-validation-message="Please provide your email address.">  OK Button  <input type="submit" value="OK" onClick="checkEmail();">

I am creating a custom form on a Salesforce Marketing Cloud Landing Page. This page will have information such as Email address, first name and last name pre-filled from an email, however there will be some cases where emails can be entered by the customer. What is the best way to validate email addresses on form submit? E.g. a regex to look at overall structure or is there a better way?


The actual post was here but it was an  and I couldn't find an answer online or with the infrastructure guys from my company as most of them already left.  I have a Windows 2008 Terminal Server. Terminal Server Configuration(licence server, session broker, etc) is managed by group policy. If i want to disable logon via:  change logon /disable   The Error Message: "Connections are currently ENABLED by Group Policy for this machine, unable to change."  Is there a smart way to fix this?  I would like to do this using a CMD as the company is moving towards automation but I am stuck.  I'll really appreciate a response or answer to this.  Thank you

I have a Windows 2008 Terminal Server. Terminal Server Configuration(licence server, session broker, etc) is managed by group policy. If i want to disable logon via:  change logon /disable  The Error Message: "Connections are currently ENABLED by Group Policy for this machine, unable to change."  Is there a smart way to fix this?  btw. is there some way to look into the session broker database?


If $k, m, n$, are natural numbers and $k \leq n$ What is the final answer of this:  $$\sum_{r=0}^{m}\frac{k\binom{m}{r}\binom{n}{k}}{(r+k)\binom{m+n}{r+k}}$$

If $k, m, n$, are natural numbers and $k \leq n$ What is:  $$\sum_{r=0}^{m}\frac{k\binom{m}{r}\binom{n}{k}}{(r+k)\binom{m+n}{r+k}}$$


Just wondering: what is the front end of SE sites? Is it  like Facebook?  A quick headers check (using whatismyip) didn't reveal any details.  The site does hold a huge amount of data and appears to work quickly, so I'm curious about seeing some of the magic involved. :)

What tools and technologies are used to build the Stack Exchange Network?  See also:


I want to be specific about terms. When I say DMZ I'm talking about a place where you would put servers that expose a service to untrusted networks like the Internet, or in some cases merely networks that are less trusted.  I am attempting to shore up our network perimeter by auditing what we expose through our firewall. The firewall I am talking about is NOT a Microsoft ISA server and never will be. If any of you are in this situation you know that the ports required to allow a member server to connect to domain controllers is pretty extensive. Microsoft in attempting to address this provides several designs using RODC's to reduce the count of open ports, but even if it were just one port the Active Directory itself is a trove of intel for an unauthorized person who has compromised a DMZ member server.  What is the consensus about AD member servers in a DMZ? Too insecure, or acceptable risk? Assuming the former (where I'm leaning), aside from local account authentication are there any more secure options than AD for authenticating users who sign onto DMZ Windows servers? If not, then is there a mechanism that can associate a local account with a real person at login for auditing purposes? It seems like the only option for tracking users' behaviour in a standalone server DMZ would be to create local machine accounts for every user who logs onto the servers.  Of course, ideally you don't have people logging on to servers for normal operations; the whole thing should be managed by proxy using services accounts (that's a whole 'nother discussion). But right now our operation isn't "there" yet. We're hopeful that DSC makes that feasible.  The focus of Microsoft's recommendations are to me either impractical or missing the point.  An Active Directory for just a DMZ reduces an intruder's ability to gather intel, but still leaves the vector pretty much in-place.  The best their solutions can do is split the risk baby by limiting that intel to the DMZ (plus whatever else your DMZ AD might service).  The trade-off is an AD for every DMZ.  So now your admins are managing one account + N DMZ's.  Not that Microsoft is listening, but there needs to be a middle way that auths a windows user but doesn't require the use of credentials that can do things like enum LDAP users.

What is the best way to manage user accounts for Windows servers in a DMZ? We are expanding our web presence and adding several IIS servers to our DMZ. I would prefer not to manage a bunch of local accounts or, on the other hand, expose our internal Active Directory servers directly to the DMZ either. Is there a standard approach to this problem?


If I Grill 1.5” pork chop on Monday and stored it in the fridge wrapped in tinfoil...will it still be good for me to eat it five days later on Saturday or has it gone bad in that time??

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I was wondering about the way we refer to the term "moments". In statistics and probability the first moments is the mean $$E[X^1] $$ The second moments is the variance: $$E[(X-E[X])^2]$$ I notice that there's a difference in which we define moments. In the first case the $k'$th moment is $E(X^k)$ and the second case it is $E[(X-E[X])^k]$. Why is there a difference? In Common scientific language when people refer to the third moment is it then $E[(X-E[X])^3]$ or $E[X^3]$

:     For the second and higher moments, the central moments (moments about the mean, with c being the mean) are usually used rather than the moments about zero, because they provide clearer information about the distribution's shape.   Could someone explain/convince me why this is true? Why is there a discrepancy? This has always bugged me and I have never seen a good explanation for it -- I just don't quite understand why/how standardization provides "clear" information in one case but not in another.  For example:     To compute the skewness, why not standardize both the mean and the variance?   To compute the kurtosis, why not standardize the mean, the variance, and the skewness? ... To compute the nth moment, why not first standardize all the mth moments for m < n? If standardization is useful then why only do this for m = 1?


If $A$ is a normal matrix, how can I show that $A^*$ can be written on the form $A^* = AU$ where $U$ is a unitary matrix? Help would be much appreciated.

This can be found at , but I don't know how to prove it:  $A$ is normal if and only if there's a unitary matrix V,s.t. $A^*=AV$


I am trying to grab the extension of an uploaded file and echo it back on my page.  $file_name = $_FILES['profile_pic']['name']; $file_extn = end(explode('.', $file_name)); $file_temp = $_FILES['profile_pic']['tmp_name'];  echo $file_extn;   The error I am receiving is      Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\reptile_forum+help\includes\widgets\logged_in.php on line 67.   Line 67 is the "$file_ext ="  Am I not using end() properly? Is there something else I can use to get me the same result?  Note: The array displays perfectly when I remove end() and use print_r(), it just seems as though end() isn't registering the array or something like that.

This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


Why is the angular velocity $\omega$ always written in $rad/sec$? Is there anything wrong if I write it in $degrees/sec$? If no, then why almost all the books have it as $rad/sec$??

I'm convinced that radians are, at the very least, the most convenient unit for angles in mathematics and physics. In addition to this I suspect that they are the most fundamentally natural unit for angles. What I want to know is why this is so (or why not).  I understand that using radians is useful in calculus involving trigonometric functions because there are no messy factors like $\pi/180$. I also understand that this is because $\sin(x) / x \rightarrow 1$ as $x \rightarrow 0$ when $x$ is in radians. But why does this mean radians are fundamentally more natural? What is mathematically wrong with these messy factors?  So maybe it's nice and clean to pick a unit which makes $\frac{d}{dx} \sin x = \cos x$. But why not choose to swap it around, by putting the 'nice and clean' bit at the unit of angle measurement itself? Why not define 1 Angle as a full turn, then measure angles as a fraction of this full turn (in a similar way to measuring velocities as a fraction of the speed of light $c = 1$). Sure, you would have messy factors of $2 \pi$ in calculus but what's wrong with this mathematically?  I think part of what I'm looking for is an explanation why the radius is the most important part of a circle. Could you not define another angle unit in a similar way to the radian, but with using the diameter instead of the radius?  Also, if radians are the fundamentally natural unit, does this mean that not only $\pi \,\textrm{rad} = 180 ^\circ$, but also $\pi = 180 ^\circ$, that is $1\,\textrm{rad}=1$?


I am preparing a LaTeX beamer presentation. I want to have few frames with the blur effect on images to focus on different aspects at a time, just as in the image below.  I tried this by creating a semi-transparent (or low opacity) overlay that covers the entire image region and then keeping the image to focus on top of this (with full opacity). \begin{tikzpicture} \usetikzlibrary{shapes.geometric} \node[align=center, opacity=.1, text opacity=1] at (-2.8,1.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 1}; \node[align=center, opacity=.1, text opacity=1] at (0,2.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 2}; \node[align=center, opacity=.1, text opacity=1] at (2.8,1.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 3}; \node[align=center, opacity=.1, text opacity=1] at (-2.8,-1.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 4}; \node[align=center, opacity=.1, text opacity=1] at (0,-2.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 5}; \node[align=center, opacity=.1, text opacity=1] at (2.8,-1.5) {\includegraphics[scale=0.1]{img/test.png}\\ Text 6}; %Opac layer \node[rectangle,fill=black, opacity=0.1, text opacity=1,minimum width=6cm, minimum height=6cm] at (0,0) {}; \end{tikzpicture}  However, this does not create the desired blurred effect. Please suggest how I can achieve this using TikZ. (Image taken from .)

Partial or entire Image Blurring in TikZ?  I have seen some examples of drop shadow blurring in the pgf-blur package version 1.01 by Martin Giese but this isn’t what I mean.  Is it somehow possible to do partial or entire Image Blurring in TikZ, just like what one may do in Adobe Photoshop?


Here is . After using his +0 ability to become a creature, can he be removed with something like ?

Some lands have an ability to become a creature, but they usually say they are still a land. If a land is a 3/3 creature and a land, can you target and kill it with a  to send it to the graveyard, or does it remain in play as a land?


I've got a little module doing some sqlite operations, and python/sqlite can't seem to count the number of arguments it's passing (thinks there's 7 parameters instead of 1)?         sql = 'select * from tbl where stuff = ?'        results = self.dbconn.execute(sql, things)   Output:       File "./DeeTee.py", line 25, in stuff        results = self.dbconn.execute(sql, things)    ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 7 supplied.

Using SQLite3 with Python 2.5, I'm trying to iterate through a list and pull the weight of an item from the database based on the item's name.  I tried using the "?" parameter substitution suggested to prevent SQL injections but it doesn't work. For example, when I use:  for item in self.inventory_names:     self.cursor.execute("SELECT weight FROM Equipment WHERE name = ?", item)     self.cursor.close()   I get the error:     sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 8 supplied.   I believe this is somehow caused by the initial creation of the database; the module I made that actually creates the DB does have 8 bindings.  cursor.execute("""CREATE TABLE Equipment      (id INTEGER PRIMARY KEY,      name TEXT,     price INTEGER,      weight REAL,      info TEXT,      ammo_cap INTEGER,      availability_west TEXT,     availability_east TEXT)""")   However, when I use the less-secure "%s" substitution for each item name, it works just fine. Like so:  for item in self.inventory_names:     self.cursor.execute("SELECT weight FROM Equipment WHERE name = '%s'" % item)     self.cursor.close()   I can't figure out why it thinks I have 8 bindins when I'm only calling one. How can I fix it?


I tend to make a starter for my bread, typically a poolish. Sometimes I make ciabatta without a starter. I tend to see the same results either way. I give the starter 10-12 hours, then rise the dough to double(4-8hrs), then form the loaf, then proof to double(30min-2hrs) it before baking at 475F with a few ice cubes in the bottom of the oven.  A few things I suspect:   The flour I use The temperature of my kitchen(though I always rise to double, not by time) Not using enough yeast(~1/4tsp in starter + 1/8tsp in dough) Over proofing Under proofing I need to adjust my level of hydration(I noticed my loafs tend to rise out more than up) Living at high altitude(9,000ft), though I hear this is supposed to increase speed of the rise. Too little gluten   What would cause my bread to always have a fine crumb? With my ciabatta I feel like its not really ciabatta because its crumb isn't coarse enough. Its more like a dense american style bread with a ciabatta crust. My french bread has the same exact crumb. Its very consistent through out the whole loaf, and I rarely(almost never) find any large holes in the bread.  My bread recipes:  Note: I measure to consistency, so any measurements are going to be crude.  Cibatta:   4c flour 2c water 1/4tsp yeast   Mix warm water (~175-180F), yeast, and a dash of sugar to feed the yeast. Sit for 15min(until water froths). Mix remaining ingredients together. Wet knead dough in bowl till consistent and gluteny. Rise overnight(10-12hrs). Punch down, pour dough out and shape by pulling to a crude oval shape. Proof till doubled(~1-2hrs), rises out not up due to high moisture and no added surface tension. Bake at 500F drop to 475F. Bake until bottom produces a hallow knock.  French bread:   Starter/Poolish   1 1/3C flour 1/4tsp yeast 1C water  Dough   3C flour 1/8tsp yeast pinch of salt(1/8tsp)    starter: Mix warm water(175-180F), yeast, and dash of sugar. Sit for 15min(until water froths). Add remaining ingredients. Let stand for 10min to hydrate completely. Mix until smooth. Let sit overnight(10-12hrs).  dough: Mix flour, yeast, and salt. Add poolish. Mix until consistent. Adjust hydration if to wet/dry(add flour or water). Knead until consistent, firm, and gluteny.  The french bread is a much less hydrated dough. It's not firm like pasta dough, but it can hold its shape unlike the ciabatta. The ciabatta just spreads out on its own, but holds together enough to be picked up(carefully).

Is it a high hydration rate? Minimal kneading? High-protein flour to hold hydration?


I am trying to apply Langevin Monte Carlo (LMC) to generate samples in a bounded domain, for example, $[0, 1]^D$. How should I properly treat boundaries to ensure valid sampling? I have tried clipping, i.e. np.clip(x, 0, 1). This could be the simplest solution. However, clipping makes the application of Metropolis-style rejection complicated. When the rejection step is omitted, clipping tends to drive samples to the boundaries. LMC proceeds as follows: Starting from randomly initialized $x_0$,  Propose the next point according to Langevin dynamics $x_{t+1}=x_t+\lambda \nabla\log p(x_t)+\epsilon_t$ where $\lambda$ is step size and $\epsilon_t \sim \mathcal{N}(0,2\lambda\mathbf{I})$. (Optional)(Metropolis-Hastings Adjustment) Accept $x_t$ with a probability of $\min\{1, \frac{p(x_{t+1})T(x_{t+1} \to x_{t}) }{p(x_t)T(x_t \to x_{t+1})})\}$ where $T$ denotes the transition probability.  Any references are welcomed!

I am trying to apply MCMC on a problem, but my priors(in my case they are $\alpha\in[0,1],\beta\in[0,1]$)) are restricted to an area? Can I use normal MCMC and ignore the samples that fall outside of the restricted zone(which in my case is [0,1]^2), i.e. reuse transition function when the new transition falls out of restricted(constrained) area?


void main() {     std::string str1 = "abracadabra";     std::string str2 = "AbRaCaDaBra";      if (!str1.compare(str2)) {         cout << "Compares"     } }   How can I make this work? Bascially make the above case insensitive. Related question I Googled and here    there is a case insensitive method  String::Compare(str1, str2, Bool). Question is how is that related to the way I am doing.

What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?  Please indicate whether the methods are Unicode-friendly and how portable they are.


I have two time fields on a form from which i'm storing time. The first challenge was to keep the time in a particular format.My time format is 12 hour format so if user system is of 24 hour format time then this will convert to 12 hour formt. Now when i'm storing this time to salesforce it is not correct' I'm getting right time on console but in salesforce it is 5.30 hour back. How i can convert this time to utc format. I have tried this        var starthours = Number(fromTime.match(/^(\d+)/)[1]);             var startminutes = Number(fromTime.match(/:(\d+)/)[1]);             var endhours = Number(toTime.match(/^(\d+)/)[1]);             var endminutes = Number(toTime.match(/:(\d+)/)[1]);             console.log('starthours '+starthours);             console.log('startminutes '+startminutes);             console.log('endhours '+endhours);             console.log('endminutes '+endminutes);                          startTime = (starthours > 12) ? (starthours-12 + ':' +            startminutes + ':00'+' PM') : (starthours + ':' + startminutes +        ':00' +' AM');             endTime = (endhours > 12) ? (endhours-12 + ':' + endminutes +            ':00'+' PM') : (endhours + ':' + endminutes + ':00'+' AM');              console.log('startTime '+startTime);             console.log('endTime '+endTime);                         let fromDateTime = fromDate+'T'+startTime;              let strDate = new Date(fromDateTime);             console.log('strDate  : '+strDate);              strDate.setHours(strDate.getHours() - 5);             strDate.setMinutes(strDate.getMinutes() - 30);             let strartDate = strDate.toUTCString();             console.log('fromDateTime  : '+fromDateTime);             console.log('strartDate  : '+strartDate);             lstcharges.push(strartDate);                   let toDateTime = toDate+'T'+endTime;              let endDate = new Date(toDateTime);             console.log('endDate  : '+endDate);              endDate.setHours(endDate.getHours() - 5);             endDate.setMinutes(endDate.getMinutes() - 30);             let enDate = endDate.toUTCString();             console.log('endDate  : '+endDate);             console.log('enDate  : '+enDate);                         console.log('toDateTime  : '+enDate);             lstcharges.push(enDate);

I currently have the following function: public String formatForGermany(Datetime targetTime) {     return this.format(targetTime, 'Europe/Berlin'); }  private String format(Datetime targetTime, String zone) {     Integer offset = TimeZone.getTimeZone(zone)             .getOffset(targetTime);     return targetTime.addSeconds(offset / 1000)             .format('HH:mm'); }  This works fine the input value is GMT. However, it seems in some contexts (TBD), Salesforce seems to anticipate this transformation is wanted and does it for me, in which case the offset gets applied twice, with the result that I display (for example) 14:00 instead of 12:00. Is there some way I can check whether the time has already been offset and either not apply it or adjust the offset accordingly?


I would like to ask if you know how to make a row entirely filled by dots in a matrix? I tried to use the \dotfill but it isn't proper because it hasn't changed anything, everything is the same after typing this command. Of course, I can do something like that: \hdots&\hdots&... . But in the part of the book I'm rewriting in LaTeX there is a row of dots in the matrix.

It seems to me that my method is quite inconvenient.  Could someone help me in this matter?      \documentclass[11pt,a4paper]{article}     \usepackage{blindtext}     \usepackage{mathtools}     \DeclareMathOperator{\sgn}{sgn} \begin{document}     $\begin{vmatrix}     a_{11} \cdots a_{1r}\cdots a_{1n}\\     \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \dots \cdot \cdot \cdots \cdot \\     a_{n1} \cdots a_{nr} \cdots a_{nn} \end{vmatrix}$ \end{document}


I have the bib file mybib.bib  @article{art1, author = {Foster, Joe and Burton, Nathan and Cook, Andrew}, journal = {Journal 1}, pages = {1-10}, title = {{Title 1}}, volume = {1}, year = {2018} }   Using \citet{art1} I get Foster et al. (2018), as desired. I would like the formatted reference in the bibliography to start with (Foster et al. (2018)), i.e.,     (Foster et al. (2018)) Joe Foster, Nathan Burton, and Andrew Cook. Title 1. Journal 1, 1:1-10, 2018.   I have tried using the natbib package in combination with apalike (starts with all authors, not the abbreviated version with et al. as in the in-text citation call-out) and plainnat (gives the desired format, but is lacking the first part).  \documentclass{article} \usepackage[authoryear,round]{natbib} \begin{document}     Citation 1: \citet{art1} \bibliographystyle{plainnat} \bibliography{mybib} \end{document}   Could somebody help me?

I would like to start my bibliography entries with the text-style citation.  I have the bib file mybib.bib  @article{art1, author = {Foster, Joe and Burton, Nathan and Cook, Andrew}, journal = {Journal 1}, pages = {1-10}, title = {{Title 1}}, volume = {1}, year = {2018} }   Using \citet{art1} I get Foster et al. (2018), as desired. I would like the formatted reference in the bibliography to start with (Foster et al. (2018)), i.e.,     (Foster et al. (2018)) Joe Foster, Nathan Burton, and Andrew Cook. Title 1. Journal 1, 1:1-10, 2018.   I have tried using the biblatex package in combination with authoryear.  \documentclass{article} \usepackage[backend=bibtex,natbib=true,style=authoryear,maxcitenames=2,maxbibnames=99,dashed=false,doi,url]{biblatex} \begin{document}     Citation 1: \citet{art1} \printbibliography{mybib} \end{document}   Can somebody help me?


I need to remove files older than 30 days under builds\<BuilnNumber>\workflow\*.*. I also need to remove files older than a year under builds\<BuilnNumber>\htmlreports\*.*, if they exist. How do I do that? I tried using FOR /D /r %%G in ("*") DO xxxx %%~nxG, but got stuck there.

I am looking for a way to delete all files older than 7 days in a batch file.  I've searched around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task.  Similar things can be  in just a couple lines of code. It seems that something at least remotely easy could be done for batch files in Windows. I'm looking for a solution that works in a standard Windows command prompt, without any extra utilities. Please no PowerShell or Cygwin either.


If for any $g$ in $L^q$, $fg$ is in $L^1$, prove that $f$ is in $L^p$. $p>1$, $p$ and $q$ are conjugate. It is sort of an inverse version of Holder inequality. We are considering Lebesgue measure in $\mathbb{R}^n$.

Let $f$ be a measurable function on a measure space $X$ and suppose that $fg \in L^1$ for all $g\in L^q$. Must $f$ be in $L^p$, for $p$ the conjugate of $q$? If we assume that $\|fg\|_1 \leq C\|g\|_q$ for some constant $C$, this follows from the Riesz Representation theorem. But what if we aren't given that such a $C$ exists?


In Perl I have connected the database using DBI concept. The database connection and select table query is working fine in .pl file. But I have run the DBI database connection code in .pm file. It's not working.  Please review code.  Sample.pl (It's working fine)  use DBI; my $driver = "mysql";      my $database = "marketplace_perl";     my $dsn = "DBI:$driver:database=$database";     my $userid = "root";     my $password = "root";     my $dbh = DBI->connect($dsn, $userid, $password );     my $dbh=connect_db();         my $sth = $dbh->prepare("SELECT UserEmail,UserPassword FROM pj_user where UserEmail=? and UserPassword=?");          $sth->execute($UserEmail,$UserPassword);   Marketplace.pm (It's not working)  package Marketplace; use DBI;     sub connect_db {         my $driver = "mysql";          my $database = "marketplace_perl";         my $dsn = "DBI:$driver:database=$database";         my $userid = "root";         my $password = "root";         my $dbh = DBI->connect($dsn, $userid, $password );        return $dbh;     }      sub login_marketplace {       my $dbh=connect_db();             my $sth = $dbh->prepare("SELECT UserEmail,UserPassword FROM pj_user where UserEmail=? and UserPassword=?");              $sth->execute($UserEmail,$UserPassword);             my $User_count=$sth->rows;     return $User_count      }   It returns the error message of "Failed to access class (Marketplace): Can\'t locate DBI.pm in @INC (you may need to install the DBI module)"  Please let me know how to fix the DB issue.

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


In my SHP to GDB toolbox, I create a list of layers in MXD, then I check for those not broken I move them. Despite using ListBrokenDataSources I have errors like this:      Runtime error : [Error 3] Impossible   trovare il percorso specificato:   u'J:\20120208_Backup_disco_E\Archivio\ATLArete\Shape Atlarete   1-1-2008\miste.shp'   Translate:     Runtime error : [Error 3] Unable to   find the specified path:   u'J:\20120208_Backup_disco_E\Archivio\ATLArete\Shape Atlarete   1-1-2008\miste.shp'   Here is my code:  # Create a list of SHP in mxd      list = []     df_list = arcpy.mapping.ListDataFrames (mxd)      for df in df_list:          for fc in arcpy.mapping.ListLayers (mxd, "", df):             if (fc.supports("DATASOURCE")) and (fc.dataSource.endswith(".shp")):                         list.append(fc)     print("List created")      # Check for borken datasource     for fc in list:         if arcpy.mapping.ListBrokenDataSources(fc):             list.remove(fc)     print ("Broken data removed from list")      # Move fc to gdb     add_list = []     for fc in list:         fc_date = time.strftime("%Y%m%d", time.gmtime(os.path.getctime(fc.dataSource)))         try:             dsc = arcpy.Describe(fc)             out_temp = '_' + fc_date + '_' + fc.name + '_' + fc_prj             out_name = arcpy.ValidateTableName(out_temp)             print ('Created ' + out_name + ' to ' + gdb_full_path)         except:             out_temp = '_' + fc_date + '_' + fc.name + '_' + 'UNKNOWN'             out_name = arcpy.ValidateTableName(out_temp)             print ('Created ' + out_name + ' to ' + gdb_full_path)         arcpy.FeatureClassToFeatureClass_conversion(fc, fd_path, out_name)         replace_name = fd_path + '\\' + out_name         fc.replaceDataSource (gdb_full_path, "FILEGDB_WORKSPACE", out_name)         print ('Replaced data source ' + out_name + ' in ' + gdb_full_path)       # Create a new MXD     new_mxd = os.path.splitext(gdb_full_path)[0] + '\\' + 'MXD' + '\\' +  time.strftime("%Y%m%d", mxd_date )+ '_' + (mxd_name)     mxd.saveACopy(new_mxd)     print ('Created new MXD ' + new_mxd + ' in ' + ws)

I want to list all the broken links in all mxds in a server drive. But whenever I try I get an error come up. Can someone use a specific example, say the drive is D drive, how would I put it into ESRIs script here:  import arcpy, os path = r"C:\Project" for fileName in os.listdir(path): fullPath = os.path.join(path, fileName) if os.path.isfile(fullPath):     basename, extension = os.path.splitext(fullPath)     if extension == ".mxd":         mxd = arcpy.mapping.MapDocument(fullPath)         print "MXD: " + fileName         brknList = arcpy.mapping.ListBrokenDataSources(mxd)         for brknItem in brknList:             print "\t" + brknItem.name del mxd   Also I'm not used to not having pythonwin, does anyone know where to d/l it? I googled it but it kept telling me to install it from the ArcMap cd (I'm just using a work computer).


Is their any track changes option available in LaTex, similar to word. If some other person want to mark comments in my LaTex document, is that possible?

I am writing a scientific paper with my collaborator. We have submitted a version to a journal and now we got a review from them, so we need to fix a few things. In Microsoft Word there is the option to "track changes", which displays the deleted text as crossed out and the new text bolded (if I remember the details correctly). Is there a way to achieve a similar result in LaTeX?  I was thinking to create a new file for the revised version and then write a script which would basically compare the two files and make the differences either bold or crossed out before sending it to latex. Is there a tool that already does it?


I have the first iPad ever made not the actual first iPad ever made but the first version and I can’t download apps because all the apps are out of its legal how do I get a older versions of the apps? Onto the iPad

I have an iPad 1 with iOS 5.1.1 that won't download any apps or update its OS. It was donated to my school so it was totally wiped before we got it.  I've tried the work around previously mentioned of downloading the apps in iTunes then dragging them over to my device that is also connected to iTunes. When I do this, a dialogue box comes up saying it was unable to install the app because the app requires a newer version of iOS. I'm really hoping Apple didn't make it so a perfectly good piece of tech is obsolete by not making iOS upgrades or apps compatible with their older technology.


For example I need to specify a term x subscript a subscript b.  For a x subscript a, I can write it as x_{a}. However, x_{a}_{b} is not supported. How do I do that?

What's the best way to write subsequences?  $x_n_i$ gives an error, while $x_{n_{i}}$ works, but it just looks like $x_{ni}$ (the i isn't lowered enough below the n)...


It seems Money has a fixed precision and always have 4 decimals. This causes me problems cause lets say I have a table of items to sell, like below  create table #example (    id int,    name varchar(50),    price money )   If the money column in #example is the price before VAT and VAT value is 8%, 4 decimals might not be enough. In below example I'm using an item price of 11usd (before vat)  insert into #example (id, name, price) values (1, 'asd', 11/1.08)   A select from #example now gives:   id  name price 1   asd 10,1852   If I want to use this price to add the vat value I get the wrong value:   10.1852*1,08 = 11,000016   This leaves a wrong margin of 0,000016USD. Obviously I'm using it wrong. Anyone have any input on where I'm wrong on this?   Edit: I wouldn't say the attached question has my answer. I'm already certain to use money and I just need help on calculating the values back.

I'm curious as to whether or not there is a real difference between the money datatype and something like decimal(19,4) (which is what money uses internally, I believe).  I'm aware that money is specific to SQL Server. I want to know if there is a compelling reason to choose one over the other; most SQL Server samples (e.g. the AdventureWorks database) use money and not decimal for things like price information.    Should I just continue to use the money datatype, or is there a benefit to using decimal instead? Money is fewer characters to type, but that's not a valid reason :)


Just like the reaction of the weight of a body is a force acting on Earth towards the body, where and in what direction does the reaction of a gyroscopic force act?

One topic which was covered in university, but which I never understood, is how a spinning top "magically" resists the force of gravity. The conservation of energy explanations make sense, but I don't believe that they provide as much insight as a mechanical explanation would.  The  Cedric provided looks similar to a diagram that I saw in my physics textbook. This diagram illustrates precession nicely, but doesn't explain why the top doesn't fall. Since the angular acceleration is always tangential, I would expect that the top should spiral outwards until it falls to the ground. However, the diagram seems to indicate that the top should be precessing in a circle, not a spiral. Another reason I am not satisfied with this explanation is that the calculation is apparently limited to situations where: "the spin angular velocity $\omega$ is much greater than the precession angular velocity $\omega_P$". The calculation gives no explanation of why this is not the case.


Prove: $n! > 2^n$ for all $n \geq 4$  I already proved the base case: $24 > 16$.   Then I assume this holds for $n=k$, and start proving it for $n=k+1$:  $(k+1)k! > 2^{k+1}$  $(k+1)k! > 2^{k}(2^1)$  After this I'm not sure how to proceed. Any help is appreciated, thanks in advance.

I'm having difficulty solving an exercise in my course.  The question is:      Prove that $n!\geq 2^n$.   We have to do this by induction. I started like this:   The lowest natural number where the assumption is correct is $4$ as: $4! \geq 2^4 \iff 24 \ge 16$. The assumption is: $n! \ge 2^n$.   Now proof for $(n+1)$ which brings me to: $(n+1)! \ge 2^{(n+1)}$  I think I can rewrite it somehow like this:  $$ {(n+1)} \times {n!}  \stackrel{\text{(definition of factorial)}}{\ge} 2^n \times 2 $$  $$ (n+1) \times 2^n \ge 2^n \times 2 $$  Then I think I can eliminate the $2^n$ and have something like this: $n+1 \ge 2$, or $n \ge 1$.  But I think I'm wrong here some where and was hoping somebody has some advice on this. How can I prove the above assumption?  Any help would be appreciated, kind regards.


What I want to do is this var text = 'some text';  $('#my_el).on("click", function do_thing(event, text) {   console.log(text); // is undefined. Why? });  Why is var text undefined?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Using ArcPy I want to make to do a selection on a feature class by field to select everything 0.1 or greater, then copy the selection to a new feature class. However, the output of my following code is exactly the same as the input and includes values under 0.1. input_fc = r"C:\Geoprocessing\Model.gdb\input_fc" output_fc = r"C:\Geoprocessing\Model.gdb\output_fc"  arcpy.SelectLayerByAttribute_management(in_layer_or_view=input_fc, selection_type="NEW_SELECTION", where_clause="Field1 >= 0.1") arcpy.CopyFeatures_management(input_fc, output_fc)  is there a step I am missing?

I am trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field GDP_TOP10 = 1.   I am using this at the moment:  #Grab rows using Search Cursor with WHERE clause rows = arcpy.SearchCursor("C:/CGDP.shp", "GDP_TOP10 = 1") for row in rows:     arcpy.CopyFeatures_management("CGDP.shp", "New.shp") del row del rows   However, this just copies the entire shapefile, not the rows I want to select with the cursor. If I execute a print statement under my for loop instead, it works and prints only the relevant fields, but the copy to new shapefile command does not seem to copy specifically.   Is there a different ArcPy command to only copy rows that match a query?


Let $S\in\mathcal{M}_{n\times n}$ invertible matrix, and let $x,y\in\mathbb{R}^n$ prove or give a counterexample that : There exists $a\in\mathbb{R}$ such that       $$aS \textrm { is unitary }\iff\frac{\|Sx-Sy\|}{\|Sx\|}=\frac{\|x-y\|}{\|x\|} $$   Meaninng, the equation holds iff $S$ is proportional to some unitary matrix.

Let $S\in\mathcal{M}_{n\times n}$ invertible matrix, and let $x,y\in\mathbb{R}^n$ prove or give a counterexample that :     $$S \textrm { is unitary }\iff\frac{\|Sx-Sy\|}{\|Sx\|}=\frac{\|x-y\|}{\|x\|} $$


So the question is   Prove that  $$\cot^{-1}{\sqrt{1+\sin x}+\sqrt{1-\sin x}\over\sqrt{1+\sin x}-\sqrt{1-\sin x}}={x\over 2};$$  $x$ belongs to $(0,π/4)$.  I simplified using $\sin x=2\sin(x/2)\cos(x/2)$ and $1=\sin^2(x/2)+\cos^2(x/2)$ and I get two answers because the second term in the numerator and denominator can be considered as either $(\sin x-\cos x)^{2}$ or $(\cos x-\sin x)^2$ leading to:   (I) the correct answer $x/2$;  (II) another solution $\cot^{-1}(\tan(x/2))$.  Am I missing something?

Well, yesterday at a Mathematics exam, i had to find $\frac{dy}{dx}$ of a cotangent inverse function $$ y=\text{arccot}\left[\frac{\sqrt{1+\sin x}+\sqrt{1-\sin x}}{\sqrt{1+\sin x}-\sqrt{1-sin x} }\right]$$ My Approach: $$ \text{Multiply and Divide by}\frac{1}{\sqrt{1+\sin x}}$$ $$ \text{but}\space \frac{\sqrt{1-sinx}}{\sqrt{1+\sin x}}=\sec x-\tan x$$ $$\text{so} \space \space y=\text{arccot}\left[\frac{1+\sec x-\tan x}{1-\sec x+\tan x}\right]$$  $\text{Then no idea, Anwers is 1/2}$  Can anyone Give me Full answer with explanation


Can anyone help me with that. at mysql database I have providers table which contains longitude and latitude attributes, there is a user who will looking for providers who will be after x km from him so suppose that I have the user longitude and latitude. Is there any way to do that with mysql

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


I want my citations to be shown as (LastName, year) instead of (LastName Initials, year). I am using the natbib package, with setting 'authoryear'.  Below a minimilistic example:  My .tex file:  \documentclass[]{article} \usepackage[authoryear]{natbib}  \begin{document}  Document body text with citations \\ \citep{Bertram91} \\ \citep{Bertram06} \\   \bibliographystyle{authordate1} \bibliography{myreferences}  \end{document}   And my .bib file:  @article{Bertram91,         author = "Bertram C.D., Raymond C.J.",         title = "Measurements of wave speed...",         journal = "Med. and Biol. Eng. and Comput.",         volume = "29",         year = "1991",         pages = "493--500", }  @article{Bertram06,         author = "Bertram C.D., Tscherry J.",         title = "The onset of flow-rate...",         journal = "Journal of Fluids and Structures",         volume = "22",         year = "2006",         pages = "1029--1045", }   This gives the output:    I do NOT want the initials in the citation.

Can someone please explain in a clear and concise way how am I supposed to enter the names of authors in a BibTeX file? I have entries with something like   @article{someid,    author = {Juan A. Navarro P\'erez, Ra\'ul de la Garza and Andr\'es Espinoza},    ...   but somehow the output seems kind of wrong!


I know of krename but I'm wondering if there's a similar app that uses gtk/gnome libraries.    I also know of Thunar but I don't really want a file manager. I just want a bulk renamer.  Are there any applications that provide a GUI just for bulk renaming tasks?

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


Let $K$ and $\bar K$ be two cartesian co-orditate systems in $\mathbb{R}^3$. The element: $$s^2=(\Delta x^1)^2+(\Delta x^2)^2+(\Delta x^3)^2$$ is an invariant in all co-ordinate system. I want prove that the relations between de co-ordinates of $K$ and $K$ must be linear.  In the book: "The meaning of relativity, by A. Einstein" we can find the following reasoning:  Suppose that $\bar x^\nu=\bar x^\nu(x^1,x^2,x^3)$ and note that: $$\left\{\begin{array}{lll} (\Delta x^1)^2+(\Delta x^2)^2+(\Delta x^3)^2= \text{const.}&(1)\\ (\Delta \bar x^1)^2+(\Delta \bar x^2)^2+(\Delta \bar x^3)^2 = \text{const.}&(2) \end{array}\right.$$ Also by Taylor's theorem: $$\Delta \bar x^\nu = \sum_\alpha \frac{\partial \bar x^\nu}{\partial x^\alpha}\Delta x^\alpha+\frac{1}{2}\sum_{\alpha,\beta} \frac{\partial^2\bar x^\nu}{\partial x^\alpha\partial x^\beta}\Delta x^\alpha\Delta x^\beta+\ldots\qquad (3)$$ Substituting $\Delta x^\nu$ given by $(2)$ to $(3)$ and compare this with $(*)$ then we deduce that $\bar x^\nu=\bar x^\nu(x^1,x^2,x^3,x^4)$ must be linear.  Can anybody help me to take $\Delta x^\nu$ given by $(2)$ and put into $(3)$ to deduce that the transformation must be linear?

In almost all proofs I've seen of the Lorentz transformations one starts on the assumption that the required transformations are linear. I'm wondering if there is a way to prove the linearity:  Prove that any spacetime transformation $\left(y^0,y^1,y^2,y^3\right)\leftrightarrow \left(x^0,x^1,x^2,x^3\right)$ that preserves intervals, that is, such that  $$\left(dy^0\right)^2-\left(dy^1\right)^2-\left(dy^2\right)^2-\left(dy^3\right)^2=\left(dx^0\right)^2-\left(dx^1\right)^2-\left(dx^2\right)^2-\left(dx^3\right)^2$$  is linear (assuming that the origins of both coordinates coincide). That is, show that $\frac{\partial y^i}{\partial x^j}=L_j^i$ is constant throughout spacetime (that is, show that $\frac{\partial L_j^i}{\partial x^k}=0$).  Thus far all I've been able to prove is that $g_{ij}L_p^iL_q^j=g_{pq}$ (where $g_{ij}$ is the metric tensor of special relativity) and that $\frac{\partial L_j^i}{\partial x^k}=\frac{\partial L_k^i}{\partial x^j}$. Any further ideas?


I have many polygons in a single shapefile and they are overlapping (first figure). Is there a tool in QGIS to only keep one overlapping area as the one shows in the second figure? There is a "update" function in ArcGIS but the polygons must be in separate shapefiles.

Here is what I'd like to achieve in QGIS.   Is there a processing tool to remove the overlapping part of polygons?    It is also very important that they do not get merged during the process and that they keep their original attributes since I need to work with them afterwards.


I would like the Stack Exchange sites to provide a way for members to respectfully agree or disagree with the closing of a question, particularly if it is marked as "off topic" or "duplicate". Over the years I have obtained a great deal of very useful information from questions that are closed, and in most of those cases I disagree with the decision to close it. I believe this will benefit the Stack Exchange communities in two important ways:   The body of subject matter that is deemed "on topic" is controlled by a very small group of elite members. Considering (a) the number of upvotes on closed questions, and (b) the number of closed questions that appear as top-ranking results in Google searches, it seems evident that the communities using these sites do not entirely share the views of the elite. The upvote/downvote on question closure would allow the community to respectfully participate in defining the bounds of subject matter for each Stack Exchange site. The definition of "duplicate" is much more subjective than its boolean nature suggests. From one person's perspective, two similar questions may seem incontrovertibly identical, because that person finds no additional value in the subtle differences between them. But a second person may find those same two questions to be distinct in some important way, for example if one of the questions emphasizes an aspect of the issue that the other does not (and contains helpful points on that aspect). These subtle distinctions may be difficult for a moderator to see, especially since the moderator is not reading the question with the goal of solving a problem.    If this feature were implemented, it might be prudent to restrict the new upvote/downvote on question closure to members with a certain reputation level, since newer members may not have enough experience in the community to understand its values and goals. The moderators can still have the final say about closing questions, but should be notified when any of their closures has received a very large number of contradictory downvotes. They can still say "well people just don't get it," but at least they should know that the community strongly favors a different perspective.

I propose to let users vote on closing activities of moderators and other users with closevoting power.  Like this:       closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Make it like this:     closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago   fair/unfair close? [agree] [disagree]      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Then the system will gather statistics and automatically grant more closing powers to those users who enjoy support of the community and revoke those powers from those mostly casting contradictory votes.  It would seem that granting the same powers to everybody has not resulted in balance but in public disorder. Perhaps it is reflective of American lifestyle (everybody has the right and means to shoot anybody), but it's not the best way to run a society by far.  What I'm trying to say is that while granting powers to everybody in advance is generous, the maturity to wheel these powers in a fair way must be proven. By introducing community feedback this assessment process can be automatized.


This is Exercise 4.3.24 in Linear algebra by Friedberg.     Let $A \in M_{n \times n} $ have the form    $\begin{pmatrix}  0 & 0 & 0 & ... & 0 & a_0\\ -1 & 0 & 0 & ... & 0 &a_1 \\ 0 & -1 & 0 & ... &0 & a_2 \\\vdots &\vdots &\vdots &...&\vdots&\vdots \\ 0 & 0 & 0 & . . . & -1 & a_{n-1} \end{pmatrix}$      Copmpute $\det(A + tI)$, where $I$ is the $n \times n$ identity matrix.   I was thinking about expressing $A$ into the product of two matrices and using the property that $\det(A)$ is the product of the determinant of each matrix. But, I am stuck here, and I am not sure if this is the right way to solve this question. I appreciate if you give any help.

I have a matrix in companion form,    $$A=\begin{pmatrix}  0 & \cdots & 0& -a_{0} \\  1 & \cdots & 0 & -a_{1}\\ \vdots &\ddots & \vdots &\vdots \\ 0 &\cdots & 1 & -a_{n-1} \end{pmatrix}$$    where $A \in M_{n}$. I want to prove by induction that the characteristic polynomial is  $$p_{A}=t^{n}+a_{n-1}t^{n-1}+\cdots +a_{0}$$  The part that is confusing me is if we assume this hold for $A_{1}\in M_{n-1}$ how do we transform, or "add" to $A_{1}$ to get the n by n matrix $A\in M_{n}$? I hope this makes sense.


How do I go about setting up LaTeXila to be able to run Biber, and how do I set up the PdfLaTeX/Biber/PdfLaTeX(x2)/View Pdf cycle in LaTeXila?  I tried to set up LaTeXila adapting the solutions I found  on stackexchange, and  and  on youtube, but I did not manage to. Following these instructions, I  only managed to set up TexMaker and TexStudio to build my thesis with PdfLateX and biber, but the GUI of both editors has problems with scaling and hi-dpi monitors on linux.

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


Let $f: I \to \mathbb{R}$ continuous and $a\in \operatorname{int}(I)$. Suppose that there is $L\in\mathbb{R}$ such that $$\lim \frac{f(y_n)-f(x_n)}{ y_n-x_n}=L$$ for all sequences $(x_n)$ and $(y_n)$ in $I$ with $x_n < a < y_n$ and $\lim x_n =\lim y_n = a$. Prove that $f$ is differentiable in $a$ and $f'(a)=L$.  I have proved a similar result, but that assumes $f$ differentiable, something like the converse of the criteria above. Some hint for that one?

One exercise from a list. I have no idea how to finish it.  Let $I=[c,d]\subset \mathbb{R}$. Let $f:I\to \mathbb{R}$ be continuous at $a\in (c,d)$. Suppose that there exists $L\in \mathbb{R}$ such that $$\lim \frac{f(y_n)-f(x_n)}{y_n-x_n}=L$$ for every pair of sequences $(x_n),(y_n)$ in $I$, with $x_n<a<y_n$ and $\lim x_n=\lim y_n=a$. Prove that $f'(a)$ exists and it is equal to $L$.  Any help? Thanks in advance.


Let $R$ a commutative ring and $S\subset R$ a subset closed multiplicatively with $1\in S$. We say that $(r,s)\sim (r',s')$ if there is a $t\in s$ s.t. $t(r's-rs')=0$. The thing is I don't understand the presence of this $t$, and I don't find any example where it's important. I tried for example for $R=\mathbb Z/6\mathbb Z$ and $S=\{1, a\}$ where $a\in \{1,...,5\}$, then with $S=\{0,1,2,3\}$, but still, it doesn't work. What I thought was something like: $$\frac{2}{1}=\frac{6}{3}$$ but since $\frac{6}{3}=\frac{0}{1}$, we would have that $\frac{2}{1}=\frac{0}{1}$, but is there something around that ?  By the way, it's not precise in my course that $0\notin S$ (that's why I included it), but may be it can't be in $S$, no ?

In chapter 3 of Atiyah and Macdonalds Intro to Comm Algebra there is the statement  "We also have a ring homomorphism $f:A\rightarrow S^{-1}A$ defined by $f(x)=x/1$. This is not in general injective." (Note: $A$ denotes an integral domain and $S$ a multiplicatively closed subset of $A$.)  How could this possibly not be injective? If $f(x)=f(y)$ then $x/1=y/1$ so $1x=1y$ hence $x=y$. What am I missing here?


I have a little difficulty writing code for my class, and I've been working on this one for about a week. I just can't get it to loop and redo the calculator block until the user types "Yes". I solved the running total problem I had, but no matter what I input when the calculator asks "Are you finished?", doesn't loop back and run the calculator again.   import java.util.Scanner; public class Lab4InputRunningTotal {   public static void main (String[]args)   { int addTotal = 0; int subTotal = 0; int multiTotal = 0; int divTotal = 0; int remTotal = 0; String finished;  double numberOne; // First user input double numberTwo; // Second user input char operator; // Operator Input  do // Start of calculator block {   System.out.println("Enter your first number"); // Prompt for first number    Scanner number = new Scanner(System.in);   numberOne = number.nextDouble();    System.out.println("Enter your second number."); // Prompt for second number   numberTwo = number.nextDouble();    Scanner operatorIn = new Scanner(System.in); // Declare a char scanner to read the operator   System.out.println("Enter an operation: +, -, *, /, %");   operator = operatorIn.next().charAt(0);    switch (operator) // Switch is neater and more compact than multiple if and else if statements.   {     case '+':   System.out.println("The sum of " + numberOne + " plus " + numberTwo + " is " + (numberOne + numberTwo)); // Addition     addTotal += 1;     break;      case '-':  System.out.println("The difference of " + numberOne + " minus " + numberTwo + " is " + (numberOne - numberTwo)); // Subtraction     subTotal += 1;     break;      case '*':  System.out.println("The product of " + numberOne + " times " + numberTwo + " is " + numberOne * numberTwo); // Multiplication     multiTotal += 1;     break;       case '/':        if (numberTwo == 0.0)       System.out.println("We're sorry. We cannot display the quotient of your numbers. \n  You cannot divide by zero, because that would implode the universe. "); // In case of zeroes       else        {         System.out.println("The quotient of " + numberOne + " divided by " + numberTwo + " is " + numberOne / numberTwo); // Division         divTotal += 1;       }       break;      case '%':        if (numberTwo == 0.0)       System.out.println("We're sorry. We cannot display the remainder of your numbers. \n  You cannot divide by zero, because that would implode the universe. "); // Also in case of zeroes       else       {         System.out.println("The remainder of " + numberOne + " divided by " + numberTwo + " is " + (numberOne % numberTwo)); // Remainder         remTotal += 1;       }       break;       default: System.out.println("Uh Oh. Something went wrong. Please try again.");     break;   }    System.out.println("Are you finished with your calculations? Yes or No.");   finished = operatorIn.next().toLowerCase(); } while ( finished == (String)"no"); // End of calculator block  System.out.println( "You used addition " + addTotal + " times. \nYou used subtraction " + subTotal + " times. \nYou used multiplication " + multiTotal + " times. \nYou used division " + divTotal + " times. \nYou used remainder " + remTotal + " times.");       } }   And from there, I really don't know how to fix it.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have a tex file with several written chapters. Then I found I need to nest one of them to another. I know this can be done by manually changing the sectioning command one by one but I found it really time consuming and a bit dumb :p   for example, I now have this document  \chapter{big nest}     \section{a}     ...     ... \chapter{i want to be a section}     \section{b}         \subsection{c}   I want to nest chapter{i want to be a section} into chapter{big nest} and after compiling, in Table of Contents it should look in a structure like:  \chapter{big nest}     \section{a}      \section{i want to be a section}         \subsection{b}             \subsubsection{c}   Question: Is there a clever way to nest an entire written chapter into another chapter?  By the way, I'm sorry for my poor language and hope you understand my question. I also have tried to search for related topic but I don't know the correct words so I got no related search results. Maybe there is, please let me know. Thank you.

This question led to a new package:      Is it possible to create headings in LaTeX where you don't specify what level of the heading you want, but rather if you want to go up, down, stay or start over in the hierarchy that the heading is going to be placed within?  That is, instead of writing  \section{Level 1} \subsection{Level 2} \subsection{Level 2} \subsubsection{Level 3} \subsection{Level 2} \section{Level 1}   write something like  \sectiontop{Level 1} \sectiondown{Level 2} \sectionstay{Level 2} \sectiondown{Level 3} \sectionup{Level 2} \sectiontop{Level 1}   If you would use something along these lines, it would be possible to make quick changes. For example, if you suddenly realized that you wanted to place the headings on row 2-5 under a certain heading, you could easily do this by placing a \sectiondown before them. If you instead was using the system where you had to specify the level of every heading you would have to make individual changes to all 4 rows.


The root password is disabled by default so nobody can directly log into the root account.  However I can still log into root another way by doing sudo su and entering my own password, given that I am a member of the sudo group in /etc/group (as far as I know this is the only necessary condition).  Is this considered a bad practice to "backdoor" my way into the root account by using sudo su? Is it something to be avoided, and instead rely on using sudo command instead?

I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. However, there isn't much that a search reveals on the matter.   It may be widely known to Linux experts, but I really don't know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don't remember running into any problems because of that.   There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the "Administrator" account for regular use on my Windows installation and haven't ever run into any problems there either.


I've been assigned a proof by contrapositive for:     If $a$ is a natural number and $a, a + 2$, and $a + 4$ are   prime, then $a = 3$.   So, the contrapositive I've produced is as follows:     If $a \neq 3$, then it is not true that $a, a + 2$, and $a + 4$ are prime.   How would I go about proving this?

Intuitively it's true, but I just can't think of how to say it "properly".  Take for example, my answer to the following question:     Let $p$ denote an odd prime. It is conjectured that there are infinitely many twin primes $p$, $p+2$. Prove that the only prime triple $p$, $p+2$, $p+4$ is the triple $3,\ 5,\ 7$.   And my solution:     Given an odd integer $n$, between the three integers $n$, $n+2$ and $n+4$, one of them must be divisible by $3$... Three possible cases are $n=3k$, $n+2=3k$, and $n+4=3k$. The only such possible $k$ that makes $n$ prime is $k=1$. In this case, given an odd prime $p$, either $p=3$, $p+2=3$, or $p+4=3$. This would imply that $p=3$, $p=1$, or $p=-1$. The only of these three that is prime is $p=3$, therefore the only three evenly distributed primes are $3$, $5$, and $7$.   Is there a "better" way that I can assert that one of the integers is divisible by 3? This feels too weak.


In order to get full RGB output (0-255) on my Intel UHD630 integrated graphics I have to run this command at every reboot:  sudo xrandr --output HDMI-1 --set "Broadcast RGB" "Full"   Is there a way to save this so that it runs automatically when X starts?  I'm running Ubuntu 19.10.

I used to edit the startup script for the GDM (/etc/gdm/Init/Default) to permanently change my display resolution.   How can I do this with LigthDM in Ubuntu Oneiric?