Prove that the set of positive integers can be expressed as a countably infinite union of disjoint countably infinite sets.

Consider the set $\mathbb Z^+$ of positive integers. Prove that $\mathbb Z^+$ can be expressed as a countably infinite union of disjoint countably infinite sets. I know that countably infinite sets means it has the same cardinality as $\mathbb N$ (the set of natural numbers). However, I am not sure how to go about proving this.


Are the matrix products $AB$ and $BA$ similar?

Given two matrices $A,B.$ On what conditions does $AB \sim BA$ hold?


Prove that any element in a ring A can be written as a product of irreducible but A is not a UFD

Let A = $Z$[$\sqrt{10}$] = {a+b$\sqrt{10}$$\mid$a,b $\in$ $Z$}.   Prove that any element in A an be written as a product of irreducible, but A is not a UFD.   Also a small question, I've proved that $4$+$\sqrt{10}$ and $4$-$\sqrt{10}$ are irreducible, but how to show that they cannot be associates?  Thank you so much!


How do i sort this data based on key value "name" using loops


I'm going from Morocco to USA via Paris and I will have to change terminals and pick up and check in my luggage between flights. Do I need a transit visa in Paris even if I have a valid US visa?


Using Workflow or Windows Service for Sync. operation

I am in a situation where inhouse database needs to be sync. (one way) from web service data of external server.   I can write couple of lines through windows service. However, I am just wondering about using WF. As per my understanding with WF, it is about workflow, with activities (if conditions) connecting with external interface, providing common layers such as exceptions, mail etc...   From architecture and future technology point of view, what would you suggestion on going WF or Windows Service way?  Please Note: Its required to execute this process every night.


Why does the wire-frame material fades across the object?  Here is what I did - I created a new material and I selected on "Wire" and I made it shadeless. Then, I created a new material and assigned the new material on the on the object. However, doing it that way, it allows me to render both materials - "Wire" and "Surface". Then I get a fading result like this -    But I want all of the edges to be shown, not a fading result. How can I make that?  Here is the blend file if anybody wants to check it out -


Removing surface rust from my Eggbeater pedals?

So I did a couple of wet rides last month, and I guess I didn't dry the pedals as well as I should have.  I have Crank Brothers Eggbeater pedals, and I noticed a bit of surface rust on them that I'd like to remove.  What are my options, considering that I can't really disassemble the pedals, and they have a large number of surfaces that are hard to get to?


Repeating something with (1/n)th chance of success n times

Is there anything that can be said about how many attempts it will take to correctly guess a random number out of 1000 numbers? If the number wouldn't change the probability would just increase every guess, giving in the end a probability of 1.  If the number changes every guess tough, you just have a 1/1000th chance everytime. Can it be calculated how many attempts it would probably take, on average?  (I'm sorry, i'm not very skilled in probability maths)


Entity browser widget in custom config form

I am able to render the entity browser button in custom configuration form. But, after selecting the image it does not get displayed in the  form, has anyone integrated in custom form so far ?  $form['content_link'] = [     '#type' => 'container',     '#parents' => ['content_link_wrapper'],     '#weight' => -3,     'widget' => [       '#title' => t('Content Link'),       '#description' => t('The content to be linked in the menu.'),       '#field_name' => 'content_link',       '#field_parents' => [],       '#required' => TRUE,       '#parents' => ['content_link'],       '#tree' => TRUE,       '#id' => 'edit-content-link',       '#type' => 'details',       '#open' => TRUE,       'target_id' => [         '#type' => 'hidden',         '#id' => 'edit-content-link-target-id',         '#attributes' => [           'id' => 'edit-content-link-target-id',         ],         '#default_value' => "",         '#ajax' => [           'callback' => [             '\Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget',             'updateWidgetCallback',           ],           'wrapper' => 'edit-content-link',           'event' => 'entity_browser_value_updated',         ],       ],       'entity_browser' => [         '#type' => 'entity_browser',         '#entity_browser' => 'image_browser_dropzonejs',         '#cardinality' => 1,         '#selection_mode' => 'selection_append',         '#default_value' => [],         '#custom_hidden_id' => 'edit-content-link-target-id',         '#process' => [           [             '\Drupal\entity_browser\Element\EntityBrowserElement','processEntityBrowser'           ],         ],       ],       'current' => [         '#theme_wrappers' => ['container'],         '#attributes' => [           'class' => 'entities-list',         ],         'items' => [],       ],       '#attached' => [         'library' => [           'entity_browser/entity_reference',         ],       ],     ],   ];


Is there a way to give a profile a different default list view then "Recently Viewed" in Lightning?


Getting Null Pointer Exception while trying to merge linked lists

I am trying to merge two linked list. I wrote the following code to pick out nodes from ListB and link it to listA at appropriate place. However i am getting null pointer exception and not able to figure out why.. pls help    Node sortedMerge(Node headA, Node headB) {       if(headB.data<=headA.data){          Node temp = headB.next;          headB.next=headA;          headA=headB;         if (temp == null) return headA;          else return sortedMerge(headA, temp);      }      else{          Node headAtemp = headA;          while(headA.next.data <headB.data && headA.next!=null){              headA = headA.next;          }          Node next = headA.next;          Node temp = headB.next;          //changing links          headA.next= headB;          headB.next = next;          if (temp == null) return headAtemp;          else return sortedMerge(headAtemp,temp);      }    }   The function should return the head of the sorted list.


Everyone knows that there is an infinitude of primes. I know the Euclide, the Euler and the Erdos proofs. But are they the only known proofs ? I will try, here, to present a fourth one : Let the Fermat numbers $F_n=2^{2^n}+1$. They are not all primes, $F_5$ for example is not, Euler has proved it ! There are two possibilities, of course : if there is an infinitude of prime Fermat numbers, the primes are infinite. If there is an infinitude of compound Fermat numbers, the Goldbach theorem states that $\gcd(F_n,F_m)=1$ if $n\neq m$. So $F_n=p_1^{n_1}\cdots p_i^{n_i}$ and $F_m=q_1^{m_1}\cdots q_j^{m_j}$ and $p_k\neq{q_j},\forall{j,k}$. Thus $p_1=F_n^{1/n_1}p_2^{-n_2/n_1}\cdots p_i^{-n_i/n_1}$ are infinite and there is always an infinitude of primes! Do you know another proof mentioned in the literature, please? Thank you.


I have installed and used Ubuntu, and now I want to try the GNOME desktop environment.  I don't know where to start. Could you give me some guidance?  Thanks!


Matrix is either null or similar to the elementary matrix $E_{2,1}$

Let $A$ be a $2\times 2$ complex matrix such that $A^2=0$. Prove that either $A=0$ or $A$ is similar over $\mathbb{C}$ to $$\left(\begin{array}{cc} 0 & 0 \\1 & 0 \end{array}\right) $$


How can I get back my account in a SE site?

First of all, I'd like to make it clear that I've tried to post it on the Math-meta site, since this question could fit better there, but I'm not allowed because I'm new and don't have enpugh reputation yet.   11 days ago I signed up in Math-SE, with my e- mail. I've been using it,asking and answering questions without any problem; but it seems that I forgot to confirm my e-mail by clicking the link that is given by mail when you sign up.  So yesterday, when I opened Chrome, I was logged out, and when I tried to log in, the page would say :" We could not find an account with that e-mail".  I don't know what to do to get my account back; since the options for recovery of your account assumes your mail is registered, and mine's not.  thanks!


Is the word “key” of the sentence an uncountable noun or an adjective?

The diplomat was quick to organize a peaceful dialogue between the two countries’ leaders, and many say that his efforts were key to averting a war.   I am not sure whether the word “key” is an uncountable noun or an adjective. And, I also think about the sentence is typo, the sentence has to add “a” or “the” before “key”.  Please tell me your thought.  The sentence is from “EIKEN 1 kyu deruzyun de saitan goukaku goi mondai kanzen seiha” page 38.


My Developer Account cannot be activated because I used a relative's credit card

So now I have an "identity cannot be verified" message whenever I activate it from the activation code Apple gave me via email.  Is there anything I can do about this or is my $99 "doomed"?


In the past hour, we've had 9 10 meta posts reporting various bugs. Pages are showing no questions, questions are getting flipped/mixed up, etc. Clearly, this is not a coincidence. Stack Exchange is going crazy!  I see nothing posted on , so I want to know: what is causing this? Is it caching? Localization? Just some turbulence in the servers? Or has the spammer threatening to hack us actually succeeded? :P  (To devs: please post the cause of this on StackStatus if you find it.)


I have a raster data in TIFF format which represents land use categories (urban, forest, agriculture etc). This I made in ArcGIS where it is possible to see all categories in different unique colors but I can't see those categories when I opened that file in QGIS.


If $f(x)<g(x)$ prove that $\lim f(x)<\lim g(x)$

I have this question:     Let $f(x)→A$ and $g(x)→B$ as $x→x_0$. Prove that if $f(x) < g(x)$ for all $x∈(x_0−η, x_0+η)$ (for some $η > 0$) then $A\leq B$. In this case is it always true that $A < B$?   I've tried playing around with the definition for limits but I'm not getting anywhere. Can someone give me a hint on where to start?


Did Singapore Airlines flight SQ 217 from Singapore to Melbourne on 15 April fly or was it cancelled.


Stored Procedure with HINT "WITH RECOMPILE" loses performance, solved with DBCC FLUSHPROCINDB

I have a Stored Procedure with the hint WITH RECOMPILE, so the Stored Procedure do not store in the cache a Query Plan for the Stored Procedure. The average time the Stored Procedure resolve the Query is between 1 and 3 second, but from time to time the Stored Procedures takes > 30 seconds and sometimes it gets timeout. The strange thing here is that I run DBCC FLUSHPROCINDB and the Stored Procedure returns to its normal time (1 to 3 seconds).  Do you have any idea of what could be happening?


I have read many articles  and even the original paper, yet the actual proof of the formula escapes me.  I'd really appreciate it if someone can outline the logical skeleton of the proof, but my question goes even beyond that: What I mean is that the quantity of energy in one electron is a scalar that has no justification or reason, neither mathematical, nor logic, like the number of beans in a jar, how can its value be derived mathematically (from what formula[e]) or inferred logically (from what premises?)  Edit after the closure:  I did read the quoted links, what I am questioning here is the epistemology of those articles and links, what scientific value does such a proof have, if any?


A newbie here.  Can someone help me understand what are the effects of running the following command from a directory:  sudo chmod -R 777 *  Will it effect the whole file system or the contents of that particular directory?  Thanks


I try to return value day , but it keep give value of 0 .What i do wrong?

So i try to return value of days depending on data input of month that user will enter .I am also using array of object.The problem is the value it return is always 0 since it always print 0 .I don't know where i do wrong .This is my coding . I am newbie and sorry if i don't explain my problem good enough.  import java.util.Scanner; import java.math.RoundingMode; import java.text.DecimalFormat; class BudgetTracker{   private static DecimalFormat df2 = new DecimalFormat("#.##");    public static void main(String []args){   Scanner sc = new Scanner (System.in);    df2.setRoundingMode(RoundingMode.UP);    System.out.println(" ----Welcome to EZ-Budgets ---- " );     System.out.print("How many months you wish to insert data: ");    int size = Integer.parseInt(sc.nextLine());    Income incObject[] = new Income[size] ;    Budget budObject[] = new Budget[size];    for(int box=0; box<size; box++){     System.out.print("\n"+"Enter month : ");    String mon = sc.nextLine();    System.out.print("Enter year : ");    int ye = sc.nextInt();    sc.nextLine();    System.out.print("Enter income for the month :RM ");    double in = sc.nextDouble();    sc.nextLine();    System.out.print("Enter budget for the month :RM ");    double budg = sc.nextDouble();    sc.nextLine();    int[] cate = new int[3];    System.out.print("Enter amount of money you spend on food :RM ");    cate [0] = Integer.parseInt(sc.nextLine());    System.out.print ("Enter amount of money you spend on university stuffs this month :RM ");    cate[1] = Integer.parseInt(sc.nextLine());    System.out.print("Enter amount of money you spend on other stuff :RM ");    cate[2] =Integer.parseInt(sc.nextLine());     incObject[box] = new Income(mon,ye,in);    budObject[box] = new Budget(budg,cate,in);   }//for loop size   for(int box = 0 ; box <size ;box++){   System.out.print("\n");   System.out.print("RM :" + budObject[box].getBudget());   }//loop1 for(int box = 0 ; box <size ;box++){   System.out.print("\n");   System.out.print("Saving RM :" + budObject[box].getSaving());   }//loop2  for(int box = 0 ; box <size ;box++){    System.out.print("\n");    System.out.print( incObject[box].getDay());   }//loop3 for(int box = 0 ; box <size ;box++){ // the part i have problem   System.out.print("\n");   System.out.print("Testing decimal format saving : RM" + df2.format(budObject[box].getSaving()));   }//loop2 }//main   }//class    class Income{ private String month; private int year; private double income;    public Income( String mon ,int ye ,double in ) {     month = mon;     year = ye;     income = in ;    }//income    public String getMonth(){return month;}   public double getIncome(){return income;}   public int getYear(){return year;}    public int getDay(){        int day = 0;    if(month == "January"){            day = 31;           return day;       }         if((month == "February")&(year%4==0)&(year%100!=0)){           day = 29;           return day;           //leap year         }         if((month == "February")&(year%4!=0)){           day = 28;           return day;           //not leap year         }         if (month == "March"){             day = 31;             return day;         }         if(month == "April"){             day =30 ;             return day;         }         if(month == "May"){             day = 31 ;             return day;         }      return day;   }//get day      public void tot(){        double totAmount = income + 100;        System.out.print(totAmount);   } }//class


I have a list containing 100 items. How do I convert it to a 20*5 two-dimensional list? My code:  l = [2,3,1,...,77] m = 20 n = 5


When should we contact the editor to follow up on our submitted manuscript?

We have submitted our manuscript for publication on June 18, 2020. Until now, we haven't heard any decision from the journal. The status of the manuscript on the online system is 'under review' since July 09, 2020 (this was updated twice). According to the journal's website, the review speed is 5.0 weeks for the first decision and 7.1 for the final decision. I am a bit confused if I should contact the editor or if I should wait until I receive an answer without contacting them. Do you recommend me contacting the editor in order to follow up on our manuscript? Most importantly, if yes, when should we contact the editor to follow up on our submitted manuscript? Thank you in advance


Is the $ L^{p}$$[0,1]$ norm continuous in p?

I ran into the following problem when I was doing my homework, and I have no thoughts on where I should start with:  (1) If $f\in L^{2}$, show that $\displaystyle \lim_{p \rightarrow 1^{+}}\int_{[0,1]}|f|^{p}=\int_{[0,1]}|f|$  (2) If $0<p$, show that $\displaystyle \lim_{q\rightarrow p^{-}}||f||_{q}=||f||_{p}$  My first thought was Generalized LDCT, but it didn't seem to work. I also made some other attempts but none of them were successful... Can anybody give me some hints on how I should look at this question?  Also, I know if $p\rightarrow\infty$ then $||f||_{p}\rightarrow||f||_{\infty}$ on $[0,1]$, but does similar continuity in p holds for other $L^{p}[0,1]$ norms in general?  Thank you!  Edit:   Sorry if I did not make it clear enough in the question. All $L^{p}$ refers to $L^p[0,1]$.  The first question is found  (thanks to t.b.), but the second question remains, mainly because $f$ is not guaranteed to be in any $L^{p}$.


Is there a passage in Lord of the Rings told from the perspective of an orc?

I distinctly remember that when I read Lord of the Rings, there was a passage told from the point of view of an orc (although obviously still told in the third person).   I think the orc was complaining about how things would turn out if they lost the war, or thinking about how things changed since Sauron came back - something to do with acquiring food - but I am not quite sure.  I looked for it online for a while now, but couldn't find any mention of it. I looked through the books themselves but couldn't find it either.  Where in the Lord of the Rings was the passage told from the perspective of an orc?


Have javascript assume degrees instead of radians?

My problem is that I have an input field where you type in some degrees and a velocity ( like 44 degrees and 10m/s). Then that runs through some javascript, and it spits out a trajectory.  A jsfiddle showing my problem a little better.     How do i input it as degrees? or convert radians to the exact same amount of degrees?  Edit: I want to convert it to the same amount of degrees. an example of 44 radians would result in 2521 degrees if I straight up convert them instead of 44 degrees (amount of radians = amount of degrees).


libboost-all-dev didn't generate the '-mt' libraries

I have installed the libboost-all-dev package, and cannot find the thread aware libraries I need inside my /usr/lib/ directory. (libboost_system-mt.a)  Are the library files that aren't suffixed with -mt thread aware? (As none of them are suffixed)


My tree farm is not growing even with bonemeal

I am playing on vanilla 1.7.2, and I trying to get trees to grow underground. I gave 60 bonemeal to a tree, and it would not grow... How many blocks high does my room need to be? Here is a picture.    I realized I actually that picture is not updated, I raised the ceiling by one block.  I googled on tree growth behavior and they said room has to be 4-5 blocks high, but the trees still won't grow.


Is there any bonus to do all the bounties?

Is there any bonus to do all the bounties in all the five acts ?   I know there is a bonus (more blood shards) for 2 acts, but if I do the three others is there some kind bonus to have done all the bounties ?


Transforming $0 = D u P''(u) - (D+G u)P'(u) + (G-Vu)P(u)$ to a standard form?

I would like to transform $$0 = D u P''(u) - (D+G u)P'(u) + (G-Vu)P(u)$$ into a common differential equation. It's my understanding that since this equation has less than three regular singular points ($u = 0$ and $u=\infty$?), my equation should transform into the Hypergeometric differential equation: $$ z(1-z)y''(z) + [c-(a+b+1)z]y'(z) -a b y(z) = 0 $$ for a suitably chosen $y$ and $z$. Is there any systematic means by which I can find the correct transformation between my variables $P$ and $u$ and the standard form variables $y$ and $z$?


Diffie-Hellman key exchange, choosing the secret key

I very well understand the Diffie-Hellman key exchange method, at least I think I do. And I was trying to implement it to try it out.  I went and calculated a very large prime number $p$ about 400 digits long. And i set $g$ to 5.  I generated a random secret number $a$, for example: 42523434.  The problem I'm facing is when I calculate $g^a \bmod p$, $g^a$ in particular, it seems to take my computer forever to calculate it, so it seems to be impractical to give $a$ such a number so I went for a smaller number (a five digit number) which takes about a second or two to calculate.  So now we have $A \equiv g^a \pmod p$, with the eavesdropper knowing $g$, $p$, and $A$.  But wouldn't it be possible to brute force $a$ by trying all 100000 combinations until what he calculates matches $A$ which would take him that long if he is good at computing powers? A solution to this would be increasing $a$ but increasing $a$ would make the exchange take so long that it wouldn't be a good method to exchange the keys.


Can't see spoilers on touchscreen outside of 'mobile' site

Spoiler text can't be made visible on a touch screen.  This was already pointed out ( as well as ).  However, that was marked as  by providing the ability to see spoiler text in the mobile version of the site.  (SE seems to be using the same definition of "mobile" as Facebook does: a little phone device.  These are not the only devices that are mobile!).  This is not a good solution.  If I have a large-screen touch device (an iPad, an Android tablet (although this  and there are only about 10 of them anyway), a Windows 8 touch-only device, a Kindle Fire, a TouchPad, etc) then I don't want to use the "mobile" version of SE - it looks like crap on a large screen.  Please provide a way to unspoiler text on the real StackExchange sites.


C++ template class instance creation issue

I've got a class defined as:  template<class T, class J, const int X, const int Y> class Example { public:     Example(); }   And in my main.cpp file, I try to create a new instance of Example on the heap:  Example<classA, classB, 5, 5>* tmp = new Example<classA, classB, 5, 5>();        which compiles, but I get a linker error:   "Example<classA, classB, 5, 5>::Example()", referenced from:       _main in main.o      Is this an issue with how I use the template parameters in main.cpp?   edit: Here's the constructor definition in Example.cpp:  template<class T, class J, const int X, const int Y> Example<T,J,X,Y>::Example() { }


What to do with a person who deliberately downvotes correct answers to be in the top of the answers?

Today I saw a behaviour which really surprised me:  I answered the question and then after a minute another guy answered it as well. The answer was basically a duplicate of my answer (which was not a surprise, the question was simple). I checked him, because he was quite reputable guy .  Then I saw that my answer was downvoted. So the answer of another guy (not the guy with 21k, who also happened to have similar answer to mine). I was surprised, because both our answers were correct. But then I decided to check one more time the 21k guy who was not downvoted.  To my surprise I saw that right now he had +2 downvotes in his statistics. This was extremely lame. He basically downvoted two correct answers to be on top of the results.  Question:  Is this behaviour acceptable and what should a person do if he sees or suspect such behaviour? I was lucky because I saw two opened page and was able to see the difference in votes and it happened in less then a minute so I was pretty sure that he downvoted correct answers.


Recover data from folder that was target of mount

I had a folder /acme, that contained data.  I found out that I was supposed to have already mounted /dev/centos/lv_acme to /acme.  I did a minimum amount of research on the web, and it appeared that mounting did not erase data.  (Though I now assume I misunderstood what I read.)    I executed the command  mount /dev/centos/lv_acme /acme     As I'm sure you've figured by now, /acme no longer contains my data.  Is there any way of recovering the data that was in /acme?


It looks like the official stack exchange app has been abandoned, so I abandoned it as well. It lacks a ton of features,and is kinda crappy. However, I really miss push notifications and not having to navigate to each of the 7 sites I'm active in.   So my question is if there is an alternative to it (either unofficial or official)  I looked at  but all the apps listed there are not found in the play store. All the apps listed at the question no longer are in the play store (item not found at link)


Is there any option with 'ls' command that I see only the directories?

Sometimes, I need to check only the directories not files. Is there any option with the command ls? Or is there any utility for doing that?  EDIT: I'm using Mac OS X, and ls -d gives me . even though I have directories.


Is it possible to remove the + sign in the cite of a reference, when using the alphanumeric? Why is the + diplayed?  @ARTICLE{Yang:2004:SecurityAdhoc, author={Hao Yang and Haiyun Luo and Fan Ye and Songwu Lu and Lixia Zhang}, journal={Wireless Communications, IEEE}, title={Security in mobile ad hoc networks: challenges and solutions}, year={2004}, volume={11}, number={1}, pages={38-47}, }   [YLY+04] H. Yang, H. Luo, F. Ye, S. Lu y L. Zhang, “Security in mobile ad hoc net- works: challenges and solutions”, Wireless Communications, IEEE, vol. 11, n. o 1, págs. 38-47, 2004.


So I was playing Mass Effect 3 online yesterday’s and everything was fine.   I tried playing again today and there is a lock on the side of the Team settings in the quick match menu. Does anyone know how to fix this?


Combinatorics: Selecting objects arranged in a circle

If $n$ distinct objects are arranged in a circle, I need to prove that the number of ways of selecting three of these $n$ things so that no two of them are next to each other is $\frac{1}{6}n(n-4)(n-5)$.  Initially I can select $1$ object in $n$ ways. Then its neighbours cannot be selected. So I will have $n-3$ objects to choose $2$ objects from. Again, I can select the second object in $n-3$ ways. The neighbours of this object cannot be selected. However from here onwards, I am unable to extend this argument as the selection of the third object is dependent on the position of the first and the second object. Is there any simpler method to prove the result?


I am confused by the notation in a homework problem. I think it relates to Cantor Diagonalisation but want  to know I am working with a power set first. Does this notation describe a power set?  {0,1}^A  Thank you.


What does "travelling at high speed" in "Look out for the car travelling at high speed" function as?

Is there a term used to refer to the following parts of these sentences (in bold):  Look out for the car travelling at high speed. Catch me coming in hot.  I'm not sure if these can be considered adjectival clauses or if there's a better terminology for it.


What is the purpose of the 250uF capacitor in the LM386 circuit?

The basic amplification schematics shown in the  datasheet shows a 250 uF capacitor in series with the output. I don't have any 250 uF, but I do have plenty of 470uF. If I understand correctly, is this capacitor used as a high pass filter, so should I be able to use a 470 uF instead of a 250 uF?   Also, is the resistor (10 ohm) and capacitor (0.05 uF) going to ground a low pass filter?


-bash: 1: command not found - Immediately on loading Terminal

Upon loading my terminal (since trying to install composer globally) I'm being spammed with countless amounts of -bash: 1: command not found before I even type any commands.  I'm not quite sure what to do, but this is all that happens, I load up terminal and get;  -bash: 1: command not found -bash: 1: command not found -bash: 1: command not found -bash: 1: command not found   for an unlimited amount of times until I close the terminal.  Can anyone help me fix the issue, or reset my terminal, or anything?    Update:  Trying to run rm -i ~/.profile ~/zsh* ~/.bash* like advised in the comments I got the below:  -rm: ~/.profile: No such file or directory -rm: ~/zsh*: No such file or directory -rm: ~/.bash*: No such file or directory   I still get the command not found error.


Hiding the mouse cursor dynamically when using the touchscreen

I have a touchscreen laptop and I want to hide the pointer whenever I touch the screen. I am aware of solutions like  and  but I want the pointer to hide/show dynamically, hiding if I use the touchscreen and showing when I use a hardware mouse.  I thought about making  and applying one of the two above solutions to the touchscreen pointer, but neither of those solutions mention how to target a single pointer, and having multiple pointers makes things act weird, and that wouldn't hide the hardware mouse cursor.  I figure I can most reasonably do this doing something like , keeping track of the current input mechanism and executing xinput -cursor [transparent cursor] whenever the touchscreen is used and xinput -cursor [normal cursor] whenever a normal mouse is used.  I looked at xinput though and it looks like since both the hardware mouse and touchscreen are slaved to the same pointer, both of them register the same events in xev so I'm not really sure where I would get the information needed to differentiate a touch from a mouseclick. is it possible?


I am new to ubuntu and linux, not a programmer, and I would like to fix background noise that I am getting from mic. I found other people had the same issue with the same soundcard (ALC892) and tried applying the following fix:    Unfortunately, probably due to my computing limitations, I was unable to do it. My issues so far were: 1) I don't know if I have "libjack-jackd2-0" or "libjack0". I assumed I had "libjack-jackd2-0" and ran the commands suggested and things seemed to work, but not sure if this was correct. 2) When I get to "building the package" and run "dpkg-buildpackage -d -us -uc -nc" I get the following error:  debian/rules:60: *** comandos começam antes do primeiro alvo.  Pare. dpkg-buildpackage: erro: debian/rules build deu erro de saída estado 2  I am running Ubuntu in portuguese but the translation of the error would be: debian/rules:60 *** commands begin before first target. Stop. dpkg-buildpackage: error: debian/rules build got an exit state 2 error  Any help would be apreciated. Thank you.


Both about -a and -e options in  is said:  -a file     True if file exists. -e file     True if file exists.    Trying to get what the difference is I ran the following script:  resin_dir=/Test/Resin_wheleph/Results  if [ -e ${resin_dir} ] ; then     echo "-e "; fi  if [ ! -e ${resin_dir} ] ; then     echo "! -e"; fi  if [ -a ${resin_dir} ] ; then     echo "-a"; fi  if [ ! -a ${resin_dir} ] ; then     echo "! -a"; fi   /Test/Resin_wheleph/Results exists and is a directory. And this is what I get:  -e -a ! -a   which seems to be a little strange (notice -a and  ! -a). But when I use double brackets (e. g. if [[ -e ${resin_dir} ]]) in the similar script it gives reasonable output:  -e -a   So:    What is a difference between -a and -e options? Why -a produces a strange result when used inside single brackets?


In my QGIS-version (2.18.12, Windows) when opening the expression string builder or the field calculator there is no inline help for the functions. I actually never managed to activate this. Is there an option that I am missing?


Proving that if $a_n\geq0$ and $\sum a_n$ converges, then $\sum a_n^2$ converges

I've been trying to do this problem for so long...  Suppose that $(a_n)_n$ is a sequence with $a_n \geq 0$ for each $n \in \mathbb{N}$, and suppose further that the series $\sum_{n=1}^{\infty}{a_n}$ is convergent. Prove that the series $\sum_{n=1}^{\infty}{{a_n}^2}$ is also convergent.   I've tried to use the ratio test, the comparison test and even epsilon proofs but I'm not getting anywhere. Would be very grateful if somebody could help me.  Thanks,  Henry


How to import Illustrator swatch libraries into InDesign - Adobe Indesign Mac?

I have a very reach swatch library in adobe-illustrator like food colors and.... But in adobe-indesign I don't have many colors. Why? Can I import them to indesign?


Why wont my computer boot Ubuntu from my flash drive?

I have a windows 8 Gateway desktop PC and I was wanting to install Ubuntu (13.10) on it.  Firstly I created a bootable USB using , the process was successful, and when I plug the flashdrive in using windows 7 AND 8, it is no longer recognized as TOSHIBA 8GB, but Install Ubuntu (H:), whenever I go into the BIOS of the Gateway PC, I set my removable disk as the first boot priority, and disable secure boot, and Launch CSM was set to always, and even after all these setting changes I still boot into windows 8.  I did notice that the motherboard in the Gateway PC was an exclusive motherboard, I don't know if that means anything but it is very frustrating and I would like some help to resolve this issue.  Thanks in advance, Gage


Security strength of RSA in relation with the modulus size

§5.6.1 p.62–64 specifies a correspondence between RSA modulus size $n$ and expected security strength $s$ in bits:  Strength  RSA modulus size   80        1024  112        2048  128        3072  192        7680  256       15360   This works out to approximately $s \approx 4 n^{0.43}$ (but I have no idea whether my extrapolation means anything; strengths up to 112 are indexed on DES while strengths 128 and above are indexed on AES, i.e. the strength is the difficulty of brute-forcing the corresponding symmetric algorithm with the specified key size).  What are these numbers based on? Do they come from the expected complexity of the best known factorization methods? Or are they extrapolation from the amount of computation in specific factorization efforts such as for  (which “required more than $10^{20}$ operations”)?  (I'm asking for more precise information than .  has a nice history of RSA factorizations, but doesn't answer my question — is that what the strength estimates are based on?)


error: /boot/vmlinuz-4.15.0-29-generic has invalid signature error you need to load the kernel first

How can i resolve this problem? I can not enter in linux partition without loosing any data..


Computing $\int_{0}^{\pi}\ln\left(1-2a\cos x+a^2\right) \, dx$

For $a\ge 0$ let's define $$I(a)=\int_{0}^{\pi}\ln\left(1-2a\cos x+a^2\right)dx.$$ Find explicit formula for $I(a)$.   My attempt: Let  $$\begin{align*} f_n(x) &= \frac{\ln\left(1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2\right)-\ln\left(1-2a\cos x+a^2\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(\displaystyle\frac{1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2}{1-2a\cos x+a^2}\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(1+\dfrac{1}{n}\left(\displaystyle\frac{2a-2\cos x+\frac{1}{n}}{1-2a\cos x+a^2}\right)\right)}{\frac{1}{n}}. \end{align*}$$ Now it is easy to see that $f_n(x) \to \frac{2a-2\cos x}{1-2a\cos x+a^2}$ as $n \to \infty$. $|f_n(x)|\le \frac{2a+2}{(1-a)^2}$ RHS is integrable so $\lim_{n\to\infty}\int_0^\pi f_n(x)dx = \int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2} dx=I'(a)$. But  $$\int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2}=\int_0^\pi\left(1-\frac{(1-a)^2}{1-2a\cos x+a^2}\right)dx.$$ Consider $$\int_0^\pi\frac{dx}{1-2a\cos x+a^2}=\int_0^\infty\frac{\frac{dy}{1+t^2}}{1-2a\frac{1-t^2}{1+t^2}+a^2}=\int_0^\infty\frac{dt}{1+t^2-2a(1-t^2)+a^2(1+t^2)}=\int_0^\infty\frac{dt}{(1-a)^2+\left((1+a)t\right)^2}\stackrel{(*)}{=}\frac{1}{(1-a)^2}\int_0^\infty\frac{dt}{1+\left(\frac{1+a}{1-a}t\right)^2}=\frac{1}{(1-a)(1+a)}\int_0^\infty\frac{du}{1+u^2}=\frac{1}{(1-a)(1+a)}\frac{\pi}{2}.$$ So $$I'(a)=\frac{\pi}{2}\left(2-\frac{1-a}{1+a}\right)\Rightarrow I(a)=\frac{\pi}{2}\left(3a-2\ln\left(a+1\right)\right).$$  It looks too easy, is there any crucial lack?  $(*)$ — we have to check $a=1$ here by hand and actually consider $[0,1), (1,\infty)$ but result on these two intervals may differ only by constant - it may be important but in my opinion not crucial for this proof.


using one variable in two different if statements

I have this chunk of code I'm trying to get to work and I need to use the 'password' variable in both of the if statements but I continue to get "NameError: name 'password' is not defined" (I'm fairly new to coding) I know there's probably a lot of ways I could improve this written in python 3.8 by the way option = str(input("do you want a new password? y/n: ")) if option in ['y', 'Y']: def generatepassword():     digit = int(input("How long do you want the password? (integer only)"))     for i in range(digit):         char = random.choice(string.ascii_letters+string.digits+string.punctuation)         (password) = char         print(password) generatepassword()  if option in ['n', 'N']: password = str(input("Password: "))  final = str(input("Is this information correct?: "))  if final in ['y', 'Y']: f = open("passwords.txt", "a") f.write (password) f.write ('\n') f.close f = open("email.txt", "a") f.write(email) f.write('\n') f.close f = open("web.txt", "a") f.write(website) f.write('\n') f.close


If $f:\mathbb{R}\to\mathbb{R}$ is a left continuous function can the set of discontinuous points of $f$ have positive Lebesgue measure?  I wondered this today, but made little progress. Thank you.


I was wondering why the 4N27 optocoupler has a pin for base of the phototransistor - and of course how to connect it.  I've usually dealt with PC817 optocouplers and connected them according to the schematic.    Now I want to do the same with 4N27 (pinout on the picture below,) so do I have to leave the base pin floating, or pull down it?


closed form of $\int_{0}^{2\pi}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^n}$

closed form of $$\int_{0}^{2\pi}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^n}$$  for $a,b>0$  n=1 we get  $$\int_{0}^{2\pi}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^1}=\frac{2\pi}{ab}$$  n=2 we get  $$\int_{0}^{2\pi}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^2}=\frac{\pi(a^2+b^2)}{a^3b^3}$$  but what the integral for n ????  I hope to be there two different solution one by contour integration and the other by real analysis and thanks for all


I want to extract a zip archive to "C:\\" (just for testing purpose). Therefore I need admin rights, so I am trying to elevate the current user to get admin rights.  if __name__ == "__main__":     ASADMIN = 'asadmin'      if sys.argv[-1] != ASADMIN:         script = os.path.abspath(sys.argv[0])         params = ' '.join([script] + sys.argv[1:] + [ASADMIN])         shell.ShellExecuteEx(lpVerb='runas', lpFile=sys.executable, lpParameters=params)         main()   The invoking message from UAC is comming as it should but when I want to extract the zip I am still getting "IOError: [Errno 13] Permission denied".  What am I doing wrong here?


Deal with double addition/subtraction errors in C

I have the following code which minus 0.1 from 0.5 for 5 times, but the result isn't exact 0.0.  I understand why there is an error, and I'm finding a way to deal with it.  The only way I came up with is to check if abs(num - 0.0) < 0.01, but the 0.01 value may not be suitable in all situations (too big or too small).  Is there a more elegant way to deal with it?  #include <stdio.h>  int main() {     double num = 0.5;      for (int i = 0; i < 5; i++) {         num -= 0.1;     }      printf("num=%lf %d", num, num == 0); }


I'm learning Blender, and I haven't changed any settings from the default. The viewport has perfect anti-aliasing, but the render is jagged. This happens in Eevee and Cycles. The first pic is the viewport, and the second is a render.


I am getting "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" error

I am trying to use a jLabel as a background but is not working. The code works as soon as I delete the label. I have the image within a package in the project separate to the form. I cannot tell if the issue is to do with the storage of the image or if there is an issue with the code. Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217) at com.mycompany.dungeoncrawler.UI2.initComponents(UI2.java:74) at com.mycompany.dungeoncrawler.UI2.<init>(UI2.java:30) at com.mycompany.dungeoncrawler.UI2$3.run(UI2.java:136) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)  Here is my code for the Form. The code where the image is initialized is pointed to in the output error at line 64.     Backround.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Purple hell.png"))); // NOI18N     getContentPane().add(Backround);     Backround.setBounds(2, 1, 1210, 700);      pack(); }// </editor-fold>                          private void txtInputKeyPressed(java.awt.event.KeyEvent evt) {                                        if(evt.getKeyCode()==KeyEvent.VK_ENTER){        Input = txtInput.getText();             try {                 Out = Player.Action(Input);             } catch (IOException ex) {                 Logger.getLogger(UI2.class.getName()).log(Level.SEVERE, null, ex);             }      if ("Invalid".equals(Out)){          JOptionPane.showMessageDialog(null, "Invalid Input");      }else txtOutput.setText(Out);            txtInput.setText("");      txtInput.requestFocus();    } }


Initializing K-means centers by the means of random subsamples of the dataset?

If I have a certain dataset, how smart would it be to initialize cluster centers using means of random samples of that dataset?  For example, suppose I want 5 clusters. I take 5 random samples of say, size=20% of the original dataset. Could I then take the mean of each of these 5 random samples and use those means as my 5 initial cluster centers? I don't know where I read this but I wanted to know what you guys think about the idea.    UPDATE: Please see this thread  for the general discussion about the various initialization methods.


Why is light described by a null geodesic?

I'm trying to wrap my head around how geodesics describe trajectories at the moment.  I get that for events to be causally connected, they must be connected by a timelike curve, so free objects must move along a timelike geodesic. And a timelike geodesic can be defined as a geodesic that lies within the light cone.  I want to know why exactly null geodesics define the light cone. Or, why null geodesics define the path of light.  Also, if there's a better explanation why matter follows timelike geodesics, that would also be welcome.


Can anyone delete my comments on Stack Overflow?

I have seen that some people can delete others' comments. Can only moderators do this or can anyone with a high enough reputation? Also, can my answers also be deleted by others?


URL Rewrite like Stackoverflow, XenForo, IPBoard

I was wondering how the url rewrite on for example this site works. I mean I don´t think that it is done via. modrewrite in apache or nginx. The thing I´m interested about is the id and user friendly title in one. How does it work that if the server enters only the id or the id with a wrong title, it 301 rewrites it to the right one ?  Is there any how to about it I couldn´t find or could you explain it for me with a small example?  For Example:  -index.php |--index.php?page=2 -server.php?id=45343 -contact.php    -example.com/ |--example.com/page/2 -example.com/server/45343/some-random-title-to-be-user-friendly(.html) -example.com/contact(.html)   .  Update:  I would like to know how this works without modrewrite (htaccess..) as I know that e.g. xenforo isn´t using it.


I have often observed this pattern and now I have one example where it is rather clear.  I often have the impression that users with a high reputation tend to get upvotes, even in cases where the answer is wrong, or at least not helpful. I remember a post where a high rep user got a lot of upvotes for an answer that was totally irrelevant to the actual question, even though it was technically correct.  I was looking at this question: , which I answered. From the question it was not that obvious that the user intentionally creates many files so the answer was to create his files outside. A high rep user posted a similar answer at the same time. Following the comments and reading the question more carefully, reveals that the answer is wrong, but he still got an upvote for it. The upvote came long after the comments were already posted, clarifying that the answer is wrong.  So I wonder how can voters be taught to actually look at the answer provided in relation to what was asked. Sometimes I have the impression that longer answers look more "professional" and thus get the upvotes and such answers tend to come from high rep users more often.  update  Here () is another such a case IMO, as the answer is not really an answer and neither does it adress the question.


Verify that R(p,2) = R(2,p) = p, where R is the Ramsey number

Verify that $R(p,2) = R(2,p) = p$, where $R$ is the Ramsey number   It just seems obvious that $R(p,2) = R(2,p)$.  But why do  $R(p,2)$ and  $R(2,p)$ both equal p?


Does Earth experience any significant, measurable time dilation at perihelion?

Is there any measurable time dilation when Earth reaches perihelion? Can we measure such a phenomena relative to the motion of the outer planets?


What Apple Watch sleep tracking app uses minimal battery power and is fully compatible with the iOS Health app?

I want to use an Apple Watch 2 to track my sleep. In order to achieve this I will need to wear the Apple Watch during sleep, which creates an issue around battery usage. So my thinking is that I can put the watch on charge twice daily on most days: in the morning while getting ready for work and again at night while getting ready for bed. By doing this I estimate the battery will have enough power to keep the watch going 24/7 on most days.  Obviously this means I need a sleep tracking app to do the tracking. My requirements are:   It must be highly efficient in terms of battery usage It can track sleep while the watch is in Airplane mode It can synchronise data with the iOS Health app on my iPhone It must be able to provide a summary of my sleep on the Apple Watch itself   NOTES:   I do not mind paying for the App if doing so results in me getting a much better product I am open to using 3rd party devices if it means the quality of tracking/measurements are much higher While not a requirement, if the app also supports syncing data with other HealthKit apps that would be a plus   I did consider posting this in the  community, but it didn't seem to have the appropriate tags.


If $ a+ \frac{1}{b}= b+ \frac{1}{c}= c + \frac{1}{a} = k$ , how to find the value of $k$?

If $a,b,c$ be distinct (non-zero) such that  $ a+ \frac{1}{b}= b+ \frac{1}{c}= c + \frac{1}{a} = k$  how do I find the value of k ?


I have been learning some Arabic mostly for fun. I am looking for the Arabic Stack Exchange site but cannot find it. I am sure I saw it lying around a few months ago or so. Any idea what happened to it?


Typesetting a matrix and its reduced row echelon matrix next to each other using `empheq`

I am trying to put these two matrices next to each other in the same empheq environment, separated by a comma and the space allotted by \qquad \quad.  \documentclass[10pt]{amsart}  \usepackage{nccmath} \usepackage{empheq} \usepackage{amssymb}  \begin{document}  \begin{empheq}[left = \empheqlbrack, right =\empheqrbrack]{equation*} \renewcommand{\arraystretch}{1.75} \begin{array}{@{\,}ccc|l@{\,}} 1 & 0 & -1 & a \\ 0 & 1 & -1 & a + b \\ 0 & 0 & \phantom{-}1 & -\mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \end{array} \end{empheq}  \begin{empheq}[left = \empheqlbrack, right =\empheqrbrack]{equation*} \renewcommand{\arraystretch}{1.75} \begin{array}{@{\,}ccc|l@{\,}} 1   &   0   &   0   &   \mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \\ 0   &   1   &   0   &   \mfrac{1}{2} \, a + \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \\ 0   &   0   &   1   &   -\phantom{-}\mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \end{array} \end{empheq}  \end{document}


I have lost my admin rights and locked up the admin account and signed in as a local account

I have lost my admin rights and locked up my admin account. I am signed in with a local account without admin rights. I am unable to run any program with admin access and using "run as administrator". What should I do.


What is the general procedure for constructing the Penrose diagram for an arbitrary $(1+1)d$ spacetime?

I've never seen a precise definition of a Penrose diagram for a $(1+1)d$ Lorentzian metric, merely the statements that it's conformally equivalent to the true metric and that null trajectories are oriented at 45 degrees.  These requirements do not uniquely specify the quantitative form of the diagram, so I wasn't clear whether general Penrose diagrams are merely qualitative depictions of the causal structure, or actually quantitatively precise.  I asked a GR postdoc, who told me that there is a unique and general algorithm for drawing a quantitatively precise Penrose diagram for a completely general $(1+1)d$ Lorentzian manifold (subject only to some weak smoothness requirements).  But I haven't encountered any textbooks on general relativity that actually do so.  Carroll only explains how to draw the Penrose diagrams for the Minkowski, Einstein static universe, and certain FRW metrics.  Misner, Thorne, and Wheeler only explain the Penrose diagrams of the Minkowski and Schwarzchild metrics, and neither Wald nor Thorne and Blandford have any systematic discussions of Penrose diagrams at all that I could find.  What is the general (quantitatively precise) algorithm for mapping an arbitrary $(1+1)d$ metric to a unique Penrose diagram?


Cycles Material Ignoring Transparency Shader

Currently, I have an HDR lit scene with a tree. The tree has a particle system for leaves, that distribute them along the weight painted branches. This works perfectly fine except for the material I have on the leaves, I have a alpha map of a leaf to literally just make it a solid color, and a transparency shader to remove the rest from view. I even made the color bit an emission shader to remove the lighting part of the problem, but the inside bits where the leaves come together are still pitch black. What can I do to fix it?  Pictures: (The UV maps in the pictures are unrelated to the leaves)


IMO 1987 - function such that $f(f(n))=n+1987$

Show that there is no function $f: \mathbb{N} \to \mathbb{N}$ such that $$f(f(n))=n+1987, \ \forall n \in \mathbb{N}$$  This is problem 4 from IMO 1987 - see, for example, .


How do i fix this Java related minecraft problem?

# A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffb57933033, pid=3284, tid=5140 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C  [ig4icd64.dll+0x43033] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\taylo\AppData\Roaming\.minecraft\hs_err_pid3284.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release   I am using a intel core i5 processor, and the link to the other article didnt really help me.


Is there any kind of guidelines on passcode generation with regards to UX? In particular I just ran into a site that used auto-generated codes but the codes it made were impossible to tell if a letter was a D an O or a 0.  I i l 1 can also be indistinguishable depending on the type style. This would seem like it should be a common UX guideline, never generate codes with those characters. Maybe even U V u v should be removed. g q and 9, 6 and G as well. Next to each other sometimes these are more obvious but in a random code it's not always clear. Do such guidelines exist and are there any other characters that should be avoided? Maybe ! is another one? Note: this question is not about passwords, it's about passcodes (maybe there is another name). A password is something a user can possibly create. A passcode is something a computer creates like emailing you a 6 character code to type in. For example Apple will popup a 6 digit number, a passcode, on an registered Apple device when you try to log into . Apple doesn't have the UX problem above because their passcodes are only digits, no letters.  Conversely some other site had a 10-15 second puzzle to solve, once solved it showed a code  Is that code BB1CA1O8? BB1CA108 ? BB1CA1D8? Get the code wrong and you have to re-fill out the form and solve the 10-15 second puzzle again Note: Obviously if you have 0 and O next to each other you can probably tell them apart. But if you the passcode it shows you is Z35O96 it's not going to be obvious to large percentage of users if that's a letter O or a number zero.


Does removing snap from Ubuntu 20.04 server pose any problem?

I am creating a new VM instance on the google cloud platform with ubuntu-os-cloud/ubuntu-2004-lts as my boot disk image. I observed that some snap packages are being installed by default including the google-cloud-sdk. Now I use apt for all the package management on the servers and don't necessarily have a problem with snap being present. I have found quite some articles on removing snapd from Ubuntu, but what I wanted to enquire is whether keeping the snap as it is and keep working with apt for my package management will pose any issues.


I'm reading Serre's Trees and in Example 1.5.3 he claims that $PSL_2(\mathbb{Z})$ is isomorphic to $\mathbb{Z}_2 \ast \mathbb{Z}_3$.   $\mathbb{Z}_2 \ast \mathbb{Z}_3 = \langle x, y | x^2 = y^3 = 1 \rangle$. But does $PSL_2(\mathbb{Z})$ even have elements of order $2$ or $3$ to begin with?   Previously, I thought since all elements of $PSL_2(\mathbb{Z})$ is in the form of  $$ \begin{bmatrix} 1 & n \\ 0 & 1 \end{bmatrix}. $$  Hence $\mathbb{Z}$ injects in $PSL_2(\mathbb{Z})$.  Let $\phi: \begin{bmatrix} 1 & n \\ 0 & 1 \end{bmatrix} \mapsto n$.  $\phi$ is a homomorphism and in fact bijective. Hence $\mathbb{Z} \cong PSL_2(\mathbb{Z})$.  Thus $PSL_2(\mathbb{Z})$ cannot have any $2$-torsion or $3$-torsion.   I must be missing something. Any help is appeciated!


Hi i have a situation similar as the exaple below (see code snippet). When appear "called button" and i click it the associated js event not work.  When i add an new element whit js (in the example through ".append()", but also with adding element after an ajax call to another page), this new element is not "identified" from the exist js code.  Which is the best way to resolve this?  Obviously this is a simple example to explain the problem, but i can not resolve the problem including the code in a function and call it when the new element appear becouse the real js code of included plugins is much to complex.    var calledButton = '
<button id="called-button">This is the called button</button>' $("#main-button").click(function() {   $("#response").append(calledButton);   $("#response").append("

Main button clicked"); });  $("#called-button").click(function() {   $("#response").append("

Called button clicked"); });    <button id="main-button">This is the main button</button>


If my credit card payment is due in 3 days time, will anything I order today have to be paid by then too?

My credit card has a balance of $600 due on the 12th every month (I'm looking to get this date moved to later on in the month, how do I do that?). I'd like to make a $1000 purchase on my card in the coming days, but I don't know if I'll have to pay that $1000 off by the 12th too, or if I can put that off until the 12th of September.  I've been paying off my card in full every month and never had a balance past the due-date, but it seems a bit silly to me if you're not allowed to carry any debt for at least 30 days because you'd have to pay off charges made on the 10th or 11th by the 12th of the same month.  Update  I contacted my Credit Union and got an answer:   The Credit Card payment due date is the 12th of every month, and that applies to all of their customers. This date cannot be changed. The payment due date has a grace-period of 10 days. Using the grace period has no attached penalty nor does it affect one's credit-rating. I asked if there was any reason not to use the grace period and they told me "no". Charges made to the card between the 1st and 31st of Month 1 will require payment by the 12th of Month 2. Charges made to the card between the 1st and 31st of Month 2 will not require payment until the 12th of Month 3, not Month 2.   So that clears that up then :)


If you bookmark a question, shouldn't you also be encouraged to upvote it?

I wrote a question today that, thus far, has received five answers (plus one from me) and zero upvotes. That's fine, it happens. But, this irks me a little, someone actually bookmarked it and (unless someone downvoted me) didn't upvote the question. I realize the criteria for upvoting is "clear and useful" not "interesting enough to bookmark", but I don't think I've ever bookmarked a question without upvoting it. You obviously like the question enough that you'd like to be able to return to it later, so I think in most cases, an upvote is in order. I wonder if SO could provide one of those little pop-up reminders suggesting you upvote a question if you bookmark it.  Edit: I am thinking something along the lines of:  If you think this question is clear and useful, please consider upvoting it.  So, just a little encouragement to act nicely if it's deserved.


On the commutative property of multiplication (domain of integers, possibly reals)

$ab = ba$  This is, inherently, true. Some texts drop it like an axiom without any justification. But I'm a bit curious where it stems from or basically why/how it works. If anyone could enlighten me a bit further, I'd be most grateful. Peano axioms? From set theory? Help.  What bugs me with this definition is it's real world "application":  Let's say I have a power output of 5 W ( $kg\cdot m^2 \cdot s^{-3}$) and I want 30% of that power output (to have some units and natural context).  Naturally, 30% is 30 1/100 (% is the unit). For simplicity, let's express that as:  $30$%$ = 30/100 = 3/10 = 3d$ where $d = 1/10$, a simpler unit (because %W would look... Wrong?).  So 30% of power is then $5 W \cdot 3d$, and we can force it to "make sense" if we associate d with W or basically scale the unit of power by d (which is intuitively understood as being 10 times smaller then the output of 1 W) $dW$. And we want to scale these 5 units of $dW$ three times.  $5 dW \cdot 3$  But the commutative property says it is the same as scaling 3 units of $dW$ 5 times or:  $3 dW \cdot 5$  And the result is the same. This is the bit that hurts my head, the fact it is the same. I try to interpret the same as, for example 50 J of work, it's either applying 50 N over 1 m of distance or 1 N over 50 m of distance.    Down here is additional stuff I think I have (you don't have to read it if you know how to answer immediately). I don't claim it's correct, if anyone parses this information, feel free to correct me.  $m\sum\limits_{i=1}^{n}{1} = n\sum\limits_{i=1}^{m}{1}$  This is how I've been trying to break it down, as it is repeated addition. It is repeated $n$ times and multiplied by $m$, and reverse on the right side. There is $x = m - n$, so when I multiply $n$ $m$ times, each repeated addition of $n$ lacks exactly $x$ to $m$.  $mn = nm$  $x = m-n$  $m(m-x) = (m-x)m$  $m^2 - mx = m^2 - mx$  $ true $  And yes, sadly, I realise that I am using the very property I'm trying to prove ($xm$ shifted as $mx$ on the right-hand side.)  And it even calls in the distributive property of multiplication over addition which I derive (for myself, informally) from the very nature of multiplication and the way we "process" numbers:  For example, number $55$ times $2$  $55 = 5 \cdot 10^1 + 5 \cdot 10^0 = 5 \cdot 10 + 5 \cdot 1$  $(5 \cdot 10 + 5 \cdot 1) \cdot 2$  This is the basis of our positional notation which appends digits of varying orders of magnitude or units together in a way it makes "sense". Each one is b times bigger than the one to the right. Basic stuff. It is why I expressed 10 and 1 explicitly, those are what I consider units in this case.  Now, from the definition of multiplication, which is at its heart just repeated addition, it is truly the same if you add together $2$ $50$ times and then again $5$ times or "all at once" (figuratively, we are always doing the former mentally) $2$ $55$ times.  That added together gives 110, which is true.  To me, the distributive property (in case of integer multiplication) is a repercussion of the very definition of multiplication which is repeated addition (evading strict concepts). I am not certain whether this is a good way to look at it.


Macro in texstudio/texmaker to surround selected text with tags

When you use some of the predefined shortcuts in texstudio on selected text, it wraps the text with the appropriate tags(is that the proper term?). For instance, suppose i highlight Hello Worldand press Ctrl+i it becomes \textit{Hello World}.  That is pretty handy as you dont't have to move the end tags around. I was wondering whether there a way to program macro to have similar behavior too. Many thanks in advanced.   [edit] found a similar answered question:


I have a dedicated server arrangement running  OS Ubuntu 12.04.5 LTS Plesk Onyx   I am migrating to a better server with SSD drives - I have around 40 domains running on my existing server but want to upgrade to the latest stable version of Ubuntu on the new server - is there any problems in making such a big leap in versions? What is the best way to do this?  All help appreciated


proove that $\sum_{t=0}^{r}\binom{ m-t}{r-t} = \binom{ m + 1}{r}$

I tried to solve a question in combinatorics and ended up with this sum:  $\sum_{t=0}^{r}\binom{ m-t}{r-t}$   when I give it to WolframAlpha it says it equals to  $\binom{ m + 1}{r}$ but gives no proof, can someone provide a discrete proof?


The inverse of $f(x)=\sqrt[3]{1-x^3}$ is itself

As I was studying this function, $f(x)=\sqrt[3]{1-x^3}$, I checked that the function is one-to-one, and so is invertible.  Then: $$y=\sqrt[3]{1-x^3}$$  $$y^3=1-x^3$$  $$y^3-1=-x^3$$  $$1-y^3=x^3$$  $$x=\sqrt[3]{1-y^3}$$ $$f^{-1}(y)=\sqrt[3]{1-y^3}$$  What kind of functions are inverse of itselfs? Thanks.


How to automatically turn black main monitor when external monitor is connected while using internal keyboard

When I use external display, I always use screen mirroring and set main display brightness to zero.  Macbook remembers screen mirroring config, but I must turn down the brightness manually every time the monitor is connected.  Is there a way to turn off main monitor automatically when external monitor is connected?  There are similar questions, but the first answer is about clamshell mode, and the second question's answers doesn't match my need. Because I want to brightness down automatically.


Unwanted White Lines in listings environment

\documentclass{article} \usepackage{listings} \usepackage{color} \begin{document} \definecolor{light-gray}{gray}{0.95} \lstset{basicstyle=\ttfamily\footnotesize,     backgroundcolor=\color{light-gray}, xleftmargin=0.7cm,     frame=tlbr, framesep=0.2cm, framerule=0pt,   } \begin{lstlisting}[mathescape] k = $\lfloor (10\log n \cdot \log\log n)^{1/3} \rfloor$; k = $\lfloor (4\log n \cdot \log n)^{1/3} \rfloor$; \end{lstlisting} \end{document}   produces    An answer to a similar question said that "this line is just an artifact of the viewer". But this line appears in two viewers and various zoom steps. On top of that, one can clearly see that the 1/3 overlaps with the white line. So I do not accept it as a mere artifact anymore.  How could this problem be approached? Is it possible to somehow put another grey layer underneath the lstlisting environment which would "eat up" any white lines?  edit: Is there a solution that would not involve editing every line of the code?


Does the Dueling Fighting Style prevent using a shield?

The Dueling fighting style doesn't seem to state anything about shields, stating that the character can only wield one weapon while fighting to gain the benefit. Does a shield count as a weapon or otherwise stop the damage bonus from occurring?


Modifying array in another function - CRASHES

#include <stdio.h> void func1(char *a); int main() {         char *mStat="welcome home";         printf("Text before: (%s)\n",mStat);         func1(mStat);         printf("Text after: (%s)\n",mStat);         return 0; }   void func1(char *a) {         printf("Input: (%s)\n",a);         a[1]='a'; }   This program crashes with a segfault all the time in the line where I am modifying the character in the string. What is wrong with it ? What is the correct way of doing it ?


$\int_{0}^{x} f(t) dt \ge {f(x)}$ holds or not on $[0,1]$

Let $$f\colon [0,1]\rightarrow [0, \infty )$$  be  continuous. Suppose that  $$\int_{0}^{x} f(t)\,\mathrm dt \ge {f(x)} \quad\text{for  all }x\in[0,1].$$  Then   $A.$ No  such  function  exists.  $B.$ There  are  infinitely  many  such  functions.  $C.$ There is  only  one  such  function  $D.$ There  are  exactly  two  functions.  Now  I  was  thinking,  since $\int_{0}^{x} f(t) dt$  is  the  area  under  the  graph  of  $f(t)$  from $0$  to  $x$ so it  can  be  easily  made  greater  than  the  value  of  $f(t)$  at  one  point, namely  $x$.  So  there   will  be  infinitely  many  such  functions  satisfying  this  condition.   Is  my  reasoning  correct or  not?  Thanks.


How would one create an iterative function (or iterator object) in python?


Is $f\left(x\right)=nx^{n}\left(1-x\right)$ uniformly convergent on $x\in\left[0,\:1\right]$

Is $f_{n}\left(x\right)=nx^{n}\left(1-x\right)$ uniformly convergent on $x\in\left[0,\:1\right]$  We can see $f_{n}\left(x\right)\rightarrow f\left(x\right)=0$ point-wise, but $f_{n}\left(x\right)\geq f_{n+1}\left(x\right)$ does not seem hold ?


I have N images in foldes with the same dimensions (HxW). Is there any software that can resize all images to the configured size (for example proportionally reduce size of the pic by X) and build a one image - grid of this images? Maybe only build a grid from images without resize?  For example - i have 20 images 900*300, after give the folder with images as input to the software i'll get one image: 3000*200 (2 rows, 10 colums of images 300*100).


Is there some kind of automatic test to check for best practice according to some sort of style guide in LaTeX, or will there be any in near future? For python we have , , , and whatnot, which helps a great deal.  I know there are a lot of paper, like the  and the , and talks out there, like the one by . Also several questions have been asked on stackoverflow, but no one asked for some kind of automation, which could help shape our LaTeX code, especially when I think of collaborative work on github or .


Why is there no change in speed of a charged particle in a uniform perpendicular magnetic field?

When the initial velocity is perpendicular to the magnetic field, the force acting on the charged particle   F = qvBsin(theta)  F = qvBsin(90)  F = qvB  In my textbook, it is given that the force will continually deflect the particle making it move in a circle. It also says that as the magnetic field acts on a particle perpendicular to its velocity, it does not do any work on the particle, it doesn't change the kinetic energy of the speed or the particle.  However, how come that it doesn't change the speed or the kinetic energy? We do have force acting on the particle which means that there will certainly be some accerleration.


I am trying to extract part of a number using sustr() but the following is not working:  $num = 012014;  echo substr($num, 0,2);   returns 51  BUT  $num = '012014';  echo substr($num, 0,2);   returns 01  I want it to return 01 can someone help me


What is the conditional test in bash to determine if a variabl $f is a directory?

So I'm scanning through a directory and want to test if each element of the directory is a directory:  FILES=$PWD/*  for f in $FILES  do   if [ $f is a directory ]; then #Correct conditional needed here     echo "Dir: $f"   fi         done   What method/function do I use to test if $f is a directory?


Teleport all entities relative to themselves in 1.13

In 1.12, I had a command block to summon in minecarts on a single point. I then had another command to spread the minecarts out in a radius of 20 blocks, and a following chain command block to teleport them to the y level 64, because the spreadplayers command teleports entities to the highest solid block. The chained command was simply:  tp @e[type=minecart,r=30] ~ 64 ~   In 1.13, this now teleports all the minecarts to point point. I tried  execute at @e[type=minecart,distance=..30] as @e[type=minecart,distance=..30] run tp @s ~ 64 ~   but this does not work, it has the same effect (Teleporting them all on top of eachother). I also replaced @s with @e[type=minecart,distance=..30] to no avail.  Any solutions here?


.e00 files - can they be converted to CSV files and used in QGIS?

I am having trouble opening an .e00 file in QGIS. (QGIS keeps locking up, and I have to "force-quit".) The file is political administrative boundaries in China.  Would it be feasible to convert the .e00 file to a CSV and import that CSV? 'Cause the .e00 file, when I open it with a text editor, looks like a spreadsheet document.  I am using QGIS 2.12 Lyon on a Mac running OS X 10.10.5.  Edit: I do not see how my question is a duplicate of "How to read Arc/Info e00 vector files (no binaries) with Python?" [I'll call that "Question A".]  First, Question A says "I can easily read e00 files with QGIS..." but in my case, I cannot easily read e00 files. I have only partial success displaying their data.  Second, I am asking whether I can turn my e00 file into a CSV file and then use the CSV file in QGIS. Question A makes no mention of CSV files. Third, I do not mention Python. I have no idea how to use Python.  I have read Question A and the answers given, and I do not understand what they are talking about. For example, when I run "ogrinfo --formats" I get "-bash: ogrinfo: command not found".


Tapering spiral text - tried text on path, art brush, and envelope distort

Using Illustrator CC 2014:  I'm trying to create a spiraled text in which the text size decreases as it spirals inward.  I've tried putting the text on a path created using the spiral tool and executing a script to decrease the size of each character, but I couldn't figure out how to access my text selection correctly.  This is the kind of spiral I'm looking for.    I've also put the text on a straight path, expanded, and used the free transform tool to make it a tapered art brush.  This achieves what I want with straight lines, but the spiral doesn't render the brush in an acceptable way.  Using brush shape on spiral path.    I also tried applying a triangular brush to the spiral path, typing and expanding my text on a straight path, and making an envelope distort using the spiral as the top object.  The results were kind of awesome, but not even close to what I was looking for.    I think the best way would be to figure out how to execute a script on the text selection.  I already have the basic logic of it solved (using JS):  function ChangeSize(){     var myDoc = app.activeDocument;      //Here's where I need to make a proper selection     var selection = activeDocument.selection;      //begin resize function     for (var i=0; i<characters.length; i++){         characters[i].characterstyle.textheight -= i * .05;      } }   This is the only thing holding me up from an otherwise very simple and straightforward design.  I've spent several hours trying and I've got nothing.  Does anyone have a simple solution for making my spiral look pretty much exactly like the Pi spiral in the sample t-shirt picture?.


First off, I understand that it is not ideal to parse html with regex.  However, I'm close to the solution I need, and I just can't quite get it right.  Say you have html input in a string and you do:  content = content.replaceAll("<[^\\P{Graph}>]+>", "");   This will essentially remove html tags except those with non-printable characters, space, tab, newline, and control characters.  This is fine, except that there is a problem with the space character.  I need to replaceAll tags that look like:  <ht ml> (space somewhere in the middle)   but keep those that look like:  < html> (because this one contains a space as the FIRST character).   How can I adjust my regular expression for replaceAll() to accomplish this?  Thanks for any input/suggestions.


I am gradually getting the hang of using Git with WordPress but I have a question that's hopefully a simple answer.   I have set up my local environment which I am happy with and using BitBucket as a private repo.   I push to my staging server when I'm happy with my local development.   Then once the client approved the staging site, it's then pushed to production.   The client has access to the production site and may make changes to the blogs (I understand this is merely database work only) and uploads some pictures.   If the client asks for some changes to the style of the site, is it good practice to then pull the production version (new images etc) and pull the database using WP Db Migrate Pro back to my local server to start working and then proceed with staging to production as before?  Should I merely just pull the theme files if they want some theme changes? Or pull everything if they require me to upload new images etc.


Are there attacks that break collision resistance but not preimage resistance?

Are there any examples of attacks on hash functions which:   break collision resistance and second preimage resistant, or break collision resistance and preimage resistant?   I have looked at Rogaway's paper1, but it seems complicated, hence was wondering if a succinct example exists.  1)  Phillip Rogaway and Tom Shrimpton. Fast Software Encryption (FSE) 2004, LNCS vol. 3017, pp. 371–388, Springer, 2004.


What is the reason for the strange behavior of the double value?


Lubuntu gets stuck while booting, possibly due to installing Docker

I had Lubuntu 16.04 running on my Macbook Pro 9.2, working fine for about 6 months now. Yesterday at work, while booting (without an Ethernet cable in), the boot process froze at the stage shown in the image below.  Then, back at home, I plugged in the Ethernet cable and everything worked fine for the evening.  Then, this morning, still at home and with the Ethernet cable plugged in, the boot process got stuck at the same stage (image below).  The newest thing I installed was docker (and docker.io), but that was about 3 days ago, and booting worked fine for the next two days. Still, a Docker message shows up around halfway in the attached image, could that have something to do with it?  I don't even know how/where to start attacking this problem. I'd be grateful for any hints on where to start searching.  /Edit: In the , the closest thing I could find in the section If an update or something else caused your boot problem was "How do I investigate boot and partition issues?". This deals with GRUB issues mostly. I'll try running Rescatux too, but I'd hope that someone might recognize a problem in my screenshot's output.


I've been trying to fix this program for a while. Basically, it's a Rock-Paper-Scissors type of game, and everything works apart from the input validation. Any help would be appreciated.  This is my code:   import java.util.Scanner; public class RockPaperScissors {     public static void main(String[] args)     {         Scanner scan = new Scanner (System.in);         System.out.println("Player 1: Choose rock, paper or scissors:");         String player1 = scan.next() .toLowerCase();         //Player 1 Input Validation         if ((player1 != ("rock"))         || (player1 != ("paper"))         || (player1 != ("scissors")))         {             System.out.println("Thats not right, choose rock, paper or scissors");         }         //Send Back to input         System.out.println("Player 2: Choose rock, paper or scissors:");         String player2 = scan.next() .toLowerCase();         //Player 2 Input Validation         if ((player2 != ("rock"))         || (player2 != ("paper"))         || (player2 != ("scissors")))         {             System.out.println("Please choose rock, paper or scissors");         }         System.out.println("Player 1 chose " + player1);         System.out.println("Player 2 chose " + player2);       //For Player 1 to win     if((player1.equals("rock"))&&(player2.equals("scissors"))     ||(player1.equals("scissors"))&&(player2.equals("paper"))     ||(player1.equals("paper"))&&(player2.equals("rock")))     {         System.out.println ("Player 1 Wins!");     }      //For a draw     if (player1.equals(player2))     {         System.out.println ("Its a Draw!");     }      //For Player 2 to win     if ((player2.equals("rock"))&&(player1.equals("scissors"))     ||(player2.equals("scissors"))&&(player1.equals("paper"))     ||(player2.equals("paper"))&&(player1.equals("rock")))     {         System.out.println("Player 2 wins!");     }  }   And this is the output that I get (Rock and Paper, are user inputs):  Player 1: Choose rock, paper or scissors:   Rock   Thats not right, choose rock, paper or scissors   Player 2: Choose rock, paper or scissors:   Paper    Please choose rock, paper or scissors   Player 1 chose rock   Player 2 chose paper   Player 2 wins!


Resources/Books for Discrete Mathematics

I am going to a Computer Science Course in University next year. I heard that Discrete Mathematics is whats required for Comp Sci so, I am looking for resources/books that I can read to get started with. I picked up . I find that some things are alittle hard to understand still. I have also looked at some videos from , I find the videos easy to understand. Except that I don't really know where am I supposed to start 1st. I am on algebra now, but can someone tell me whats the sequence I should go from here, eg. topics/playlists?  An you know, for maths, there must be alot of practice. So where can I find lots of practice questions? Schaum's Outline of Discrete Mathematics has quite little practice questions.


How are calculated numbers in AES S-box?

I have a problem calculating the 0x02 value of the AES S-Box.  I followed the steps descibed in “”, but my answer is not correct.  0x02 is 00000010  Input = 0  0  0  0  0  0  1  0 (LSB First) Row 0 = 1  0  0  0  1  1  1  1 Bit 0 = 0  0  0  0  0  0  1  0 = 1  Row 1 = 1  1  0  0  0  1  1  1 Bit 1 = 0  0  0  0  0  0  1  0 = 1  Row 2 = 1  1  1  0  0  0  1  1 Bit 2 = 0  0  0  0  0  0  1  0 = 1  Row 3 = 1  1  1  1  0  0  0  1 Bit 3 = 0  0  0  0  0  0  0  0 = 0  Row 4 = 1  1  1  1  1  0  0  0 Bit 4 = 0  0  0  0  0  0  0  0 = 0  Row 5 = 0  1  1  1  1  1  0  0 Bit 5 = 0  0  0  0  0  0  0  0 = 0  Row 6 = 0  0  1  1  1  1  1  0 Bit 6 = 0  0  0  0  0  0  1  0 = 1  Row 7 = 0  0  0  1  1  1  1  1 Bit 7 = 0  0  0  0  0  0  1  0 = 1   LSB is 11100011, MSB = 11000111, than (XOR) to the final vector 0x63, the result is 0xa4, but it should be 0x77  What am I missing or what might I be doing wrong?


Proving an integral formula containing the Poisson kernel

Specifically, the question is as follows:     Let $\mathbb{D}$ be the open unit disk in $\mathbb{C}$ and suppose that $f:\bar{\mathbb{D}}\rightarrow\mathbb{C}$ is a continuous function such that both $\Re f$ and $\Im f$ are harmonic.       (a) Show that   $$f(re^{i\theta})=\frac{1}{2\pi}\int_{-\pi}^\pi f(e^{it})P_r(\theta-t)dt$$   for all $re^{i\theta}$ in $\mathbb{D}$.       (b) Show that $f$ is holomorphic in $\mathbb{D}$ if and only if   $$\int_{-\pi}^\pi f(e^{it})e^{int}dt=0$$   for all $n\geq1$.   I believe (a) is a direct consequence of Poisson's representation theorem for harmonic functions, stated as follows:  Let $\mathbb{D}$ be the open unit disk and $f:\partial\mathbb{D}\rightarrow\mathbb{R}$ be continuous. Then there exists a continuous function $u:\bar{\mathbb{D}}\rightarrow\mathbb{R}$ such that $u(z)=f(z)$ if $z\in\partial\mathbb{D}$, $u$ is harmonic on $\mathbb{D}$, and $u(re^{i\theta})=\frac{1}{2\pi}\int_{-\pi}^\pi P_r(\theta-t)f(e^{it})dt$ and $u$ is unique.  It seems to me that this can just be applied to the real and imaginary parts of the function $f$ from the question to derive the desired result, but maybe I'm making a careless mistake?  For (b), it's not obvious to me how part (a) assists in the solution. This is a homework question, so I am looking for assistance with understanding it, but not a full solution. Thanks.


Is there a way to disable scrolling to the Spy-disguise & Engineer Build/Demolish menus?

With most other classes I can quickly switch between weapons easily with the scroll-wheel (with the option to Auto-switch instead of menu-switch turned on), and this is quite helpful.  However, when I'm bringing up the Spy's Disguise menu (or the engineer's build/demolish menus) I'll press the keybind to bring up the menu, as I then need to press another key to select the disguise/building.  However, I can also scroll on the wheel into these menus, which is never what I intended to do. I always just want to switch from the wrench to, say the pistol or the shotgun, or the sapper to the knife.  So, is there any way to disable those menus from appearing when scrolling?


"Ten times fewer the number" versus "one-tenth the number"

Lately I've been hearing and reading statistics that are communicated in wording that, frankly, confuses me.  Forgive me for not citing specific instances, but I can give a hypothetical statistic that exemplifies the kind I'm referring to:     Comparing the number of tax returns the IRS audited in 2002 and 2010, the number of unlucky folks who had their returns audited in 2002 was ten times fewer than the number in 2012.    There is something about that wording that bothers me, and I'm not sure why.    After a fruitless search on the internet using numerous combinations/permutations of words and phrases such as "X times fewer," "X times less," "mathematical expressions of 'times fewer' as opposed to 'a fraction fewer,' or 'a fraction less,'" and more, I came up empty. Perhaps this question is more appropriate on a math website, but in the off-chance members of EL&U might give their imprimatur to this question, here goes:  Here's a second hypothetical example.  Is it grammatical—not to mention mathematical—to say the following?:     There are ten times fewer pollinating honeybees worldwide today than there were in 1912.  [Though this is a made-up statistic, there has been a dramatic reduction in the number honey bees in America of late!]   Should not the expression be:     There are one-tenth fewer honeybees worldwide today than there were in 1912.     On the surface, the "ten times fewer" locution seems to me to be a contradiction in terms.  How can something less be 10 times fewer?    I can understand readily how, for example, 2012's bee population of, say, 90 million can be one-tenth (point one) less than 1912's population of 100 million, but ten times fewer?   I'm confused.  Which expression is "more" correct?


Is it possible to simplify small if statements in python?

I have a program that adjusts some values when an input is negative. Those values cannot be grouped for various reasons (I cannot put them all into one nice if statement).  This is a code example:  if num > 0:     n_op = 50 else:     n_op = -50   OR  n_op = 50 if num < 0:     n_op = -50 (OR) n_op= -n_op   Pieces like this happen everywhere in my code and I am starting to get sick of it. Not only it doesn't seem like the most efficient solution, they also make the code look like crap.  Is there a way to make those specific pieces of code nicer?


Destroying cubes in combined mesh at runtime

How could I destroy cubes from a mesh? Once i've combined my cube to a single mesh, would it be possible to be able to destroy one of these cube but to keep a mesh ? Ive seen a video where te person show a script to cut square or triangle shapes into a plane, so I tought it might be possible in 3d (Holistic3d is the person). Does anyone have a script to do that ? because I have no clue how it could be done.


Find source of outgoing traffic to specific UDP port

Since a few days ago I've been observing some strange recurrent outgoing UDP traffic from my server on port 24441 but since it's not constant, I cannot seem to find what's causing it.  All I can see is the following in iptables logs:  Nov 15 00:46:33 server kernel: [17216276.676673] Firewall: *UDP_OUT Blocked* IN= OUT=eth0 SRC=<SERVER_IP> DST=5.9.124.53 LEN=192 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=60641 DPT=24441 LEN=172 UID=501 GID=513   I suspect it's some kind of malware running periodically from my server but want to find out what exactly. Can someone shed a light on how to catch this/log the source of this automatically when it happens? I'm running Centos 6.7. Thanks!


Frequency of a trigonometric function: $g(x) = \sin(2\pi(x-a)b \ \cos(2\pi(x-a)c)) + d.$

I have a trigonometric function $g(x)$ and I'm interested in how its frequency changes as $|x|$ increases. When I plot the function I can see that the frequency increases with $|x|$, but is there a way to show this formally?  This is the function:  $$g(x) = \sin(2\pi(x-a)b \ \cos(2\pi(x-a)c)) + d.$$  [Edit] In a previous question I asked about he periodicity of this function and accepted an answer. However, knowing that the function is not periodic does not really tell me anything about the frequency. Just that the function values don't repeat. I am interested in the behaviour of the frequency, because I use this function in an application in swarm intelligence (known as ) to generate potential solutions to binary problems. Basically, the function is sampled at regular intervals $x = (0, 1, ..., n)$. At each sample position, the function value is mapped to a binary bit as follows: if $g(x) > 0 \rightarrow 1$, else if $g(x) \leq 0 \rightarrow 0$. Now, if the frequency increases indefinitely as $x$ increases, this has implications for the algorithm when $n$ is large, because of the way a search is carried out in PSO. So, although this question is closely related to my previous question, there are other implications.


Ridiculously slow MacBook Pro 15'' 2011 with low battery and El Capitan

Problem solved: see "Update 2" section.  I have a MacBook Pro 15'', A1286, Early 2011 which was running OS X Lion and became extremely slow few weeks after an upgrade to El Capitan. The upgrade itself took very long. After the upgrade, the laptop was running smoothly during about 1 week.   Then, performance suddenly dropped and all menus now take a while to open. The mouse cursor is very jerky. The one of the touchpad is also jerky, altough to a slightly less extent. Practically, it is impossible to use the laptop.  The battery is no longer charging and the time (date/hour) is no longer remembered, so that I have to reset it after each start of the OS.  (skip) Specifications : Processor i7 @ 2,3 GHz with 4 GB RAM (skip)    Update 1   Upgraded to 8 GB RAM.  Shrinked OS partition.  Cloned to SSD.   Checked SMART values.   Checked file system.   Problem not solved.  (skip)     Update 2  Short version:  The culprit is the low battery After thorough tests, I came to the conclusion that the jerky cursor movements and the MacBook coming slower and slower was caused by the battery with "replace now" status.    Long version or how the problem has been identified.   I first followed this procedure in the comments of a video showing how to fix battery issue on a MacBook:    Power off computer Remove battery  Disconnect magsafe  Connect magsafe  Connect batte Power on   This had the positive effect that afterwards, the date/time were remembered, although the battery was in very poor ("replace now") condition.  Then, I reset SMC and NVRAM, following the procedures linked by users Nimesh Neema and Amey. The problem remained. The MacBook was fast during the first seconds and then went slower and slower. This happened even when using softwares from Apple only and not from third-parties.  Lastly, I tested the MacBook with the battery from a 13'' inch (A1278) MacBook Pro. Both batteries operates at the same voltage (although thus of the 15'' has higher capacity). The battery connector is not a the same location, but is same, so that I could insert it and hold the battery with my hand. This battery was in better condition (with "must be checked" status, but didn't had yet the "replace now" status. This totally solved the problem. The MacBook remained fast and the cursor movements, from the touchpad or mouse were still smooth after several minutes.    Conclusion: If the battery has the "replace now" status, some artifacts totally paralyze the MacBook Pro, although it appears working correctly during the first seconds. This is a purely hardware problem and system reinstall or upgrade is NOT necessary.


Why would my TV image turn black when electrical appliances turn on?

I have my computer connected to my TV via HDMI. Every time something electrical happens (fridge turns on, stove sparks, etc), the image on the TV goes black for a second and then comes back on. And before anyone asks, trust me, I checked other options, it is perfectly in sync with the fridge/stove/etc and not some random coincidence  Anyone have any ideas as to what is causing this or how I fix it? Or should I just get a new HDMI cable?  The lights do not flicker or dim when this happens.  Also, if it is on the same circuit, how do I figure that out?  And will connecting the TV to a regular surge protector work, or do I need to put it on a voltage stabilizer?


If $f(x_1)=f(x_2)=y$, then prove that $f$ can not be continuous everywhere

Let $ f:[a,b]→\mathbb R$ be a function with  the following property:  For every $y\in f([a,b])$, you have exactly two $ x_1, x_2 $,such as $f(x_1)=f(x_2)=y$.  Prove that f  can not be continuous everywhere.


c++ template class inheritance with other template methods

I'm struggling with a compilation issue. Given a Base class templated with T that contains a method templated with U, I can't call the method from a derived class. The following example reproduces my problem:  #include <iostream> #include <vector>  template <class T> class Base { protected:   template <class U>   std::vector<U> baseMethod() const   {     return std::vector<U>(42);   } };  template <class T> class Derived : public Base<T> { public:   std::vector<int> derivedMethod() const   {     return baseMethod<int>();   } };  int main () {   Derived<double> d;   std::vector<int> res = d.derivedMethod();   return 0; }   Compiler result:  t.cc:21:12: error: ‘baseMethod’ was not declared in this scope t.cc:21:23: error: expected primary-expression before ‘int’ t.cc:21:23: error: expected ‘;’ before ‘int’ t.cc:21:26: error: expected unqualified-id before ‘>’ token


How does maximization of entropy imply minimization of energy?

Consider the Wikipedia article "". It clearly says    For an isolated system with fixed energy, the entropy is maximized. For a closed system with fixed entropy, the energy is minimized.   The problem comes when they provide a mathematical explanation under the header  "Mathematical explanation" (in the same article). It first states that $$\bigg(\dfrac{\partial S}{\partial X}\bigg)_U=0,~~\bigg(\dfrac{\partial^2 S}{\partial X^2}\bigg)_U<0,$$  at equilibrium for an isolated system with fixed internal energy. Then the article uses some algebra to connect these terms to  $$-\dfrac{1}{T}\bigg(\dfrac{\partial U}{\partial X}\bigg)_S~~\&~~-\dfrac{1}{T}\bigg(\dfrac{\partial^2 U}{\partial X^2}\bigg)_S~~\text{respectively}.$$ This is then used to claim the minimization of energy.  My confusion is that the entropy maximization requires internal energy constant (point 1 above). Thus  $$\dfrac{\partial U}{\partial X}=\dfrac{\partial U^2}{\partial X^2}=0.$$  The first equality is okay, but for the minimization of the internal energy, we require that the second one be positive and not $0$.  I was not aware of a connection, mathematical in nature, between the minimization of internal energy and the maximization of entropy, till I came across this Wikipedia document. This then leads to all of this confusion. I don't see where I am going wrong. Also, this is the proof given in the thermodynamics books by R.H. Swendsen. Any help is highly appreciated.


One quick question. I plan on getting a bank letter for my Canadian visa (Temporary resident visa) application and the question I would like to ask is quite simple.  Can I present a bank Letter in place of my bank statements? which details that I have certain Funds in my bank account? Kindly let me know as soon as possible.


What is the best practice for aligning table content for text/number mix?  I know that for text/string content it should be aligned to the left and for numbers it should be aligned to the right of the column.   But what if I have a unique identification number which is something like: H2345633?   It is mostly numbers but it is not entirely number based. So how should it be aligned?


I want to show that for $\gcd(a,b)=1$, $a,b \in \mathbf{Z}$, $\gcd(b^2+ab,a^2+2ab)=1$. I think the first step is something like this $$\gcd(b^2+ab,a^2+2ab)=\gcd(b(a+b),a(a+b)+ab). $$ I have two properties that can be used. There are 1/ $\gcd(a+b,c)=\gcd(a,c)$ if $b \vdots a$. 2/ $\gcd(ab,c)=\gcd(a,c)$ if $\gcd(b,c)=1$. Please help me. Thank you.


Pokemon Go login doesn't work on data but works on wifi

I have a Galaxy S4 and I have issues running Pokemon Go.  It will not login using data, only wifi. So I connect on wifi at home, then go out and switch to data. It is fine.   But if the game needs to be restarted, it just gets hung on the google account login. It only works on wifi to get into the game.  Possibly related/unrelated: incense and lures do not work. People see stuff at lures, but I never do. They just do not work for me for some reason.


Strange blue line in profile page of relatively new staff member

The  has a strange blue line next to the Staff indicator:    Looking at the HTML source, I presume this is because they're not ranked yet:    This only seems to happen for staff members, not for other users.  Tested in the latest Safari and Firefox on macOS Catalina.


I have a 1 TB hardisk which is lmv2 and I want to make two partitions of it.  one to normally store stuff.  and one ntfs where i can store windows  BUT I get error when i use gpart and this is what it looks like    When I try to resize the 930 gb drive, it says it's busy as Ubuntu is using it:


Finding $ \lim_{x\rightarrow 0}\frac{(1+x)^{\frac{1}{x}}-e+\frac{ex}{2}}{x^2}$ without using series expansion.

Finding $\displaystyle \lim_{x\rightarrow 0}\frac{(1+x)^{\frac{1}{x}}-e+\frac{ex}{2}}{x^2}$ without using series expansion.   I am trying to solve it  using D L Hopital Rule  So $\displaystyle \lim_{x\rightarrow 0}\frac{(1+x)^{\frac{1}{x}}\cdot \frac{1}{x^2}\bigg[\frac{x}{1+x}-\ln(1+x)\bigg]+\frac{e}{2}}{2x}$  again i want to Diff with r to $x,$ but this is to complex  please help me how to short my calculation , Thanks


Writing the number of questions in exam class using words

I am creating an exam using the exam class. To conform with the standard format, I need to be able to count the number of questions (which can be done using \numquestions) and display them as words (i.e. 1 --> one, 2 --> two etc). I have tried using fmtcount but I can;t get the two packages to work together. Any help would be greatly appreciated! Here is a MWE:  \documentclass{exam}  \begin{document}  \section*{Here are \numquestions\ questions}  \begin{questions}     \question This is the first question.     \question This is the second question. \end{questions}  \end{document}   I would like the \numquestions in the section title to be in words (i.e two) instead of just the number 2.   Thanks!


Solving techniques for iterating over a list and changing the output after every word

here's my code  spam = ['apples', 'bananas', 'lemons']  def funcc(spam):     for i in range(len(spam) - 1):         print(spam[i], ',')     print('and', spam[-1])   I need to make a function which returns a string with all the items separated by a comma and a space with 'and' inserted before the last item. But my function should be able to work with any list value passed on it. I don't need the full code to resolve my problem, just asking for techniques to solve this task!


What's the easiest way to check if a javascript variable is a number and greater than zero?

I coded this:          isNumberNotZero: function (num) {              // Return false if num is null, an empty string or zero             if (num === null || typeof num === "undefined" || (typeof num === "string" && num.length === 0) || num == 0) {                 return false;             }             return true;         },   But is there an easier way to do this. The code I have does not seem very clean.