I'm trying to set a custom paper size for my document via the geometry package. However, whenever I add the [papersize={x,y}] option, I get the wrong output. The document compiles successfully (with XeLaTeX), but the page size is not change, and additionally the margins appear all messed up (text flows past the bottom margin).   This doesn't happen on a fresh document, so I suspect the geometry package is in conflict with one of the other packages I'm using; but I can't figure out which one.   Here's a my code:  \documentclass[twoside,11pt]{memoir}  %set page dimensions \usepackage[ xetex, outer=1.84in,inner=0.92in,  top=0.92in, bottom=2.1in, papersize={8.27in,13.39in}]{geometry}  %Set English lang.  \usepackage{polyglossia} \setmainlanguage{english}  %enable emphasis with color instead of italics \usepackage{xcolor} \definecolor{ecol}{gray}{0.15} \renewcommand\emph[1]{\textcolor{ecol}{\textbf{#1}}}  %define typeface \usepackage{fontspec}[ligatures=tex] \setmainfont{Baskerville}[SmallCapsFont = Bodoni 72 Smallcaps]%  \usepackage{microtype}  %figures and graphics \usepackage{graphicx} \usepackage{subcaption} \usepackage{wrapfig} \usepackage{caption}  %layout debugging \usepackage{layout}  %for referencing labels \usepackage[colorlinks=true, anchorcolor=red]{hyperref}  \usepackage{lipsum}  \begin{document}  \lipsum[1-20]  \end{document}   Any ideas as to what might be causing the issue?

I tried to get the following example working on Windows 10 (Texmaker V5.0.1);   I used it for a long time on Mac OS and it worked very well. But on Windows 10 the geometry parameters seam not to work. The page is DIN A4 but not in a smaller size for kindle as I expect.  What can I do?  Thank you!  P.S.: I use MikTex 2.9 (64 bit)  P.P.S.: The minimal example:  \documentclass[8pt]{memoir}  \usepackage[utf8]{inputenc} \usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.5cm, left=0.5cm, right=0.5cm, bottom=0.5cm]{geometry} \usepackage{graphicx} \usepackage{tikz, blindtext}  \makechapterstyle{box}{   \renewcommand*{\printchaptername}{}   \renewcommand*{\chapnumfont}{\normalfont\sffamily\huge\bfseries}   \renewcommand*{\printchapternum}{     \flushright     \begin{tikzpicture}       \draw[fill,color=black] (0,0) rectangle (2cm,2cm);       \draw[color=white] (1cm,1cm) node { \chapnumfont\thechapter };     \end{tikzpicture}   }   \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries}   \renewcommand*{\printchaptertitle}[1]{\flushright\chaptitlefont##1} }  %Begin Decorative packages \usepackage{type1cm} \usepackage{lettrine} %End decorative packages  \usepackage[T1]{fontenc} \usepackage[scaled]{helvet} \renewcommand*\familydefault{\sfdefault}  \frenchspacing \sloppy \pagestyle{empty}  \chapterstyle{box} \begin{document}  \title{Latex Template for Kindle} \author{by YOUR NAME} \date{} \maketitle \newpage  \newpage \chapter{Preface}{}  \lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala.   \newpage \chapter{Introduction}  \lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala.   \end{document}


Hi I am new to JavaScript and have been doing some practice stuff. I am struggling with looping through an Object's properties and appending each property to the DOM. Can someone provide some guidance please? I tried piecing this together through other questions but not sure where I am going wrong?  var person = {     firstName: "john",     lastName: "doe",     age: 45,     placeOfBirth: "somewhere" }  for(var i = 0; i < person.length; i++) {     if(hasOwnProperty(person[i])) {         var p = document.createElement("p");         p.innerHTML = person[i];         document.body.appendChild(p)     } }

I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.


I want a hint for the following integral: $$\int \frac{dx}{x^{2}\sqrt{1- a^{2}+x^{2}}}$$ where $a$ is a real constant.  In fact,  $$\int \frac{dx}{x^{2}\sqrt{1- a^{2}+x^{2}}} = -\frac{\sqrt{1- a^{2}+x^{2}}}{x(1- a^{2})}$$ why?


I have an executable file called drracket in a folder :    However in GUI it appears as a source file :   Is there a way to run the file via GUI like double-click etc.? (Running it in prompt forces me to keep the prompt open  and bound to the executing file, closing the prompt closes the program as well).

When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?


I am looking to build a camera trap for wildlife viewing, able to capture pictures (or even videos) in decent quality to be able to identify distinct features. I do however need to be able to see the pictures in real time, so the camera would need some sort of wireless connection to a receiving device such as a phone.  I thought of using an FPV setup as used in drone racing, but the quality and range seems to be quite low, and the strengths of an analog signal seem to be latency and fps, which are both not important to me. It would be nice to have some sort of digital signal to be able to do some editing, such as storing pictures. It would also be cool to connect several cameras to one device.  Are there any solutions to this problem? Would a raspberry pi/arduino setup work in some way? Thanks!


Can you please advise the best ubuntu version for my old laptop with spec below? CPU: AMD E-450 APU with Radeon(tm) HD Graphics x2 Ram: upgraded to 5.5 GiB Harddisk:upgraded to SSD  Can I also try the most updated ubuntu version? Thanks All.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


This code work on api 23 but in api 27 does not. It shows me this message:   Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference   Can someone please help?  I can't solve this. I am stuck over 1 week now.  the code is:  public class AdapterMenuList extends BaseAdapter {      private Activity activity;      public AdapterMenuList(Activity act) {         this.activity = act;     }      public int getCount() {         return ActivityMenuList.Menu_ID.size();     }      public Object getItem(int position) {         return position;     }      public long getItemId(int position) {         return position;     }      public View getView(int position, View convertView, ViewGroup parent) {          ViewHolder holder;          if(convertView == null){             LayoutInflater inflater = (LayoutInflater) activity                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);             convertView = inflater.inflate(R.layout.lsv_item_menu_list, null);             holder = new ViewHolder();              convertView.setTag(holder);         }else{             holder = (ViewHolder) convertView.getTag();         }          holder.nameProduct = convertView.findViewById(R.id.nameProduct);         holder.price50Text = convertView.findViewById(R.id.price50Text);         holder.price100Text = convertView.findViewById(R.id.price100Text);         holder.imgThumb = convertView.findViewById(R.id.imgThumb);          holder.nameProduct.setText(ActivityMenuList.Menu_name.get(position));         if(ActivityMenuList.Category_ID == 1 ){             holder.price50Text.setText("Pret 50 Tb: "+ActivityMenuList.Menu_price50.get(position)+" "+ActivityMenuList.Currency);             holder.price100Text.setText("Pret 100 Tb: "+ActivityMenuList.Menu_price100.get(position)+" "+ActivityMenuList.Currency);         }else{             holder.price50Text.setText("Pret: "+ActivityMenuList.Menu_price50.get(position)+" "+ActivityMenuList.Currency);             holder.price100Text.setVisibility(View.GONE);         }         Picasso.with(activity).load(Config.ADMIN_PANEL_URL+"/"+ActivityMenuList.Menu_image.get(position)).placeholder(R.drawable.loading).into(holder.imgThumb);          return convertView;     }      static class ViewHolder {         TextView nameProduct, price50Text, price100Text;         ImageView imgThumb;     }   }

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 am creating a 2D platform game in a wpf application... and I tried to make my character walk with a gif animation.  Here's my C# code:  private void imgMega_OnKeyDown(object sender, KeyEventArgs e)         {             if (e.Key == Key.Right)             {                 if (Grid.GetColumn(imgMega) <= Grid.ColumnDefinitions.Count - 1)                     Grid.SetColumn(imgMega, Grid.GetColumn(imgMega) + 1);                 BitmapImage bmi = new BitmapImage(new Uri("megaman.gif", UriKind.Relative));                 imgMega.Source = bmi;              }         } /*---- When my character walk ----*/          private void imgMega_OnKeyUp(object sender, KeyEventArgs e)         {             BitmapImage bmi = new BitmapImage(new Uri("Megaman8bit.jpg", UriKind.Relative));             imgMega.Source = bmi;         } /*---- When my character stop walking ----*/   And my XAML code:  <Image Name="imgMega" Width="60" Grid.ColumnSpan="4" FocusVisualStyle="{x:Null}" Source="Megaman8bit.jpg" Focusable="True" KeyDown="imgMega_OnKeyDown" KeyUp="imgMega_OnKeyUp"/>   * My "megaman.gif" image is my walking character and my "Megaman8bit.jpg" image is my immobile character. *  With this code, the character changes his position but the gif animation doesn't work... Somebody can help me to find what's wrong ?

What control type should I use - Image, MediaElement, etc.?


I have the following code that clones an asset and its' children...  public class Cloner {         public Asset root_asset { get; set; }     public Asset cloned_root_asset {get; set; }     public Asset a_clone {get; set; }     public Id root_id { get; set; }     public Id cloned_root_id { get; set; }     public Id idxx { get; set; }     public List<Asset> children { get; set; }     public List<Asset> childrenx { get; set; }     public Cloner(ApexPages.StandardController controller){         root_asset = (Asset) controller.getRecord();         root_id = root_asset.Id;     }     public void doClone(Asset a, Id p){         a_clone = a.clone(false, false, false, false);         //a_clone.RootAssetId = cloned_root_asset.Id;         a_clone.ParentId = p;         insert a_clone;         p = a.Id;         childrenx = Database.query('SELECT ' + String.join(new List<String>(Schema.getGlobalDescribe().get('Asset').getDescribe().fields.getMap().keySet()), ',') + ' FROM Asset WHERE ParentId = :p');          for(Asset b : childrenx){             doClone(b, a_clone.Id);         }     }     public PageReference cloneAsset(){         root_asset = Database.query('SELECT ' + String.join(new List<String>(Schema.getGlobalDescribe().get('Asset').getDescribe().fields.getMap().keySet()), ',') + ' FROM Asset WHERE Id = :root_id');         cloned_root_asset = root_asset.clone(false, false, false, false);         insert cloned_root_asset;         children = Database.query('SELECT ' + String.join(new List<String>(Schema.getGlobalDescribe().get('Asset').getDescribe().fields.getMap().keySet()), ',') + ' FROM Asset WHERE ParentId = :root_id');         for(Asset a : children){             doClone(a, cloned_root_asset.Id);         }         idxx = cloned_root_asset.Id;          PageReference pageRef = new PageReference('/'+ idxx);         pageRef.setRedirect(true);         return pageRef; //Returns to the case page     } }   With following visualforce page:   <apex:page standardController="Asset" extensions="Cloner" action="{!cloneAsset}">     <apex:form >         <apex:inputHidden value="{!asset.OwnerId}"/>     </apex:form> </apex:page>   How do I make a test class for the code?  @isTest private class testCloner {     @isTest static void myTest() {         List<Asset> assets = [Select Id from Asset limit 100];         for(Asset a : assets){             //Create a new instance of standard controller             ApexPages.StandardController sc = new ApexPages.standardController(a);             Cloner c = new Cloner(sc);             c.cloneAsset();         }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


I have this two arrays.  url = ["http://www.linkedin.com/in/jannuelanarna", "http://www.linkedin.com/in/jannuela", undefined, undefined];  publicUrl = ["http://www.linkedin.com/in/jannuelanarna", "http://www.linkedin.com/pub/jay-r-bautista/64/b29/45b", undefined, "http://www.linkedin.com/pub/ronilo-canson/75/927/4a3", "http://www.linkedin.com/pub/siddharth-chaudhary/33/aa1/8", "http://www.linkedin.com/in/rojohnh", "http://www.linkedin.com/pub/lara-martinez/74/777/a3b", "http://www.linkedin.com/pub/alena-ortega/69/72a/415", "http://www.linkedin.com/in/nivlek1416", "http://www.linkedin.com/pub/emmar-reveriza/59/a91/132", "http://www.linkedin.com/in/samsanchezcb", "http://www.linkedin.com/pub/mitch-stevens/6b/375/3a0", "http://www.linkedin.com/pub/irish-jane-sumadic/29/339/910", "http://www.linkedin.com/pub/joel-sumadic/45/31b/ab3", "http://www.linkedin.com/pub/luna-cielo-yniesta/68/4b2/690"];   What will be the code so that I could search if a url exist in an array?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


Suppose that every integer is coloured one of three colours. Prove that there exist distinct integers $a, b, c$ such that all of the following are the same colour: $a, b, c, a+b, a+c, b+c, a+b+c.$   I initially thought of splitting the integers into $3$ sets, one of which has infinitely many colours. Obviously, if two of the sets are empty, then there exist such integers. However, I wasn't sure how to ascertain that there exist such integers when more than one set has arbitrarily many elements.   An alternative approach I thought of involved showing that $\exists a, b, c\in \mathbb{Z}$ such that for any function $f: \mathbb{Z}\to \{0, 1, 2\},f(a) = f(b) = f(c) = f(a+b)=f(a+c)=f(b+c)=f(a+b+c),$   but I'm not sure how to show this.

Can all integers can be painted either red, blue, or green such that there exists at least $1$ integer of each color, and if any $3$ integers $a$, $b$, and $c$ have the same color then $a+b$, $a+c$, $b+c$, and $a+b+c$ also have the same colour?


Hello all I am having a problem with my code. I want to add a new row with the same fields whenever I click on add product. However when I run the code and I click on add product it doesn't work.   Here's the HTML:
 Item Name	 Item Code	 Description	 Quantity	 Price	 Image
 <input type="text" name="itemname" id="itemname" style="border: none"/>	 <input type="text" name="itemcode" id="itemcode" style="width:50%; border:none"/>	 <input type="text" name="description" id="description" style="border:none;"/>	 <input type="text" name="quantity" id="quantity" style="width:50%; border: none"/>	 <input type="text" name="price" id="price" style="width:50%; border: none"/>	 <input type="file" name="image" id="image" style="border:none">	 <input type="checkbox" name="check" placeholder="Delete">

 <input type="button" name="add" value="Add Product" onclick="addRow(concierge)"/> <input type="button" name="delete" value="Delete Product" onclick="deleteRow(concierge)"/>   and the Script I am using for both Delete and Add:  function addRow(tableID) {      var table = document.getElementById(tableID);      var rowCount = table.rows.length;     var row = table.insertRow(rowCount);      var cell1 = row.insertCell(0);     var element1 = document.createElement("input");     element1.type = "text";     element1.name="itemname";     cell1.appendChild(element1);      var cell2 = row.insertCell(1);     var element2 = document.createElement("input");     element2.type = "text";     element2.name = "itemcode";     cell3.appendChild(element2);      var cell3 = row.insertCell(2);     var element3 = document.createElement("input");     element3.type = "text";     element3.name = "description";     cell3.appendChild(element3);      var cell4 = row.insertCell(3);     var element4 = document.createElement("input");     element4.type = "text";     element4.name = "quantity";     cell4.appendChild(element4);      var cell5 = row.insertCell(4);     var element5 = document.createElement("input");     element5.type = "text";     element5.name = "price";     cell5.appendChild(element5);      var cell6 = row.insertCell(5);     var element6 = document.createElement("input");     element6.type = "file";     element6.name = "image";     cell6.appendChild(element6);      var cell7 = row.insertCell(6);     var element7 = document.createElement("input");     element7.type = "checkbox";     element7.name = "check";   }  function deleteRow(tableID) {     try {         var table = document.getElementById(tableID);         var rowCount = table.rows.length;          for(var i=0; i<rowCount; i++) {             var row = table.rows[i];             var chkbox = row.cells[0].childNodes[0];             if(null != chkbox && true == chkbox.checked) {                 table.deleteRow(i);                 rowCount--;                 i--;             }           }     }catch(e) {         alert(e);     } }   Thank you in advance for your help

What is the best method in jQuery to add an additional row to a table as the last row?  Is this acceptable?  $('#myTable').append('
my data	more data
');   Are there limitations to what you can add to a table like this (such as inputs, selects, number of rows)?


Let $u$ be harmonic ($\Delta u=0$) on the unit circle, if $u\equiv 0$ on $\partial G$ then $u\equiv0$ on $G$   We set $P=-u\frac{\partial u}{\partial y}, Q=u\frac{\partial u}{\partial x}$  Using Green we get $$Q_x-P_y=(\frac{\partial u}{\partial x})^2+u \frac{\partial^2 u}{\partial x^2}+u\frac{\partial^2 u}{\partial y^2}+(\frac{\partial u}{\partial y})^2=(\frac{\partial u}{\partial x})^2+(\frac{\partial u}{\partial y})^2$$  By green  $$\iint_{G}(\frac{\partial u}{\partial x})^2+(\frac{\partial u}{\partial y})^2=\oint_{\partial G}u(-\frac{\partial u}{\partial y}dx+\frac{\partial u}{\partial x}dy)=0$$  how can I an conclude that $u\equiv 0$? must it be on the unit circle?

I am confused how to do this question. I need to use Green's first identity and if $\nabla(f)=0$ then $f$ is constant on $\Omega$ since $\Omega$ is path connected.  I have subbed in the information into green's identity but I don't get anything useful.  $$\iiint_\Omega \nabla f\cdot \nabla g \,dV =\iint_{\partial\Omega} f\nabla g\cdot n \,dA - \iiint_\Omega f\cdot \Delta g \,dV$$   We get:  $$\iiint_\Omega \nabla f\cdot \nabla g \,dV =-\iiint_\Omega f\cdot \Delta g \,dV$$   $$\iiint_\Omega \nabla. (f \nabla g) \,dV =0$$ $$\iint_{\partial\Omega} f\nabla g\cdot n \,dA=0$$


How can we find that how many times a specific app has been downloaded? For example, in  page I cannot see any information about that.

I cannot see the download counts of one app on Google Play.   How can we know that number of one app?


I am getting errors whenever I try to install any packages telling me to run apt-get -f install. to fix them.  When I run the command I get this message:  $ sudo apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-57   linux-headers-4.4.0-57-generic linux-headers-4.4.0-59   linux-headers-4.4.0-59-generic linux-headers-4.4.0-62   linux-headers-4.4.0-62-generic linux-headers-4.4.0-63   linux-headers-4.4.0-63-generic linux-headers-4.4.0-64   linux-headers-4.4.0-64-generic linux-headers-4.4.0-66   linux-headers-4.4.0-66-generic linux-image-4.4.0-31-generic   linux-image-4.4.0-57-generic linux-image-4.4.0-59-generic   linux-image-4.4.0-62-generic linux-image-4.4.0-63-generic   linux-image-4.4.0-64-generic linux-image-4.4.0-66-generic   linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-57-generic   linux-image-extra-4.4.0-59-generic linux-image-extra-4.4.0-62-generic   linux-image-extra-4.4.0-63-generic linux-image-extra-4.4.0-64-generic   linux-image-extra-4.4.0-66-generic linux-signed-image-4.4.0-57-generic   linux-signed-image-4.4.0-59-generic linux-signed-image-4.4.0-62-generic   linux-signed-image-4.4.0-63-generic linux-signed-image-4.4.0-64-generic   linux-signed-image-4.4.0-66-generic snap-confine Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   linux-image-4.4.0-72-generic Suggested packages:   fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools The following NEW packages will be installed:   linux-image-4.4.0-72-generic 0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded. 10 not fully installed or removed. Need to get 0 B/21.8 MB of archives. After this operation, 66.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 539835 files and directories currently installed.) Preparing to unpack .../linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb ... Done. Unpacking linux-image-4.4.0-72-generic (4.4.0-72.93) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb (--unpack):  cannot copy extracted data for './boot/vmlinuz-4.4.0-72-generic' to '/boot/vmlinuz-4.4.0-72-generic.dpkg-new': failed to write (No space left on device) No apport report written because the error message indicates a disk full error                                                                               dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic Errors were encountered while processing:  /var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   It appears my boot partition is full? It looks like these linux-headers files are outdated and not needed but what is the best and safest way to clean out these packages?

My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error:  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f.   I tried running apt-get install -f and this was the output(after saying yes on prompt)  (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device  No apport report written because the error message indicates a disk full error                                                                           dpkg-deb:    error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic   /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried running apt-get autoremove and it gives me the same error as apt-get upgrade.  When I run df, I get this for /boot:  /dev/sda1                    233191     230297         0 100% /boot   So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with:  $ dpkg -l linux-image-\* | grep ^ii ii  linux-image-2.6.38-13-server  2.6.38-13.52  Linux kernel image for version 2.6.38 on x86_64 ii  linux-image-3.0.0-13-server   3.0.0-13.22   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-14-server   3.0.0-14.23   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-15-server   3.0.0-15.26   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-16-server   3.0.0-16.29   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-17-server   3.0.0-17.30   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.2.0-24-generic  3.2.0-24.39   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-25-generic  3.2.0-25.40   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-26-generic  3.2.0-26.41   Linux kernel image for version 3.2.0  on 64 bit x86 SMP   When I try to remove the oldest with this:  $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be     installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   How can I free up or extend boot without messing up my installation?


I want to install a font from true type of font of my own. where should I install my font in ubuntu?

Question says it all. I need them to be available in gimp.


After installing ubuntu 16.04 I am getting a very weak wifi signal.   Currently, I am sitting 3-4 feet away from my router and I have only 2 bars of wifi signal on my HP Envy M6 notebook. I have checked my TP-link router with my tablet and phone - they both have full bars.  I also feel that this OS is draining my battery faster than Windows 8 (I'm using a dual boot).

Only when I'm closer to the router, it shows any signal, but when I'm just little far from it, it is not showing wifi routers signals.


Hello Guys and/or Gals,  I am new to the site and after searching it for a few hours i finally decided to sign up as i have some questions.  I have a Windows 8.1 system and I would like to install Linux on it in VMware OS. I have never tried Linux before so I thought i would ask what is best version of Linux to run in VMware? I want to use it for rendering graphics, storage, teamspeak and other software. I do not want a dual boot system which is why I have vmware as I do not want it full time at this point. I also want to learn more about linux as when my windows 8.1 pc dies I will need a new os, and i am done with windows at that point.  So is Ubuntu the best choice and is there only one version to choose from?  Think that is all my questions for now. Thanks in advance Valshardreg

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am studying for a midterm and I have no idea about how to prove that the derivate of $\frac{d}{dx}x^2$ is equal to $2x$  Anyone has any idea?  Thank you

I need your help, my question is how to proof that the derivative of $x^2$ is $2x$?  Please I need a clear explanation.


I have an awk expression !a[$0]++ and I want to know the exact evaluation order. From the document of awk, ++ is at higher precedence than !. However, in this example, ++ is in its postfix form (not !++a[$0], which as I understand is basically tells awk, "evaluate other parts first, after that evaluate me". In this case, what's the evaluation order?

This one-liner removes duplicate lines from text input without pre-sorting.  For example:  $ cat >f q w e w r $ awk '!a[$0]++' <f q w e r $    The original code I have found on the internets read:  awk '!_[$0]++'  This was even more perplexing to me as I took _ to have a special meaning in awk, like in Perl, but it turned out to be just a name of an array.  Now, I understand the logic behind the one-liner:  each input line is used as a key in a hash array, thus, upon completion, the hash contains unique lines in the order of arrival.  What I would like to learn is how exactly this notation is interpreted by awk. E.g. what the bang sign (!) means and the other elements of this code snippet.  How does it work?


I have a question regarding the outer environment in JS. Suppose I have the code like this:  function callbackTest(callback) {   var a = 1;   callback(); } callbackTest(function() {   console.log(a); });   The brower told me that a is not defined. It means the outer environment is the global context, but I created the function within callbackTest, so I assume the outer environment of callback is the callbackTest. Can somebody tell me why? Thx!

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?


first of all sorry about my english. I need to split a file path. For example:  "C:\Folder\Folder2\1.cr2"   I need to get file drive, file path, file name and file extension separately:  C:\ ,  Folder\Folder2 , 1 and  .cr2   Thanks.

My path is \\server\folderName1\another name\something\another folder\  How do I extract each folder name into a string if I don't know how many folders there are in the path and I don't know the folder names?  Many thanks


On the tags tab of my user profile, the title of the answer-votes element is missing a space (or a line break) after the first sentence when there are two sentences:

A little pedantic, but once I noticed it I couldn't unsee it.   When I hover over the tag score for a user who has asked and answered a question in the tag on Meta, there is no space after the first period.  For example, if I hover over my score for the  tag, I get this:        I also tried an example on the main site, hovering over Jon Skeet's tag score for generics. Sure enough, the space was there. (I haven't asked a question on the main site, so couldn't use my own profile.)  UPDATE: As pointed out by @MichaelLiu on  question, the space is now missing on the main site too. Here's his image:        Can we add the spaces back?


It is simple, but I just cannot figure out how to draw that cross...

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


I am in the last year of university and got myself a well paid part-time job. My expenses are negligible for now. Since I was 18 I was always making money here and there, so I managed to gather over 400k of local currency,CZK (200 on my personal account, 200 on "building savings"(?)). Now I've been doing a little research for the last couple of days so I've got an idea what I could do with the situation, but the world of finance is absolutely alien to me, big and scary so I would seriously appreciate a feedback and some advice. My idea would be to take most of the saved money and put it into ETF as a long-term investment, such as VOO or SPY, which might be a less dangerous option. From this point I'd like to regularly, monthly, save up. My question is: is this a smart idea, or are there any flaws I don't see. I'd like to see this as a passive, long term investment. Right now I am sitting on two chairs at once and I don't have the time to learn enough and watch enough the world of finance to start actively working with money. I am aware of generally known risks about ETF, that it is a bit more risky than other options etc. Another question: what would be the procedure, is it really that easy to create an account with a broker (xtb,etoro), put the money there and immediately buy? Is this reliable? Now for some this probably is the very basic question, but I really have got no one to ask around and as well as I know that it is the better the sooner you start with saving, I am also aware that it might be a bad idea to rush into things and regret in a week or two after finding out and realizing mistakes I don't see. Edit: naturally I am curious about another suggestions that would you see as a better option

I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it.   What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here.


I have seen conflicting sources on this - some claiming the turret range is infinite, or at least functionally so, while others have held that the range was 25 or 40 metres.  Does anyone have verified post launch data on this, or maybe a video of a character being at a safe distance from the turret?  Specifically, I'm looking for post launch information; the pre launch question I've seen on here is one of the conflicting sources I mentioned.

As far as I've seen, it seems like , so that's not an issue.  What I'd like to know is if it has a cutoff range, or does all it need is line of sight?  Meaning, could I place it on a high position that's far up, such as on Hollywood 1st obj elevator, and still have it shoot players that are coming out from under tunnel?


Note: This question is specifically about when the infinite monkey theorem is extended to reproducing an infinite sequence (as oppose to a finite one)  I was browsing wikipedia, and came across the infinite monkey problem. I understand that if Random keys are selected for an infinite period of time, eventually any finite combination of characters will eventually be produced. For example, a complete copy of Hamlet. However, I am confused about what happens when this is extended to infinity. According to wikipedia:     If the monkey's allotted length of text is infinite, the chance of typing only the digits of pi is $0$, which is just as possible as typing nothing but Gs (also probability $0$).     However, this suggests that the probability of typing any combination of characters (that are infinitely long) is also $0$. However, the probability that a combination is typed is 1. However the sum of all possible events appears to be $0$, not $1$ (as the probability of any combination of infinite length being typed such as pi is $0$ as $0+0+0+0+...+0=0$   I'm not sure if I have just misunderstood this problem or if I have made a false assumption. It might have something to do with concept of "Almost certainly", but I was a bit intimidated by the wikipedia article.

Of course, we've all heard the colloquialism "If a bunch of monkeys pound on a typewriter, eventually one of them will write Hamlet."  I have a (not very mathematically intelligent) friend who presented it as if it were a mathematical fact, which got me thinking... Is this really true?  Of course, I've learned that dealing with infinity can be tricky, but my intuition says that time is countably infinite while the number of works the monkeys could produce is uncountably infinite.  Therefore, it isn't necessarily given that the monkeys would write Hamlet.  Could someone who's better at this kind of math than me tell me if this is correct?  Or is there more to it than I'm thinking?


My code seems to be throwing a null pointer exception when attempting to copy an existing file to a new location; the new file will also be named based on the current date of execution.   Any ideas?  public static String returnScreenshotName() {     return (System.getProperty("user.dir") + "\\target\\output\\imgs\\" + screenshotName); }  private static void copyFileUsingStream(File source, File dest) throws IOException {     InputStream is = null;     OutputStream os = null;     try {         is = new FileInputStream(source);         os = new FileOutputStream(dest);         byte[] buffer = new byte[1024];         int length;         while ((length = is.read(buffer)) > 0) {             os.write(buffer, 0, length);         }     } catch (IOException ignored) {     }     finally {         is.close();         os.close();     } }  public static void copyLatestExtentReport() throws IOException {     try {         Date d = new Date();         String date = d.toString().replace(":", "_").replace(" ", "_");         File source = new File (System.getProperty("user.dir") + "\\output\\report1.html");         File dest = new File (System.getProperty("user.dir") + "\\output\\" + date + ".html");         copyFileUsingStream(source, dest);     }catch (IOException ignored) {     }

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 am wondering if private religious universities consider hiring faculty members who are clearly not affiliated with said religion. For example, someone who is clearly Muslim applying to a Jesuit university for a tenure track position. Is it a waste of time for the very obviously Muslim candidate in this example to submit an application?

I just saw an ad in mathjobs.org about an opening in a Catholic university, see . I am not christian. So I was wondering to be eligible for employment in a university or college affiliated with a specific religion, should the applicant  have the same religion, or other people from other religions (or even non-religious people) are eligible to apply as well?


Here's my situation: I'm setting up an Ubuntu 14.04 web server for a team to share. I'd like the team to have read/write access to everything inside var/www/html (same as CHMOD 775 on every file and folder).   My issue is that SFTP clients on the Mac (Transmit, Cyberduck, and FileZilla) don't respect the default permissions I've set up.  After several hours, I've walked through many steps to accomplish my goal:  Set up team permissions:   Created a myteam group Added all users to the myteam group Changed the group ownership of /var/www/html to myteam   At this point, ls -la of /var/www returns  drwxrwsr-x  2 marcelo myteam 4096 Jul 20 13:29 html   Set a default UMASK:   Updated /etc/ssh/sshd_config with Subsystem sftp /usr/lib/openssh/sftp-server -u 002 based on . Updated /etc/pam.d/sshd and /etc/pam.d/login with a new line session    optional     pam_umask.so umask=0027 based on  Updated /etc/pam.d/common-session/ with a new line session optional pam_umask.so and edited /etc/login.defs to change the UMASK line to UMASK 002 based on  Rebooted all appropraite services and/or rebooted the entire machine   At this point, if I SSH into the server via a shell, the umask command reports 002, and all new files and folders have the correct permissions. However, if I SFTP into the server via Transmit, Filezilla, Cyberduck, etc. and create files or folders, it does not respect and defaults files to rw-r--r-- and folders to rwxrwsr-x (the folders are correct). I checked, and the FTP clients are not overriding any permissions - those are disabled.

I know this question has been already discussed, but by reading the posts I could not figure the answers, because some said "yes umask can work", and others say "OpenSSH put command always preserve permissions"   Before all just to precise:   I use OpenSSH 5.9 on RHEL 6.2 I have configured a chrooted SFTP server, using internal-sftp subsystem, with -u 0002 for umask I precise I don't use the -p or -P option   From what I have read on one hand: there are many ways to define umask for SFTP transfers:   option -u of internal-sftp (or sftp-server) , since OpenSSH 5.4 create a wrapper to sftp-server (in which we explicitly set the umask - this doesn't fit for chrooted environment btw) add a specific configuration in pam.d/sshd file   On the other hand I have read:     The OpenSSH SFTP client and server do transfer the permissions (as an   extension) and create the remote file with the permissions on the   local side. AFAICT, there is no way to disable this behavior.   So I did the following test:   On my client I created file MYFILE and directory MYDIR with permissions 600 and 700.  Then with sftp commands:  mkdir => the new directory has permissions following the umask (OK) put MYFILE => MYFILE has same permissions as on client (KO) put -r MYDIR => MYDIR has same permissions as on client (KO)   If I change permissions of MYFILE and MYDIR on client side, and upload again, I get the new permissions on server side.  I tried the pam.d solution too, but it changed nothing.  So now I'm confused :  From what I tested and a part of what I read, I would say OpenSSH always preserve permissions. But as there are many posts saying that a umask could be defined, I can imagine I do a wrong thing in my test configurations.  I would appreciate some experienced feedback.  Thank you.


Icons (and find a community bar) are slightly shifted to the top (i.e. not centered on community name) in the main menu for :        Compare it with MSE:

There is an alignment issue in the  Inbox, Achievements dialog and Site Switcher. The icon is not properly padding with the adjacent text.  The alignment in inbox, achievement and site switcher from other sites are fine. I can verify this alignment issue in Chrome and Firefox.   Screenshot for reference:


I use workspaces with a great deal of windows! I have a problem:   Be using a firefox tab, or terminal window.  Change to password manager (on other workspace) by clicking launcher icon Copy password I want to go back to last opened window <- !! MY PROBLEM !! how can I do this?   I get 'stuck' at step 4 and go crazy trying to find where I last was. I hate this ! It breaks up my flow. I feel like using my birthday as password for everything ^^  I searched a lot and found advice  Tapping ALT+TAB or Shift+ALT+TAB but this cannot go across workspaces.  I would love a key that is 'go to last active window' wherever it may be, changing workspace if needed

Enabling Bias alt-tab sorting to prefer windows on the current viewport as described  made no difference. How can I get back the exact same behavior as 11.04, so that alt-tab only switches between windows on the current workspace?  Simply disabling the alt-tab and shift-alt-tab keybindings on the unity switcher seems to have helped, but it still switches workspaces on me sometimes.  For example, if I give a terminal window focus then press alt-tab, it switches to another terminal window on any workspace before trying to switch on the same workspace. Also, the Unity switcher still shows up when I alt-tab then hold alt even though I removed its alt-tab keybinding.


I have several Boot CD's/DVD's where I'm able to make a bootable USB-stick and put into it. But I can do this separately only. Is it possible to merge several bootable CD's/DVD's into a single bootable USB-stick where I can choose which system to boot from? I'll be happy for a good link, or if you just tell me the steps with the right expressions that i can google.

I am looking to create a USB flash drive that I can put multiple  ISO images on and select which boots from startup. The ideal candidate supports Linux and Windows-based ISO images, and is relatively simple. It also must have some reasonable process for adding and removing an ISO image from the drive/list.    Things that I'm not looking for in this specific question:    or other swiss-army knife live CDs. The point is to boot any one of multiple CDs, not to boot a (certainly useful) utility CD. Installing a single live CD to a USB drive. I'd like to have multiple ISO images, selectable at startup.   I don't have a specific purpose in mind, possibilties include a single drive with a  variant, Ubuntu desktop, UBCD4Win for DOS, the Offline NT Password Cracker, etc.  Flexible and easy to use are the name of the game!


Does anyone have any advice for removing separators of split quotes in a piece of text? I am using Python, and am still a beginner.   For example, "Well," he said, "I suppose I could take a break." In this example, the italicized "he said," is the separator, and needs to be removed. Then, the quote needs to be seen as one string within quotations such as, "Well, I suppose I could take a break."  I haven't been able to find code similar to this yet, and was hoping someone may be able to point me in the right direction.   Thanks!

I have a value like this:  "Foo Bar" "Another Value" something else   What regex will return the values enclosed in the quotation marks (e.g. Foo Bar and Another Value)?


I want to search an associative array and when I find a value, delete that part of the array.  Here is a sample of my array:      Array (     [0] => Array         (             [id] => 2918             [schoolname] => Albany Medical College             [AppService] => 16295C0C51D8318C2         )      [1] => Array         (             [id] => 2919             [schoolname] => Albert Einstein College of Medicine             [AppService] => 16295C0C51D8318C2         )      [2] => Array         (             [id] => 2920             [schoolname] => Baylor College of Medicine             [AppService] => 16295C0C51D8318C2         ) }   What I want to do is find the value 16295C0C51D8318C2 in the AppService and then delete that part of the array. So, for example, if that code was to run on the above array, it was empty out the entire array since the logic matches everything in that array.   Here is my code so far:              foreach($this->schs_raw as $object) {                 if($object['AppService'] == "16295C0C51D8318C2") {                     unset($object);                 }         }

Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.


I have both wired and wireless headphones. I thought of sharing the both to see a movie. To do that, can we get the audio output of both at same time. I can able to switch the output but not access at same time.

I have 1 android device, 1 wired headphones, 1 wireless headphones, 2 ppl willing to watch film.  When I connect both of headphones only wired work.  Is it possible to use both of headphones simultaneously?


import java.util.Scanner;  public class DisplayBox2 {  public static void box (int length, int width){       Scanner input = new Scanner (System.in) ;     String Answer;       System.out.println("Do you want to use a special character to use to display the box ?");        Answer = input.nextLine();      if (Answer == "Yes"){         System.out.println("Please enter the character that you would like to display the box");         int Char = input.nextInt();      for (int i = 0; i < length; i++) {            for (int j = 0; j < width; j++) {                 System.out.print(Char +" ");             }             System.out.println("");         }     }      if (Answer == "No"){          for (int i = 0; i < length; i++) {             for (int j = 0; j < width; j++) {                 System.out.print(" *");             }             System.out.println("");         }     }       input.close();  }  public static void main(String[] args) {     // TODO Auto-generated method stub      Scanner input = new Scanner (System.in);        int length, width ;       System.out.println ("Please enter the length of the box");      length = input.nextInt();     System.out.println (" Please enter the width of the box");     width = input.nextInt();       input.close();        box (length, width);    }   }  i dont understand what the error is in my code. can anyone please help  Please enter the length of the box  5  Please enter the width of the box  5 Do you want to use a special character to use to display the box ?  Exception in thread "main" java.util.NoSuchElementException: No line found  at java.util.Scanner.nextLine(Unknown Source)  at methods.DisplayBox2.box(DisplayBox2.java:14)  at methods.DisplayBox2.main(DisplayBox2.java:56)

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 want to know how I can compress my dll files in my program, then upon running of the program the files are extracted from the program so that the program may use them, and when the program is closed, the files are compressed back in.

I am not too familiar with .NET desktop applications (using ). Is it possible to have the entire application run from a single .exe file?


how do I configure VLC 2.0.4 to open each file I open in a new instance, meaning not the already opened window (if it is opened) and by that repalcing the currently played file?

I always used to open a new VLC window; go to "open file"...etcetera when I wanted to watch something because when I click on a file in Windows Explorer and chose "open with" or just clicked on the file or right-clicked to choose "play with VLC" it always opened in an old already used VLC window.  Is there any way to get VLC to use a new one without always resorting to: Open VLC, "open file", find file etcetera?


So im working on induction proofs but im having a bit of trouble with them. If you guys could help me that would be greatly appreciated, they're just sort of confusing to me.  Use induction to prove the following theorem: Theorem: For each integer $n$, $n^3-n\equiv 0\pmod{6}$

As homework, I have to prove that     $\forall n \in \mathbb{N}: n^3-n$ is divisible by 6   I used induction  1) basis: $A(0): 0^3-0 = 6x$ , $x \in \mathbb{N}_0$ // the 6x states that the result is a multiple of 6, right?  2) requirement: $A(n):n^3-n=6x$  3) statement: $A(n+1): (n+1)^3-(n+1)=6x$  4) step: $n^3-n+(n+1)^3-n=6x+(n+1)^3-n$  So when I resolve that I do get the equation: $n^3-n=6x$ so the statement is true for $\forall n \in \mathbb{N}$  Did I do something wrong or is it that simple?


My passport expires in May. I have a US visa, but my passport is in my maiden name. I'm planning on making a new passport with both my maiden and married last names. Will I be able to  use the visa? I need to know what to do. Thank you.

I had my US visa about 7 month age, and I had to renew my passport for certain circumstances, so there was a mismatch in the name between both the visa and the new passport, you see they had to put my grand grandfather's name which was not on the old passport nor the visa, the name on old passport and visa is: Abdelrahman Samy Ali Mohammed and the new passport is: Abdelrahman Samy Ali Ibrahim Mohammed. My grand grandfather's name is Ibrahim, so the question is that gonna cause me any troubles concerning my entry to the US? is there any document should I consider taking it while i'm traveling?  Thanks,,


Suppose that $G$ is a finite group of even order. Show that $G$ must contain a non- identity element a for which $a^2 = e$.

I am working on the following problem from group theory:     If $G$ is a group of order $2n$, show that the number of elements of $G$ of order $2$ is odd.   That is, for some integer $k$, there are $2k+1$ elements $a$ such that $a \in G,\;\; a*a = e$, where $e$ is the identity element of $G$.


How can I have a cell that uses the literal value written into it, or calculates its value when no literal value was given?  For example:   I have two columns: column B with a price including VAT, and column C with a price without VAT. If I put a price with VAT in B2, then I want cell C2 to calculate the price without VAT based on B2. But if I put a price without VAT in C2, then I want cell B2 to calculate the price with VAT from C2.     I want to give this spreadsheet to my mother, who barely understands Excel. She just has to enter the values that she knows, and the worksheet should derive the other values from that.

I would like to either populate a cell value from direct key input or have the cell value derived from a formula.  Example: either directly input a number into cell A4 or have the value for A4 = A2 + A3    I don't want the formula overwritten should direct key input be used.  Thx, hope this clarifies.


There seems to be an issue with the flair link. On any site, after going to the user profile page, if I click on the flair link, its is not taking me to the flair page. Instead it stays on the same page with the URL of the page changes to this    This seems to be a bug where an extra / is added to the URL.  Update: As  pointed out, it seems that because of the characters in my username, the URL is not getting generated properly. But I'd like to point out that, if such characters are allowed to be entered as a part of the username, then the system should handle them as well.

The "flair" link in the profiles for people with all-Unicode usernames is broken.  For example, clicking on it for  links to .  What's happening here is that the flair link is http://site.stackexchange.com/users/<userid>/<username slug>/flair. For such usernames, the slug is blank, which leads to http://site.stackexchange.com/users/<userid>//flair, which is just a link to the profile.  Could this be fixed? To fix it, we could either have the system recognize the double-slash, or remove the slug from the flair link (I don't see why it's needed).


explains the singular and plural of performance depends on the contex.  One person answers that regarding algorithms, it's always singular, but perhaps other people disagreed.  Here's the passage.     In the classical model of computation, the state-of-the-art in   factoring is a composition of four algorithms. Due to their   performance, they are executed in a specific order in the search   for a non-trivial factor of the composite number one wishes to factor.   Should it be "due to their performances"?  What makes it difficult for me in this case is the presence of "their".  So I'm not sure this passage can be put in the singular as Peter Shor .   uses the plural in one case, but that example doesn't clarify what should be done in this case.      In this context, I'm inclined to say it should be singular because the performance of algorithms is in many ways a measure of how successful they are, determining the context, but I'm not sure.  What would you say is the context here of this case?  The text could be written to "Due to their complexity classes, [...]" and then plural would be a necessity.  But I'm in the interested in the question asked, not in how it could be rewritten.

When I have to use information and performance I'm always confused.  However, I'm asking whether when I'm referring to more than one piece of information of performance I should use "information/performance is" or "information/performance are."


I'm currently experiencing issues with my server MySQL databases as I keep receiving the following error:  InnoDB: The log sequence in ibdata files is higher InnoDB: than the log sequence number in the ib_logfiles! Are database? InnoDB: you are using the right ib_logfiles to start up the database? InnoDB: Log sequence number in ib_logfiles in 6316712, log InnoDB: sequence numbers stamped to ibdata file headers are between InnoDB: 24916633497 and 24916633497   Hope someone can help me with this. Thanks, in advance!

Our site was getting intermittent database errors and I asked my webhost to check what's happening. After some inspection they found that the database has few issues and tried repairing it. Finally I got following message from them-      I have attempted every repair on the InnoDB database and we are still   getting  the InnoDB log sequence number is in the future. At this   point to get the  ibdata and the iblogfile to match up once again we   will need to restore the  MySQL directory (which includes databases)   from the backup we have on the  server. The process should not take to   long but there will be some downtime  associated with a restore like   this. If this is not the best time to restore  the MySQL directory I   can schedule this for a different time. Please let me  know how you   would like to proceed with this.   Can someone tell me what'd be the best way to address this issue. I really don't want to lose out on any data and want the dB to be repaired.   PS: If you need more information, please let me know and I'll get it from our web hosts.   Would really appreciate your help.


My MacBook Pro kernel-panicked with this message, "You need to restart your computer. Hold down the power button until it turns off, then press the power button again."  The same message appears each time I reboot.

I was trying to swap command and option key for my external keyboard following the instruction in  .  When I'm done with change and I restarted, my mac booted with Kernel panic message. I'm sure I've messed the info.plist file. Now I cannot boot in safe mode as well.  I know if I get a way to change the file it should be fine.  The message shown in screen is   panic(cpu 0 caller 0xffffff80002c4794): Kernel trap at 0xffffff80005eae1e, type 14=page fault, registers: ... Debugger called: <panic> Backtrace (CPU 0), Frame : Return Addressd ... ... can't perform kext scan: no kext summary BSD process name corresponding to current thread: Unknown  Mac OS version: Not yet set  Kernel version: Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48PM Kernel UUID: ... System uptime in nanoseconds: 11...   The error specifies the problem in kext as well.  Thanks.


About twice a day svchost.exe uses 50% CPU for more 20-40 minutes. If I kill the process it starts again. Is there a way to identify what service is causing this without disabling services one by one? The virus scanner is scheduled for other time and is not reporting that it would be scanning. Switched off real time scanning in antivirus app and didn't help.  Edit: Turns out it was the Windows update service. I suspect this is Microsoft's revenge for not upgrading to Windows 10 because seems to be related with the popup asking me to install W10.

I'm having a problem with Windows 7 64-bit. I thought it was slow and all, but then I saw that the CPU usage was always around 80% and started searching for a solution.  There are two svchost.exe's consuming around 30% each and in the resources monitor there's a system interrupts consuming 45% all the time. I tried closing the applications, but it makes no difference.  I tried some other things that I've found on Google, like disable system updates, but it didn't work.  I don't know if it will help but here's my specifications:  Core 2 Duo 4400 ATI Radeon 4850 4 GB DDR2 RAM     EDIT  I ran the suggested program and got this information; did I get it right?      EDIT  As you asked here it is, did I get it right now? The other TCP/IP there's nothing.    EDIT  I ran msconfig and took the services that one of the svchost.exe processes was using out of the startup and now my CPU is around 50%, but I still would like to improve it further. I can't lose that much CPU power just because of Windows...    EDIT  Yeah, there's nothing I can do here. I am going to reinstall Windows XP soon, it's really weird...


I am reading about the TI TM4C12x microcontroller, which is available as an IC:    The datasheet of one of its variants can be found here:   On the block diagram on p. 48, it is shown that the MCU uses a ARM® Cortex-M4F processor.  Questions: Is the ARM® Cortex-M4F processor sold as an IC chip (like the common Pentium chips in desktop PCs)? I thought I would be able to find a picture of the ARM processor chip, but I was not successful in a Google search.   If the answer is yes, does TI (and other MCU manufacturers) somehow put the ARM processor chip inside its own TM4C chip, so if I cut open the TM4C chip, I would find another ARM IC inside?   If not, what exactly does TI buy from ARM?  "Appendix A. Package Information" in the datasheet does not seem to say much this.

Assumptions:   Computer architecture: Describes how the different modules of a processor interact with each other. A computer architecture is defined using vhdl files Computer Organization: Describes the physical layout of the processor modules on silicon. A computer organization is defined using a set of photo masks (and manufacturing process eg chemical, that goes at each step) Computer Organization, therefore, requires that the fab process be taken into account. ARM is not in the fabrication business, therefore it does not sell photo masks.     My question(s):   What exactly is ARM selling to a vendor (eg: freescale)? For a SoC (System On Chip), (eg: ), which part is ARM and which is Freescale? Who did the integration?


How do I solve this equation: $$x^5 \equiv  3\pmod{19} $$ where all I know is Fermat's Little Theorem and operations on multiplicative group $\mathbb Z_p^*$?

We know that $221 = 17*13$. So we can check if the system has roots to both of those equations separately, which it does:  $x^{5} \equiv 2$ mod $13$ has the solution $6 + 13n$ and $x^{5} \equiv 2$ mod $17$ has the solution $15 + 17n$.   I got these numbers from wolfram, I have no idea how to solve this problem WITHOUT a calculator. And even after finding these numbers. How would one obtain a solution modulo $221$? I was thinking the Chinese Remainder Theorem but I am under the assumption that CRT only applies to problems with powers of $x$ which are $1$.  Thanks.


I did a frame swap recently and my front brakes are now screeching loud and not as powerful as they were on the other frame. This leads me to believe that I must have gotten some mineral oil or other contaminant on them during the frame swap process.   The problem is that the pads are expensive and they still have a lot of life left on them. But just wondering if it's a lost cause this point to try to clean or salvage them

In trying to change the brake pads on my mountain bike, I managed to get oil on my new pads and empty out all the brake fluid, and consequently also get some oil on the disc. I took the bike to the shop and they are now telling me I need to change the pads and the disc. I can understand the pads, but do I really need to change the disc or is the guy (girl actually) just scamming me. The disc is not soaking in oil, from what I can tell it just has a bit of oil here and there.


I'v been reading other answers about dynamically generated elements and event listeners but I still don't get how to do it with my case:   I appended a few check boxes to a list with:  $('#divId').append(...)   So the result is something like this:  <div id="divId">     <label><input type="checkbox" id="0"...> Element 0 </label>     <label><input type="checkbox" id="1"...> Element 1 </label> . . . </div>   Every element have a different id but i don't know how to add an event listener that listens to all the elements on that list. Something like:  $([ALL THE CHECK BOXES IDS]).change( function() {     if( $(this).is(":checked)"){         // do stuffs...     }  });

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.


A comment an an answer of mine on  made my wonder about the iron coins used by the Faceless Men, one of which was given by Jaqen H'ghar to Arya.  Was the iron coin given by Jaqen H'ghar to Arya regular Braavosi currency? Or were they a different kind, minted just by/for the Faceless Men as a mean to let them being recognized when they wanted to?  I've always assumed that the Faceless Men used their own coins, without any legal value and distinct for the regular Bravoosi currency; my rationale is that regular currency is used by anyone and is too much widespread to be instantly recognized as a symbol of the Faceless Men, like the sailor to whom Arya shows his coin:     "Wait," Arya said suddenly. "I have something else." She had stuffed it down inside her smallclothes to keep it safe, so she had to dig deep to find it, while the oarsmen laughed and the captain lingered with obvious impatience. "One more silver will make no difference, child," he finally said.   "It's not silver." Her fingers closed on it. "It's iron. Here." She pressed it into his hand, the small black iron coin that Jaqen H'ghar had given her, so worn the man whose head it bore had no features. It's probably worthless, but...   The captain turned it over and blinked at it, then looked at her again. "This... how... ?"   Jaqen said to say the words too. Arya crossed her arms against her chest. "Valar morghulis," she said, as loud as if she'd known what it meant.   "Valar dohaeris," he replied, touching his brow with two fingers. "Of course you shall have a cabin."   A Storm of Swords - Arya XIII   From this passage, it seems to me that the captain is somewhat shocked to see that iron coin, but he is from Braavos, so the mere sight of an iron coin should not be a great surprise to him; but he is "bought" only after Arya say the words, so the whole passage instead of clarifying the situation, gives me even more doubts about the whole subject.   Like, I said, I tend to support the hypothesis that the coins fo the Faceless Men are not regular currency, but I don't have any official reference to support this opinion of mine; for what I know it could be just an assumption made without any established fact.    The only references that I was able to collect are that Arya's coin (given by a Faceless Man) was      a piece of iron no larger than a penny and rusted along the rim. One side had writing on it, queer words she could not read. The other showed a man's head, but so worn that all his features had rubbed off.   A Clash of Kings - Arya X   and about Braavosi currency     Yet they brought him money: leather purses plump with gold and silver and the square iron coins of Braavos.   A Dance with Dragons - The Ugly Little Girl    book has pictures of both of these coins and they seem to be two different things, but they are both depicted as round coins, and we know that the Bravoosi currency is made of square coins, so I'm inclined to consider these illustrations as inaccurate and to not use them as a solid and valid reference.    So, do the Faceless Men use their own distinct iron coins, or just the regular Braavosi currency?  Please note that I'm only interested in answers about the books, not about the TV show.

Jaqen H'ghar gives Arya the iron coin, she can apparently give it to any Braavosi and say Valar Morghulis and that gets her where she needs to go, but why?    Where do these coins come from and what do they indicate to a Braavosi?


I haven't installed Python, but unfortunately the terminal doesn't work. Pressing Ctrl+Alt+T or clicking the terminal icon doesn't work at all. Please help Do I need to reset this?

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


Is there a model of $\mathsf{ZF}$ in which the Axiom of Choice fails but the following statement holds for arbitrary sets $A, B$:     there is an injection $A \to  B$ if there is a surjection $B \to A$?

For sets $A,B$, let $|A|\leq^*|B|$ say that there exists an onto map $f:B\rightarrow A$ or $A=\emptyset$.   My question is, is $$\forall A,B(|A|\leq^*|B|\longrightarrow |A|\leq|B|)$$ equivalent to the axiom of choice?  Thanks


We can (shallow) copy a list by using [:]:  l = [1, 2, 3] z1 = l[:]   We can also (shallow) copy it by using [::]:  z2 = l[::]   and now z1 == z2 will be True. I understand how these slices work after reading the answers in .  But, my question is, is there any difference between these two internally? Is one more efficient than the other in copying or do they do exactly the same things?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


gives a 404, and doesn't seem to exist anymore.

Previously, in order to explain the benefits of (certain limited kinds of) duplication on Stack Exchange sites, I've seen a blog.stackoverflow blogpost with the words "Dr. Strangedupe" in the title.  The post comes up in a search on the new blog, but       Can we please bring this post back? I'd love to link to it when , to reassure the questioner that there is value in not deleting their question because of search terms, but the blog post explained it a lot better than I could in a comment.


I found this proof of Pythagorean Theorem from  what 3Blue1Brown shows in his Lockdown math lecture  "": In the following right triangle, project $\cos\alpha$ and $\sin\alpha$ back to the hypotenuse of length $1$, they become $\cos^2\alpha$ and $\sin^2\alpha$: $\to\cos^2\alpha+\sin^2\alpha =1 $.  I thought this is what a simple, visual, and elegant proof!  My questions:  Is it a circular proof, why? If not, are there better ones?  I want clarity about whether or not this proof is circular.  The argument only depends on the definition of the sine and cosine functions and nothing more (please correct me if I am wrong).  This is why I love it.  Many other geometry solutions involve more than three shapes.

The  is one of the most popular to prove by mathematicians, and there are  (including one from ).    What's the most elegant proof?  My favorite is this graphical one:    According to cut-the-knot:     Loomis (pp. 49-50) mentions that the   proof "was devised by Maurice Laisnez,   a high school boy, in the   Junior-Senior High School of South   Bend, Ind., and sent to me, May 16,   1939, by his class teacher, Wilson   Thornton."      The proof has been published by Rufus   Isaac in Mathematics Magazine, Vol. 48   (1975), p. 198.


Problem Statement  I use BibTeX for the Bibliography, makeindex for the Index and hyperref to create the hyperlinks.  In the .pdf file that I get after compiling, all hyperlinks (e.g., ToC entries, page references in the Index, citations of Bibliography entries,...) work, except for the Index entry in the ToC, which instead points to the Bibliography (the Bibliography ToC entry also links to the Bibliography).  How to reproduce the problem  Here is my example.tex file, reduced to a MWE:  \documentclass[a4paper]{book}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{lipsum} \usepackage{makeidx} \usepackage[nottoc,numbib]{tocbibind} \usepackage{hyperref}  \makeindex  \begin{document}  \bibliographystyle{unsrt} %\nocite{*}  \frontmatter  \title{Title} \author{Author} \date{} \maketitle  \tableofcontents  \mainmatter  \chapter{First chapter} \section{First section\index{section}} \lipsum[1-2] \section{Second section} \lipsum[1-2]  Cite-example\cite{ref1}  \backmatter  \bibliography{biblio.bib}  \printindex  \end{document}   and my biblio.bib file:  @book{ref1,   author = "Author",   title  = "Title",   year   = 1490 }   Finally, here is the routine I use in compiling (I am running TeXLive in GNU/Linux Fedora20):  pdflatex example.tex makeindex example.idx bibtex example.aux pdflatex example.tex pdflatex example.tex   What am I doing wrong?

I am writing a document using the book class, and the hyperlink to the index sends the pdf viewer a bit too far, i.e. when I click the top of the screen is at the start of the index instead of displaying the index title. Here is a MWE :  \documentclass{book} \usepackage{hyperref} \usepackage{makeidx} \makeindex \begin{document}   \cleardoublepage \phantomsection \addcontentsline{toc}{section}{Table of Contents} \renewcommand{\contentsname}{Table of Contents}  % Original name = Contents \tableofcontents \index{foo}   \cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{\indexname} \printindex   \chapter{foo} \end{document}   When I compile it and click on index, I get to that position :    How can I have the hyperlink to index send exactly to the index page, with the index title clearly visible at the top ?  Edit: Fixed the order of phantomsection and addcontentsline  Edit 2 : The log with a verbose hyperref is the following :  Package hyperref Info: Anchor `Doc-Start' on input line 18. Package hyperref Info: Anchor `chapter*.1' on input line 20. (D:\Travail\Bugtex\bug.toc Package hyperref Info: bookmark on input line 1: (hyperref)             thecounter {0} (hyperref)             text {\contentsname } (hyperref)             reference {chapter*.1} (hyperref)             toclevel {0} (hyperref)             type {toc}. Package hyperref Info: Reference (link) `chapter*.1' on input line 2. Package hyperref Info: Reference (link) `section*.2' on input line 3. Package hyperref Info: Reference (link) `chapter.1' on input line 4. ) \tf@toc=\write4 Package hyperref Info: Anchor `page.1' on input line 23.  [1   {C:/Users/Arnaud/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map} Package `hyperref' Info: End of reference (link) `chapter*.1', line 2. Package `hyperref' Info: End of reference (link) `section*.2', line 3. Package `hyperref' Info: End of reference (link) `chapter.1', line 4. ]  Package hyperref Info: Anchor `page.2' on input line 23.  [2  ] Package hyperref Info: Anchor `section*.2' on input line 24. Package hyperref Info: bookmark on input line 25: (hyperref)             thecounter {0} (hyperref)             text {\indexname } (hyperref)             reference {section*.2} (hyperref)             toclevel {0} (hyperref)             type {toc}.  (D:\Travail\Bugtex\bug.ind Package hyperref Info: Reference (link) `page.1' on input line 3. Package hyperref Info: Anchor `page.3' on input line 5.  [3  Package `hyperref' Info: End of reference (link) `page.1', line 3.  ]) Package hyperref Info: Anchor `page.4' on input line 28.  [4   ] Package hyperref Info: Anchor `chapter.1' on input line 28.  Chapter 1. Package hyperref Info: bookmark on input line 28: (hyperref)             thecounter {1} (hyperref)             text {\protect \numberline {\thechapter }foo} (hyperref)             reference {chapter.1} (hyperref)             toclevel {0} (hyperref)             type {toc}. Package atveryend Info: Empty hook `BeforeClearDocument' on input line 29. Package hyperref Info: Anchor `page.5' on input line 29.


I am having trouble with multiplying my numbers and getting not correct value.  I have numbers 1,2,3,6,12 and 2.95,3.95,6.95,15,95  but when I multiply my number 3 with 2.95 using 2.95 * parseInt('3') it returns 8.850000000000001  and when I multiply 12 with 15.95 it returns 179.3999999999998.  I dont want this too long zeros and this kind of value .8500000000001  its also returns some of those numbers when they multiply.  how to get rid of this? how can I get complete value like 12 * 15.95 should give 179.40

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I recently came across this issue. I searched online and found that a stranded preposition might be no longer treated as incorrect, but it's just a guess. Are you still taught not to end a sentence with a preposition or is it a myth now?

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


Does  anyone know how to show this? Let $H$ be a Hilbert space and $A$, $B$ bounded positive operators defined on $H$ such that $A^{-1}: H \rightarrow H$ exists and hence bounded and $A \leq B$. Therefore, $B^{-1}: H \rightarrow H$ exists and bounded. Show that $A^{-1} \geq B^{-1}$.   I tried to use this theorem "If two bounded self-adjoint linear operators $S$ and $T$ on a Hilbert space $H$ are positive and commute, then their product $ST$ is positive." However, I don't know whether $A$ and $B$ commute with each other. Are there any other ways to deal with it? I am using book of Kreyszig.

I need the following result. I think it's quite obvious but I don't know how to prove that: Let $C, T : \mathcal{H} \rightarrow \mathcal{H}$ be two positive, bounded, self-adjoint, invertible operators on a Hilbert space $\mathcal{H}$ such that $C \leq T$. Then it follows also that $T^{-1} \leq C^{-1}$. Or maybe this is even not true? If this is not true can somebody give me a counter-example or if it is true some strategy how to solve this? I would be very thankful.  mika


I would like to know whether it is possible to have Windows 7 installer files and Ubuntu 12.04 installer files on the same bootable USB drive so that if I choose to boot a PC with such a USB drive, I will get the option to install either Windows 7 or Ubuntu 12.04 on it.  Perhaps a USB drive can have two bootable partitions, one with Windows 7 setup files while the other can have Ubuntu 12.04's setup files. On booting with such a drive, one gets a boot screen which lets you install either of the two or both at different times.  Is such an arrangement possible? Can this be done?  Please let me know.

What I want is to create a bootable pen drive that shows GRUB menu and I can select any of the several bootable systems from there to install/run. I have several ISO images that I want to install in the USB like Ubuntu, Fedora, System Rescue CD, Windows XP and Windows 7 (The windows versions are optional, mostly am looking for a multi installer for Linux distros, specially Ubuntu version)  The default Startup Disk Creator only works with Linux Images and only 1 at a time (At least for the mean time. If it allows more systems and multiple ISOs it would be awesome)  What method exists that I can use step by step to create a bootable USB Drive with multiple images than can be booted from the USB and selected from GRUB. It must support Windows Images and Linux Images.  Alternatively, is there also a way to have multiple versions of the Ubuntu installation ISO on same USB Drive, such as, when booting from it, I get to choose what Ubuntu version and architecture to install, for example:     BOOT MENU   Ubuntu 12.04 32 Bit   Ubuntu 12.04 64 Bit   Ubuntu 12.10 32 Bit   Ubuntu 12.10 64 Bit   UPDATE: Wanted to add that the English version for the post mentioned by daithib8 is here:


When I try to boot my computer, I get this error:     The system is running in low-graphics mode   Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   The LIKELY causes like installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors are not what is causing this as   I have No graphics card. No additional drivers. I freed space too. I reinstalled desktop too. I checked lightdm.config too. It already had  greeter-session=unity-greeter  I did this too. sudo apt-get install fglrx  sudo reboot No idea what this does but this was one of the solutions provided. And this too.   sudo apt-get update sudo apt-get -d install --reinstall gdm sudo apt-get remove --purge gdm sudo apt-get install gdm sudo reboot    Now I have no desktop in failsafe mode in ubuntu.  Now what do I do? I HAVE TRIED THE SOLUTIONS PROVIDED FOR . They didn't work.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


The community has King, King, Queen, Queen, 2. Bob has 10, 7 in the hole. Charlie has 3, 3 in the hole.     Does Bob win because he has high card, or does Charlie win because he pocket 3 pair?

player A : 4,4 player B : A,10 board : K,K,Q,Q,2  Which player wins? I guess Player B but player A claims he has a pair of 4 which is a bigger kicker. who is correct?


I'm creating 3 VM's. I set up the first two with nodejs/npm but am having problems with the third. (Note: I realize cloning would have been far more expedient, but that's outside of scope of question.)  In the third, I've installed nodejs and npm using the sudo apt-get install method for each. After installing both I ran sudo ln -s /usr/bin/nodejs /usr/bin/node to link node to nodejs. Unfortunately, after performing this node fails to work; node -v returns nothing while nodejs -v returns v0.10.25.  Any leads as to what error was made or how to resolve? I've tried both unlinking and removing and recreating /usr/bin/node multiple times.  Note: Similar problem listed here (), but mine is different enough to support a new topic, I believe.

I have two Ubuntu 12.10 machines: machine A is a VMWare VM and machine B is and old Acer laptop. On both machines, I installed node using apt-get. However machine A installs the main binary as /usr/bin/node and machine B as /usr/bin/nodejs. Here are some behaviors I observed:   Both machine returns /usr/bin/node in response to the which node command. However, there is no such file on machine B. Issuing the command node works for machine A, not B. On B, I have to use nodejs instead. On B, there is a binary called /sbin/node, A does not have it.   These behaviors causes inconsistency problem when developing on both machines. For now, I worked around by renaming the binaries on B as such:  sudo mv /sbin/node /sbin/node-sbin sudo ln -s /usr/bin/nodejs /usr/bin/node   Is there a way to really fix this, so that node will be installed as /usr/bin/node instead of /usr/bin/nodejs?


How do I prove the following using the Pigeonhole principle?  Let $n$ be an odd integer. Prove that there exists a positive integer $k$ such that $2^k \mod n = 1$.  I don't understand how I can prove this. Any help would be appreciated.

Hi I've been trying to solve this problem for at least 4 hours now but I can't figure it out. If anyone can help I would really appreciate it!  I am asked to prove this using the pigeonhole principle:  "If n is an odd integer, show there exists a positive integer k such that 2^k mod n = 1."  I know that n has n possible remainders (0,1,2,...,n-1) and that this may be the "pigeonholes". I also found that as you increase k in 2^k and calculate 2^k mod n, the remainders occur in a pattern... (Like for 2^k mod 5, when k=0 -> remainder is 2, k=1 -> r=4, k=2 -> r=3, k=3 -> r=1, then the pattern repeats 2,4,3,1.)  Also, I found n divides 2^k - 1, so 2^k - 1 = nb, for an integer b. Since 2^k is even and n is odd, b must be odd too...  (Thank you to both who helped me!!! I am really grateful :) )


Can't remember the name of a book I read as a kid. Premise is that teens travel back in time using some sort of diode. I think the teens were created somehow and one is named "fiver." The "fiver" name referred to the sequence of the traveler. So the protagonist was the fourth traveler, and Fiver would take over after him. The book would've published before the 90s, but I'm not sure how much earlier. Help?

This book had a story similar to the 12 monkeys story.  It took place after an apocalypse and the main character was going back in time to try to fix his current timeline.  His base was in a bomb shelter under the Cinderella City Mall in Denver (it's gone now but was once the largest mall in the world.)  I'm pretty sure the apocalypse was a nuclear war. I think the cover was black and green.  I can't remember more because the 12 monkeys story is distorting my memory.


In the following html piece, does javascript: do something?  <input type="text" name="Name" id="Name" value=""   onkeydown="if(event.keyCode == 13){                   if(IsValidBrowser()==true){                           javascript:Continue();                         //^^^^^^^^^^^                   } else {                      alert('Please use Safari, Google Chrome, or MS                       Internet Explorer version 7.0 or higher.');                   }            }"  />   I thought that javascript: was only to be used in the href property of a <a> tag, but I run into this.  Thanks.

I've been making a concerted effort to improve my javascript skills lately by reading as much javascript code as I can. In doing this I've sometimes seen the javascript: prefix appended to the front of event handler attributes in HTML element tags. What's the purpose of this prefix? Basically, is there any appreciable difference between:  onchange="javascript: myFunction(this)"   and  onchange="myFunction(this)"   ?


I am working on an Insurance domain use case to predict if an existing customer will buy a second insurance policy or not. I have a few personal details saved under different categories like Marital status, Smoker (Yes or No), Age (Young, Adult, Senior Citizen), Gender (Male/Female) and few are continuous variables like Premium Paid, Sum Insured.  My target is to use this mix set of categorical and continuous variables and predict the class ( 1 - Will buy a second policy, 0 - Will not buy a second policy). So how can I find/compute the correlation in this dataset and pick only the significant ones to use in Logistic Regression formula for classification?  Will appreciate if someone can provide articles, link to a similar piece of work done in Python.

I am building a regression model and I need to calculate the below to check for correlations   Correlation between 2 Multi level categorical variables Correlation between a Multi level categorical variable and continuous variable  VIF(variance inflation factor) for a Multi level categorical variables   I believe its wrong to use Pearson correlation coefficient for the above scenarios because Pearson only works for 2 continuous variables.   Please answer the below questions   Which correlation coefficient works best for the above cases ?  VIF calculation only works for continuous data so what is the alternative?  What are the assumptions I need to check before I use the correlation coefficient you suggest?  How to implement them in SAS & R?


Can anyone tell me why this won't compile?  DateTime? completedDT; bool completed = false; completedDT= completed ? DateTime.Now : null;   I would have thought that as it was writing to a nullable object (DateTime?) the use of null would be acceptable. Instead I get this error:     Error  19  Type of conditional expression cannot be determined because there is no implicit conversion between 'System.DateTime' and 'null'

Could someone explain why this works in C#.NET 2.0:      Nullable<DateTime> foo;     if (true)         foo = null;     else         foo = new DateTime(0);   ...but this doesn't:      Nullable<DateTime> foo;     foo = true ? null : new DateTime(0);   The latter form gives me an compile error "Type of conditional expression cannot be determined because there is no implicit conversion between '<null>' and 'System.DateTime'."  Not that I can't use the former, but the second style is more consistent with the rest of my code.


I have received the documentation and I have not found the option to add a page to the table.

I'm trying to build a custom datable because I want the functionality to sort, search and paginate and also add action buttons in each row. Initially, my VF page was using  but we have now decided to rebuild that page in LWC.  I found a similar  but it hasn't really worked for me.  I then found  (Javascript) and  (ES2018) I have tried to implement Vanilla Datatables but I keep running into issues such as:      TypeError: Cannot read property 'length' of undefined   The above error is thrown because the library is unable to find the body of the table.   My point is that I feel this library won't work because it's using document, window and so on.   I was wondering if there is a way I could convert this library to something that is more suited to LWC basically have it "export" the modules. Since I'm not a JS expert I'm unable to put the pieces together.   Just for some context, I'll post my code here:  <template>

                 <template for:each={fieldSetData} for:item="field">
{field.fieldLabel}
                     	                 </template>

             <template for:each={records} for:item="row">
                     <template for:each={row} for:item="data">                         {data.value}	                     </template>
             </template>

 </template>   import {LightningElement, api, wire} from 'lwc'; import {processRecords} from 'c/recordGenerator'; import getFieldSetData from '@salesforce/apex/FieldSetData.getFieldSetData'; import getSobjectRecords from '@salesforce/apex/DeomoCTRL.getRecords'; import VanillaDatatable from '@salesforce/resourceUrl/VanillaDatatable'; import {loadScript, loadStyle} from 'lightning/platformResourceLoader';  export default class ManageSelectedIndicators extends LightningElement {     @api recordId;     records;     fieldSetData;     @wire(         getFieldSetData,         {objectName: 'SOBJECTName', fieldSet: 'FIELSETName'}     ) wiredFieldSetData({error, data}) {         console.log('wired called in Child')         if (data) {             this.fieldSetData = data;             this.getData();         }     }       constructor() {         super();         console.log('Constructor called in Child');     }      connectedCallback() {         console.log('Connected callback');     }      renderedCallback() {         console.log('Rendered callback');         Promise.all([              loadScript(this, VanillaDatatable + '/VanillaDataTables/src/vanilla-dataTables.js')          ]).then(() => {              const table = new DataTable(                  document.getElementsByClassName('.sobject-table'),                  //Also tried this.template.querySelector('.sobject-table'),                  {searchable: true, sortable : true}              );          })          .catch(error => {             console.log(error);          });     }      getData() {         getSobjectRecords ({             sobjectId: this.recordId         })         .then(response => {             this.records= processRecords(response, this.fieldSetData);         })         .catch((error) => {             console.log(error);         });     }  }   Edit: I have also tried lwc:dom="manual" that didn't seem to work either.  Is there any other way I could achieve these functionalities? Or do I have to write custom code to achieve this?


Good evening. I am reviewing for an intro to Java exam and the instructor wrote a question I seem to be missing something.  Consider:   int[][] mat = new int[3][4]; for (int row = 0; row < mat.length; row++) { for(int col = 0; col < mat[0].length; col++) { if (row < col) mat[row][col] = 1; else if (row == col) mat[row][col] = 2; else mat[row][col] = 3; } }   What are the contents of mat after the code segment has been executed?  The selection of answers I won't bother to list specifically as I don't require a specific answer to this. I need to understand what is supposed to happen. I plugged into an IDE and I get a gibberish answer if I add a System.out.print(mat);  "[[I@139a55"  While the instructor is expecting a selection of integers in either a 3x4 or 4x3 array. No integers exceed 3.   Any illumination on this would be invaluable to helping me understand the relationship between the for loops and the array to be done.

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


If I'd use a 30mm lens on a crop sensor, would it be like a fullframesensor with a 50mm on it? 30*1.6=48~50

I'm reading that a 50mm lens is recommended as a first prime lens for DSLR owners as it's supposed to give a 'natural' perspective, but when used on (most) DSLRs, the view is cropped, as if you were zoomed in by 1.5-1.6x, so it's more of a telephoto lens when used on a DSLR. I've also read however that the 50mm lens gives the same perspective on a DSLR and a 35mm, and shouldn't really be considered to be 'equivalent' to an 80mm lens as the crop factor isn't really a magic focal length changer.  Can someone explain how the image is different from (for example) a 50mm lens on a DSLR and an 80mm lens (assuming 1.6x crop factor) on a 35mm camera?


In the following code , I have 2 paragraphs with an Image between para 1 and para 2. As written in the code. The figure code is between the paragraphs text. But in the pdf file output the image does not lie between the paragraphs but at the end of the para 2. Can anyone pls help me to get the image between the paragraphs? CODE: \subsubsection{para1}   xxxxxxxxxxxxxxxx  \\  \begin{figure}[h]  \includegraphics[scale=0.8]{RotorAssembly}   \caption{Rotor components and assembly  \label{fig: Permanent magnet rotor }  \end{figure}  \subsubsection{para2} Permanent magnets are made of xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


If I am a stationary observer and the electrons are moving relative to me,then shouldn't its density increase according to special relativity and thereby create an altogether negative net charge.

Current in wire + moving charge next to wire creates magnetic force in the stationary reference frame OR electric force in the moving reference frame from special relativity due to change in charge density etc.... I think I understand this and I think it's super cool. Now here's the rub...  Current in wire + stationary charge next to wire creates no net charge. This is how nature behaves. I get it. My question is why can't I use the same special relativity logic as above, that is, current in wire cause electrons in wire to contract in accordance with special relativity so there has to be a net charge on the wire, which then acts on stationary charge next to wire.  I have been reading and reading and reading and I have come up with the following:  (1) When electrons in wire get accelerated to create current the distance between them actually expands in accordance with special relativity - something to do with bells spaceship paradox - which I am not going to pretend to understand  (2) This expansion from (1) above is exactly opposite and equal in magnitude to the contraction special relativity then causes and the expansion and contraction cancel out to keep the charge density in the wire constant and therefore no net charge on the wire  Here are my questions:  Is the explanation above correct? If so, please elaborate because i dont understand  If not correct, what is going on?  This is driving me absolutely nuts.