I am trying to create div which are draggable as well as resizable. Now, if I hardcode one div at design time, it works. However, if I add divs at run time, draggable does not work.  /*----------------------*/  . movingDiv {      border: 1px solid;     width: 150px;      height: 150px;      padding: 0.5em;      resize: both;     overflow: auto;     position: absolute; } /*-----------------*/  ......... .........

Drag and resize


Does PvZ 2 Piñata Parties only appear when all worlds are unlocked?

I haven't obtained any piñata parties in few days. Does it require all worlds unlocked before a piñata party unlocks?


Image of a Borel set under monotonic functions

Suppose $B$ is a Borel set and $f$ mapping  from $B$ to $R$ is a non decreasing function.Prove that $f(B)$ is a Borel set. f is a Borel measurable function because the inverse image of $(a, \infty)$ will be of the form $(t, \infty)$ or $[t,\infty)\cap B$ which is a Borel set. I cannot define inverse function because it may not be strictly increasing. How do I proceed?


How can I install and use powerline plugin?

is a plug-in to display informational and beautiful statusline for vim, tmux and shell prompt for bash, zsh.  Vim statusline:     How can I install and setup Powerline for different applications and shells in Ubuntu?


I've set up proftpd to use ssl/tls. Trying to connect I get an 'Illegal PORT command'  Finding Host xxx.nl ... Connecting to xxx.xxx.xxx.xxx:21 Connected to xxx.xxx.xxx.xxx:21 in 0.018001 seconds, Waiting for Server  Response Initializing SSL Session ... 220 FTP Server ready. AUTH TLS 234 AUTH TLS successful SSL session NOT set for reuse SSL Session Started. Host type (1): AUTO USER xxx 331 Password required for xxx PASS (hidden) 230 User xxx logged in SYST 215 UNIX Type: L8 Host type (2): Unix (Standard) PBSZ 0 200 PBSZ 0 successful PROT P 200 Protection set to Private PWD 257 "/" is the current directory CWD /var/www/html/ 250 CWD command successful PWD257 "/var/www/html/" is the current directory TYPE A 200 Type set to A PORT 192,168,192,14,211,181 500 Illegal PORT command Port failed 500 Illegal PORT command PASV 227 Entering Passive Mode (xxx,xxx,xxx,xxx,160,151). connecting data channel to xxx.xxx.xxx.xxx:160,151(41111) Failed to connect data channel to xxx.xxx.xxx.xxx:160,151(41111)   iptables:  Chain INPUT (policy ACCEPT) target     prot opt source               destination ACCEPT     icmp --  anywhere             anywhere            /* 000 accept all icmp */ ACCEPT     all  --  anywhere             anywhere            /* 001 accept all to lo interface */ REJECT     all  --  anywhere             loopback/8          /* 002 reject local traffic not on loopback interface */ reject-with icmp-port-unreachable ACCEPT     all  --  anywhere             anywhere            /* 003 accept all to eth1 interface */ ACCEPT     all  --  anywhere             anywhere            /* 004 accept related established rules */ state RELATED,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere            multiport ports ftp /* 021 allow ftp. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports ssh /* 022 allow ssh. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports smtp /* 025 allow smtp. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports pharos /* 051 allow rundeck. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports 8140 /* 814 allow puppetserver. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports http /* 080 allow http. */ ACCEPT     tcp  --  anywhere             anywhere            multiport ports https /* 443 allow https. */ DROP       all  --  anywhere             anywhere            /* 999 drop all */  Chain FORWARD (policy ACCEPT) target     prot opt source               destination  Chain OUTPUT (policy ACCEPT) target     prot opt source               destination   Connecting via normal ftp works just fine...   I'm using WS_FTP with ftp-authssl//xxx.nl/.... I tried several other connection options, ports, etc. But all give the same error. Althoiugh it seems that sometimes a first directory listing is shown (but that might be caching of WS_FTP)


If "rm dir -r" has removed just partial content of dir/dir1/, has it not removed anything in dir/dir2/?

If rm dir -r has removed just partial content of dir/dir1/ (and I cancelled rm), has it not removed anything in dir/dir2/ if dir/dir2/ still exists and contains something? My OS is Ubuntu 14.04 and filesystem ext4.  I heard , but can my question be answered more surely?  My OS is 64bit Ubuntu 14.04 with ext4 filesystem.  Knowing if rm completely remove a subdir before removing another subdir is weaker than knowing the order of rm operating in. So my question is not duplicate of the linked one.


Isosceles triangle has the least perimeter among triangles on the same base with same area?

Prove that of all triangles on the same base with same area, the isosceles triangle has the least perimeter (without trigonometry).   I could prove this with trigonometry but couldn't do the same with elementary geometry. I can see that if AB is the common base, then the locus of the third point must be parallel to AB. I cannot understand anything more hence couldn't provide anything more. Just trying to solve a trigonometric problem with geometry. Thanks, in advance, for your solutions.


openlayers add points to GeoJSON layer and store them to postgis

it should be a quite standard demand.   load data from a database (in this case PostGis) add data to the layer (in this case points with attributes) save new data back to database   I use this functionality with google maps api, but I wan't to move to Openlayers (3/4). Does anyone know a good example, tutorial how i could implement this?


PHP PDO prepared statements giving 'invalid syntax' error

I'm using prepared statements in PDO to select some data from my SQL server and I'm getting a syntax error:  QLSTATE[HY000]: General error: 10007 Incorrect syntax near 'memb_user'. [10007] (severity 5) [(null)] in   memb_user is the table name. Here is the prepared statement and the array that I'm using:  $query =   "SELECT ?, ? FROM ? WHERE ? = ? AND ? = ?";     $data    =   array($this->columns['username'], $this->columns['password'], $this->table,                       $this->columns['username'], $this->user , $this->columns['password'], $this->pass);   And this is how I'm executing the statement:  $statement  =   $this->connection->prepare($query);         $statement->execute($data);   I've tried putting the query into sql server and replacing the placeholder with correct values and it seems to be okay, only thing that was of concern was the quotes that needed to be in the WHERE conditionals. So am I executing this incorrectly?


Error:Undefined symbols for architecture x86_64

The error message is following. Although I have found some data in Internet. I still have no idea about this error. Hope someone help me. Does this problem come from building systems? Undefined symbols for architecture x86_64: "operator<<(std::__1::basic_ostream<char, std::__1::char_traits >&, Stack&)", referenced from: Path(int, int) in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) #include <iostream> using namespace::std;  struct offsets{     int a,b; }; enum directions{N,NE,E,SE,S,SW,W,NW};   struct Items{     int x,y,dir;     Items(){};     Items(int a,int b,int d){         x=a;         y=b;         dir=d;     } };  template<class T> class Stack{ public:     Stack(int stackcapacity);     bool Isempty()const;     T& Top()const;     void Push(const T& item);     void Pop();      private:     T* stack;     int top;     int capacity;     friend ostream &operator<<(ostream &os, Stack<T> &s); };  template<class T> Stack<T>::Stack(int stackcapacity):capacity(stackcapacity){     if(capacity<1)         throw "stack capacity must be >0";     stack=new T[capacity];     top=-1; }  template<class T> inline bool Stack<T>::Isempty()const{     return top==-1; }  template<class T> inline T& Stack<T>::Top()const{     if(Isempty())         throw"stack is empty";     return stack[top]; }  template<class T> void Stack<T>::Push(const T &x){     if(top==capacity-1)     {         T *temp=new T[2*capacity];         copy(stack,stack+capacity,temp);         delete[]stack;         stack=temp;         capacity*=2;     }     stack[++top]=x; }  template<class T> void Stack<T>::Pop(){     if(Isempty())         throw "stack is empty";     stack[top--].~T(); }  template<class T> ostream& operator<<(ostream& os,Stack<T>&s){      os<<"top="<<s.top<<endl;     for(int i=0; i<=s.top;i++){         os<< i <<":"<<s.Stack[i]<<endl;     }     return os; }          ostream& operator<<(ostream& os,Items& item){     return os<< item.x<<","<<item.y<<","<<item.dir; }


Disjoint compact sets in a Hausdorff space can be separated

I want to show that any two disjoint compact sets in a Hausdorff space $X$ can be separated by disjoint open sets. Can you please let me know if the following is correct? Not for homework, just studying for a midterm. I'm trying to improve my writing too.  My work:  Let $C$,$D$ be disjoint compact sets in a Hausdorff space $X$. Now fix $y \in D$ and for each $x \in C$ we can find (using Hausdorffness) disjoint open sets $U_{x}(y)$ and $V_{x}(y)$ such that $x \in U_{x}(y)$ and $y \in V_{x}(y)$. Now the collection $\{U_{x}: x \in C\}$ covers $C$ so by compactness we can find some natural k such that  $C \subseteq \bigcup_{i=1}^{k} U_{x_{i}}(y)$   Now for simplicity let $U = \bigcup_{i=1}^{k} U_{x_{i}}(y)$, then $C \subseteq U$ and let $W(y) = \bigcap_{i=1}^{k} V_{x_{i}}(y)$. Then $W(y)$ is a neighborhood of $y$ and disjoint from $U$.  Now consider the collection $\{W(y): y \in D\}$, this covers D so by compactness we can find some natural q such that $D \subseteq \bigcup_{j=1}^{q} W_{y_{j}}$.  Finally set $V = \bigcup_{j=1}^{q} W_{y_{j}}$, then $U$ and $V$ are disjoint open sets containing $C$ and $D$ respectively.   What do you think?


Add Chapter Title to Header - without "Chapter 1"

I'm looking for the way (assuming there is one) of putting the current page's chapter title in the header of the page. Basically, what I want is:    where only the chapter's title ("First Chapter" in this case) shows up.  However, what I get is:    or some variant, but always with "Chapter 1" or just "Chapter" in there.  My code is:   % AUTHOR: Enter the title, all letters in upper case \def \booktitle{Trial Title} \def \currentrevision{A} \def \documentnumber{ME-MAN-001}  \title{\booktitle}   \pagestyle{fancy} \fancyhf{} \fancyhead[LE,RO]{\leftmark}  % \fancyhead[LE,RO]{FIRST CHAPTER}  \fancyhead[RE,LO]{\documentnumber~Rev.~\currentrevision} \fancyfoot[LE,RO]{\thepage}   Yes, I am using fancyhdr and I've reviewed the documentation and tried the variants, but nothing seems to work. I've also tried too many things to detail here.


After reboot, nothing shows up: Ubuntu installation

After passing through all the steps mentioned .  I see nothing but a black screen, even after I wait for more than 15 minutes, nothing shows up. Help plz.


Ideals in Commutative Rings Containing a Field

This is a question that always stumped me.  It is from an undergrad book (Sharp, Steps in Commutative Algebra) and apparently concerns the Primary Decomposition/Prime Avoidance Theorem, so I expect the solution to be only a few lines, but I can't get it.  Suppose that $R$ is a commutative ring containing an infinite field $F$.  Suppose that $I, J_1, \dots, J_n$ are ideals of $R$.  Suppose that $I \subset \bigcup\limits_n J_n$.  Then prove that $I$ is contained in some $J_k$.  I can't figure out how to use the presence of the field to turn it into a situation where the Prime Avoidance Theorem can be applied, but maybe this isn't the right method.


I am an engineering student (CSE) in India..But recently I have developed a strong love to physics..I want to learn physics and understand it in deep..I know physics is the search of deep fundamental laws of nature.That means I need to start from first principles and extrapolate from it?How should i learn physics?


evaluate $\int_0^\infty \frac{(ln(x))^2 }{1+x^2}dx$

I am attempting to evaluate the following integral: $$\int_0^\infty \frac{(ln(x))^2 }{1+x^2}dx$$  Using the substitution $x=e^u$ and $dx=e^u du$, I get: $$\int_{-\infty}^\infty \frac{u^2}{e^{-u} + e^u} du$$  It's suggested that I evaluate this integral in the complex plane. How do I complete this problem?  The problem is found in Arfken.


A valid alternative(s) to siunitx package

Although this question is very simple in the substance, I would like to ask it anyway. Visibly if I use the comma within the mathematical environment you can see a small space that I have underlined with a red horizontal line.  %% Compile and read me! \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \begin{document} \[a=(3,15 \pm 0,22) \text{ cm}\] \end{document}     Surely the space, with the use of siunitx package it will disappear as it is a specific package for units and decimal numbers. To remove this space I use the command to have a negative space \!. In fact I obtain this:    \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \begin{document} \[a=(3,\!15 \pm 0,\!22) \text{ cm}\] \end{document}   Are there any other alternatives without the use of siunitx package?  Are there possible contraindications if you do not use this package?


I'm developing a  application, and I'm using constant NSStrings as ways to store key names for my preferences.  I understand this is a good idea because it allows easy changing of keys if necessary. Plus, it's the whole 'separate your data from your logic' notion.     Anyway, is there a good way to make these constants defined once for the whole application?     I'm sure that there's an easy and intelligent way, but right now my classes just redefine the ones they use.


Warning propmt on downloaded Excel: File format and extension do not match. The file could be corrupted or unsafe

I want to develop MS Excel download feature for some of my data, thus I created a VF page with following attributes on the apex:page tag.  contentType="application/vnd.ms-excel#somefile.xls" cache="true" applyHtmlTag="false" standardStylesheets="false" sidebar="false" showHeader="false"   With this I get the file downloaded but when I try to open it, the Excel application (I use 2013 version) shows a warning message before showing the data.  The file format and extension of 'somefile.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?  I've used XML Spreadsheet markup for this and have avoided the use of Visualforce tags wherever I could, just to make sure the output is not HTML but native Spreadsheet markup. The file is not corrupted for sure since I can see the expected data as I open it after clicking "Yes" on the warning message.  Could anybody help me make this download without that warning message ?


I'm doing an exercise of programming for school, can't solve a "java.util.ConcurrentModificationException" error

I cannot compile this program which from a file with this format (where "Via" is the italian for "road")  Via Emilia-->Via Botti  Via Castello-->Via Emilia  Via Appia-->Via Botti  Via Botti-->Via Emilia  Via Castello-->Via Amendola  Via Appia-->Via Ancona  Via Castello-->Via Botti  Via Matteotti-->Via Carso  Via Ancona-->Via Matteotti  Via Carso-->Via Matteotti   And at the third questions asks me to find which roads  are recursive one into another (like a->b and b->a), but when I try to put conditions to remove the possibility of having duplicate answers (like a and b are recursive and b and a are recursive) I get this error "java.util.ConcurrentModificationException", what does it mean?  This is the main  public static void main(String[] args) throws Exception{      ArrayList<percorso> perc = new ArrayList<percorso>();      String line;     BufferedReader br = new BufferedReader(new FileReader("vie.txt"));      while ((line = br.readLine())!=null){     percorso p = new percorso (null,null);     String [] e = line.split("-->");     p.from = e[0];     p.to = e[1];     perc.add(p);     }     br.close();     //punto1(perc);     //punto2(perc);     punto3(perc); }          This is the method to compile the answer at the third question      public static void punto3(ArrayList<percorso> perc) throws Exception{      BufferedWriter bw=new BufferedWriter(new FileWriter("3.html"));     bw.write(" \n  \n");     bw.write("
 Punto 3
 \n");     bw.write("
 Trovare le coppie di strade che formano un anello chiuso
 \n");     ArrayList<percorso> perc2 = new ArrayList<percorso>();     for (percorso k: perc)         perc2.add(k);      ArrayList<String[]> Arr = new ArrayList<String[]>();      for (percorso i: perc2){         for (percorso j: perc2){             if (i.from.equals(j.to) && i.to.equals(j.from)){                 String [] e = {i.from,i.to};                 Arr.add(e);             }         }     }      ArrayList<String[]> Arr2 = new ArrayList<String[]>();     for (String [] z: Arr){         Arr2.add(z);}      for (String [] f: Arr){         for (String [] j: Arr2){             if (f[0].equals(j[1]) && j[0].equals(f[1]))                 Arr.remove(j);         }     }     for (String [] x: Arr)     bw.write("le vie "+x[0]+", "+x[1]+" formano un anello chiuso
");     bw.write(" \n  \n");     bw.close();     }   And the class percorso is the following     public class percorso {    String from;    String to;     public percorso (String from,String to){     this.from = from;     this.to = to;    }    }


￼How do I get rid of this icon?  I'm not even sure what it's for. It's possible that it's for remote CD Drive, but I don't remember how I got it up there in the first place.  Details:   iMac 27 inch late 2012 OS X Mavericks


nathan@gentoodesktop ~/Documents $ mkdir test nathan@gentoodesktop ~/Documents $ mkdir te*/test mkdir: cannot create directory 'te*/test': No such file or directory nathan@gentoodesktop ~/Documents $ cd te* nathan@gentoodesktop ~/Documents/test $ mkdir test nathan@gentoodesktop ~/Documents/test $ ls  test


I don't know what is the difference between using "I have got" and "I have" For example:      He's got broad shoulders.    Is it possible to say:      He has broad shoulders.    If yes, so what is the difference?


"1 out of 100 chickens is" or "1 out of 100 chickens are"?

I'm in an argument. To me "are" makes more sense. I understand the rationale for is because it's only one chicken, but chickens itself is plural. Help?


Not getting coverage on these line of code, can anyone help with the test class?   @AuraEnabled public static Boolean deleteRecord(Id recordId){     Sobject sobj = recordId.getSObjectType().newSObject(recordId);     Database.DeleteResult result = Database.delete(sobj, true); return result.isSuccess();   }         public with sharing class SingleRelatedListController { public static final String FIELDS_PARAM = 'fields'; public static final String NUMBER_OF_RECORDS_PARAM = 'numberOfRecords'; public static final String RECORD_ID_PARAM = 'recordId'; public static final String SOBJECT_API_NAME_PARAM = 'sobjectApiName'; public static final String SOBJECT_LABEL_PARAM = 'sobjectLabel'; public static final String SOBJECT_LABEL_PLURAL_PARAM = 'sobjectLabelPlural'; public static final String PARENT_RELATIONSHIP_API_NAME_PARAM = 'parentRelationshipApiName'; public static final String RELATED_FIELD_API_NAME_PARAM = 'relatedFieldApiName'; public static final String SORTED_DIRECTION_PARAM = 'sortedDirection'; public static final String SORTED_BY_PARAM = 'sortedBy'; public static final String RECORDS_PARAM = 'records'; public static final String ICON_NAME_PARAM = 'iconName';  @AuraEnabled public static List<RecordType> getRecordTypes(String objectName) {     List<RecordType> rts = [SELECT Id, Name FROM RecordType WHERE SObjectType = :objectName];     return rts; }  public static String findObjectNameFromRecordIdPrefix(String recordIdOrPrefix){     String objectName = '';     try{         //Get prefix from record ID         //This assumes that you have passed at least 3 characters         String myIdPrefix = String.valueOf(recordIdOrPrefix).substring(0,3);          //Get schema information         Map<String, Schema.SObjectType> gd =  Schema.getGlobalDescribe();           //Loop through all the sObject types returned by Schema         for(Schema.SObjectType stype : gd.values()){              //if (!sObj.contains('__')) to exclude managed package objects              Schema.DescribeSObjectResult r = stype.getDescribe();             String prefix = r.getKeyPrefix();             System.debug('Prefix is ' + prefix);              //Check if the prefix matches with requested prefix             if(prefix!=null && prefix.equals(myIdPrefix)){                 objectName = r.getName();                 System.debug('Object Name! ' + objectName);                 break;             }         }     }catch(Exception e){         System.debug(e);     }     return objectName; }


$f:[0,\infty) \to [0,\infty)$ continuous function such that $\int_0^{\infty} f(x) dx$ is convergent ; is $\{f(n)\}$ bounded?

Let $f:[0,\infty) \to [0,\infty)$ be a continuous function such that $\int_0^{\infty} f(x) dx$ is convergent ; is $\{f(n)\}$  bounded  ?  I know that if $f$ is uniformly continuous then $\{f(n)\}$ converges to $0$ , but I don't know what happens under assumption of continuity of $f$ only . Please help . Thanks in advance


Add javascript to a content type form in Drupal 7

I'm trying to add a custom javascript file to my article content type forms (add/edit).  I've tried , hook_form_alter and   to no avail. They both seem to pick up the page i'm on, not the form in Drupal's Overlay with the form in it.  Obviously I want the Javascript to fire only when I'm actually on the form. So just putting the Javascript in a onReady function in a sitewide js file won't suffice.  My current setup in template.php:  function zeilschepen_form_alter(&$form, &$form_state, $form_id){   switch ($form_id) {     case 'node-accommodation-form':       $form['#after_build'][] = 'zeilschepen_after_build';       break;      case 'views_exposed_form':       if (isset($form['field_country_value'])) {         $form['field_country_value']['#attributes'] = array('placeholder' => array(t('Land...')));       }       break;   }  }  function zeilschepen_after_build($form, &$form_state) {   $theme_path = drupal_get_path('theme', variable_get('theme_default', NULL));   drupal_add_js ("$theme_path/js/test.js");   return $form; }   And test.js:  (function ($, Drupal, window, document, undefined) {      Drupal.behaviors.test = {         alert('test');     } })(jQuery, Drupal, this, this.document);


If $(a + ib)^3 = 8$, prove that $a^2 + b^2 = 4$       Hint: solve for $b^2$ in terms of $a^2$ and then solve for $a$   I've attempted the question but I don't think I've done it correctly:  $$ \begin{align*}   b^2 &= 4 - a^2\\   b &= \sqrt{4-a^2} \end{align*} $$  Therefore, $$ \begin{align*}   (a + ib)^3 &= 8\\   a + \sqrt{4-a^2} &= 2\\   \sqrt{4-a^2} &= 2 - a\\   2 - a &= 2 - a \end{align*} $$  Therefore if $(a + ib)^3 = 8$, then $a^2 + b^2 = 4$.


Running Cronjob @reboot returns that file on nfs share does not exist.  Example  @reboot python /abs/path/to/script.py   mail from crontab on startup reads "more or less"  /usr/bin/python can't open file "/abs/path/to/script.py": [Error No. 2] No such file or folder.   Script can be run from the command line with no trouble.. Theory is that the cronjob is running before mount has been run. The questions.   Is this theory correct? Is there a way to force the job to wail until the drive has been mounted? .... Other than just putting in a sleep 60 into the command. ;) I tried that already, but it's hit and miss and I need the script to run 100% of the time quickly.


Work on current loop placed in a magnetic field: how can there be work done against magnetic forces?

I'm facing some doubts while studying the lecture on magnetic dipole potential energy  - "15–1 The forces on a current loop; energy of a dipole".  When it's showed that, for a rectangular loop, $\mathrm{U_{mech}}$ corresponds to the mechanical work done in bringing the loop into a magnetic  field $\bf{B}$ (from equation $(15.6)$ to equation $(15.11)$) the work on the loop "against magnetic forces" is calculated.   My question is: since magnetic forces never do work on electrons in the loop, how can there be a work done against them?    The explanation I tried to give myself is the following. As explained in the following sections of the lecture, the velocity of the electrons is not parallel to the loop but is also has a component due to the traslational motion. Therefore the force considered when the work is calculated shouldn't be the total magnetic force, but only a part of it. So maybe this has something to do with the possibility for this force to do work?   I'm getting a bit confused on the topic, any suggestion is highly appreciated.


Convert sub-folder into separate project without losing history?

I have converted a mercurial project with many sub-folders into git (hg-git extension) and it seems to have worked.  I would now like to have each sub-folder as a separate git project so I can better manage permissions etc.  Is it possible to take the history from the main branch and only pass along the relevant changes which happened to each specific sub-folder? For example, my current version control is for the /dags folder overall and I have change history for over a year saved. I would like project_1 to be completely separate from project_2.  --/dags --/dags/project_1 --/dags/project_2 --/dags/project_3


My colleague and I are fitting a range of linear and nonlinear mixed effect models in R. We are asked to perform cross-validation on the fitted models so that one can verify that the effects observed are relatively generalizable. This is normally a trivial task, but in our case, we have to split the whole data into a training part and a testing part (for CV purposes) that share no common levels. For example,  The training data may be based on Groups 1,2,3,4; The fitted model is then cross-validated on Group 5.  So this creates a problem since the group-based random effects estimated on the training data do not apply to the testing data. Thus, we cannot CV the model.  Is there a relatively straightforward solution to this? Or has anyone written a package to tackle this problem yet? Any hint is welcome!  Thanks!


Let $p$ be prime and $a$ an integer not divisible by $p$. Prove that if $a^{2^{n}} \equiv -1 \pmod p$, then $a$ has order $2^{n+1}$ modulo $p$.

Apparently I already proved this but I am having trouble the second time around. It is important to use only basic properties of congruences and orders of elements  and Euler's generalization of Fermat's theorem (as that is the section this set of exercises is based on). It is clear that $a^{2^{n+1}} \equiv 1 \pmod p$ here by squaring both sides. I know that $a^{p-1} \equiv 1 \pmod p$ here since $a$ is not divisible by $p$ . It seems obvious to me that the only solutions modulo $p$ to $x^{2} \equiv 1 \pmod p$ are $x = 1,p-1$. It seems this would help because it would mean that if $2^{n+1}$ was not the order of $a$ modulo $p$, then there must be an $x < 2^{n}$ such that $a^{x} \equiv -1 \pmod p$. I wasn't sure if there was some argument by descent here either. I also figured that by the division algorithm we can do a similar argument for $a^{x} \equiv -1$ instead of $a^{x} \equiv 1$ where if $x < 2^{n}$ is the order then if the quotient in the division algorithm equation is even, $x | 2^{n} \implies x$ is a power of two $\implies p|2 \implies p=2$ and then check that the $p=2$ case is also satisfied. But then the argument obviously doesn't work if the quotient in that equation is odd because then we can't move a $2$ out to the exponent to square the entire expression. If we assume for some $x < 2^{n+1}$ we have that $a^{x} \equiv 1 \pmod p$ where $x$ is the order of $a$ modulo $p$ then we must have that $x | 2^{n+1} \implies x$ is a power of $2 \implies x = 2^{k}$ Then $a^{2^{k}} \equiv a^{2^{n+1}} \pmod p \implies p|a^{2^{k}}(a^{d}-1)$ where $d_{2^{n+1}} < 2^{n+1}$. Since $p|a^{2{k}}$ results in the contradiction $p|1$, we must have $p|a^{d}-1$ so that $a^{d} \equiv 1 \pmod p $ if $d < x$, a contradiction too However, we don't necessarily have that $d<x$. There must be a simple way but I really can't see it.


Find limit of $\lim_{x\to 0}\frac{\sin^{200}(x)}{x^{199}\sin(4x)}$, if it exists

I'm practising solving limits and the one I'm currently struggling with is the following: $$\ell =\lim_{x\to 0}\frac{\sin^{200}(x)}{x^{199}\sin(4x)}$$  What I've done:   Since this is an obvious $0/0$ , I tried using de L'Hospital's Rule consecutively only to see both the numerator and the denominator grow so much in size that each couldn't fit in one row. $$ \begin{align} l & =\lim_{x→0}{{\sin^{200}(x)}\over{x^{199}\sin(4x)}}\\ & = \lim_{x→0}{{200\sin^{199}(x)\cos(x)}\over{x^{198}\left(199\sin\left(4x\right)+4x\cos\left(4x\right)\right)}}\\ & = \lim_{x→0}{{39800\cos^2\left(x\right)\sin^{198}\left(x\right)-200\sin^{200}\left(x\right)}\over{x^{198}\left(800\cos\left(4x\right)-16x\sin\left(4x\right)\right)+198x^{197}\left(199\sin\left(4x\right)+4x\cos\left(4x\right)\right)}} \end{align} $$ Another solution I tried was through manipulation and the use of trigonometric identities and formulae but to no avail. I tried substituting:   $\color{red}{\sin(4x)}$ with $\color{blue}{4\sin(x)\cos(x) - 8\sin(3x)\cos(x)}$ and then $\color{red}{8\sin(3x)\cos(x)}$ with $\color{blue}{4\sin(4x)+4\sin(2x)}$. $$ \begin{align} l & =\lim_{x→0}{{\sin^{200}(x)}\over{x^{199}\sin(4x)}}\\ & =\lim_{x→0}{{\sin^{200}(x)}\over{x^{199}(4\sin(x)\cos(x) - 8\sin(3x)\cos(x))}}\\ & =\lim_{x→0}{{\sin^{200}(x)}\over{x^{199}(4\sin(x)\cos(x) - 4\sin(4x)+4\sin(2x))}}\\ \end{align} $$    No matter what I try, the limit remains $0/0$.  Question:  Does the above limit exist? If so, what I path should I follow to work out a solution?


Suppose I have:  srting s="C:\\someIllegalChars\\בלה.xlsx"; FileInfo fi = new FileInfo(s);   This gives:  Illegal characters in path. :::  ::: System.ArgumentException: Illegal characters in path.    at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)    at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)    at System.IO.FileInfo.Init(String fileName, Boolean checkHost)    at ...   I need a function that will fix this type of Illegal  strings, something like:  string Fixer(string){ return fixed string; }


I need to find $$\lim_{n\to\infty}\frac{1^{k}+2^{k}+...+n^{k}}{n^{k+1}}$$ for $k>0$ And I just need an explanation on how come $$\lim_{n\to\infty} \sum_{i=1}^{n} \frac{1}{n}\left(\frac{i}{n}\right)^{k} = \int_{0}^{1}x^{k}dx$$


Let $k$ be a field. Let $R$ be the formal power series ring $k[[x]]$. Define $N$ on $R \setminus \{0\}$ as follows: $N(f)$ is the smallest $n$ of which the coefficient of $x^n$ in $f$ is nonzero.  (a) Prove that $R$ is a Euclidean domain with Euclidean norm $N$.  (b) For $a$, $b$, $a+b$ nonzero elements of $R$, prove that $N(a+b)$ cannot be bounded as a function of $N(a)$ and $N(b)$.  (c) Prove that if $a$ and $b$ are two power series such that $b$ does not divide $a$ (and $b \neq 0$), there are infinitely many pairs $(q, r)$ for which $a = bq + r$ and $N(r) < N(b)$.


Can I recall (cancel) the erase my iPhone command

I had lost my iPhone, and I initiated the erase iPhone using iCloud. But, in the meanwhile, I found the iPhone. I am holding it in airplane mode, and it is still not wiped. I'm aware that if I turn on internet for it, it will probably start erasing all. I would love if I could cancel the erase command. Is this possible? Otherwise, I would just have to erase it, and back it up from iCloud backup. I would rather, not do any of that and just cancel the erase command. Is this possible?


Cannot copy/cut and paste from file manager to Desktop on Ubuntu 20.04 LTS

I cannot copy and paste files from the file manager to Desktop on Ubuntu 20.04 LTS. Is there a way to fix this issue?


Is there a cleaner proof of convergence for this almost-telescoping series

I was wondering how the convergence of the series $$\sum_{k\geq1}\frac{(k+1)^y-k^y}{k^x},$$ depends on $x$ and $y$, where $x$ and $y$ are real numbers. I've been able to show that it converges if and only if $y\leq x$, by distinguishing nine cases; whether $x$ and $x-y$ are positive, negative or zero. If desired I can include a sketch of my proof. My question is whether there is a proof that works for all real $x$ and $y$? Or at least a proof that seems less artificial?


I am looking for a good drop down terminal that can be split for gnome. At work I use KDE and Yakuake and it works really good but I don't really like KDE that much. I installed Yakuake in gnome and it is really buggy so I removed it and I am looking for a good one.   I also see that there are similar topics but they are all out of date. I have looked into terra but the last update to the ppa was in 2013 so was avoiding that one a bit. I am already using screens so having screens nested inside tmux for multi panel terminal doesn't really sound like it will work that well.  Ubuntu 15.04 with Gnome.


How does the summoning ability affect the encounter difficulty?

The Drow Mage (CR 7) has the Action Summon Demon (1/day), which allows him to summon a shadow demon (CR 4). Is the shadow demon already included in the CR of the Drow Mage, or do I have to count the shadow demon as an extra creature to determine the difficulty of the encounter?


How to cite a reference whose cite key contains '&' in the table

I'm encountering a problem using TexShop (with Tex Live 2016 distribution) when try to cite a reference directly in a table. The cite key contains a '&', I guess LaTeX might treat it as a normal tabular separate mark, although it is in the '\citep{}' command. The code is like this:  \documentclass[preprint]{aastex6}  \begin{document}  \begin{table} \centering \caption{Test for cite key contains `\&'. \label{tab:test}} \begin{tabular}{lll} Citation Failed     & {\citet{2007A&A...465..587S}} & Nothing appears\\ Citation Succeeded  & {\citet{2015MNRAS.453.1619A}} & A paper appears\\ \end{tabular} \end{table}  I want to cite \citet{2007A&A...465..587S} in the table,  whose cite key contains `\&', you can see the citation works  here but not in the table. I didn't encounter this problem  with CTeX in Windows, compiling the same script.  \bibstyle{aasjournal} \bibliography{bbb.bib}  \end{document}   Typeset with LaTeX will give you the following error:     ./aaa.tex:9: Missing \endcsname inserted.   to be read again                      \global   l.9 ...n Failed     & {\citet{2007A&A...465..587S}                                                     } & Nothing appears\   ?   Meanwhile, the .aux will get a wrong name for '2007A&A...465..587S':  \citation{2007A\global \advance \columncount by 1\relax \saveampersand A...465..587S}   which should be (if you cite this paper in other places of article, only if it's not in a table):  \citation{2007A&A...465..587S}   Using this incorrect .aux file, BibTeX will tell you:     White space in argument---line 19 of file aaa.aux    : \citation{2007A\global    :                        \advance \columncount by 1\relax \saveampersand   A...465..587S}   I'm skipping whatever remains of this command   Finally, the citation won't appear in the .pdf file, as a contrast, the second paper cited in the table will appear, like this:    Yes, I can change the cite key by deleting '&' and then problem solved, but I'm trying to figure out how to solve the problem without changing cite key, because the cite key is usually generated automatically by other tools, and it is not a easy task to change all the cite keys of such type.  The 'bbb.bib' used in this example is:   @article{2007A&A...465..587S, Adsnote = {Provided by the SAO/NASA Astrophysics Data System}, Adsurl = {http://adsabs.harvard.edu/abs/2007A%26A...465..587S}, Author = {{Shi}, J.~R. and {Gehren}, T. and {Zhang}, H.~W. and {Zeng}, J.~L. and {Zhao}, G.}, Doi = {10.1051/0004-6361:20066709}, Journal = {\aap}, Keywords = {line: formation, line: profile, stars: abundance, stars: late-type, galaxies: evolution}, Month = apr, Pages = {587-591}, Title = {{Lithium abundances in metal-poor stars}}, Volume = 465, Year = 2007, Bdsk-Url-1 = {http://dx.doi.org/10.1051/0004-6361:20066709}}  @article{2015MNRAS.453.1619A, Adsnote = {Provided by the SAO/NASA Astrophysics Data System}, Adsurl = {http://adsabs.harvard.edu/abs/2015MNRAS.453.1619A}, Archiveprefix = {arXiv}, Author = {{Alexeeva}, S.~A. and {Mashonkina}, L.~I.}, Doi = {10.1093/mnras/stv1668}, Eprint = {1507.05446}, Journal = {\mnras}, Keywords = {line: formation, Sun: abundances, stars: abundances, stars: late-type}, Month = oct, Pages = {1619-1631}, Primaryclass = {astro-ph.SR}, Title = {{Carbon abundances of reference late-type stars from 1D analysis of atomic C I and molecular CH lines}}, Volume = 453, Year = 2015, Bdsk-Url-1 = {http://dx.doi.org/10.1093/mnras/stv1668}}   EDIT: Change all the pictures into source code. Posted the '.bib' file used in the code. EDIT: According to the comments below, the problem might be caused by the deluxtable macro, so I changed deluxtable into table and tried again, same problem occurred. EDIT: According to @DavidCarlisle, The problem is caused by aastex6.cls and/or aasjournal.bst. Add \string before & will solve the problem. You won't meet this problem using standard LaTeX template. Also, many people suggest simply do NOT use & in the cite keys, so that you won't meet the problem anywhere.


Can i replace notebook GPU with something newer?

i saw some videos on youtube, that you're able to replace soldered GPU (very risky though)  i have a macbookpro5,5 and thinking to replace gpu with something new (probably another OEM mobile GPU that i'll get on ebay)  is that possible?


I need some advide about user type with hashmap

I wrote user type as below  class Item {    int first;    int second;     public boolean equals(Item p) {        if(first == p.first && second == p.second )             return true;        else if(first == p.second && second == p.first)            return true;        else            return false;    }    public int hashcode() {        return Objects.hash(first, second);    }    public void set(Object first, Object second) {        this.first = Integer.parseInt(first.toString());        this.second = Integer.parseInt(second.toString());    }   }  However, It doesn't work at all. Did I design the duplicate test incorrectly?


I have tried various methods to install WiFi drivers on my machine. I have downloaded the rtl_wifi directory and have installed the necessary firmware too. However, when I run the command:  sudo modprobe -r rtl8723de   and  sudo modprobe rtl8723de   I am getting this as output:  modprobe: ERROR: could not insert 'rtl8723de': Operation not permitted    Please help me find a solution to this as I am a student and need WiFi on my machine almost daily.


I've tried many things but for some reason I can not figure out why the following code keeps giving me an error.  $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) {     die("Connection failed: " . $conn->connect_error); }   $sql = "INSERT INTO app_users (signupDate, userToken, ipAddress, countryCode, countryName, regionName, cityName, zipCode, latitude, longitude, timeZone, referer, userAgent, hostName) VALUES ('$ls_signupDate', '$ls_userToken', '$ls_ipAddress', '$ls_countryCode', '$ls_countryName', '$ls_regionName', '$ls_cityName', '$ls_zipCode', '$ls_latitude', '$ls_longitude', '$ls_timeZone', '$ls_referer', '$ls_userAgent', '$ls_hostName)'";  if ($conn->query($sql) === TRUE) {     echo "Content Inserted successfully"; } else {     echo "Error inserting content: " . $conn->error; }   The error it keeps giving me is...     You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near '' at line 2   What am I doing wrong here?


Finding a quadratic equation with roots $x=α^2$ and $x=β^2$

I'm struggling on a question and have no idea where to start.   The quadratic equation $y=ax^2+bx+c$ has roots $x=\alpha$ and $x=\beta$. Find an equation that has roots $x=\alpha^2$ and $x=\beta^2$.  I was just wondering if anyone could provide any knowledge so I can start this question?


I saw in a grammar book mentioned something like this :     Liz can speak French very well.   Then I saw another example saying like this :        She often eats durians   My mother always wipes the floor.      With those examples, I got a little bit confuse. Why is the 1st example not saying "speaks" as it is referring to Liz which is only 1 person? Is it because it is referring to Proper Noun ?


If $G=G_1\times G_2$ does it follow that $H\leq G \implies H=H_1\times H_2$ where $H_1\leq G_1$ and $H_2\leq G_2$. I am thinking that it does, being that the projection of $H$ into $G_1$ and $G_2$ is a homomorphism, but now that I am writing this it might be that $H\subset H_1\times H_2$ rather than equality.


Firefox on my Ubuntu installation requires me to update the  plugin and following the link, I get to the page which ask me to download the latest Firefox package.  I download the tar.gz and unzip it. It is the new version, but it is in an independent folder and if I want to use it, I need to open the folder and click on the Firefox executable.  How can I replace the old version of Firefox on my Ubuntu installation with the newly-downloaded?  I checked the old version:  nanger@mypad:/usr/lib/firefox$ which firefox /usr/bin/firefox nanger@mypad:/usr/bin$ whereis firefox firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz   I'm not very familiar with the linux system. But what is /usr/bin/firefox? Is it a symbolic link which link to the Firefox executable in /usr/lib/firefox? How can I replace it with the new version?


Why is my python global variable not changing?

I need help to understand why my python variable is not changing?  Here is the code:  from tkinter import filedialog from tkinter import *  selectedRootFolder = ""  #<-------------------------------------here is the variable declared  # get any folder to be a root folder def add_dir():     root = Tk()     root.withdraw()     dirname = filedialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')     selectedRootFolder = dirname     print("Here: " + selectedRootFolder)#<-----------------------here is the variable changed  # print the root folder  def print_root_dir_path():     print (selectedRootFolder)  #<-----------------------------here is the variable empty -> =""  # in case a wrong number is taken def invalid():     print("---------------------")     print ("INVALID CHOICE!")     print("---------------------")  # exit program def exit_prog():     print ("Thank you, come back soon!")     exit()  # define the menu options menu = {"1":("Choose Directory:", add_dir),     "2":("Print Root Directory Path",print_root_dir_path),     "9":("Exit",exit_prog)    }  while True:         # list the menu     for key in sorted(menu.keys()):         print (key + ":" + menu[key][0])      # pick a number      print("---------------------")     ans = input("Make A Choice: ")     print("---------------------")      #get the number, if none, call invalid function     menu.get(ans,[None,invalid])[1]()   This is just a part of the script, but it should be able to show my problem, which is that when I pick option 1, to choose a directory, it is successful, and it prints the selectedRootFolder, but when I choose option 2 after that, the printed value is just as declared in the beginning, empty.  I do not understand why is that, can u help me?   Thank you.  Edit 1:  Changed:   selectedRootFolder = print(dirname)   To:       selectedRootFolder = dirname print("Here: " + selectedRootFolder)


Allow bypassing CAPTCHA based on reputation or network experience

I was trying to post a question on Android Enthusiasts earlier on my (government) work WiFi, and was put through a .   This got me thinking, why am I even suspicious? Yes, I'm on my non-home WiFi so there may be suspicious traffic related to other people using the internet here, but I'm logged in to my account on the Stack Exchange Network. I have close to 30k rep across the Network, have been a member for some 5 years, and AFAIK, don't have any major strikes against my account.  Why are "established users" required to complete captcha? I would think that any instance of someone running amok would be fringe at best and easily handled on a case-by-case basis.  Can experience on the site be taken into consideration when prompting someone for a captcha?


Using "" Rreturn Error:- The attempted operation is prohibited because it exceeds the list view

I have the following code inside my remote event reciever, the code will get all the folders and files under a specific folder:-  CamlQuery camlQuery6 = new CamlQuery();    camlQuery6 = new CamlQuery();    camlQuery6.ViewXml = "<View Scope=\"RecursiveAll\"><Query><Where><BeginsWith><FieldRef Name=\"FileDirRef\" /><Value Type=\"Text\">" + context.Web.ServerRelativeUrl + "/Library3/" + currentFilingSystemItem["DealName"].ToString() + "</Value></BeginsWith></Where></Query></View>";     ListItemCollection collListItem6 = context.Web.GetList(context.Web.ServerRelativeUrl + "/Library3").GetItems(camlQuery6);    context.Load(collListItem6, items => items.Include(           item => item.Id,           item => item["FileDirRef"],           item => item["Title"],           item => item["DealStage"],           item => item["DealName"],           item => item["Fund"]         ));  context.ExecuteQuery();   now the returned items will be around 150, but the library3 i am querying against contain more than 5500 items. so the above code is returing the folloiwng error:-     The attempted operation is prohibited because it exceeds the list view   threshold enforced by the administrator.   so can anyone advice how i can overcome this issue? by modifying the query or adding indexed? Thanks


Closing questions on mobile theme also shows me flag counts

When I'm using the Stack Exchange mobile view (specifically on my iPhone), after voting to close a question I am also shown the flag count. If I refresh the page afterwards, the flag count disappears and I don't think there is (or should be) any way that a non-moderator should see this.  Take for example . This is what I see before my close vote:    Additionally, the close vote dialog doesn't make it immediately obvious like the desktop version how the close votes are distributed, but this is a lesser issue:    After the close dialog is gone, I get the "x votes remaining" message, and I am also shown the flag count, which I don't think I should be able to see.


"Why is your baby's face so dirty?"   "She _______ (eat) chocolate"   I know, the answer is Present Perfect Continuous - has been eating. What about the Present Perfect - has eaten? Can't we use it in similar situations?


Python: list import options in subdirectory, then import one of them

I'm making a game engine that can be used with multiple story modules. I want to keep the stories in a subdirectory and use a single PLAY.py file to allow the user to choose one of them.  So far, I have been able to use this simple code to get a list of all of the story modules:  import glob stories = glob.glob( ./stories/ds_*.py )   I then use a for loop and a format statement to list the options for the user. The problem is that I can't find out how to use the resulting strings to actually import anything. Maybe glob is not the best solution?


Can I copy my answer in Quora to Stack Exchange sites or vice-versa?

I am a member of both Quora and some Stack Exchange sites. Sometimes, I see that the same question is asked in both.   In such cases, is it OK for me to copy posts from Quora to Stack Exchange or vice-versa? Would I be violating any terms of service?


jQuery selectors for dynamically loaded HTML

jQuery does not seem to be able to select a loaded HTML element. Here is my HTML:

   The loaded HTML is a list of links. This is my JavaScript:  $("#submenuID li").addClass("active");   But it would not add the class. After some snooping around. I learn to use  $("#submenuID li").live('click', function() {     $("#submenuID li").addClass("active"); });   However, it does not work until I click on the link a second time.


How to disable the "Your site has updated to WordPress x.y.z" admin email?

Using the automatic update of my self-hosted WordPress blogs, I configured automatic updates of both the WordPress core as well as WordPress plugins and themes ().  Whenever a core update occurs, I get an email like:     Your site has updated to WordPress 3.9.2      Howdy! Your site at  has been updated automatically   to WordPress 3.9.2.      No further action is needed on your part. For more on version 3.9.2,   see the About WordPress screen:       If you experience any issues or need support, the volunteers in the   WordPress.org support forums may be able to help.         The WordPress Team   I understand that I can  but I would prefer to only disable the above notification.  Therefore my question is:  How to disable update notification emails in WordPress?


How do I make Panel always transparent like the Dock in GNOME 3?

I'm using Ubuntu 17.10. I want the Panel to be always transparent instead of dynamic transparency.


How to modify a page title using JavaScript or jQuery?

I am using include method to include the menu page on every pages, code below:  <!--#include virtual="include/menu/Menu.html"   This Menu.html page has a static title <Title>ABC</Title>. Note that the Title for current viewing page does not show its Title, but only show the Title for the included Menu.html page, which is "ABC".  Is there a way to change the <Title><Title> for the menu page (not the Title on the current viewing page) by using JavaScript, jQuery, or any trick you can think of?


I was watching The Simpsons when Milhouse Van Houten says “Quote, unquote', but I don’t understand. Please have a look

The world is or rather the expression is quote,unquote. The sentence that Mulhouse said was "Get a load of that quote-unquote Santa." It was an episode where Homer get the job of Santa for Christmas. And Bart and their friends glimpse The Santa (who is Homer in reality) but Bart didn't knew it and he was going to humiliated his dad...


extract lines that match a list of words in another file

I have file 1 which have those lines:  ATM 1434.972183 BMPR2 10762.78192 BMPR2 10762.78192 BMPR2 1469.14535 BMPR2 1469.14535 BMPR2 1738.479639 BMS1 4907.841667 BMS1 4907.841667 BMS1 880.4532628 BMS1 880.4532628 BMS1P17 1249.75 BMS1P17 1249.75 BMS1P17 1606.821429 BMS1P17 1606.821429 BMS1P17 1666.333333 BMS1P17 1666.333333 BMS1P17 2108.460317 BMS1P17 2108   And file 2 have a list of words:  ATM BMS1   So, the output will be like this:  ATM 1434.972183 BMS1 4907.841667 BMS1 4907.841667 BMS1 880.4532628 BMS1 880.4532628   I know it's really a duplicate question, but I tried all types of grep and sed and awk, maybe it will works with you guys with this tiny example  but I have a very huge file > 1M lines and all previous way doesn't help  it return part of the lines that containing those words although there are other words in file 2 that matches the lines from file 1


I'm trying to use pst-optexp with XeLaTeX, but every time I call \drawwidebeam, I get a broken figure.  \documentclass{article} \usepackage{pst-optexp} \usepackage{pst-node}  \begin{document}  \section{Test 1}  \begin{pspicture}[showgrid](0,-0.3)(3,3.3)     \pnode(0.5,1){A}     \pnode(3,1){B}     \optbox[position=start,optboxsize=0.5 1](A)(B)     \lens[n=2](A)(B)     %\drawwidebeam[beamwidth=0.2,fillstyle=solid,fillcolor=green!40]{1-2}(B)     \optbox[position=start,optboxsize=0.5 1,labelangle=90,labeloffset=1.5](0.5,2.5)(3,2.5){No crash yet} \end{pspicture}  \section{Test 2}  \begin{pspicture}[showgrid](0,-0.3)(3,3.3)     \pnode(0.5,1){A}     \pnode(3,1){B}     \optbox[position=start,optboxsize=0.5 1](A)(B)     \lens[n=2](A)(B)     \drawwidebeam[beamwidth=0.2,fillstyle=solid,fillcolor=green!40]{1-2}(B)     \optbox[position=start,optboxsize=0.5 1,labelangle=90,labeloffset=1.5](0.5,2.5)(3,2.5){Crash!} \end{pspicture}  \section{Test 3}  \begin{pspicture}[showgrid](0,-0.3)(3,3.3)     \pnode(0.5,1){A}     \pnode(3,1){B}     \optbox[position=start,optboxsize=0.5 1](A)(B)     \lens[n=2](A)(B)     \drawwidebeam[beamwidth=0.2,fillstyle=solid,fillcolor=green!40]{1-2}(B)     \optbox[position=start,optboxsize=0.5 1,labelangle=90,labeloffset=1.5](0.5,2.5)(3,2.5){Crash!} \end{pspicture}  \end{document}   Result:   I used Sharelatex for this test. I'm also having the same issue with the complete document, with MiKTeX 2.9.6500 and XeTeX 3.14159265-2.6-0.99998.   How can I fix my figure? If there is no easy way to solve this bug, how can I compile my figure with Latex and then import it in XeLaTex?


Nouveau Error: unknown chipset during startup Ubuntu 14.04

I'm using laptop Acer Nitro VN7-571G-53N6, nvidia GeForce 840M. This is a screenshot of the error:    [11.128989] nouveau E[DEVICE][0000:03:00.0] unknown chipset, 0x118010a2 [11.129037] nouveau E[   DRM] failed to create 0x80000080, -22


How can I fix “Malformed entry 9 in list file”

From what I’ve seen in other posts, it looks like I entered a typo... Hate to say I’m extremely new to Ubuntu, but hopeful this is fairly simple! Sudo apt-get update E: Malformed entry 9 in list file /etc/apt/sources.list (Component) E:The list of sources could not be read.


How Do I remove minimize, maximize, and close buttons in Ubuntu 18.04?

I recently installed Ubuntu 18.04. Previously in GNOME 3, the minimize, maximize, and close buttons never appeared on any of my applications, such as Chromium Browser and Emacs. These buttons annoy me because I am used to  clicking Alt+Space.   How do I remove these buttons from Ubuntu 18.04?


How to get nth derivative of $\arcsin x$

I want to calculate the nth derivative of $\arcsin x$. I know $$ \frac{d}{dx}\arcsin x=\frac1{\sqrt{1-x^2}} $$ And $$  \frac{d^n}{dx^n} \frac1{\sqrt{1-x^2}} = \frac{d}{dx} \left(P_{n-1}(x) \frac1{\sqrt{1-x^2}}\right) = \left(-\frac{x}{(1-x^2)^{}} P_{n-1}(x) + \frac{dP_{n-1}}{dx}\right)\frac1{\sqrt{1-x^2}} = P_n(x) \frac1{\sqrt{1-x^2}} $$ Hence we have the recursive relation of $P_n$: $$  P_{n}(x)=-\frac{x}{(1-x^2)^{}} P_{n-1}(x) + \frac{dP_{n-1}}{dx}, \:P_0(x) = 1 $$ My question is how to solve the recursive relation involving function and derivative. I think it should use the generating function, but not sure what it is.


Redirection operator, standard input and command parameters

I'm following "The Linux Command Line" by William Shotts.  From what I understood, the > operator saves standard output to file, and < take standard input from file.    If the keyboard is the default standard input and < only takes that input from some file, why is ls -l not equivalent to ls < some_params.txt where some_params.txt would contain -l?  Thanks in advance


Is there a version control software tool that works on Windows?

I'm working with a team that uses Windows, Axure & Illustrator.  I was hoping that I could find some sort of tool similar to Kactus or Abstract for version control, but I can't seem to find anything for Windows or for Adobe Illustrator.  Does anybody have any suggestions?


Was it just coincidence that Tahir Mahmood went on stage?

In episode 3 of “Bodyguard,” Tahir Mahmood steps onto stage at St. Mary’s college as the Home Secretary is speaking and the two of them, plus others, are blown up by a bomb. In the next episode we discover that the stage had a weight trigger and that his arrival set it off. This heavily implies that whoever asked him to go on stage was affiliated with those who planted the bomb.  We know that Mahmood was sent on stage by advisor Rob Macdonald as part of a scheme, together with other members of the home secretary’s staff, to embarrass her. The audience knows that some of the people in on this scheme have been plotting with the U.K. security services. This, together with interference in video recordings of the event, characteristic of the security services, implicates the security services in the assassination.  In the final episode it is revealed that the bomb had been set by members of an organized crime gang who had gotten the explosives from an Islamic terrorist. A senior member of the police force had been helping them by leaking information. So, were the security services involved? If so, why? If not, who got Mahmood to go up on the stage? Was it just coincidence that he went up there at the right time?


Getting the name of the class of the tabs of a Tkinter notebook

In the following code I can access information in a notebook tab, in this case, the flag variable of the tab frame. This can be useful in several situations; in my case, when I drop one of the tabs. But it is perhaps easier to exemplify by binding to the NotebookTabChanged event, like so: import tkinter as tk from tkinter import ttk import random   class FrameA(ttk.Frame):     def __init__(self, parent, flag=0):         ttk.Frame.__init__(self, parent)         self.flag = flag         self.label = ttk.Label(self, text="This is Frame A!\nThe flag is {}".format(self.flag))         self.label.pack()   class FrameB(ttk.Frame):     def __init__(self, parent, flag=1):         ttk.Frame.__init__(self, parent)         self.flag = flag         self.label = ttk.Label(self, text="This is Frame B!\nThe flag is {}".format(self.flag))         self.label.pack()   class App(tk.Frame):      def __init__(self, parent):         tk.Frame.__init__(self, parent)          self.notebook = ttk.Notebook(parent)         self.notebook.bind("<<NotebookTabChanged>>", self.tab_changed)         self.tabs = []         for i in range(6):             frame = random.choice([FrameA, FrameB])             j = random.choice(range(30))             self.tabs.append(frame(self.notebook, flag=j))             self.notebook.add(self.tabs[-1], text="Tab {}".format(i))          self.notebook.pack(expand=True, fill='both')      def tab_changed(self, event):         i = self.notebook.index(self.notebook.select())         print("{}".format(self.tabs[i].flag))   if __name__ == '__main__':     root = tk.Tk()     root.geometry('500x200+300+300')     App(root)     root.mainloop()  It could also be helpful to have access to which class (FrameA or FrameB) was used in the definition of the selected tab. Can that be done?


The definite and zero article with the word "civilization"

Tell me please why the is not used in the first following sentence and is used in the second one.     Ancient egyptian civilization existed for a long time.      The Inca civilization flourished for a long time.   Is the omitted because of the word ancient, or the use of the is optional in both sentences?


Going to US, information on forex to be carried

I would be flying to US (California) for employment next week. To survive for the first month, until I get my first paycheck I'll be carrying some US Dollars from India. I have decided to carry around US$600 with me. However, I need some help on whether it's a good idea to carry the entire amount in currency notes or divide it among currency notes and traveler's checks. I am also thinking about carrying a forex card maybe, as an option. Either way if I lose any of them, I'll be losing the amount, isn't it? Or does it work in a different way?


After upgrading from Ubuntu 12.04 to 14.04 not able to install any new package

I have upgraded from Ubuntu 12.04 to 14.04 LTS but after upgrading errors appear after installing any software. I tried to install icedtea-netx. Generally following error comes  Setting up tex-common (4.04) ... Ignoring /etc/texmf/texmf.d/05TeXMF.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/15Plain.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/45TeXinputs.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/55Fonts.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/65BibTeX.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/75DviPS.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/80DVIPDFMx.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/85Misc.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/90TeXDoc.cnf during generation of texmf.cnf, please remove manually! Ignoring /etc/texmf/texmf.d/95NonPath.cnf during generation of texmf.cnf, please remove manually! Running mktexlsr. This may take some time... done. Running updmap-sys. This may take some time...  updmap-sys failed. Output has been stored in /tmp/updmap.K0LdoKUQ Please include this file if you report a bug.  Sometimes, not accepting conffile updates in /etc/texmf/updmap.d causes updmap-sys to fail.  Please check for files with extension .dpkg-dist or .ucf-dist in this directory  dpkg: error processing package tex-common (--configure):  subprocess installed post-installation script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1)   What should I do?


I upgraded from 17.04 to 17.10 on a Lenovo T540p which has broken two finger touchpad scrolling and right clicking

Trackpad two finger scrolling and right-click issue with Ubuntu 17.10 (i386, 64bit, GNOME 3.26.1) on a Lenovo T540p (the model with a Intel Core i5-4210M Haswell CPU etc)


If I have example.com, and blog.example.com, do search engines see those as one site or two? Will using subdomains hurt SEO? I have some technical reasons why I can't use example.com/blog.


friend of the familyname's or familynames

Is it      "John is a friend of the Smith's."   or      "John is a friend of the Smiths."   ?   Thank you for your answer :)


Java 8 - External Iteration performing better than Internal Iteration?

So I was reading a book for Java 8, when I saw them doing comparison between external and internal iteration and thought about comparing the two, performance wise.  I have a method that just sums up a sequence of integers up to n.  Iterative one:  private static long iterativeSum(long n) {      long startTime = System.nanoTime();     long sum = 0;      for(long i=1; i<=n; i++) {         sum+=i;     }       long endTime = System.nanoTime();     System.out.println("Iterative Sum Duration: " + (endTime-startTime)/1000000);      return sum; }   Sequential One - using internal iteration  private static long sequentialSum(long n) {      long startTime = System.nanoTime();      //long sum = LongStream.rangeClosed(1L, n)     long sum = Stream.iterate(1L, i -> i+1)             .limit(n)             .reduce(0L, (i,j) -> i+j);      long endTime = System.nanoTime();     System.out.println("Sequential Sum Duration: " + (endTime-startTime)/1000000);      return sum; }   I tried to do some benchmarking on them, it turns out that the one using external iteration performs far better than the one using internal iteration.  Here's my driver code:  public static void main(String[] args) {      long n = 100000000L;      for(int i=0;i<10000;i++){     iterativeSum(n);     sequentialSum(n);     }     iterativeSum(n);     sequentialSum(n); }   The running time for the Iteravtive one was always < 50ms whereas the execution time for Sequential one was always > 250ms.   I am not able to understand why internal iteration is not out performing external iteration here?


Under the U.S.'s Copyright Law, is it an act of copyright infringement if we changed the color of another artist's image to black and white?

Under the U.S.'s Copyright Law, would it be an act of copyright infringement if we were to change the color of another artist's image to black and white?  The answer to this question is provided . For further information, please check out , which is also provided below.  This question was asked to make it clear for those who may think that by changing the color or the size of another artist's work, you did not violate the U.S Copyright Law, which is not true.  Instead of trying to manipulate another artist's image to entitle ourselves as the "original" owner, the right and proper action is to request the permission to use it.


Function on $[0,1]$ which takes every value twice has infinitely many discontinuities.

I know that there is no continuous function on $[0,1]$ which takes each value exactly twice. I know how to prove this fact using Intermediate value property and attainment of maximum value on compact set. I am interested to show that for such function number of discontinuties are infinitely many? I had no clue how to proceed for this example. Any help will be appreciated.


I can't figure out what's the tense of call in the following phrase      I heard someone call my name   I mean,  I'm quite sure it's infinite but then shouldn't it be calling or to call?


How can I show that these two polynomials are coprime?

Let $n , m \in \mathbb{N}$ and let $k = \gcd(n , m)$. Then there exist $p , q \in \mathbb{N}$ coprime such that $n = p k$ and $m = q k$. And it is easy to see that $$ \frac{X^n - 1}{X^k - 1} = \sum_{i = 0}^{p - 1} X^{k i} = f(X) \qquad \mbox{ and } \qquad \frac{X^m - 1}{X^k - 1} = \sum_{j = 0}^{q - 1} X^{k j} = g(X)\mbox{,} $$ being $X$ an indeterminate. How can I show that $\gcd(f(X) , g(X)) = 1$?


I have a long URL. I use the package breakurl, and it works fine outside of an enumerate environment, but not when it is on an \item. \usepackage[margin=3cm]{geometry} \usepackage{hyperref} \usepackage{breakurl} \begin{enumerate} \item svn co \burl{https://svn.xxx.ch/reps/yyyyyyyyyy/Publications/ABC-paper-2012/trunk ABC-paper-2012} \end{enumerate}  How can I give the URL a line break? Edit: If I remove margin=3cm, it works properly. It seems to be an interaction between geometry and breakurl.


Give an example of a set that has the set of natural numbers as it s set of accumulation points.

So far, I have:   Let $S_k = \{ K + \frac{1}{n}: n \in N \} \ \forall K$.   Example:  $S_0 =\{ \frac{1}{n} : n \in N \} $ where there is only one accumlation point.   Are there other examples that of a set that has the set of natural numbers as the set of accumulation points?


It is about  question on unix SE migrated from the SF.  What I did:   I voted the question up (on SF). Voted to migrate it to unix SE. It was migrated (my vote was the last needed). Followed the migrated question on the unix SE. Its vote count was also migrated from SF. But the up arrow didn't signed that I already voted this question. Thus, I was able to vote it up again.   Currently the question has 2 upvotes from me, but from different sites.  I think, maybe the question owners are perfectly synchronized on question migrations, but its voters aren't.  It is a bug or feature?


How to change the font size of a document?

Possible Duplicate:          Sometimes when I want to review a draft I need larger fonts. Is there a package or a command that I can use to increase the font of the entire document?


$f_\ast\mathcal{O}_X$ is locally free of rank $r=\deg f$ for a finite $r$-to-one morphism $f$.

Let $f\colon X\to Y$ be a finite $r$-to-one morphism between smooth projective varieties.  How does one show that $f_\ast\mathcal{O}_X$ is a locally free sheaf of rank $r$ on $Y$ ?  Any insights for $f_\ast\mathcal{O}_X$ would be very much appreciated. A local section over $U\subset Y$ for $f_\ast\mathcal{O}_X$ is just a regular function over $f^{-1}(U)$, so it seems as if one can write this uniquely as a sum of $r$ "pieces"...?  An aside second question: is there a naturally defined map $f^{\ast}f_\ast\mathcal{O}_X(D)\to\mathcal{O}_X(D)$ where $D$ is a divisor on $X$ ?


Path of a particle acted by a force always perpendicular to velocity

What is the path of a particle if it is continuously acted upon by a force perpendicular to its velocity (given that acceleration magnitude is never equal to $v^2/r$)? Is it still a circle?


[table name:franchise  I have two inputs in php latitude and longitude with this value i need to fetch nearest frachise from franchise table.  please see image for table info.  Ex: 25.271631753161955-Latitude  55.31605750322342-Longitude  I want to select nearest franchise using given latitude and longitude.]


What's this icon in menu bar on Macbook Pro?

Does anyone know what's this icon to the left of battery status in the menu bar? It looks like binoculars.  This appears only on lock screen, and disappears as soon as I login (either through TouchID or entering the password). Clicking on that while the screen is locked doesn't help. If it helps, this is a MacBook Pro with TouchBar (2017 model) and is running macOS Catalina 10.15.6. I've been using this laptop for more than 2 years but this started appearing only 3-4 days ago. Thanks


I've been embracing Test-Driven Development (TDD) recently and it's had wonderful impacts on my development output and the resiliency of my codebase. I would like to extend this approach to some of the rendering work that I do in OpenGL, but I've been unable to find any good approaches to this.  I'll start with a concrete example so we know what kinds of things I want to test; lets say I want to create a unit cube that rotates about some axis, and that I want to ensure that, for some number of frames, each frame is rendered correctly.  How can I create an automated test case for this? Preferably, I'd even be able to write a test case before writing any code to render the cube (per usual TDD practices.) Among many other things, I'd want to make sure that the cube's size, location, and orientation are correct in each rendered frame. I may even want to make sure that the lighting equations in my shaders are correct in each frame.  The only remotely useful approach to this that I've come across involves comparing rendered output to a reference output, which generally precludes TDD practice, and is very cumbersome.  I could go on about other desired requirements, but I'm afraid the ones I've listed already are out of reach.


How to access an object (already cast as its parent) as its actual object without reflection?

How do I access the property of a child class instead of the abstract class, when handling objects by their parent/abstract class? Like in this example:  public class WordCategories {   public static abstract class Noun {     public static final String TYPE = null;     //... and so on, methods   }   public static class Person extends Noun {     public static final String TYPE = "Person";     // ...   } }  /* ... then we build a collection with members like: */ nouns.add(new WordCategories.Person("Bill Clinton");  /* now later we need to access a mixed list of nouns: */ for(WordCategories.Noun n: nouns) {   if(n.TYPE.equals("Person") ){ // this is always null }   Obviously I could just specify (WordCategories.Person) n but that assumes that it is a Person. I need the cast to come from the parent class, and it would be most elegant if it did not involve interpreting the TYPE constant or the use of reflection, for that matter.


Quite a similar thread to others I've seen here - hope I'm not repeating the same questions again!   I just got my first payslip after arriving in the UK and noticed that the tax is far higher than the HMRC rate for my salary bracket.     I did some research but couldn't find any reason why I would be taxed at 24.23% of my gross this month AND then an additional amount for NI.    I have about £640 back pay from April that is only being paid now,but even so, it doesn't explain the rather large discrepancy between the HMRC rate and what I'm seeing here.   Any ideas?


Ticket to Ride: May a train segment count for 2 different routes?

We have a question regarding Ticket To Ride. Can part of one train be used to fulfill two different destination routes? For example, my clever son completed his San Francisco-Atlanta “Destination Ticket” (17 bonus pts.). He then drew the Portland-Nashville “Destination Ticket” (also 17 bonus points) and decided this would be a cinch since he had already completed San Francisco to Atlanta. He simply added another 5 train cars, from San Francisco to Portland, and claimed another 17 bonus points for the Portland-Nashville ticket! I think he should not be allowed to do this, but should complete a whole separate train between Portland and Nashville to earn those 17 additional points. I may be reading the rules too quickly, but I don’t see where the rules explicitly address this one way or the other. Do you know if there is an “official” rule on this? Or is it up to people to determine this in their own house rules? Thanks for any tips you have!


Finding a tricky limit using intergral sums

Find the limit, interpreting this as as the limit of the integral sum of a suitably chosen function.  $$\lim_{n\to\infty} \frac{1}{n} \sqrt[n]{(n+1)(n+2)... (n+n)}.$$    A hint that has been given: find the logarithm of equation and then find a limit of logarithm.


Adam, Bertrand, and Carissa toss a coin in sequence until one person wins by tossing the first head.  If the coin is fair, find the probability that Adam wins.  Can somebody tell me if I'm on the right track?  Adam can win on the first round if he rolls a head. Or he can win on the second round if all three of them roll tails and then he rolls a head. Or he can win on the third round if they roll tails six times and then he rolls a head.  P(Adam wins) $= .5 + .5^4 + .5^7 + \dots + .5^{3n-2}$ where $n=$ number of rounds.  Thoughts? Should I be getting a numeric answer here...?


Can I use pipe output as a shell script argument?

Suppose I have a bash shell script called Myscript.sh that need one argument as input.  But I want the content of the text file called text.txt to be that argument.  I have tried this but it does not work:  cat text.txt | ./Myscript.sh   Is there a way to do this?


Inequality of $\vert \text{tanh}(x)-x+\frac{x^3}{3}\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$

I have an assignment, that I cannot seem to find a starting point for. I am not looking for the specific answer, but only where to begin. Any pointers are appreciated.  I have to prove the inequality $\vert \tanh(x)-x+\frac{x^3}{3}\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ where $x-\frac{x^3}{3}$ is the 3rd order Taylor expansion.  I've tried with the triangle inequalities, Lagrange remainders, and a lot of other stuff, but I am no where near a correct argumentation. Does anyone have any suggestions?


Good morning forum. I have this basic query in oracle SELECT P.IDPROYECT, P.NOPROGRAM, P.IDETAP, P.STATUS_ETAP, P.VERSION FROM poa.PROYECT P LEFT JOIN DGI.DEPENDENCIA UA ON (P.RAM = UA.RAM AND P.DEPT = UA.DEPT AND UA.YEAR = 2021);  I am attracted to a series of records so the noprogram is repeated 3 times but the only thing different is that the version of those 3 is newer, I would like it to show me only 1 of the 3 records that has a higher version


does anybody know how to enable fingerprint login in a LUBUNTU LXQT 0.14.1? I have a Lenovo X230 Thank you


Variables in the Dirac Equation Lagrangian

(Warning: I'm a student of mathematics with no training in physics.)  In derivations of the Dirac equation from an action principle, one encounters the action $$S= \displaystyle\int\,d^4x \,\bar\psi(x)(i\gamma^{\alpha}\partial_{\alpha}-m)\psi(x)$$ where $\psi(x)$ is the Dirac field and $\bar\psi=\psi^{\dagger}\gamma^0$ is the Dirac adjoint. (See pages 88 and 89 of  for these equations.)  Looking at this action, it seems to depend on one variable, namely $\psi$. But every reference I've ever looked at that derives the Dirac equation from the action says something like, "Treat $\bar\psi$ as an independent variable and vary with respect to it to obtain the Dirac equation." (See Page 90 of the reference above for example.) But this seems ridiculous to me; the very definition of $\bar\psi$ shows that it depends on $\psi$! Why could one not then, in any context, take any field equation one wants, multiply by some independent variable which makes the action a scalar, and then vary with respect to this variable to re-obtain the field equation? I have some vague idea about why my reasoning is not valid, but I'd like to hear why it's wrong from some folks who are more educated in physics than I, and why the reasoning is correct in the case of deriving the Dirac equation.


How do spiders find your website in the first place?

This is just a question of curiosity. Let's say I register for a new web domain and purchase a hosting account. I set up a website, and soon search index bots are visiting the site to learn more about it. How did those bots know how to find the site if I haven't linked to it from anywhere else on the web?   My guess would be that the search providers obtain new IPs from either the domain name registrar or the hosting provider and feed these to their spiders, but I've been unable to find a clear answer on this.


Can medium intensifiers be ranked by the strength of intensification?

Here are the examples of adjectival intensification:        It's quite cold here in March.   It's pretty cold here in March.    It's fairly cold here in March.   It's rather cold here in March.      To me, their meaning seems altogether the same—It's cold to a slight or medium degree, a little more or a bit less— but I doubt about the exact sameness.  To make the question topical, I should explain that it was brought up during one of the numerous wide-ranging discussions on the subtleties of the English language I had a few days ago with an acquaintance of mine. Then, he claimed that all intensifiers, even those in my examples, can be ranked by their strength, and backing his point, he mentioned  a book on adjective intensification he had come across when he studied the English Language at the University (not in the English-speaking country) in the early 2000s.   After a painstaking search, I came across a link to a book which is unavailable in the place I live in. When I sent   to the man, he  said that the book's title seems familiar to him, but he's not sure.   So, my question is:  Is it true that the intensifiers in the examples can be ranked by their strength?  If it is true, what might be their descending order? If there's no rule for this, is there a customary usage order?


I have about 1700 rep on SO, meaning I can retag questions without review, but I cannot edit, yet.  I have problem with one specific question (and some other earlier, but I have not reported the problem then):   I click the Edit link, change the tags, click the Save Edits, but I get an error message for the main "question" input box, saying:     Edits must be at least 6 characters; is there something else to improve in this post?   and another for the Edit Summary, saying:     Your edit summary must be at least 10 characters   It would make sense, if I made a small edit inadvertedly in the post. But I did not. I've tried like dozen times. Both in full and mobile version of SO. No luck.  If I specify Edit Summary, I get rid of the latter error message. But I cannot get rid of the first.  I'm not getting the problem, when re-tagging with other questions.


Wrapping a function with variadic arguments

When looking for how to wrap a function with variadic length argument, what I often see as an answer is not a solution but a workaround. Let's change the example from printf to a function printfln written in a library and I have no control over the library and I cannot add anything there. Now, I have another function double_printfln that should call printfln two times. This time we cannot use vprintf workaround. How to do this?  #include <stdio.h> #include <stdarg.h>  int printfln(const char *format, ...) {     int result;     va_list args;     va_start(args, format);     result = vprintf(format, args);     printf("\n");     va_end(args);      return result; }  int double_printfln(const char *format, ...) {     int result;     va_list args;     va_start(args, format);     result = printfln(format, args);     result += printfln(format, args);     va_end(args);     return result; }  int main() {     int x=7;     char text[20] = "Hello";     double_printfln("%s, %d", text, x);     return 0; }    Solution For those who face with a similar problem, this is how I fixed it. This is actually another workaround but in a better way: int double_printfln(const char *format, ...) {     char line[512];     int result;     va_list args;     va_start(args, format);     memset(line, 0x00, sizeof line);     vsprintf(line, format, args);     va_end(args);      result = printfln(line);     result += printfln(line);      return result; }


How to install gem through proxy with authorization

I am behind a corporate proxy and it needs authorization to use it. When I try just to use option -p http://ip.of.my.proxy:3128, it throws error 407. Is there a workaround?


How to check formatting of a SHA-1 message-digest

I need some basic validation (sanitation checks) to determine if some input is a valid SHA1 sum or just a (random) string. If possible with simple parsing rules or a Regex.  Are there any rules to what a SHA1 sum should adhere? I cannot find any, but from quick tests, all seem to be hexadecimal and around 40 characters long[1].  I am not interested in tests that prove whether or not the SHA-1 sum was made in a secure, properly random or other manner. Just that the format is correct.  I am also not interested in testing that the digest is an actual representation of some message; Just that it has the format of digest in the first place.    For the curious: this is for an application where I build avatars for users based on a.o. their uuid. I don't, however, want to place those uuids in the URL, but obfuscate them a little. So instead of avatars/baa4833d-b962-4ab1-87c5-283c9820eac4.png, we request avatars/5f2a13cb1d84a2e019842cdb8d0c8b03c9e1e414.png. Where 5f2a... is e.g. Digest::SHA1.hexdigest(uuid + "secrect").   On the receiving side, I am adding some basic protection that sends back a 400 bad request whenever something is obviously false. Such as avatars/haxor.png or avatars/traversal../../../../attempt.png. Note that this is a very much simplified example.    [1] Two tests with different outcome:  Using sha1sum on Ubuntu Linux:   $ echo "hello" | sha1sum | cut -d" " -f1 | wc -c 41   using Ruby's Digest:     Digest::SHA1.hexdigest("hello").length => 40   Edit: turns out this is me, being stupid, wc-c includes the newline, as kennytm points out in the comments. Still: is it safe to assume it will be 40 characters, always?


A 256GB SSD has Windows-10 and 16.04 installed.  BIOS not UEFI.  A charity I work with requires me to use Quickbooks Desktop on Windows.  The plan is to ghost the existing system to a 512GB or larger SSD and create a third bootable Windows 7  partition for performing charity activities.   Is this possible to have a third partition? Is there a good example you have used as a guide? Is triple booting with two Windows partitions different from 2 Linux partitions?   If you have done this before ( with GRUB) please indicate this in your response: lessons-learned are appreciated.  Thank you


How to make sudo accept password automatically without prompting for it?

I created a user named shut so that whenever one logs in using that username the machine would shut down. For that I placed the below command in the end of the .profile.  exec sudo shutdown -h now   But this didn't serve the purpose. When the user shut logs in, rather than the machine shutting down, the login screen is coming back. So the user isn't able to log in but at the same time getting back the same login screen.  The reason I feel is that because password for the user shut isn't provided , the machine isn't shutting down. And because of exec, the login screen is coming back (which is fine).  Now to solve my work, I need a way so that it would automatically take my password when the above sudo command executes. I checked man sudo and I think -A option has to be used.   Following that man page, I ran  SUDO_ASKPASS=/home/ravbholua/pass.txt  export SUDO_ASKPASS   Then to check whether it's working, I ran  ravbholua@ravbholua-Aspire-5315:~$ sudo -A pwd  sudo: unable to run /home/ravbholua/pass.txt: Permission denied   From this output, it means this path file has to run and provide my password as output to sudo. What earlier I thought, it would take the password from this file named pass.txt, so I entered my password in this file. But no!!!!!!!  Any suggestions please!


How to put everyone except myself into adventure mode?

How can I use a command block to turn everyone (except myself) into adventure mode (gamemode 2)? Any command which does this would be awesome.


After getting caught stealing a few things in skyrim, I noticed that most of the stolen items got confiscated. However, when I went back to the original place of the item, it was gone.  So my question is, does the confiscated items get stored somewhere specific, or are there no way of getting them back?


I am using qgis version 1.8.0. My project contains tiff and several "shape" layers. The CRS is WGS 84 (EPSG:4326). I am attempting to measure the areas of the layer polygons. However if I click on the symbol "Measure area", I am getting a message. It keeps telling me the measurements are problably wrong. (Testing this statement by measuring leads to enormous but wrong values) It suggests to define a coordinate system in project properties. I have been trying this serveral times - with no results. Furthermore I read "Working with Projections" and "Measuring" in the User guide (http://docs.qgis.org/user_guide/html/en/user_manual/introduction/general_tools.html and ). Also after adjusting all other CRS settings the problem stays.  What should I do ?  Thank you for your advice


If it's so hard to beat the market, why do banks invest billions in active portfolio management (and why do they have any customers?)

It's well known that beating the market is difficult, and most actively managed funds aren't really doing all that much better, especially after accounting for fees. So if that's the case, why the hell do banks invest so much money in active asset management, why do portfolio managers even exist, and why do these people get any customers? Who is it out there that says "yup, I'm going to take all of this money, and NOT invest it in a index-linked mutual fund, but instead give it to some guy in a suit pretending to be an expert and demanding expensive fees just so he can offer me the exact same return I'd get from the S&P 500"? And now I bet somebody will say "SOME managed funds do beat the market, just look at A, B, and C", yeah buddy that's called survivorship bias. Come back in 5 years and we'll be talking about fund x, Y, and Z.


Following .  Since you can't use an array modifier on lamps, how can you create an array so that all lights are clones of the same original and can be edited as one?


How to replace Windows 8 with Ubuntu on an Acer ES1-711 laptop?

I want to know how to disable the secure boot sequence to allow Ubuntu or Linux Mint to replace Windows 8 completely on my Acer 64 bit laptop.


Prove by cases that $|x + y| \le |x| + |y|$ for all real numbers $x,\,y$.

PROOF: Assume $x$ and $y$ are real numbers. Consider the following cases.  CASE 1: assume $x \ge 0$ and $y \ge 0$  CASE 2: assume $x \ge 0$ and $y < 0$  CASE 3: assume $x < 0$ and $y \ge 0$  CASE 4: assume $x < 0$ and $y < 0$  What steps should be taken from here? I assume my cases are correct, I am just having trouble fleshing them out.


Is there such a thing as a white laser pointer?

I can't seem to find a white laser pointer for sale anywhere. Is it just me or is it somehow not possible to make it? I see only color laser pointers like red, green, blue, etc.


Would it work if I run Siri on OS X El Capitan by copying Siri.app from macOS Sierra to the OS X El Capitan?  Just want to find out what exactly would happen even though OS X El Capitan doesn't support Siri.


Are there any tools that will display a complete tree

My tree currently contains around 1500 people and I would like to be able to browse the WHOLE tree; I like the way the tree displays on Ancestry.co.uk but find it a little limiting (especially when checking some of the data) that I can only see a few generations and limited number of people, in one view.  Is there anything out there, which will give me a comprehensive view of the tree?


Transfer Windows 10 boot disk to another computer

I’ve had a laptop fail (CPU failure according to the blinking LED) and was wondering what steps I could take to transfer its hard drive to a new machine and have it boot. It currently has Windows 10 installed (upgraded from Windows 8.1, Windows 8 before that, and originally Windows 7).  I’ll probably start by taking a backup image of the disk. The replacement laptop hasn’t arrived as yet, it’s of a similar vintage. The old machine was a HP ProBook (don't recall the model off the top of my head), and the replacement a Dell Latitude 6420.  I of course want to avoid having to reinstall and reconfigure all the applications on the drive.


Check if a mesh has a material in Python

I want to create a script that check if the mesh has a material, if not it applies a diffuse shader with mid grey (value 0.735).


How can I stop \footcite from hijacking my beamer columns?

I have prepared a beamer presentation for a seminar. I already have presented, but in trying to change traditionally-cited references (with a number superscript and the reference typesetted at the end of the presentation), I used biblatex's \footcite. Consider this frame snippet:  \documentclass[10pt]{beamer} \usepackage[utf8]{inputenc} \usepackage{amsmath,amssymb} \usepackage{colortbl} \usepackage[spanish,es-tabla]{babel}   \usepackage{wasysym} \usepackage[style=verbose,autocite=footnote,maxnames=10,babel=hyphen,hyperref=true,abbreviate=false,backend=biber,mcite]{biblatex} \addbibresource{references.bib}  \usepackage{pgf} \usepackage{booktabs} \usepackage{multirow}  \setlength{\columnsep}{.2cm} \def\newblock{\hskip .11em plus .33em minus .07em} \mode<presentation> {   \usetheme[width=4em]{PaloAlto}   \usecolortheme{crane} } \title{Title} \subtitle{Sub}  \author[me]{me} \date{\today}  \begin{document}  \begin{frame}   \titlepage \end{frame}      %%%%%%% MAIN CODE %%%%%% \begin{frame}{The FDTD Method}     \begin{columns}         \begin{column}{0.4\textwidth}           \begin{itemize}               \item Discretization of both space and time by central differences.                 \item Yee Cell %\footcite{Taflove2000}.              \end{itemize}         \end{column}      \begin{column}{0.5\textwidth}         \begin{figure}           \centering           \includegraphics[width=0.9\columnwidth]{some_figure}           \caption{Unit Yee Cell.}         \end{figure}     \end{column}      \end{columns} \end{frame}  \end{document}   Put any PDF, PNG or JPG file named some_figure together with this .tex file. The content of the references.bib file (just to enable compilation) are:  @Book{Taflove2000,     Day = {{30}},     Edition = {{2nd}},     Month = {{jun}},     Publisher = {{Artech House Publishers}},     author = {Taflove, Allen and Hagness, Susan C.},     title = {{Computational Electrodynamics: The Finite-Difference Time-Domain Method}},     year = {{2000}}, }   With the comment in place (that is, when not citing with \footcite) the second column containing the figure appears in the PDF output correctly. But, when the comment is removed, the citation appears at the footer of the frame, but the second column goes into oblivion along with the figure. Does anyone know how to solve this?


Why the whole system hangs while trying to reading bad CD/DVD?

When I insert some scratched CDs or DVDs and try to read them, the whole operating system (Win7 in my case) seems to hang. Looks like all hard drive I/O is also paralized and most Windows OS hangs. Why does this happens? Is there any other OS or configuration that does not have this issue?  I'm unable to test this on my newer systems because they dont have optical drives...   This may be related to either Windows architecture, the driver model, a problem with PATA/SATA design, but I am not sure which one is the culprit.


Traveling through Canada on China Southern, in transit visa required while quarantined in the “sterile transit area”?

I’m a Filipino passport holder. No U.S. visa, no Canadian visa. I’m flying from Costa Rica to Mexico City. Then Mexico City to Vancouver, then to China, then Philippines.  I get on China Southern flight number 378 in Mexico City and it lands in Vancouver Terminal M.   The exact same flight number on China Southern 378 and Terminal M and even the same seat goes all the way from Vancouver to Guangzhou.   The stop in Vancouver is 1 hour 50 minutes. We have to get off the plane.  The Canadian website on in transit immigration is very unclear.   It says if you stopover on an international flight you will “stay in the sterile transit area” while you transition in the same flight like I will.    I take this to mean we get off the plane, stand around in the “sterile transit area” for no more than 1 hour 50 minutes and then we get back on the plane.  No special visa would be required, is this correct?  Has anyone done this?


My code is written as follows:   \begin{equation} \forall x \in \mathbb{R}, \cos(x+2\pi)=\cos(x)  and  \sin(x+2\pi)=\sin(x) \end{equation}   But when I 'execute' it there is no space between cos(x) & and so can you help me cope with this issue? Thanks in advance!  PS: if someone could teach me how to define a new environment so that   \begin{theorem}Equation\end{theorem}   produces immediately a mathbox with the equation inside of it?, I would greatly appreciate your help!


Reset question grace period once an answer has been posted

When answers are posted within a question's initial grace period, it is possible that further edits could completely change the question (see ""), and render those first few answers incorrect.   Worse yet, nobody is notified that there was a change to the question, except those that are sitting on the page and notice the edit bar pop in. And of those, only those bothered enough to open it in a new window to compare the differences, will see how much was changed.   After the grace period is up, nobody will be able to consolidate why the first few answers actually answered a different question. And the answerers won't know unless someone comments or down-votes (and in the latter case, without context, they still might have trouble understanding, unless they memorized the question's initial state).  Jon Skeet stated it pretty well in  on :     I'd like this to apply to the question, as well as answers. Sometimes I (or others) have added perfectly good answers, but then the question has been changed within the grace period, making answers look foolish without any indication of what's happened.   So this time, my proposal is quite simple:     Once an answer is posted to a question within the initial grace period, a new grace period should start, and the current state of the question should be saved as the first revision. Further edits within the next 5 minutes will be aggregated into a new, second revision.   This will only noticeably affect questions where answers are posted within the grace period and the author of the question makes edits within 5 minutes of the first answer. (Effectively, it would treat it as if a different user made an edit within the author's grace period.) All other scenarios will continue to behave as they do today.  This feature request comes close:    However, the answer suggests a simple change to the wording or a pencil icon (like we see with edited comments), without adding a revision that can be viewed and compared. I don't think this is enough - in some cases it's going to be important to know what changed, not just when.


PHP - htmlspecialchars_decode not working

I am trying to stop a webform giving "â€“" instead of "-"   $time = $_POST['CBTime'] ; $fixtime = htmlspecialchars_decode($time);   ...  "Contact them on $day at $fixtime.\n".   Is the PHP I have  And the element of the form is  <select class="callback-time" id="CBTime" name="CBTime"><option value="">Time</option><option>Any time</option> <option>9am – 11am</option> <option>11am – 2pm</option> <option>2pm – 5pm</option> </select>   So an example of what will be outputted form is:  Contact them on Wednesday at 9am â€“ 11am.


How can I run a Minecraft Server on multiple CPU cores?

I am working on setting up a Minecraft server on a machine I have at home. This particular machine has two quad-core CPUs running at 2.0Ghz so I would like to take advantage of the number of cores and run a server with 4 or 6 of the cores. My server of choice is CraftBukkit, the latest version of which is craftbukkit-1.4.7-R1.0 and launched with a start-up script of:  "C:\Program Files\Java\jre7\bin\java.exe" -Xms1G -Xmx8G -jar craftbukkit-1.4.7-R1.0.jar"   The  says:     Minecraft servers, as of 1.1.0, can use multiple cores, so now they will not sit idle.   but does not really expand on this.  My questions, then:   Is it possible to set the number of cores the server uses? How do I do it - via start-up options, or other methods? Is it really worth it and would it make that much of a difference with a lot of players?


Find the value of infinite series $\sum_{n=1}^{\infty} \tan^{-1}(2/n^2)$

Find the value of infinite series   $$ \sum_{n=1}^{\infty} \tan^{-1}\left(\frac{2}{n^2} \right) $$  I tried to find sequence of partial sums and tried to find the limit of that sequence. But I didn't get the answer.


Why is "letter" not plural in "two letter words"?  For me it's very strange as the equivalent in French would be plural but my English friend finds it totally normal.