Roles and capabilities is easily the most confusing part of WordPress. Just when I think I have it sorted, I realise ...NO! I created a plugin and gave all the plugin admin pages in Dashboard: publish_pages capability. (Because I think this will allow editors to view and manage) I then created a new role based on Editor: add_role("mbbp_booking_user_key", "Booking Manager", get_role( 'editor' )->capabilities);  Why? Because I just want people with Editor role to be able to manage the plugin settings and bookings. (i.e. I dont want to overload the interface with options like Appearance, Menus, Widgets, Plugins, Settings, Tools, etc..) This appeared to work, I was able to create a new user with role: Booking Manager and access the booking pages and add, edit and save records into the custom tables I created for the project. BUT ... I created an settings page which uses get_option('mbbp_bookings_settings'); and to save the options, I created a form on the settings page:

<?php _e('Settings', 'mbbp_domain'); ?>
      <form method="post" action="options.php" novalidate="novalidate">         <?php settings_fields('mbbp_settings_group'); ?>

<?php _e('Booking Settings', 'mbbp_domain'); ?>

                 <?php _e('Booking Fee', 'mbbp_domain'); ?>	                  <input name="mbbp_bookings_settings[booking_fee]" type="number" id="mbbp_bookings_settings[booking_fee]" value="<?php echo isset($mbbp_bookings_settings['booking_fee'])?$mbbp_bookings_settings['booking_fee']:''; ?>" class="small-text">

<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes', 'mbbp_domain'); ?>">
     </form>
  I didn't test thoroughly though... Because User Role: Booking Manager can access the page BUT when trying to save, he gets the error:  "You need a higher level of permission"  Now, this is obviously because only Administrator can update settings page and I have now realised that an Editor can't save options... So how can I make this work so that the Editor can save my plugin settings but not access all the Dashboard admin pages?

In my custom plugin, I want other user roles can also save the plugin settings. And I use settings_fields('custom_options') function to save settings.  When I am logged in as an editor or any other role, on clicking the button I am redirected to the while screen page with a message Sorry, you are not allowed to manage these options.  Please, can anyone help me with this?  Thanks in advance!


I am using   foreach(glob("config/pages/*.php") as $page){   to get the list of all files in the directory of config/pages/ Can I have this show up by the oldest file first and the newest file last?  I am wanting to make a navigational menu out of all of this. My full source code is as follows but I need the oldest file to show up first, Maybe I could add a variable to each file like: `$order = 1;' where the number would be the order in the list?   so for example for page home.php the $order would be equal to 0 and about.php would be equal to 1. And then somehow sorting based on counting in order from 0?

<?php echo $config['site_title']; ?>
  <?php      $files = glob("config/pages/*.php");      $files = array_combine(array_map("filemtime", $files), $files);      ksort($files);       foreach($files as $page){          // Remove the conifg/pages/ from the string         $strip1 = str_replace('config/pages/', '', $page);          // Remove the .php from the string         $strip2 = str_replace('.php', '', $strip1);          // Uppercase the first letter in the string         $capit = ucfirst($strip2);          // Re-define the string as the display title         $title = $capit;          // Remove the .php and replace it with .html         $html = str_replace('.php', '.html', $strip1);          // Re-define the string for the link url         $link = $html;          // Display the end string with html elements to user         echo "
".$title."
";     }  ?>

I'm trying to display an array of files in order of date (last modified).  I have done this buy looping through the array and sorting it into another array, but is there an easier (more efficient) way to do this?


int menuDecision = displayMenu();    //WHILE USER DOESN'T SELECT QUIT while(menuDecision != 3){ /*     if(menuDecision == 1){         Queue myQueue;     }     else{         Stack myStack;     } */      switch(menuDecision){         case 1: Queue myQueue;                 break;         case 2: Stack myStack;                 break;     }      menuDecision = displayMenu();  }   How come when I run the above as a switch statement it's giving me an error but when I use the if/else-if it works? Basically the program instantiates an object depending on what is selected in the menu.Once an object is created the constructor is called, and the constructor calls another function and so on...Basically a new object is created each pass in the while Loop. Since I'm not getting a lot of feedback in my code, would the above implementation be considered 'bad programming'?  Thanks!  Edit: The error is:   main.cpp:27:4: error: cannot jump from switch statement to this case label                         case 2: Stack myStack;                         ^ main.cpp:25:18: note: jump bypasses variable initialization                         case 1: Queue myQueue;

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


I've heard conflicting reports on whether you can rent a car in the US and drive it into Mexico.  We are going on a 2 week trip to the Baja Peninsula and want to fly into San Diego and rent a car to drive down.  Is it possible? If so what things should I be careful/worried about? Will the rental agency set me up with everything I need to legally drive in Mexico?  With that said, any danger or concerns or tips for driving the most direct route from San Diego, through Tijuana, and half way down the Peninsula?

During the summer, I plan to rent a car in Calfornia, USA and do some roadtripping in the south-western part of the USA. I would also like a day trip to Mexico. Can I just drive through the border or isn't this possible at all? Do I need any special preparation?


I wish to name a property that expresses whether something is in the front or at the rear.  This term has to be used together with 'side' without causing ambiguity.  Much like 'side' can be left or right, 'height' can be high or low, '????' can be front or rear.  Is there a word for that?

Is there an equivalent word to "side" when speaking of the front or rear of something (e.g. a car)?  So, a mechanic might say:     You damaged your wing-mirror? Ok, which side?   ... or...     You damaged your bumper? Ok, which [insert word here]?


So, I stumbled onto this article which really blew my mind (). To sum it up, these researchers set up some kind of material that slowed a photon down while it traveled through the material. Once it passes through the material, it should return $c$; however, when they race it against another photon, it comes up short. To me, this sounds like it should be bigger news. The speed of light should ALWAYS equal exactly $c$ when in a vacuum. So, if this was not the case, did they just cause some issue with Einstein? Or, is there something to which I am not privy?

Last year  by changing their shape. Does this violate the special theory of relativity?


I'm trying to export a Developer certificate from Keychain Access. I've followed all the instructions and got to the point where I need to enter the "login" keychain password.  However, when I enter this password and press Allow, nothing happens.  I've checked the password multiple times. The Keychain Access is set to Keychains = login and Category = My Certificates. I've tried with other categories too.

I'm running into an issue where keychain password verification box does not verify password - does not shake for incorrect password and nothing happens when I press "allow". I'm using iCloud keychain.  What could make the Keychain Access wants to... dialog box to not verify the password?  Nothing happens when I press "Allow" with password enters. The box does not shake when password is incorrect:


Let $(\Omega ,\mathcal F)$ where $\Omega =\{\omega \mid \omega :[0,\infty )\to \mathbb R\text{ is a function}\}$ and $\mathcal F$ generated by cylinders, i.e. of the form $\{\omega \mid (\omega (t_1),...,\omega (t_n))\in B\}$ for some Borel set $B\subset \mathbb R^n$. Let $$C=\{\omega \mid t\mapsto \omega (t)\text{ continuous}\}.$$  Why $C$ is not measurable ? I tried by contradiction. If it's measurable, then there is a $B\in \mathcal B(\mathbb R)^{\mathbb N}$ and a sequence $(t_i)$ of $[0,\infty )$ s.t. $$C=\{\omega \mid (\omega (t_i))_{i\in\mathbb N}\in B\}.$$ I don't see where there is a contradiction.

Let $C(\mathbb{R})=\{ f:\mathbb{R}\to \mathbb{R} \colon \ f \text{ continuous}\}\subseteq \mathbb{R}^{\mathbb{R}} $. How to prove formally that $C(\mathbb{R}) \notin \mathcal{B}(\mathbb{R}^{\mathbb{R}})$ (the product sigma algebra)?  The classic proof said that   $A \in \mathcal{B}(\mathbb{R}^{\mathbb{R}})$ iff exists $J\subseteq \mathbb{R}$ with $|J|\leq \aleph_0$ and $B\in \mathcal{B}(\mathbb{R^J})$ such that $A=B \times \mathbb{R}^{\mathbb{R}\setminus J}=\{f \in \mathbb{R}^\mathbb{R} \colon  \ (f(j) \colon \ t \in J) \in B\}$. In simpler terms,  $A$ only can have countable restrictions but the set of continuous functions have uncountable restrictions since every function on $C(\mathbb{R})$ needs to be continuous in every point $x \in \mathbb{R}$.  The last part of this proof always didn't satisfied me at all, and I don't really know how to do this proof formally.   Any help or references will be appreciated.


I want a mod_rewrite rule not to be executed when traffic is hitting the web-server from internal network. The web server is an apache 2.2 The following RewriteCond is meant to guard the rewrite rule.          RewriteCond %{REMOTE_ADDR} !=192\.168\.[0-15]\.[1-255]   If I access the web server using ip 192.168.15.173, the rule doesn't seem to kick in and thus the rewrite rule is executed despite my internal address. Where is my mistake?  Matching for the simpler:      RewriteCond %{REMOTE_ADDR} !=192\.168\.15\.173   fails as well.  I used the "Blocking of Robots" example in  to build the rule. Am I missing something?  Edit: I already tried to investigate using rewrite logging, but that didn't bring up any useful information. That's what happens during the request:      192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (2) init rewrite engine with requested uri /test/     192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (3) applying pattern '^/test/(.*)' to uri '/test/'     192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (2) rewrite '/test/' -> 'https://example2.com/'     192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (2) explicitly forcing redirect with https://example2.com/     192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (1) escaping https://example2.com/ for redirect     192.168.15.173 - - [12/Jun/2013:13:50:17 +0200] [example.com/sid#7f3c6afb5e30][rid#7f3c6f864b68/initial] (1) redirect to https://example2.com/ [REDIRECT/302]   I don't even see the RewriteCondition mentioned in this log.  Edit2: The apache version in detail is:  Name        : httpd Arch        : x86_64 Version     : 2.2.15 Release     : 26.el6.centos Size        : 2.9 M Repo        : installed From repo   : anaconda-CentOS-201303020151.x86_64   Edit3: I upped the LogLevel to 4 and now I get more results:  192.168.15.173 - - [12/Jun/2013:14:18:05 +0200] [example.com/sid#7f3c6afdfdb0][rid#7f3c6f880568/initial] (4) RewriteCond: input='192.168.15.173' pattern='!=192\.168\.15\.173' => matched   Why does this match?  Edit4:  tells me, that it shouldn't match ...

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


If $a = r \pmod b$ when $0 \le  r < b$, then $\gcd(a, b) = \gcd (b, r)$.  I do not understand why this is, can somebody explain?  I've also looked over this thread:  , but I still can't seem to see how that applies to $a = r \pmod b$.

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


I'm on Ubuntu 20.04 and am running the standard gnome. I've had a look at  and  but these are not helping and, in fact, crashed my computer when I edited the resource file. I also found:  which didn't seem to help. Suddenly my Top Bar, Settings Menu, and login screen has HUGE fonts. Example  Anyway, it makes my eyes hurt. If I go into settings/universal access, Large Text is off. If I turn it on, it gets smaller. If I turn it off, it gets smaller still. Next reboot, though, resets this back to the big ugly font. If I leave it on and reboot, same thing. Don't know what to do next. I figure this came in with an update, but can't be sure.

So I was configuring VS code on my Notebook when suddenly I noticed that my interface font got really small on my desktop, terminal and files. I use Gnome Tweaks Tool to increase my scaling factor to 1,15 , but, even though it was active, the font stayed tiny. The solution I found was moving my scaling factor, which instantly fixed my font issue, however, every time I restart my Notebook the font gets tiny again and I have to repeat the process. I tried reseting my font configuration using this command, but had no success. gsettings reset org.gnome.desktop.interface text-scaling-factor  I also tried using the command dconf reset -f /  Finally, I tried using dconf-editor, but still had no success altering the font rendering DPI or changing the scaling factor. All of the steps I mentioned fixed my fonts temporarily, but the issue still persists when I restart my Notebook I am out of ideas and even considered getting a fresh Ubuntu install by now... My video card: NVIDIA GeForce GTX 1050 GPU


Hi my requirement is to produce following string:   qid<> 0 And qid<> 1 And qid<> 2 And qid<> 3 And qid<> 4 And qid<> 5 And qid<> 6 And qid<> 7 And qid<> 8 And qid<> 9    So I did like this:  import java.util.*; import java.lang.*; import java.io.*;  /* Name of the class has to be "Main" only if the class is public. */ class Ideone {     public static void main (String[] args) throws java.lang.Exception     {         // your code goes here        String deleteQids="qid<> ";        String deleteqidString1="";         for(int i=0;i<10;i++) {          deleteqidString1+=deleteQids+i +" And ";        }        System.out.println(deleteqidString1);     } }     But at the end And appears.  Can anybody please tell me how to get rid of this?

Is there a way to determine if the loop is iterating for the last time. My code looks something like this:  int[] array = {1, 2, 3...}; StringBuilder builder = new StringBuilder();  for(int i : array) {     builder.append("" + i);     if(!lastiteration)         builder.append(","); }   Now the thing is I don't want to append the comma in the last iteration. Now is there a way to determine if it is the last iteration or am I stuck with the for loop or using an external counter to keep track.


After unistalling Ubuntu 17 from my laptop, left me with 3 very small pertitions which they added 3 extra letters to my drives. I am unable to delete them format them or anything from windows D management, is there another method to remove them please? This is how my HD is partitioned: 323MB, 260MB, 128MB, C:\687GB NTFS, F:904MB NTFS, G:450MB NTFS, H:9.42GB Recovery NTFS. The NTFS partitions are from Windows, but the first 3 are Linux left overs. I'll appreciate your help.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Quantum gates seem to be like black boxes. Although we know what kind of operation they will perform, we don't know if it's actually possible to implement in reality (or, do we?). In classical computers, we use AND, NOT, OR, XOR, NAND, NOR, etc which are mostly implemented using semiconductor devices like diodes and transistors. Are there similar experimental implementations of quantum gates? Is there any "universal gate" in quantum computing (like the NAND gate is universal in classical computing)?

When expressing computations in terms of a quantum circuit, one makes use of gates, that is, (typically) unitary evolutions.  In some sense, these are rather mysterious objects, in that they perform "magic" discrete operations on the states. They are essentially black boxes, whose inner workings are not often dealt with while studying quantum algorithms. However, that is not how quantum mechanics works: states evolve in a continuous fashion following Schrödinger's equation.  In other words, when talking about quantum gates and operations, one neglects the dynamic (that is, the Hamiltonian) realising said evolution, which is how the gates are actually implemented in experimental architectures.  One method is to decompose the gate in terms of elementary (in a given experimental architecture) ones. Is this the only way? What about such "elementary" gates? How are the dynamics implementing those typically found?


Using Rank-Nullity Theorem, find dimension and basis for the Subspace $W$ of $\mathbb{Q}_{4} [x]$ consisting of all the polynomials $a_{0}+a_1x+a_2x^2+a_3x^3+a_4x^4$ such that  $a_1+a_2+a_3+a_4=0$.  Not sure how to use the theorem with this problem and very unsure what steps need to be taken.  Thank you in advance for the help.

Using the Rank-Nullity Theorem, find the dimension and a basis for the subspace W of  $Q_4[x]$ consisting of all the polynomials $\displaystyle a_0+a_1x+a_2x^2+a_3x^3+a_4x^4$ such that $\displaystyle a_1 + a_2 + a_3 + a_4 = 0$.  Need some direction on how to start this question. Have some idea if a matrix was used but not a polynomial


I couldn't find a proof of the superposition theorem from circuit analysis anywhere online.  I thought it might be helpful to ask and provide my proposed proof as an answer to gather feedback and improvements.

I was just wondering whether there is a formal prove for the  in electric circuits? I tried searching it online but couldn't find anything sufficient. Most of the sources assume it follows from the definition of linear systems, but then how do you prove linearity without using the superposition theorem? Any input will be much appreciated!


I looked and could not find... How can I show the solutions for $x^y = y^x$?    There (as far as I can tell) are three curves satisfying this. One is $x=y$, one curves through $(2,4) (4,2) (e,e)$ and goes asymptotic in the $++$ and $+-$ quadrants and its mirror image reflected across $x=y$.   But it is not easy to find a closed form expression for the solutions...at least not for me. Thanks

It's not too difficult to figure out that $x$ and $y$ can both be 1, and also $x$ can be 2 and $y$ can be 4 (and vice versa). But I can't rule out if there are other solutions. Does it have anything to do with inverse functions? Is there a way to see the solutions by graphing, or algebraically?


I have downloaded  and successfully installed on my Windows machine. But, I didn't find Scott schema in it. During installation, I didn't get any option where it asked to create sample schema. Could anyone suggest how to get scott schema in Oracle XE 11.2 ?  List of users :

I want to install scott schema, a sample database in oracle.  But in express edition, I can't find out it.  Please help me install it on Oracle 11g express.  I'm a newbie, pls help me


Is there any maximum limit to number of running threads in Linux? Is it possible to count total number of threads from all classes in java?

What is the maximum number of threads that can be created by a process under Linux?  How (if possible) can this value be modified?


Recently I have found statement that claims: (Jockusch-Mohrherr) Let A be any c.e. set except ω. Then A is creative iff (∀c.e.B) [A∩B=∅ ⇒ A ≡ A∪B]. But I couldn't find any proof of it. Can somebody help me prove this claim?

I was recently reading a Ph.D. thesis in which the following result was cited:  (Jockusch-Mohrherr) Let $A$ be any r.e. set except for $\mathbb{N}$. $A$ is creative iff for every r.e. set $B$ disjoint from $A$, it follows that $A \equiv_{1} A \cup B$.   I found this interesting and was trying to track down the source of the theorem, but nothing was given in the bibliography. Does anyone know where I could find this result? Or, I guess, alternatively provide a sense of how to prove this? Thanks.


I'm currently using Chrubuntu on my C720 Chromebook, but want to create a bootable Linux USB key. The problem is that I can't seem to do this from within Ubuntu once I've loaded it and obviously can't do it in Chrome OS at all.  I haven't got easy access to Windows or a Mac, so would prefer to do it within Chrubuntu if possible. I've tried it with both an SD card and a USB thumb drive with UNetbootin and the disk creators available through the software centre. Both throw errors, basically telling me I don't have permission, or just "Installation failed".  Right now, I have a downloaded ISO and a 32GB SD card and USB key.  The reason I'd like to do this is that I need to do some software development for university (the only serious programming this academic year) and would like a bootable environment for both my Chrome devices and for use elsewhere.  Any help would be appreciated.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


I am struggling trying to understand the final part of the proof of Theorem 3.54 on Baby Rudin. Here's the Theorem     Let $\sum a_n$ be a conditionally convergent series. Suppose :   $$ -\infty \leq \alpha\leq \beta \leq +\infty$$   Then there exist a rearrangement $\sum a'_n$ with partial sums $\{s'_n\}$ such that      $$ \lim\limits_{n\to\infty} \inf s'_n=\alpha \quad \quad \lim\limits_{n\to\infty}\sup s'_n=\beta$$   The complete proof can be seen here, in this question . I didn't quite understand the last part, namely     Finally, it is clear that no number less than $\alpha$ or greater than $\beta$ can be a subsequential limit of the partial sums of (25).    How do i prove this statement exactly?

I have trouble following the following theorem in Rudin:  Let $\sum a_n$ be a series of real numbers which converges, but not absolutely. Suppose $$-\infty \leq \alpha \leq \beta \leq +\infty.$$ Then there exists a rearrangement $\sum a_n^\prime$ with partial sums $s_n^\prime$ such that $$\lim_{n\to\infty}\inf s_n^\prime = \alpha, \ \ \ \mbox{ and } \ \ \ \lim_{n\to\infty}\sup s_n^\prime = \beta. \tag{24}$$  Here's the proof:  Let $$p_n = \frac{|a_n| + a_n}{2}, \ q_n = \frac{|a_n| - a_n}{2} \ (n = 1, 2, 3, \ldots). $$ Then $p_n - q_n = a_n$, $p_n + q_n = |a_n|$, $p_n \geq 0$, $q_n \geq 0$. The series $\sum p_n$, $\sum q_n$ must both diverge.   For if both were convergent, then $$\sum \left( p_n + q_n \right) = \sum |a_n|$$ would converge, contrary to hypothesis. Since $$ \sum_{n=1}^N a_n = \sum_{n=1}^N \left( p_n - q_n \right) = \sum_{n=1}^N p_n - \sum_{n=1}^N q_n,$$ divergence of $\sum p_n$ and convergence of $\sum q_n$ (or vice versa) implies divergence of $\sum a_n$, again contrary to hypothesis.   Now let $P_1, P_2, P_3, \ldots$ denote the non-negative terms of $\sum a_n$, in the order in which they occur, and let $Q_1, Q_2, Q_3, \ldots$ be the absolute values of the negative terms of $\sum a_n$, also in their original order.   The series $\sum P_n$, $\sum Q_n$ differ from $\sum p_n$, $\sum q_n$ only by zero terms, and are therefore divergent.   We shall construct sequences $\{m_n \}$, $\{k_n\}$, such that the series $$ P_1 + \cdots + P_{m_1} - Q_1 - \cdots - Q_{k_1} + P_{m_1 + 1} + \cdots + P_{m_2} - Q_{k_1 + 1} - \cdots - Q_{k_2} + \cdots \tag{25}, $$ which clearly is a rearrangement of $\sum a_n$, satisfies (24).   Choose real-valued sequences $\{ \alpha_n \}$, $\{ \beta_n \}$ such that $\alpha_n \rightarrow \alpha$, $\beta_n \rightarrow \beta$, $\alpha_n < \beta_n$, $\beta_1 > 0$.   Let $m_1$, $k_1$ be the smallest integers such that $$P_1 + \cdots + P_{m_1} > \beta_1,$$ $$P_1 + \cdots + P_{m_1} - Q_1 - \cdots - Q_{k_1} < \alpha_1;$$  let $m_2$, $k_2$ be the smallest integers such that $$P_1 + \cdots + P_{m_1} - Q_1 - \cdots - Q_{k_1} + P_{m_1 + 1} + \cdots + P_{m_2} > \beta_2,$$ $$P_1 + \cdots + P_{m_1} - Q_1 - \cdots - Q_{k_1} + P_{m_1 + 1} + \cdots + P_{m_2} - Q_{k_1 + 1} - \cdots - Q_{k_2} < \alpha_2;$$ and continue in this way. This is possible since $\sum P_n$, $\sum Q_n$ diverge.   If $x_n$, $y_n$ denote the partial sums of (25) whose last terms are $P_{m_n}$, $-Q_{k_n}$, then $$ | x_n - \beta_n | \leq P_{m_n}, \ \ \ |y_n - \alpha_n | \leq Q_{k_n}. $$ Since $P_n \rightarrow 0$, $Q_n \rightarrow 0$ as $n \rightarrow \infty$, we see that $x_n \rightarrow \beta$, $y_n \rightarrow \alpha$.   Finally, it is clear that no number less than $\alpha$ or greater than $\beta$ can be a subsequential limit of the partial sums of (25).  I don't understand the last two lines of the proof (put in bold). I'm aware that this question was already asked on this forum, but I didn't understand the answers provided in this question, so that's why I'm writing my own question. Thanks in advance.


I would like to make a question. I will install Ubuntu OS along my Windows Enterprise 10 x64 bit. When I go to ubuntu.com to download the operating system I see like alternative options 2 version : 32 & 64 bit.   My computer is Fujitsu Siemens with the details shows in photo below. I like to know if the 32-bit version know 5 GB of RAM ?

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


Upon publishing a post, I'd like the post views count to be a random integer between 829 and 1013.  Could you please tell me what code I need to add to functions.php in order to achieve this?  Thank you!

I am testing a ranking system for posts, and I'd like help with the below:  Upon publishing a new post, I'd like the post view count to immediately have a random number between 829 and 1013 added to it.  Could you please tell me how I can do that? If you offer any code, kindly let me know exactly where to put it.  Thank you.


I found a lot of info about how to make my smartphone faster but I couldn't find the reason for smartphones lowliness.   I found that you should move apps to SD Card (if you have one) Don't use a lot of widgets, try not to use too much home screens. Remove apps that you don't use. Turn off animation.   And more stuff like this.  But what makes the phone become slow with time?

I did a hard-reset, wiped everything everywhere, reinstalled firmware and changed SD card. However, the phone still works extremely slowly, not as when it was bought. What can wear out in phone? Inner flash memory or something else?


I started a document like this to avoid having to write the title and author twice:  \title{The Document's Title} \author{My Name}  \hypersetup{     colorlinks,     citecolor=black,     filecolor=black,     linkcolor=blue,     urlcolor=black,     pdftitle={\@title},     pdfauthor={\@author},     bookmarks=true }   I read about using \@title to insert the document's title. However, it doesn't work. Instead, my PDF's title (the text in the window bar of the PDF viewer) is now "title".  If you want a complete document which exhibits the problem for testing, you can use this:  \documentclass{report} \usepackage{hyperref}  \title{The Document's Title} \author{My Name}  \hypersetup{     colorlinks,     citecolor=black,     filecolor=black,     linkcolor=blue,     urlcolor=black,     pdftitle={\@title},     pdfauthor={\@author},     bookmarks=true }  \begin{document} Some text. \end{document}

I once read about an option for hyperref that automatically takes the info provided via the standard \author and \title, and puts it into the pdfinfo. Now I want to implement it in my template and can't find it anywhere in the hyperref manual nor anywhere else.  Did I dream about this or can someone help me out here?  (A similar, but more general question: )


I am trying to convert a string date into a format for sql datetime.    The format is like: "20140428132222" I think this equates to YYYYMMDDTTTTTT

I have a datetime coming back from an XML file in the format:     20080916 11:02   as in      yyyymm hh:ss   How can i get the datetime.parse function to pick up on this? Ie parse it without erroring? Cheers


I've seen this on a few boards, but I don't know if it's the right thing to do. Should the case be soldered to GND?  It is the common cylindrical :

Every development board I have ever used that includes a 32.786Khz crystal has always had its can soldered directly to board.  What is the reason for this ? Is this to minimize radiated energy from the crystal during its operation (assuming that the pad its soldered to is ground) ?  If the can was not soldered to the board, what would be the effect ?  Added  If you look at this image, the crystal has 3 solder points. Two for the legs, and one for the case/shell/can (green arrow).   My question is about the reason for soldering the case/shell/can to the board.


I want to create a map with one vector layer (a state shapefile) and another vector layer/raster layer containing desired data in QGIS. When I load both the layers in QGIS, in order to obtain image I always save as JPEG (under Project -- save as image) and then edit it in paint tool of Windows by removing the unnecessary areas around the state image, by rubbing it with an eraser.   Is their a method by which this eraser practice can be skipped to save time?

I've created a GP tool using ArcGIS that creates an "area of interest" mask from selected features.  Effectively it creates a new donut polygon layer where the hole was the previously selected features.  Can I replicate this task in QGIS?  Example: For a specific map, I want to highlight a county within the state and mask the rest of the state and features outside the county with a gray, semi-transparent polygon layer above.  Conceptually I would do it similar to this.   User loads state, county, and river layer User selects county of interest Run a utility (if it exists) that exports all of the unselected features to a donut shapefile without the originally selected polygon.  If this layer mask was an "in memory" layer only available to QGIS, that would be just fine, too, maybe even better.   Does this type of tool or capability already exists within QGIS or will I have to write this as a custom function?  Here is how I did it in ArcGIS with ModelBuilder and the result I would be looking for, where the yellow layer and river layer exists statewide (all the way across the image), and the gray layer is transparent with a "donut hole", allowing the bright yellow portion to display through and draw the viewers attention the the area of interest:


I know how to remove the rows containing redundant info in one particular column but not how to save ONLY the redundant   For example:  I have the following text (kk.txt) with 3 columns:  A 3 qs    A 8 qs   A 6 st   B 3 qs   A 5 qs   C 9 st   D 2 st   C 3 st     If I apply,   awk '{if(! a[$1]){print; a[$1]++}}' kk.txt > kk2.txt   It gives me:  A 3 qs   B 3 qs   C 9 st   D 2 st   Instead, I want the opposite:  A 3 qs   A 8 qs   A 6 st   A 5 qs   C 9 st   C 3 st     Any ideas???  Many thanks


I have a problem with shortcuts after upgrading to Ubuntu 17.10, and have no idea how to debug it.   Problem is following: When I use shortcuts like Shift+Alt+Insert it behaves as Shift+Insert or Alt+Insert depending on which key was pressed first.   It's possible that is's only java problem (I have this behavior stably reproducible in CLion IDE, and unstable in others), but seems it's overall problem.   Is is some known issue, or is there any easy way to debug which presses/released events are happen?  UPD: Seams, I got the problem. Alt+Shift is set up as keyboard layout change shortcut. So, when shift is pressed, alt press changes layout and not delivered to applications, and visa versa if alt is already pressed, shift is not delivered. Is there any way to fix it?

I have Ubuntu 16.04 with GNOME shell. I set ctrl+shift for the "Modifiers-only switch to next source" option.   This shortcut conflicts with apps hot-keys. I can't use ctrl+shift+i to open devtools in Chrome, it just switches the layout. In VS code IDE if I press shortcuts with ctrl+shift (for example ctrl+shift+f), shortcuts work but always switch a keyboard layout. When I used Windows this problem didn't exist.  Can I set the ctrl+shift shortcut in such a way that it causes a switch action only after the keys are released and only if this 2 keys were pressed (without additional keys)?


Ubuntu 13.10 doesn't save my brightness settings between sessions. Everytime I boot up, the brightness is always at zero, and I always have to set it back to my preferred setting (at maximum). How can I ensure that my brightness preference will persist after reboot? I am using a HP pavilion dv4. I see where this question has been answered but no one gives step by step instructions on how to get it completed. Thank you

Ubuntu 11.10 doesn't save my brightness settings between sessions. Everytime I boot up, the brightness is always at zero, and I always have to set it back to my preferred setting (at maximum). How can I ensure that my brightness preference will persist after reboot?


Some guy in my class shut my pc down while I was working on something. I want to get him back by automatically running a file after having inserted a USB in his USB port. The computers at our school run windows 7 and are even allowed to open cmd as an administrator. Is there a relatively easy way to do that? (And I have tried shutting it down remotely, but I I just got a response saying: "Access denied (5)")

It is possible to use autorun.inf on a CD rom to make it run an exe without prompting the user but the same is not possible on a USB drive. Why? If its possible, how? On a USB drive it just prompts the user to select an action.


I've asked a question here:   I've made about 5 edits to it as I've discovered more information and added information requested by others. I feel I have now distilled the problem (EDIT 5). Should I remove all the extra information (such as previous edits that add nothing) that is now irrelevant? It will make the question more concise, more likely to be read and therefore more likely to be answered.

I often see questions edited into this form:     Lorem ipsum dolor sit amet blah blah blah paragraph paragraph original question.            UPDATE: The Lorem disappeared and left this message: "new information".   I find this format unaesthetic (since Stack Exchange posts are supposed to be useful in the long term and update boundaries are artifacts of the creation rather than the content) and feel that new information should, whenever possible, be incorporated into the original text “as if it had always been that way” if practical, and pointing out an update should be done mostly in comments.  Is this an appropriate writing style, and if so under what circumstances? If not, should it be removed or discouraged?


I remember reading a book series during elementary school that had a boy who found a magic stone that went into a belt. I think that he kept finding more of them to keep them from who/whatever the antagonist was. I do remember there being a lot of ravens. They showed up all the time when things were getting tense, and maybe they were an alternate form of the antagonist. I know he was attacked by them at least one time.  It was a series, fairly long, and something you would read around 4th-5th grade. It was written in English. This was somewhere between 15-20 years ago, and I don't think that the books were new at the time I read them.

I read this book series as a kid back in the late 1970s, so it's an old series - and my memories are similarly old, and vague.   I know it's a fantasy series. I think there are 4 books in the series. Or perhaps 7.  There's a central boy character who has to get a collection of magical objects (every fantasy needs a quest!), each of which represents a different magical 'element': wood, stone, fire, etc. I definitely remember there was a wooden object. He lives in our normal world. The whole series takes place "here & now". I have a feeling he's a "chosen" person of some kind... But, the strongest memory I have is of a symbol: a circle which is divided into quarters (a vertical bar and a horizontal bar).  I know it's vague, but does anyone recognise this?


!924 will execute that line from history. Is there a syntax where I can simply pull that line from history to the current line so I can edit it: i.e.: like using the up arrow with a built in search feature?

I use !n where (n) is the line number for executing a line in the history file I want executed at the command prompt which I find via history|less.   But there is a command line history event I wish to manually modify. How can I insert into the command line a history events contents without it actually executing so I can modify and then press return?  Best,


I have just run a lm in R and here is the output:   Coefficients:               Estimate Std. Error t value Pr(>|t|)     (Intercept) -1.182e+01  1.558e+01  -0.759   0.4482     ht           1.978e-01  1.909e-01   1.036   0.3003     educ         5.893e-02  7.564e-03   7.791 1.37e-14 *** age          4.022e-03  2.361e-03   1.704   0.0887 .   Hb           5.329e-02  1.845e-01   0.289   0.7728     I(Hb^2)      2.048e-04  6.624e-03   0.031   0.9753     I(ht^2)     -5.409e-04  5.883e-04  -0.919   0.3581    Can someone please explain to me why for this line:   I(Hb^2)      2.048e-04  6.624e-03   0.031   0.9753     I have a t value of 0.031 and this corresponds to a P value of 0.97? A t value this small is close to 0 meaning that I would expect for it to have a  probability P('less than' t) close to 50%, maybe 52%? I have made an awful drawing of my understanding here:    I think my flawed understanding has something to do with the fact that R's output gives P(>|t|)?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I'm trying to demonstrate the convergence of the following series: $$\sum \frac{\sin(1/n)}{\sqrt{n}}$$  I know I can prove the convergence by the comparison test. I started like  $$\frac{\sin(1/n)}{\sqrt{n}} \le \frac{1}{\sqrt{n}},$$  but now I'm stuck because $\frac{1}{\sqrt{n}}$ diverges. With which sequence can I compare it to be able to use the comparison test?  Can you give me a hint?

So my teacher gave a pretty tough (for me) problem in class today: Does the series $$ \sum_{n=1}^{\infty}\frac {\sin{\frac 1 n}} {\sqrt n} $$ converge or diverge?  So far I've thought of trying the Comparison Test and Ratio Test but couldn't really get anywhere. Intuitively I think it should converge, but how do I actually show this?


I have a trek 7300 multitrack hybrid bike. The tires and tubes are at least 7 years old and I would like to replace them. The rim does not have any sizing printed on it that I can see. The current tire is a WTB Slickasaurus which has marked (37/32) 700c and 700x37/32c. I understand the 700c is for tire diameter. What does the 37/32 represent?  Is the Slickasaurus a good tire for the bike, or would you recommend some others? I spend most of my time on paved roads, and occasionally a little gravel/dirt road.  edit: sorry you think this is a duplicate question. I did see the linked question before asking but it didn't seem to explain 3 numbers which is what I saw marked on my tire. Also I don't think the tire on the bike now is the original one it came with.  edit 2: here's how it looks on my tire

I tried getting a good measurement with my caliper, but the flexibility of the tire doesn't help much. Let's say I have a 26"x2.125" tire. I know this fits on an ISO 559mm bead seat diameter rim, and 26" = 660.4mm. 26":  The OD of the tire including the tread? The OD of the tire excluding the tread? When aired up or deflated? Means it fits a 559mm ISO BSD None of the above?  2.125":  Width of tread? Width of sidewall? Inflated or deflated?  Essentially, I'm converting the tire sizes to "height off rim in mm" and drawing them with a wheel in a web application, so I need to know how "tire size" translates to this measurement. I'm somewhat assuming that the fractional sizes can be converted to the same measurement, but I'm aware that they have certain differences - so any help there would be of value as well.  has been helpful, but still leaves me with the questions above.


I am currently trying to update a set of data, but I am receiving the error "Too Many SOQL Queries: 101". From what I have seen while searching around, this is normally an error that occurs while querying inside a loop, but that is not the case for what I wrote. Any ideas for why I'm getting the error?  List<object1__c> objectList = [SELECT Id, checkboxField__c FROM Interest__c WHERE Id in (SELECT Object1_Id__c FROM object2__c)];  for (object1__c a: objectList) {     a.checkboxField__c = true; } update objectList;   object2__c is a custom object that has a custom field on it called Object1_Id__c which is a lookup to to object1__c.

I am getting a Too many SOQL queries: 101 error on a trigger when I am trying to deploy another trigger.  I am posting the trigger which is causing the error.  trigger rollupAccountShowings on Account (before insert, before update) {    if (trigger.isinsert) {       for (Account a:Trigger.new){           a.No_of_Viewings__c = 0;        }    } else {      for (account a : [select                   id,                  (select id from pb__Showings__r)                  from account                   where id in:trigger.new LIMIT 1]) {           trigger.newMap.get(a.id).No_of_Viewings__c = a.pb__Showings__r.size();      } }   Can anyone correct me where I have gone wrong and suggest me the changes.  Thanks


I recently  which was rejected by the community. Edit was on question . I highlighted important keywords and function names for better readability, got approved by 2 users, however was rejected by community. Almost similar  for this question, by another user, got accepted.   I would like to know the reason for rejection so that I can improve my highlight edits moving forward.

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


This may sound silly but it's a good point. In apps such as web browsers pressing the back key only navigates the browser back to the previous page. Pressing the home key makes an app disappear, but isn't it still running in the back ground? So for apps like web browsers where pressing the back key doesn't close them how do you close them when you want to change applications and not have an unused one taking resources?  Isn't it a bit rediculous that there's no built in way in android to exit an app?

I am using Maverick application for GPS navigation. In previous versions the back button caused to quit the application. (Which is also correct behavior according to question:  ) Currently I have Maverick 1.94 Lite. When I press the back button, Maverick only hides to background. (The same as if I pressed home button). I don't see anywhere in menu an option to exit. I wish to avoid task killers, or switching of my phone in order to quit Maverick.  How do I exit from Maverick?  My phone is SK17i aka Sony Ericsson Xperia Mini pro.


An inversion in an array is a pair of indices(i,j) such that a[i]>a[j] and i < j.   Given 2 arrays A and B and we have to return number of such pairs such that a[i]>b[j] and i < j.  Example :   Let n=3 and A[]=[5,6,7] and B[]=[1,2,3] then answer is 3. 3 pairs are (5,2) , (5,3) and (6,3).  My code :   #include <stdio.h> #include <stdlib.h> int main() {     int len;     scanf("%d",&len);     int a[len];     int b[len];     for(int i = 0; i < len; i++)        scanf("%d",&a[i]);     for(int i = 0; i < len; i++)        scanf("%d",&b[i]);     int count = 0;     for (int i = 0;i < len; i++)     {         for(int j = i+1; j < len; j++)         {              if(a[i] > b[j])              {                  count++;              }          }      }      printf("%d",count); }   But this is O(N^2) solution.I need a better solution as N<=200000.I know we can count inversions in same array in O(N*Log N) time.But how this can be done for two different arrays ?

I'm designing an algorithm to do the following: Given array A[1... n], for every i < j, find all inversion pairs such that A[i] > A[j]. I'm using merge sort and copying array A to array B and then comparing the two arrays, but I'm having a difficult time seeing how I can use this to find the number of inversions. Any hints or help would be greatly appreciated.


I want to kill a specific item using a command block. If this is possible, how do I do this. Can you kill 2 specific items using a single command block. If yes, how?  I tried killing a gold ingot but it didn't work. Here is the screenshot.

I'm trying to remove a specific, named, item if it is dropped on the floor. I have the following on my command block:  kill @e[type=Item] {Item:{tag:{display:{Name:"RedFlag"}}}   But it's removing all items, not just the one I want. What am I doing wrong?  I also tried  kill @e[type=Item] {Item:{id:"red_flower",Damage:2}}   But that didn't work either, it's still removing all items, even things that aren't red flowers!


Prove by induction that for all $n \in \Bbb N$   $$\sum_{k\mathop=1}^n k = \frac{n(n+1)}2 \quad \text{and} \quad \sum_{k\mathop=1}^n k^3 = \left(\sum_{k\mathop=1}^n k\right)^2$$   I have proved the first part but can anyone show me how to solve the second part?  Thanks.

How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


Assume it is reducible, then $g(x)h(x)=x^n-x-1$ Note $g(0),h(0),g(1),h(1)=\pm1$ Then I am stuck.

I want to prove that     $p(x):=x^n-x-1 \in \mathbb Q[x]$ for $n\ge 2$ is irreducible.   My attempt.   GCD of coefficients is $1$, $\mathbb Q$ is the field of fractions of $\mathbb Z$, and $\mathbb Z$ is UFD. Hence, $p(x)$ is irreducible over $\mathbb Q$ iff it's irreducible over $\mathbb Z$ (Gauss's lemma). Let $m\in \mathbb Z$ such that $\varphi(m)=n$ (Euler's totient). Make reduction of $p(x)$ by modulo $m$. Because of $\overline{x^n}=\overline{x^{\varphi(m)}}=\overline{1}$, we get $\overline{p(x)}=\overline{1-x-1}=\overline{-x}$, which is irreducible. Hence, $p(x)$ is irreducible.   Does this proof is correct?  UPDATE. Thanks to Calvin Lin. My mistake is: not for all $n$ we can find such $m$. OK, but as for the rest, does my proof is correct for such $n$, that $n=\varphi(m)$ for an integer $m$? And can it be some changed for all $n$, i.e. can we find such modulo that $\overline{p(x)}$ is irreducible for every $n\ge 2$?


Suppose $V$ is a vector space over a field $F$.  Let $v \in V\setminus \{0\}$ and $\lambda \in F$.  Does $\lambda v= 0$ imply $\lambda = 0$?

Does $\lambda \mathbf u = 0$  imply $\lambda = 0 $ or $\mathbf u= 0$ where $\mathbf u$ is in a vector space $V$ over a field $F$.   The case for the vector equalling zero is trivial due to the fact field axioms include a multiplicative inverse, so how could I show lambda is 0?


I'm right-clicking the minecraft.jar file and going under the Properties tab and there is no checkbox that allows the file to be executable.   Neither the Open With nor command options are working either. Any ideas?

I know that to execute a file, I use the . command, then the file name with a space between them. But I'm trying to execute a .jar file using the . and it does not work. I went into the properties and marked it as executable and made it run with Java.   Is there a way to execute a file with Java in the Bash Terminal?    I am trying to execute the Minecraft.jar file.


I cannot figure out how the blender unit is working. The width and height of the plane does not correlate with the displayed units. How is this possible ? Here is a screenshot of my work.

I just found out about the Mesh Display : Length feature in the "N" panel (thanks to ) that allows one to measure the length of a face or vertice.  But my first encounter with this tool gives me complex feelings of love and hate, see how, as I was trying to measure the aspect ratio of this TV screen, I am getting WIDTH = 20.33 and HEIGHT = 37.57.  These values seem awfully wrong, since my betrusted eyes tell me the height should be shorter than the width.    I have tried measuring the single vertices as well, to identical results.


I am trying to know the assumptions of linear regression (LR). I understand linear regression needs the relationship between the independent and dependent variables to be linear, but LR also assumes the input residuals to be normally distributed. Please help me understand this.

In linear regression, each predicted value is assumed to have been picked from a normal distribution of possible values. See below.  But why is each predicted value assumed to have come from a normal distribution? How does linear regression use this assumption? What if possible values are not normally distributed?


How to reproduce:   Search by tags. Select arbitrary tag. Select arbitrary question Go back (either navigation button or phone button)  Expected: get back to tag search results (questions list). Actual behavior: getting back to tags.   Nexus 5  Android 6.0.1  App version 1.0.83

This looks a little bit like a variation on  but specific to the tags view.  Reproduction (app version 1.0.71):   Select any site (say Meta) from the sidebar Switch to the tags view using the top bar Choose a tag, any tag ( is nice)   optionaly refine your search with more terms  Go to any question found, go back   you end on the unfiltered tags view  Go back again   lucky you, your search is here


i think its printing the code from memory and not the actual array. the reason i coded it this way is everything has to be in a method. when i run it prints char instead of integers. that why i figure its from memory.  enter code here  import java.util.Random; import java.util.Scanner;   public class ArrayDemo {     public static void main(String[] args) {     int[] numbers1 = readInputs(5);     int[] numbers2 = createNumbers(5);     System.out.println("System Generate Array");     printArray1(numbers1);     System.out.println("User Input Array");     printArray2(numbers2); } public static int[] createNumbers(int numberOfOutputs) {     Random generator = new Random();     int Low = 1;     int High = 25;     int[] outputs = new int[numberOfOutputs];     for (int i = 0; i < outputs.length; i++)     {                                                    outputs[i] = generator.nextInt(High - Low) + Low;     }     return outputs; }     public static int[] readInputs(int numberOfInputs) {   System.out.println("Enter " + numberOfInputs + " numbers: ");   Scanner in = new Scanner(System.in);   int[] inputs = new int[numberOfInputs];   for (int i = 0; i < inputs.length; i++)   {      inputs[i] = in.nextInt();   }   return inputs; } public static void printArray1(int[] list1) {    System.out.println(list1 + " "); } public static void printArray2(int[] list2) {     System.out.println(list2 + " "); } }

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


Question : If $p$ is prime, and $0< k< p$ show that $ p \mid {p \choose k}$  ${p \choose k}$ can be rewritten as:  $${p(p-1)(p-2)\dots(p-(k-1))(p-k)! \over (p-k)!\cdot k(k-1)(k-2)\dots3\cdot2\cdot1}$$  Now the $(p-k)!$ cancels out. Since in the numerator we have k consecutive  integers, k divides one of them (not p as p is prime and $k <p$). Then k-1 divides another one or two terms in the k consecutive terms (again not p). This reasoning continues until  3 and 2.   This means that ${p \choose k}$ can be rewritten as pq implying $p | {p \choose k}$  What if any of this proof is wrong. I am worried about any 'overlaps', i.e. say k-6 divides terms that k-3 divides invalidating the argument.  P.S. I hope the above is legible as I am new to this site. Thank you!

Prove if $p$ is a prime then $p \mid \binom pk$ for $k\in\{1,\ldots,p-1\}$  I don't really know where to begin with this one.   I can see that I have to use the fact that $p$ is prime somewhere - the same is not true for composite numbers, for example $4\nmid 6=\binom42$.  I have checked that this is true for the first few primes:    $3$ divides $\binom 31=\binom32=3$ $5$ divides both $\binom 51=\binom 54=5$ and $\binom 52=\binom 53=10$ $7$ divides $\binom71=\binom76=7$, $\binom72=\binom75=21$ and $\binom73=\binom74=35$.


Can someone tell me whether my solution is okay? I based it off a proof for a more general theorem about cyclic groups and generators.     Prove that the generators of $\mathbb{Z}_n$ are the integers $r$ such that $0\leq r <n$ and $\gcd(r,n)=1$.   Let $\mathbb{Z}_{n}=\langle 1 \rangle$. Since $0\leq r <n$, $\langle r\rangle \subset \langle 1 \rangle$. Then let $\mathbb{Z}_n=\langle r \rangle$ and assume that $d=\gcd(r,n)>1$. Then there exist integers $t$ and $s$ such that $r=td$ and $n=sd$. Then $rs=tds=tn=1$ (since $|\mathbb{Z}_n|=|\langle 1 \rangle|=n$). Then $|\langle r\rangle|\leq s<n$. This forms a contradiction (if $|\mathbb{Z}_n|=n$ and $\mathbb{Z}_{n}=\langle r \rangle$ with $|\langle r\rangle|<n$, then $|\mathbb{Z}_n|\neq n$) by assuming that $\gcd(r,n)>1$.

A cyclic group is a group that is generated by a single element.  That means that there exists an element $g$, say, such that every other element of the group can be written as a power of $g$.  This element $g$ is the generator of the group.  Is that a correct explanation for what a cyclic group and a generator are? How can we find the generator of a cyclic group and how can we say how many generators should there be?


Is there a general method for trying to finding parametric equations for polynomial equations?  The classic example of $x^2 + y^2 = 1$ having multiple parameterizations:  \begin{array}{rcl} (x,y) &=& (\sin t, \cos t) \\ (x,y) &=& (\cos t, \sin t) \\ (x,y) &=& \left(\frac{1-t^2}{1+t^2}, \frac{2t}{1+t^2}\right) \end{array}  which are easily seen to work by plugging in. Note that the first two involve elementary functions, but the last one only rational functions.  I'm curious about higher degree polynomials. Is there a general method to find a parameterized set of equations in rational functions? That is, is there an algorithm for extracting the parameter functions for $x$ and $y$ from the equation (or arbitrary sets of equations over $v\ge1$)? And if not, is there a characterization of which implicit sets can be parametrized?  Take the (random off the top of my head) example:  $$x y^3 + x^2 y + x y = 1$$  Is there a set $x(t), y(t)$ for this that can be found algorithmically? (I may well be naive here, not realizing something obvious, or maybe the entire field of algebraic geometry is geared towards possible solutions to this).   One can do the reverse process of creating an implicit set of equations via Gröbner basis calculation, trying to eliminate $t$. Or likewise in the forward direction if you can eliminate variables one-by-one with GB that would suffice to parameterize via one of the original variables. But in general if elimination isn't possible, is there still an algorithm to (even partially) parameterize?

We all know some curves can be described by $y=f(x)$ and some surfaces can be described by $z=f(x,y)$ However, there exists curves and surfaces which cannot be described by those, such as a circle and a sphere. Therefore, we introduce parameterized vector equations, which can describe them. For example, circle: $\vec r(t)=r\cos(t)\hat i+r\sin(t)\hat j$ sphere: $\vec r(u,v)=\rho\cos(u)\sin(v)\hat i+\rho\sin(u)\sin(v)\hat j+\rho\cos(v)\hat k$ However, all curves described by $y=f(x)$ and  $z=f(x,y)$ can be parameterized. For curves, $$\vec r(t)=t\hat i+f(t)\hat j$$ For surfaces, $$\vec r(u,v)=u\hat i+v\hat j+f(u,v)\hat k$$ Therefore, I think this suggests the set of all parameterized surfaces (or curves) is the super-set of the set of all surfaces (or curves) described by $z=f(x,y)$ (or $y=f(x)$). Is that correct? Now, here comes the the real challenge. A curve can also be described by an implicit function $f(x,y)=0$ and a surface can also be described by an implicit function $f(x,y,z)=0$ I have 3 questions regarding this.   Can all surfaces (curves) described by an implicit function be parameterized? (If yes, then what is the general way?) Can all surfaces (curves) described by parametric vector equations be represented using implicit function? (If yes, then what is the general way?) Compare the set of all parameterized surfaces (curves) and the set of all surfaces (curves) represented by implicit function. (which is which super-set?)   Sorry for the use of nontechnical terms. I use them because I don't know the technical ones. I have only started learning vector calculus last year in university.  EDIT: I think my question is not too clear, so I will give an example of writing the surface $f(x,y,z)=0$ into $\vec r(u,v)$ We want to parameterize a sphere. $$x^2+y^2+z^2-\rho^2=0$$ Let $x=\rho\cos(u)\sin(v)$, $y=\rho\sin(u)\sin(v)$, $z=\rho\cos(v)$, $$\rho^2\cos^2(u)\sin^2(v)+\rho^2\sin^2(u)\sin^2(v)+\rho^2\cos^2(v)-\rho^2$$ $$=\rho^2\sin^2(v)(\cos^2(u)+\sin^2(u))+\rho^2\cos^2(v)-\rho^2=\rho^2-\rho^2=0$$ I want to know if there is a general way of finding $x=x(u,v)$, $y=y(u,v)$ and $z=z(u,v)$ for any given $f(x,y,z)=0$


I drove to Westminster Bridge Road last Wednesday around 6.45 pm. Now different people have different statements to offer. How do I know if I need to pay any fees? Help.

I drove through London last week. Mostly on the the A406. I only briefly saw an announcement about the congestion fee, when entering london on the M11. I didn't see any camera or any other signs on the road, that I actually entered the zone where I would need to pay a congestion fee. The question is, how do I see that I am entering a congestion fee area and is there a way to find out as a non resident (ie. no british license plates) if I have a bill running in the UK now?


Selecting an item from a large number of items is a very well-solved problem. However, there doesn't appear to be a good solution for selecting large numbers of items, ie. when the user needs to select 100+ items from a list of thousands. Note that there's no real way to reduce the number of selectable items - all those items need to be available to select at once.  My best approach solution so far is a list of checkboxes with a search field and "select all" and "un-select all" buttons. It seems like it'd work, but it feels clumsy and I'd love to know if anyone's got a better solution.         – Wireframes created with

One of our clients wants us to build a web application to share information about the magazines he publishes. Each edition of a magazine contains a variable amount of advertisers. These advertisers come from a central pool of advertisers. This pool contains (at the moment) about 150 advertisers. Each edition of a magazine contains a subset (about 70-80) of these advertisers.  Our client wants us to come up with a way for him to add 70-80 advertisers from this list of 150 to an edition of a magazine. It needs to be as fast as possible, as easy as possible and as intuitive as possible.  What would be an ideal solution here? I was thinking about something in the lines of the image below.   List of available advertisers. List of selected advertisers. Advertisers have a delete button. Textbox with auto-suggest for advertisers in the list on the left. <Enter> removes the advertiser from the left list and adds it to the right one. Textbox gets cleared and remains focus.   My colleagues suggested drag-and-drop or just one list with a checkbox for each advertiser, but those approaches force the user to do a lot of searching and clicking. With my approach the user can just keep on typing.  Any other suggestions for this situation?


Some class and race features allow a character to "count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift." (Eberron warforged Juggernaut) or "Your carrying capacity (including maximum load and maximum lift) is doubled, and you have advantage on Strength checks made to push, pull, lift, or break objects." (barbarian path of the totem bear)  Would these characters be able to wield a two-handed weapon (eg maul) with one hand? Alternatively, can a larger version of a one-handed weapon be used to give more damage? This seems to work for the "enlarge" spell, so could it work through non-magical means?

With the new Elemental Evil Player's Companion released awhile ago, Goliaths were added to 5e. I'm unfamiliar with 3.5 and previous editions, but I know that they were included and wielding large weapons was a thing you could potentially do. Goliaths in 5e have the same trait as in 3.5e, it seems:  Powerful Build. You count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift.  So, does this mean a Goliath can wield large-sized weapons? The pushing/dragging/lifting capacity for a strong Goliath (say 16 Str) would be nearly 1000 lbs (16 * 60) and the carrying capacity half of that. A heavy weapon weighs between 10-20 lbs, but this IS significant weight to be throwing around in battle, but I am unsure of the weight of a large weapon. My DM and I are unsure of the mechanics if a Goliath could. We talked about doing an extra die roll for damage, which is extremely strong, or treating the Goliath as if he were under the Enlarged Creature spell, which gives a +4 to damage, which seems more balanced in our opinions. Are there rules for wielding large weapons in 5e? Can a Goliath wield large weapons out of the box with no feats?


I format the pen drive in Windows as exfat, but Ubuntu can't mount it.  Which format do I have to use for Ubuntu?

When trying to mount an exfat filesystem, I get the following error:  Error mounting /dev/sda6 at /media/gkp/Backup: Command-line  `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" "/media/gkp/Backup"'  exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'   Exfat is used on some USB sticks and camera sd cards. What can I do to mount this type of filesystem?


Is there a way to change the size of evenly extruded polygons AFTER performing Extrude/Inset?  It can be very helpful in modeling to be able to work with sets of geometry and yet retain control over the individual elements as if they were being worked on one at a time.  I have tried to use various Pivot settings in combination with Scale but do not have the control over sets of selected faces that will allow me to shape the model the way I'd like to do for mechanical/architectural models.  Step 1: Inset several faces.  This works fine.    Given that the four interior faces are selected;  How can I re-size them in relation to one another without them scaling towards each other with a bias they normally would not have if I were working on them individually?  Step 2: Batch Scale the selected Faces.  Now everything is disproportional.    I have tried changing the Pivot for the Scaling operation but could not get the symmetrical results I was hoping to acheive.

I would like to know if it is possible to perform operations (extrude and scale mainly) to individual faces as opposed to groups of faces.  Currently when I select these faces...    And extrude, I get this:    I would like to know how to get this:    Setting the pivot point to Individual Origins doesn't work either for contiguous selections of faces.      I often need to do this kind of extrude+scale to lots of faces at a time, so it is simply not efficient (bordering on impossible) to do them one at a time as I did for the example.


How can I round up different type of currencies with using jquery? What I'm trying to do is;  10.30 → 10 //Below .5 will round down 10.60 → 11 //After .5 will round up 849.95 → 850 1,022.20 → 1022

I'd like to convert a float to a whole number in JavaScript. Actually, I'd like to know how to do BOTH of the standard conversions: by truncating and by rounding. And efficiently, not via converting to a string and parsing.


Here is a simple flower bud with a colour pattern using noise and a gradient texture.  Now I want to add two textures, a wave pattern for the petals and a noise pattern for the stem. I have used a gradient into a colour ramp as a kind of mask. The texture settings are set high here just so it's easy to see. Each bump node I have run into the normal input on a diffuse shader (I think the problem is here). Because when I then mix it with the base colour pattern I'm getting the colour data from the diffuse nodes blending with the base colour pattern in the first image.   How can I add these two texture/bump nodes and fade between them in a way that doesn't interfere with the base colour pattern I want to use? EDIT: This question was closed as a duplicate, but the linked question is a different issue. I was able to solve this problem by dragging the colour output from the colour ramp node for the pattern into the diffuse bsdf nodes for each texture. It feels like a messy set-up to me, I think this could be done more elegantly.

I'm trying to add a bump map with logo to noise texture Bump map.  I have a bump map created with Noise texture and then on top of that I want to add my bump logo (which also has it's own color on it.)   Is it possible within one material?


I have a script, which starts the execution of multiple C++-programs. I have to execute those with sudo, as they use some "restricted" linux libs/files(probably not the right nomenclature, but you get what i mean). Now i would like to write a shell-script which calls those binaries one after the other, but i do not know how to do this:  #!/bin/bash ./main a > out/output2DFloat.csv  ./main a a > out/output3DFloat.csv  ./main a a a > out/output2DDouble.csv  ./main a a a a > out/output3DDouble.csv   and call this with sudo? Or append Sudo before each and call it with sudo...  My fear is, that the sudo timer runs out, before even one is finished, which would lead to big problems, if the next ones then need sudo-rights ...

To do a patch manually I must type this command   sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql     There is a space just before the 09:   sudo ./playback_delete_data_patch.sh [space] 09_delete_old_data_p.sql   How can I run this inside a script?  There are also several other commands but this one is giving trouble.


I am working with AT89S51 microcontroller and using keil to write program in C. It produced a hex file of size about 4875 bytes but flash memory on the microcontroller is only 4kbytes.  I programmed the flash successfully and the program is also working fine.  I am glad its working but I want to know why is it working since there is no enough space on flash to program my code on the microcontroller.  Let me know if you need any additional info.

I have a hex file with a size of 42 kB.  Does the size matter while loading it in a microcontroller?  Can I load 42 kB hex file in a ATMEGA32 chip which has a memory of 32 kB?


I probably did something that I was not supposed to do and now I ran into some kind of problem. I deleted two old user accounts from my Mac inside System Preferences to get some space back. However the space did not become more so I checked the hard drive and found the two user folders still being there. So I deleted both manually, which was probably not the best idea. They went to the Trash. However when trying to clear my Trash, the following error occurs:  The operation can't be completed because some items had to be skipped. For each item, choose File > Get Info, make sure "Locked" is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again.  Next I tried to delete the two folders via Terminal using this command: sudo rm -rf ~/.Trash/ This did not work either, I got the following error: Operation not permitted Does anyone have any idea how to solve this problem. Thanks for your help in advance.

I had an old user account on this machine that I no longer needed and was taking up a lot of space. I removed it by going to System Preferences > Users & Groups and deleting the user. It took a while, but it seemed to work and the user disappeared from the list.  However, I didn't seem to reclaim any disk space, which I thought was odd. So I checked and the deleted user's folder was still present in /Users.  Since the user was no longer listed in Users & Groups, I tried just manually deleting the user folder from the Finder and then emptying the trash. This worked up until it hit file 103,556, at which point it seemed to get stuck. I let it run overnight for 8+ hours and when I came back to it this morning, it was still sitting at 103,556.  I couldn't cancel the delete operation or anything, so I force-restarted the computer and tried emptying the trash again. Again, it counted up to the same file and then stopped.  Is there any way I can force-empty the trash to get rid of this user account?


I was looking at some python2 code that looks something like this:  def foo(self):     pass  foo.boolean = 'WTH'   and this code seems to be syntactically correct.  But what purpose does it serve?

Not many are aware of this feature, but Python's functions (and methods) can have . Behold:  >>> def foo(x): ...     pass ...      >>> foo.score = 10 >>> dir(foo) ['__call__', '__class__', '__delattr__', '__dict__', '__doc__', '__get__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'func_closure', 'func_code', 'func_defaults', 'func_dict', 'func_doc', 'func_globals', 'func_name', 'score'] >>> foo.score 10 >>> foo.score += 1 >>> foo.score 11   What are the possible uses and abuses of this feature in Python ? One good use I'm aware of is 's usage of the docstring to associate a syntax rule with a method. But what about custom attributes ? Are there good reasons to use them ?


What are these dots and how can I remove them?    I am using version 2.79b.

How can I get rid of those little white dots? I am using Blender 2.70a.


Suppose $(X,S,\mu)$ is a measure space such that $\mu(X)<\infty$. Prove that if $\mathcal{A}$ is a set of disjoint sets in $S$ such that $\mu(A)>0$ for every $A \in \mathcal{A}$, then $\mathcal{A}$ is a countable set.

Let $\mathcal A$ be a collection of pairwise disjoint subsets of a $\sigma$-finite measure space, and suppose each set in $\mathcal A$ has strictly positive measure. Show that $\mathcal A$ is at most countable.  I have no clue about this one. Any hints would be appreciated.


Recently I was going through some old papers and ran across  some paperwork of my mothers, that I had never seen before. Much to my surprise their was a stack of checks that had never been cashed for reimbursement for medical services made out to my mother, dating back to 1993. One was for more than $1000.00. I am the executor of my mother's estate, and I wonder if I have any recourse for perhaps cashing these checks.

I found an old un-cashed check dated 1994 for $487 from my Xerox Retirement plan with no expiration date. Can I still cash it?


I am looking for help proving this proposition:  "If $Z$ is a standard normal random variable and $g(z)$ is differentiable, then $\mathbb{E}[g'(Z)]=\mathbb{E}[Zg(Z)]$"  I have tried evaluating $\mathbb{E}[g'(Z)]$ using integration by parts as follows. $$\mathbb{E}[g'(z)]=\int_{-\infty}^\infty{g'(z)}\frac{1}{\sqrt{2\pi}}e^{-\frac{z^2}{2}}dz=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty{g'(z)}e^{-\frac{z^2}{2}}dz$$ Let $u=e^{-\frac{z^2}{2}}$ and $dv=g'(z)dz$. Now, $$\frac{1}{\sqrt{2\pi}}e^{-\frac{z^2}{2}}g(z)\Big|_{-\infty}^{\infty}+\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}zg(z)e^{-\frac{z^2}{2}}dz$$ Interestingly the second half of this equation is equal to $\mathbb{E}[Zg(Z)]$. I am not sure how to show that the first half of the above equation equals zero and is thus equal to $\mathbb{E}[Zg(Z)]$. I am also not sure how to evaluate $\mathbb{E}[Zg(Z)]$ as to yield the same equation, so it seems I have hit a dead end. I would like some help finishing this proof. Preferably, I want to know the simplest method.

(Apologies if I break some conventions, this is my first time posting!)  I am working on proving Stein's characterization of the Normal distribution: for Z $\sim N(0,1)$ and some differentiable function $f$ with $E[|f'(Z)|] < \infty$, $$E[Zf(Z)] = E[f'(Z)]$$ Writing the LHS expression in integral form and integrating by parts, I eventually obtain: $$E[Zf(Z)] = \frac{1}{\sqrt{2\pi}} \left[ -f(z) \cdot \exp \left\{ \frac{-z^2}{2} \right\} \right] \Bigg|_{-\infty}^{\infty} + E[f'(Z)]$$ Now I need to show that the first expression on the right hand size is zero. Intuitively, this seems clear because of the exponential term, but I am having trouble explicitly applying the condition on $f'$ to prove this rigorously. Any ideas?


I do know that some utilities can create a persistent Ubuntu on a USB drive, but as far as I know these installations never update the kernel and driver installations are not possible.  So the question is: is it possible to have a full fledged, updating Ubuntu installation running on a USB drive? Creating this installation would happen from a Windows 10 UEFI computer.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


While I was rolling to attack for my Warlock's Eldritch Blast, I said I don't think it gets my Spell Attack Bonus because I didn't see it say such anywhere, and the DM (also new to D&D) agreed, said it sounded correct as cantrips don't get the bonus. As I have been reading however it seems that they do get the bonus to attack rolls, it just certainly doesn't carry over to damage save rare exceptions. Can anyone verify this to me? And if so, show a source so I could let my DM know?

So I know how to calculate spell DC (8 + proficiency + modifier) and spell attack rolls (1d20 + proficiency + modifier), but I am not clear on spell damage.   Namely, do you add your spell modifier (e.g. int for wizards) to spell damage?   For example, burning hands does 3d6 fire damage or half as much if the opponent succeeds on a dex save.  If you have a Wizard with 16 Int casting it with a 1st-level spell slot, does the spell do 3d6 (or half) damage, or 3d6+3?


I recently answered this question on Code Review: . The question is about determining whether an array of arbitrary dimension contains a specific element. Based on this statement found in :  Array types are reference types derived from the abstract base type Array. Since this type implements IEnumerable and IEnumerable<T>, you can use foreach iteration on all arrays in C#.  and given the declaration int[,,,] array4, I first gave the answer: bool result = array4.Any(x => x == 1);  However, according to a comment of @JimmyHu, the compiler generates a:  Error  CS1061  'int[,,,]' does not contain a definition for 'Any' and no accessible extension method 'Any' accepting a first argument of type 'int[,,,]' could be found (are you missing a using directive or an assembly reference?)  Apparently, the correct answer must be: bool result = array4.Cast<int>().Any(x => x == 1);  This other attempt bool result2 = ((IEnumerable<int>)array4).Any(x => x == 1);  does not work either and yields:  Error  CS0030  Cannot convert type 'int[,,,]' to 'System.Collections.Generic.IEnumerable<T>'  Question: is the C# Programming Guide wrong on this point or I am missing something. Do arrays derive from Array which implement the generic interface or not?

I have just noticed that a multidimensional array in C# does not implement IEnumerable<T>, while it does implement IEnumerable. For single-dimensional arrays, both IEnumerable<T> and IEnumerable are implemented.  Why this difference? If a multi-dimensional array is IEnumerable, surely it should also implement the generic version? I noticed this because I tried to use an extension method on a multidimensional array, which fails unless you use Cast<T> or similar; so I can definitely see the an argument for making multidimensional arrays implement IEnumerable<T>.  To clarify my question in code, I would expect the following code to print true four times, while it actually prints true, false, true, true:  int[] singleDimensionArray = new int[10]; int[,] multiDimensional = new int[10, 10];  Debug.WriteLine(singleDimensionArray is IEnumerable<int>); Debug.WriteLine(multiDimensional is IEnumerable<int>); Debug.WriteLine(singleDimensionArray is IEnumerable); Debug.WriteLine(multiDimensional is IEnumerable);


I want to take regular backups of my web development project files but would like to ignore not so important files like images, vendor files, etc. There is a way to exclude folders but how to exclude by file type?

My Déjà Dup backups have become quiet large and I noticed they contain a huge number of unnecessary files (e.g. *.pyc files, **__pycache__ folders and other build related temporary stuff).   I know that I can ignore specific folders, but is there a way to exclude files and or folders by patterns?  I thought there might be more options usable trough a configuration file, but Déjà Dup doesn't use one. So I looked at duplicity (the CLI it is based on), but the man page doesn't mention a configuration file either. I know that duplicity can ignore files and folders based on patterns (--exclude, --exclude-filelist), but I have no idea how to combine this with Déjà Dup.  Do I have to ditch Déjà Dup and use duplicity manually? Or is there a way to set the needed options, so that they are used automatically, when duplicity is used by Déjà Dup?


Often I'm on MSE via my iPhone, where the math in comments only was shown as code, but in posts it was "compiled" normally so I didn't bother too much. But suddenly a few weeks ago, the math was shown only in code even in the posts, which makes rather difficult to read them. What is going on? Is this problem known, do you have this problem too? How to fix it? I'm not sure if this is the right side to post this question, thanks for indicating if you think I should post it elsewhere.

The MathJax code in Mathematics Stack Exchange doesn't render after I updated to the new version (It used to):     App Version: 1.6.2.5 Device: iPhone 6s OS Version: Version 9.0 (Build 13A342)


I know this is a very serious place to put this basic question. But I didn't find an explanation for the same.   I know that $ab/ab=b^2$ for all reals with $a\neq0$. But some of my students believe that answer is 1. I know this is only a convenion, but what is the reason for take such convenion in order of operations like "$ab/ba$ means $a*b*a^{-1}*b$" and it does not $ab/ab$ mean $a*b*a^{-1}*b^{-1}$"? Is there a really mathematical reason? That is: if "$ab/ab$ means $a*b*a^{-1}*b^{-1}$", is there a type of contradiction to some law?

I've been in a lengthy discussion today about how to interpret the division symbol. There seem to be two views on what it means.  • Everything on the left hand symbol is divided by everything on the right hand of the symbol. or  • The operator only deals with the term to its immediate left and right.  Which is correct? I tried to find a specific definition for the usage of the division operator but I couldn't find it.


Following expression was asked to be evaluated in TIFR GS 2015 exam,   $$G = \lim_{n\to\infty}(n+1)\int_{0}^{1} x^{n} f(x) dx$$  where $x \in [0, 1]$ and $f(x)$ be any real valued continuous function.  I have tried using Integration by parts technique but I am not able to solve the integral. I would like to know if any other approach should be used for solving this problem.  P.S. : As per answer key, $G = f(1)$.

I need help to prove this in real analysis. I think it uses IMVT, but not sure how to do it.     Let $f(x)$ be a real valued continuous function on $[0,1]$. Show that   $$ \lim \limits_{n\to\infty}(n+1)\int_{0}^{1}x^nf(x)dx=f(1) $$


I'm using angular js views and routing to load different HTML inside a div. But when i change an partial html and reload it stil shows up the cached version.  According to my reasearch this is not due to angular js template caching, cause on load of html i tried to get the cached HTML like this $templateCache.get('loadedPage.html') and the result was undefined so its not angular js that is caching the html.  then when i saw in chrome i could find my html cached . i tried with following  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/> <META HTTP-EQUIV="Pragma" CONTENT="no-cache">     <meta http-equiv="Cache-Control" content="no-store" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" />   but still i could see browser caching the html.  any other way of doing it ?

Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner.  For security reasons we do not want certain pages in our application to be cached, ever, by the web browser. This must work for at least the following browsers:   Internet Explorer 6+ Firefox 1.5+ Safari 3+ Opera 9+ Chrome   Our requirement came from a security test. After logging out from our website you could press the back button and view cached pages.


I'm trying to replace some text in a string using regExp g Modifier. Only i found that this will not work with variables...   So what i want is this:  var toReplace = 'something'; var replaceIn = 'replace something, where something is something';  var result = replaceIn.replace(/toReplace/g, "something new");   In this case the variable toReplace is being ignored because it is in the //g.  Does anyone know a way around this? Thanks in advance!

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


When I try to play Minecraft offline it says Updating Minecraft... and then I get a black screen. No error is displayed. I am using the Minecraft laucher jar file. Are there any packages I need to download in order to play Minecraft?

How to correctly install Minecraft, including setting any needed packages or apps to install it and to troubleshoot the most common problems that Ubuntu users face when trying to use Minecraft.  I am trying to install and run Minecraft without first having to install the Oracle version of Java. I want to use the OpenJDK version that comes with Ubuntu and as a last resort, use the Oracle one.  I also want to know a list of problems related to Minecraft in Ubuntu and the possible solutions to them.  A step by step guide on how to install Minecraft would also help.


I am new to Ubuntu and I do not know which version of Ubuntu should I prefer.

This question is here just to avoid you choosing the wrong Ubuntu version number.  So, this is not about:     nor about   nor   nor   nor   nor .   So in the answer below a simple guide as to what Ubuntu version is good for you, independent of future releases!


Let's run cat and then type a then ^D - you will see that cat did not exit.  Compare it with cat + a + Enter + ^D - now cat did exit.  So, why two ^D presses are necessary to exit cat in the first case and only one ^D in second case?

If I do   $ cat > file.txt      textCtrl-DCtrl-D   Question 1: If I don't press enter, why do I have to press Ctrl-D twice?  If I do  $ cat > file.txt      pa bam pshhhCtrl-Z   [2]+  Stopped         cat > file.txt $ cat file.txt $ cat > file.txt      pa bam pshhh      Ctrl-Z   [2]+  Stopped         cat > file.txt $ cat file.txt pa bam pshhh   Why is the second time the file with 1 line?


I ahve a form to let people upload files. Here is the code below. Of course I oversimplified it and removed divs, labels, submit button, uneeded structural and layout code, etc.  <form id="uploadForm" action="" method="post" enctype="multipart/form-data"> <input required type="text" id="name" name="name"  /> <input required type="file" name="file" id="file" /> <input required type="password" name="password" id="password"  /> </form>   Each time I submit the form, Firefox and chrome, among others, systematically ask me if I want to remember this login/password for future use.  The problem is that this form has nothing to do with login. The name field is a file name, and the file may be password-protected (it has to be decrypted on the server), hance the password field. So, it's totally useless and even quite annoying when the browser asks me if I want to remember something.  IN the code above, I tried to use autocomplete=off, it doesn't change anything. Some other posts recommand using autocomplete=anything_else_than_off, but it doesn't work either. After a few more search, it seems that autocomplete is in fact now totally ignored by most recent browsers, including IE11.  How can I prevent the browser form asking "would you like to save ..." in such a case, when the form has nothing to do with login ? If possible, a solution compatible with firefox, chrome, safari, edge and IE11.  Thank you for your answers

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don't get me wrong, I'm all for doing everything possible to protect people's personal information (health, financial, surfing habits, etc.), but sometimes people get a little too jumpy.  Case in point: One of our state customers recently found out that the browser provides the handy feature to save your password. We all know that it has been there for a while and is completely optional and is up to the end user to decide whether or not it is a smart decision to use or not. However, there is a bit of an uproar at the moment and we are being demanded to find a way to disable that functionality for our site.  Question: Is there a way for a site to tell the browser not to offer to remember passwords? I've been around web development a long time but don't know that I have come across that before.  Any help is appreciated.


I wrote a paper (P1) which went through peer review and got published. The paper introduced a new graphical user interface (GUI) primitive. I then wrote P2, which extends P1, turning it into a new class of UI, which had no analogs at the time of writing (and maybe still doesn't, but the window of opportunity is shrinking). P2 is not just a thin layer on top of P1, it comes with substantial enhancements that are the result of our "lessons learned from P1" analysis + new ideas. P2 stands on its own, and it refers to P1 as if it were written by other people, per conference requirements. P2 also provides a short intro about P1, such that someone unfamiliar with P1 can still get the picture. It also provides comparisons to analogs of P1, explaining how our approach differs and arguing that our approach is better. The set of P1 analogs consists of ~5 papers. One is a preprint, 3 are just providing their designs but not including any usability evaluation details at all, or deferring that to future work. This leaves us with one good alternative, which we were not aware of at the time work on P2 started. However, we did refer to this alternative in our related work section and compared it to our own product (there are some ideological differences in our approaches). P2 explains that we chose to base our work on P1, because at the time of writing P1 was the only artifact of its kind that has gone through formal usability tests and provides detailed results of their evaluation process. Of course, the fundamental underlying reason is that P2 is the continuation of our previous work on P1. P2 has been submitted for peer review, and a reviewer rejected it, one of the reasons being "it only considers one paper [referring to P1] containing a very similar design". What is the right way to explain why P2 is built on top of P1 without compromising anonymity? p.s. note that the reviewer in question seems to have forgotten about the section where we compare P1 to alternatives. It could be that that section is not convincing enough, not well-written - but in that case the reviewer would have said "it is not convincing enough" rather than "only considers one paper". The review is otherwise thorough, I cannot say that I have the impression the reviewer hasn't read the paper fully.

Need to publish results of one my research in a journal. Springer’s manuscript guidelines prompt me to make a blinded manuscript containing no author information, but links in the References section ( and to my images published with explicitly advertized authorship) quickly reveal who the author is.  Should the author  formally obey the blindness rule and ignore its silliness in the conditions given,  or replace such references (at least for the peer-review time) with some stuff included directly,  or what?  Would it be acceptable to hold the paper/preprint accessible by URL (especially with links from third-party sites) during expected peer review?


I'm trying to derive the MLE and Bayesian posterior for $n$ in the Binomial model, $\mathrm{Binomial}(n, p)$ with known $y$ and $p$. The following questions arise  How to derive analytically the negative log-likelihood (and its first-order conditions)?  What is an uninformative prior for $n$ in this case (e.g., for $p$ one can use a $\mathrm{Uniform}(0, 1)$)?  Is there a conjugate prior for $n$?  What if the prior on $n$ is improper, i.e. discrete prior on $\{y_{max}, \mathbb{N}\} \subset \mathbb{N}$? Is there a proper solution?   I tried to look around to found references but I was able to find rather technical papers that do not directly address this (simpler) case. References found so far:  [1] ,  [2] .  [3] : the most informative so far  [4]  addresses the case I'm interested in but does not show a direct log-likelihood maximization

Here is the setup: Bob runs an experiment: he flips a coin N times (between 0 and +$\infty$). The coin has a probability p of landing on heads. Bob starts with zero points. For each head, Bob scores a point. Now, Bob goes to Alice and tells her p and that the score is zero, and ask her the probability that he flipped the coin N=n times. The case that make it special for me is the addition of the possibility of zero draws, and I'm stuck with it. Here is my attempt at solving this: N is the random variable counting the number of flips, S is the random variable counting the score. We want to know $P(N=n|S=0)$. $$ P(N=n|S=0) = \frac{P(S=0|N=n) \cdot P(N=n)}{P(S=0)} $$ Now $P(S=0|N=n)= (1-p)^{n}$ so that's good. Also, $P(S=0) = P(N=0) + \sum\limits_{n=1}^\infty (1-p)^{n}P(N=n) $ But now I'm stuck since I don't know what do with that $P(N=n)$. Now you could argue that since we know nothing about the distribution of N, the most reasonable assumption is that they are all equally likely. Then the substitution occurs as: $$ P(N=n|S=0) = \frac{P(S=0|N=n) \cdot P(N)}{\frac{1}{p}\cdot P(N)} = p(1-p)^{n} $$ This feels like cheating. Not because of the limit, this looks legit cf replace $\infty$ with $N_{max}$ and take the limit at the end, but because of the assumption on $P(N)$ being uniform. While keeping $N_{max}$ this is good, but it seems shady when taking the limit. Also, what do I know if it is uniform ? Am I doing something wrong here ?


When I go hiking I noticed that sometimes the photos have a noticeable amount of haze, especially when photographing long distance mountains. I think this is a natural phenomenon due to air composition, but I was wondering whether I can reduce this effect somehow.  After reading some guides, I tried with polarizer filters, but it did not really improved much. In Lightroom I can "Dehaze" the photos, but this introduces an overall blue tonality that makes the overall composition unreal. How is it possible to take "cristal clear" shots of mountains? Is it a matter of time/weather conditions (like better when cloudy/more humid than a sunny day)?

Distant landscapes often appear hazy, washed-out and blue due to .  What can be done to maximise the contrast range of the exposure when photographing such scenes?  For example:   Would any sort of hardware, camera settings, or type of "film" (including digital) produce better results? Are there reliable ways to predict when haze will be lowest?