I tried to install Ubuntu with an usb stick. I used unetbootin. Everytime I tried it, there was an error:  "invalid or corrupt kernel"   I tried with several sticks. What could be the problem?  Greetings from Germany Michael

I've downloaded the daily Ubuntu 12.04 iso.  I currently have windows 7 x64 operating system installed.  How can I make a bootable usb from the Ubuntu iso?


I'm fitting some data with a pdf that is the mixture of two gaussians with the same mean (this is, the sum of the density functions). The weight of each gaussian after the fit is $w_{\rm core}$ and $w_{\rm tail}$, $$ f_{\rm Global} ( \mu, \sigma_{\rm core}, \sigma_{\rm tail} ) = w_{\rm core} N(\mu, \sigma_{\rm core}) + w_{\rm tail} N(\mu, \sigma_{\rm tail}) $$ , where $N(\mu, \sigma)$ is the normalized normal distribution Is there an analytical expression to compute the variance of the global pdf (as a function of $w_{\rm core}$, $w_{\rm tail}$, $\sigma_{\rm core}$ and $\sigma_{\rm tail}$)?  Answer $$ \sigma_{\rm Global}^2 = w_{\rm core} \sigma_{\rm core}^2 + w_{\rm tail} \sigma_{\rm tail}^2 $$ This is derived in  for the general case $\mu_{\rm core} \neq \mu_{\rm tail}$. I'm quoting it in case somebody searches directly for the specific case (like me) and does not find the other answer.

Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance?


I am trying to prove this equation with an induction proof:  $$\ F(n) = \frac{(1 + \phi)^n  -  (-\phi)^n}{\sqrt{5}}$$   where $\ \phi = \frac{\sqrt{5} - 1}{2} $  I have started off by proving two base cases: $\ F(1)$ and $\ F(2):$  $$\ F(1) = \frac{(1 + \phi)^1  -  (-\phi)^1}{\sqrt{5}} = \frac{(1 + \phi  +  \phi)}{\sqrt{5}} = \frac{1 + 2\phi}{\sqrt{5}} = \frac{1 + \sqrt{5} - 1}{\sqrt{5}} = \frac{\sqrt{5}}{\sqrt{5}} = 1  $$  $$\ F(2) = \frac{(1 + \phi)^2  -  (-\phi)^2}{\sqrt{5}} = \frac{(1 + 2\phi + \phi^2  - \phi^2)}{\sqrt{5}} = \frac{(1 + 2\phi)}{\sqrt{5}} = \frac{(1 + \sqrt{5} - 1)}{\sqrt{5}} = \frac{\sqrt{5}}{\sqrt{5}} = 1$$  However, I do not know how to go about proving the inductive step: $\ F(n + 1) $. Can someone show me how to proceed from here?

It turns out that the Fibonacci sequence satisfies the following explicit formula: For all integers $F_{n} ≥ 0$,  $F_{n} = \frac{1}{\sqrt{5}}[(\frac{1+\sqrt{5}}{2})^{n+1} - (\frac{1-\sqrt{5}}{2})^{n+1}]$  Verify that the sequence defined by this formula satisfies the recurrence relation $F_{k} = F_{k-1} + F_{k-2}$ for all integers $k ≥ 2$.


I've been trying to finish an assignment that requires me to run a compound interest formula, but I can only use iomainip and iostream libraries.  do (cout << BaseMembershipFee * pow((ONE+(GoldRate/CompoundMonthly),(CompoundMonthly*years)) << years++) << endl;     while (years < 11);   This works with a math library (I think), but I can't figure out how to make it without pow.  Variables:  const float BaseMembershipFee = 1200, GoldRate = 0.01, CompoundMonthly = 12, ONE = 1; float years = 1;

What is the most efficient way given to raise an integer to the power of another integer in C?  // 2^3 pow(2,3) == 8  // 5^5 pow(5,5) == 3125


I have written a function using the DO macro (using  Peter Seibel's book as reference) but for some reason, when I compile my function:  (defun test ()   (do ((n 2 (1+ n))        (m 1 (1+ m))        (a (1+ n))        (b (1+ m))        (c (+ n m)))       ((= n 10) (* a b c))       (print (* a b c))))   I get the following warning messages:  WARNING: in TEST in lines 1..10 : N is neither declared nor bound,          it will be treated as if it were declared SPECIAL.  WARNING: in TEST in lines 1..10 : M is neither declared nor bound,          it will be treated as if it were declared SPECIAL.  WARNING: in TEST in lines 1..10 : N is neither declared nor bound,          it will be treated as if it were declared SPECIAL.  WARNING: in TEST in lines 1..10 : M is neither declared nor bound,          it will be treated as if it were declared SPECIAL.   When I try to execute test, it says that n has no value.   I am under the impression that the order of binding doesn't matter, but I tried rearranging it anyway and still received the same result.  What am I missing here?  I am using CLISP 2.49

I understand the difference between LET and LET* (parallel versus sequential binding), and as a theoretical matter it makes perfect sense.  But is there any case where you've ever actually needed LET?  In all of my Lisp code that I've looked at recently, you could replace every LET with LET* with no change.  Edit: OK, I understand why some guy invented LET*, presumably as a macro, way back when.  My question is, given that LET* exists, is there a reason for LET to stay around?  Have you written any actual Lisp code where a LET* would not work as well as a plain LET?  I don't buy the efficiency argument.  First, recognizing cases where LET* can be compiled into something as efficient as LET just doesn't seem that hard.  Second, there are lots of things in the CL spec that simply don't seem like they were designed around efficiency at all.  (When's the last time you saw a LOOP with type declarations?  Those are so hard to figure out I've never seen them used.)  Before Dick Gabriel's benchmarks of the late 1980's, CL was downright slow.  It looks like this is another case of backwards compatibility: wisely, nobody wanted to risk breaking something as fundamental as LET.  Which was my hunch, but it's comforting to hear that nobody has a stupidly-simple case I was missing where LET made a bunch of things ridiculously easier than LET*.


I thought I understood the difference, but now I'm not so sure. I've read the technical answer several times but I'm not understanding what is happening. I have this example.  class Program    {       static void Main()       {          int val = 0;           Example1(val);          Console.WriteLine(val); // Still 0!           Example2(ref val);          Console.WriteLine(val); // Now 2!           Example3(out val);          Console.WriteLine(val); // Now 3!       }        static void Example1(int value)          {              value = 1;          }        static void Example2(ref int value)          {              value = 2;          }        static void Example3(out int value)          {            value = 3;          }     }   I always thought the difference between default parameters is that if I am passing val into Example1, I can't use assignment.  But with the ref keyword val is still 0, but I have created a reference that is now treated as the variable "value" within Example2(ref val). Am I getting hung up on anything so far? if I had used  int value = 0; Example1(value); Console.WriteLine(value); // this would then return 1 correct?   Now then, what is happening with the out keyword? Same thing as ref?

I'm creating a function where I need to pass an object so that it can be modified by the function. What is the difference between:  public void myFunction(ref MyClass someClass)   and  public void myFunction(out MyClass someClass)   Which should I use and why?


Automating some map production.  Current high level approach:   Have user providing an Area of Interest (AOI) as a polygon extent If AOI > Threshold Area size Then  Use the origin of the AOI, create number of grids based upon PageUnit size for an A4 landscape template Then use this Grid to generate a Map Series.   Problem  There can be some pages that will only show a small 'sliver' of the intersecting AOI.  As crudely illustrated by the red rectangles in the below image:    What is a better approach to automate this kind of map production.  Make the assumption that the incoming AOI can be any size, any shape.  Scale and layout orientation are flexible.  The final multi-page map book needs to be easily understood by end-user, hence why we assumed a simple grid map would be sufficient.  I anticipate others will have encountered this issue before and found good workarounds

I am trying to tile a polygon with a minimal number of fixed sized squares.  Currently I am creating a fishnet over my polygon then spatially joining the squares that intersect the polygon. This is not optimal.  Also note the squares can be shifted vertically/horizontally but not rotated.  My end goal: The polygon represents a clipped image and I want a tiling of the clipped image. Where each tile is 300px by 300px. Some overlap is fine if that makes the problem easier.  Current    Manually optimized    Are there any tools or algorithms that would help with this? I am proficient with Python and ArcMap.  The polygon was created from line features so I also have access to those segments. Maybe that would will help for generating the squares.  The entire polygon must be covered.


<!DOCTYPE HTML>
Before the script...

...After the script.
       When I run the above code, it outputs "false", which isn't correct. If I change [[25,4]].includes([25,4]) to ['a'].includes('a'), it outputs the correct answer "true". Why does it do that?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


We know that in circuit capacitor block the DC current and pass AC current. My question is how a capacitor block DC and pass AC?

Why can't I charge the capacitor with AC? How do the plates block the flow of electrons with DC but not with AC.  Somebody told me that the DC is blocked by the capacitor, so the capacitor gets charge, but I could not get the actual concept about it.


I have 6 Treatment groups (A-F, with A as control) and measure parameter A at four time points 1-4. Now I am particular interested in time*treatment as I want to know if the change over time of the parameter of the groups B-F is significantly different to the control A. However, with a mixed multiple measures ANOVA including all groups (A-F) I only get a general answer: time*treatment is significant or not. Consequently, I did mixed multiple measures ANOVA for each group and the control group (A and B, A and C, A and D etc.).   My question now: Is it appropriate to do seperate analyses? (I am thinking of the issue with multiple t-test and the increase in type 1 error)  Is there another way to calculate the time*treatment  significancies for all groups (B-F) to the control within a single analysis?    I am working with SPSS btw. - Thank you already in advance!   EDIT: This is a repeated measures ANOVA with one dependent variable and not a MANOVA where you have multiple independent variables

I am using a MANOVA test to compare nine different dependent variables (from neuropsychological and neuropsychiatric assessment) between three groups. The output shows a significant influence from GROUP on my variables ($p < .001$).   Ofcourse, I am interested in how the three groups influence every dependent variable. I have studied Field's "Discovering Statistics Using IBM SPSS Statistics" chapter 16, and he states that the preferred post-hoc analysis is a discriminant analysis, because of the linear combination in which the dependent variables are related to group membership in a MANOVA. Discriminant analysis could account for this linear combination, so Field states.  Otherwise, I read some literature, on basic statistical sites, where is stated that I can use multiple univariate ANOVA's with Bonferroni correction, and use a post-hoc on these univariate ANOVA's when they are significant.   Which of these method's is better? That is, which will make my chance of a Type I or II error the least?


In the Chamber of Secrets movie Ginny was studying in the study area, and Harry found Justin minutes later. How did Ginny have time to petrify Justin? Was another student possessed?

In Harry Potter and the Chamber of Secrets it is revealed that      Ginny is being possessed by Tom Riddle and is the one opening the Chamber of Secrets.   The book seems relatively without holes in this regard.  However in the movie when Harry discovers Justin Flinch-Fletchley we see moments prior to this      Ginny is studying in a room full of people.   This implies that the person opening the chamber of secrets couldn't have been in the chamber when the second attack occurs.  Is this just a goof in the movie or is there an alternate explanation for this?  Is the Basilisk acting on its own in the movie?


I have one admin account and recently I have accidentally added myself to a single group (usermod -G without -a).   So, I am not in the sudoers file any more. However, it is not possible to log in to root by default on Ubuntu. Do I  the password for root during the boot process?

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox.  This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:  sudo usermod -G vboxusers stephane   This is a problem.  I now see what I should have run instead is:  sudo usermod -aG vboxusers stephane   The end result is I'm no longer in the groups I should be in.  Including whatever group is required to run "sudo".  When I run any command as sudo now, I get the following:  $ sudo ls [sudo] password for stephane:  stephane is not in the sudoers file.  This incident will be reported.   Is there a way to fix this, or do I need to re-install from scratch again?


When I learn guava,I found some code like this in com.google.common.hash.Hashing class:  public static HashFunction crc32c() {     return Crc32cHolder.CRC_32_C; }  private static final class Crc32cHolder {     static final HashFunction CRC_32_C = new Crc32cHashFunction(); }   I want to know, why do not write like below, Is this merely the author's habit? or for other purpose?  public static HashFunction crc32c() {     return new Crc32cHashFunction() }

What is an efficient way to implement a singleton pattern in Java?


I used this code. I am confused why this int array is not converted to an object vararg argument:  class MyClass {     static void print(Object... obj) {         System.out.println("Object…: " + obj[0]);     }      public static void main(String[] args) {         int[] array = new int[] {9, 1, 1};         print(array);         System.out.println(array instanceof Object);     } }   I expected the output:  Object…: 9 true   but it gives:  Object…: [I@140e19d true

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]


I have Ubuntu 12.04 LTS and I just found out about the wget command and was wondering if there was a way to download YouTube videos using wget?

What are instructions on how to download videos from YouTube?    Notice: Terms of Service Violation  Please be aware that by following any of the answers below, you will be violating YouTube's . In particular, from Section 5.B.:     Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.


How would you find the limit of this function:    The n value is always even (this is for a problem and it would not make sense for n to be an odd number)  Also, how could I plot this with n as the x value? I've tried to do it with an excel spreadsheet, but I just can't find the way to do it. I've done the first 10 even values for n (2,4,6,8,10,12,14,16,18,20) and the graph looks like it is approaching 0.3, but is there a way to know for sure?

For each positive integer $n$, let $x_n=1/(n+1)+1/(n+2)+\cdots+1/(2n)$. Prove that the sequence $(x_n)$ converges.   This is what I have so far..  Let $\epsilon > 0$ be given to us. We must show that there exists an $N \in \mathbb{N}$  such that $n\ge N \implies \left|\frac{1}{2n} - 1\right| < \epsilon$. Choose $N$ to be any positive integer which is larger than $\frac{1}{\epsilon}$. (So $N>\frac{1}{\epsilon}$.) Then $n\ge N \implies \left|\frac{1}{2n} - 1\right| = |\frac{1-2n}{2n}|$


I want to label a layer with 2 columns/attributes. It´s not a problem in Mapinfo, but can it be done in QGIS as well?

Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')


In essays, or writing in general, is it more acceptable to include or leave out accents in French words (or even natively accented words in general)?  For example, would I say     The bread was served à la carte.   or     The bread was served a la carte.   The same thing applies to naïve vs. naive.  Does it depend on whether the word is commonplace or not? Meaning, French words integrated with English don't need to be spelled with accents, but more obscure words do? Does using an accent for a common French word in English seem pretentious?

Take an expression like déjà vu. This is a French term which is frequently seen in English. In fact, it is included in English dictionaries. But it is often seen in English in a variety of forms:     déjà vu      déjà vu      deja vu   Now, one would probably not consider using frisson or soupçon, both proper unanglicized French words [uh-oh, see edit], without italics to indicate that they were foreign words. But once anglicized, do the words require non-English diacritical marks? Or, if such are used, does that push the word back into foreign status, so that italics are again required?  There's probably a continuum in operation here, during which a word goes from foreign with foreign markings to English with only English markings (or lack thereof). What I want to know is how one can tell where to draw the line. Does anybody have any useful information about this? Guidelines? Or is it on a case-by-case basis?  Honestly, I feel affected writing à la carte when every damn diner you walk into has an "a la carte" (or "ala carte" or "a la cart") category on the menu.  Edit: For example, see the Free Online Dictionary's  for soupçon:     Soup`con´ n. 1. A suspicion; a suggestion; hence, a very small portion; a taste; as, coffee with a soupçon of brandy; a soupçon of coquetry.   and then in the Thesaurus part:     soupcon - a slight but appreciable amount; "this dish could use a touch of garlic"    So if dictionary entries can't even remain consistent within the same definition, what chance does a mere mortal have?


I was posted an interesting situation from one of the players in my game. He stated that he noticed since he is a Tabaxi\Monk and once he levels up 5 times in Monk Magic to get the Longstrider Ability and boosts of speed ability then adds his racial speed boost and then someone casts haste on him, this would give him a movement of 3000' for movement. I know you can't stack certain speed boosts.   My question is: do any of these stack? If so, which ones and what would his speed become in that scenario?

Dash is an action that can be taken by any character, and by some as a bonus action, and Tabaxi's racial feature feline agility can be used as part of their movement, not action or bonus action.  So a tabaxi's base speed is 30'. Assume my character is a 10th-level monk (+20' speed), a 6th-level Barbarian (+10' speed from fast movement), a 2nd-level Rogue (with the cunning action feature), a 2nd-level Fighter (with the action surge feature), and has the mobile feat (+10' speed).  This allows a speed of 70'. a partner casts longstrider on me (+10' speed), so my speed is 80'.  The tabaxi feline agility feature is: "when you move on your turn during combat, you can double your speed until the end of the turn, cannot be used again until you move 0".  Assuming I need to run - while in combat:   Base speed 80' feline agility "when you move on your turn during combat, double speed" now speed 160' action drink potion of speed (gain an additional action, doubles movement) notice this does not double again, as an effect that already doubles my speed is in effect haste action dash +160 action surge dash +160 bonus action dash (cunning action) +160  = 640 feet   Now the next turn, I couldn't use feline agility, nor action surge, but would free up an Action, and the haste spell effect would double my speed.   Recalculating this, base movement 80 potion of speed in effect x2 (160) haste action dash +160 (320) action dash +160 (480) bonus action dash (cunning action) +160 (640)  = 640   As I understand it, if an effect would be repeated through use of item/magical means, they do not stack.  In this case the "Doubles your movement" is the effect in question, as it is repeated through many means (spell, potions, racial abilities, and even boots) it only makes sense that it is not permitted to stack, but please, correct me if I am wrong.


In the following scenario you can buy/sell offices in different cities, so say the user purchases an office in London, then the user sells it and we wish to show the user a message that the sale has taken place, should it be phrased like:  this,     You sold your Office which is situated in London for  495,000.   or     You sold your Office which was situated in London for  495,000.

For example:  "Last week, I found out that NASA stands for 'National Aeronautics and Space Administration.'"  or  "Last week, I found out that NASA stood for 'National Aeronautics and Space Administration.'"


The general value of $\theta$ simultaneously satisfying equations, $$\sin\theta = \sin\alpha \quad\text{and}\quad \cos\theta = \cos\alpha$$   is given by   $$\theta = 2n\pi + \alpha \ \forall \ n \in \mathbb{Z} \\$$   My attempt:  Adding the two equations,   $$\sin\theta + \cos\theta = \sin\alpha + \cos\alpha$$ $$\sin\theta - \sin\alpha = \cos\alpha - \cos\theta$$ $$2\cos\left( \frac{\theta + \alpha}{2} \right)\sin\left( \frac{\theta - \alpha}{2} \right)= 2\sin\left( \frac{\theta + \alpha}{2} \right)\sin\left( \frac{\theta - \alpha}{2} \right)$$ $$\cos^2\left( \frac{\theta + \alpha}{2} \right) = \sin^2\left( \frac{\theta + \alpha}{2} \right)$$ $$\cos(\theta + \alpha) = 0$$ $$\therefore \theta + \alpha = (2n+1)\frac{\pi}{2},\  n \in \mathbb{Z}$$ $$\theta = (2n+1)\frac{\pi}{2} - \alpha, \ n \in \mathbb{Z} $$  Why doesn't my solution match with the correct solution?  Please help!

I know that if $\sin x=\sin y$ then $x=n\pi+(-1)^ny$  and $\cos x=\cos y$ implies that $x=y+2k\pi$ or $x=-y+2l\pi$. Since the latter does not fit the form above $x=y+2k\pi$ which implies that $k=0,1,-1$. Hence, we have x=y or $x=2\pi,y=0$ or $x=0,y=2\pi$.


So, right now I'm using this:  /give @p minecraft:diamond_pickaxe 1 0 {CanDestroy:[minecraft:stone]}   But I need one that also has the Name value. Anyone know this one?

I'm trying to create an item that can break certain blocks, but also has a colored name in 1.13.2   Here's the command I'm using.  /give iAugust minecraft:shears{display:{Name:"[{\"text\":\"Arcane Shears\",\"color\":\"aqua\",\"italic\":false,\"bold\":false}]CanDestroy:[minecraft:iron_bars]"}}   But it only has a colored name, and it can't break specific blocks.


I want to know why the first result is different from the second one?  full code:  public static void main throws Exception {         KeyGenerator kg = KeyGenerator.getInstance("RC2");         SecretKey sk = kg.generateKey();         byte[] key = sk.getEncoded();          System.out.println(Arrays.toString(key));         System.out.println("****");         SecretKey sk1 = new SecretKeySpec(key, kg.getAlgorithm());          boolean status = sk1.equals(sk);           System.out.println(status); //the result is true         System.out.println(sk1==sk); //the result is false }

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


A rather new user self-answered their question. Yet not by adding and answer, instead the question was edited. See this example:   My first feeling was to edit their answer out of the question into its own answer. Yet that would mean that I would post the answer and perhaps recieve up/downvotes on it. This made me think that this could be considered as copy-catting and rude.  Would it be rude?  Another approach would be to comment on the question to educate the user to post one's answers as answers.  How should we deal with this kind of answers?

I saw this question:   I don't know what the best option is for dealing with such a question, because I've seen questions like this several times already.  So, what should we do with questions that are:   poorly asked finally answered by the OP as an update to the question itself, not as an answer.


I wish to add blocks in  beamer theme. I am not able to get the frame around the blocks.  \documentclass[12pt]{beamer} \usepackage{config/presento}  \begin{document} \begin{frame}   \frametitle{Frame title}   \begin{block}{Observation 1}      Simmons Hall is composed.   \end{block}   \begin{exampleblock}{Observation 2}     Simmons Dormitory is composed of brick.   \end{exampleblock}   \begin{alertblock}{Conclusion}     Simmons Hall $\not=$ Simmons Dormitory.   \end{alertblock} \end{frame}    \end{document}       How I would use the standard blocks in Presento beamer theme as in other themes like Madrid etc. What line should add/remove in the .sty file to get the frames around the standard blocks(like alert, example and basic block.) Thanks in advance.

Usually I use beamer  with the Warsaw theme which puts theorems (and other things) in boxes. Now I switched my theme to Marburg but i still want to keep the boxes. How can one do that?


I read that gravitational waves are so tiny that we need extremely precise equipment to detect them. I am no physicist, but GR really intrigues me and I was wondering about two things:   How powerful would a gravitational wave have to be for an average human to notice its effects, and what would those effects look like? How would these effects change as a function of the energy of the wave? What kind of cosmic event (e.g. black hole on black hole collision) could cause these gravitational waves?

Assume two black holes in the most common size range, spiraling into each other until they merge. The event releases significant amounts of energy via gravitational waves, which warp the space-time.  If the distortion is powerful enough, it would get noticed in daily life, or perhaps even detected by the proprioceptors in the human body.  How close, as an order of magnitude estimate, would you have to be to the merger to perceive it like that, without any instrument?


I am working on React project.  I have use case where I have to add step attribute on Number <Input> tag. This step attribute will be dynamic. Based on array data.  Array data is [{ precision: 2 }, { precision: 4 }, { precision: 5 }].  So I generate the step like:  <input type="number" step={ 10 ** -precision } >   Here 10 ** -precision will output :  0.01  for precision = 2  0.0001 for precision = 4  0.00001 fror precision = 5  This is what I want, and it is working fine in Firefox and Opera.  But Chrome is the issue, Chrome's output for 10 ** -4 is 0.00009999999999999999. Which is breaking in my case.  Chrome's output is correct till 10 ** -3 after that it is printing wrong.    My chrome version is : 74.0.3729.131 and OS: MacOs Mojave: 10.14.4

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


How to give a VF page link to custom Button(In yellow Circle). My VF page Name is CreateUserPage.

I am creating a new custom button or link, and when i try to use a Visualforce page my content dropdown list is empty. How do i get a VF page to trigger on a custom button or link.


Give an example of  nonmeasurable function $f:(\mathbb{R}, Leb)\rightarrow \mathbb{R}$ such that  $|f|$ is measurable and for  every $a\in \mathbb{R}$ , $f^{-1}(\{a\})$ is a measurable set    My idea: suppose $E$ is a nonmeasurable subset of $[0,1]$  and $f:\mathbb{R}\rightarrow \mathbb{R}$ is such that $f(x)=x$ for $x\in E$ and $f(x)=x-e^x$ for $x\in E^{c}$.

Can we give an example of Lebesgue non-measurable function, for which set $\{x: f(x)=C\}~\forall C\in\mathbb{R}$ is measurable? Thanks.


I want to remove some features from my settings app (device is rooted)  I used adb shell pm disable 'com.android.settings/.Settings\$SecuritySettingsActivity' to disable security settings and it worked. However, I am unable to find the activity name to disable backup and factory reset option.   (I'm using LineageOS)  So far I have tried     adb shell pm disable 'com.android.settings/.BackupSettingsActivity'   and     adb shell pm disable 'com.android.settings/.Settings\$PrivacySettingsActivity'   Both of which did absolutely nothing. I am still able to open backup and reset option from settings.   When I try to launch the said activities     adb shell am start -n com.android.settings/.BackupSettingsActivity   It errors out at saying BAD COMPONENT  while these two commands open the back and reset activity that I want to disable     adb shell am start -a android.settings.BACKUP_AND_RESET_SETTINGS      adb shell am start -S 'com.android.settings/.Settings\$PrivacySettingsActivity'

The Settings app is common to all Android devices, some have more features than others, but most of them are common, such as "Wireless and networks", "Sound", "Screen" and so on.  However, I am faced with the desire of disabling access to some of these components, while keeping access to some others. Using apps such as "SmartAppProtector", I am able to lock access to the entire Settings application, but can't configure access on a deeper level.  Is there a way to do so? How can I, for example, enable access to the "Wireless and networks" component and disable access to the "Screen" component?  Rooting is no problem, thank you.


I'm having a little issue, I can't go for bash v.4 I'm stick to use bash 3.2.57. I'm inputting my script in this form logs_logs_2017-04-{02..06}.tar.bz2 but since bash 3.2.57 doesn't support brace expansion with leading zeroes the script is feeded with the following logs_logs_2017-04-2.tar.bz2 logs_logs_2017-04-3.tar.bz2 ..... and these file names don't exist.  Any idea ?  Thanks !

On my local machine, where I run CentOS 7.2, when I do this:  for i in {8..12}; do echo ${i}; done   I got:  8 9 10   But when I do this:  for i in {08..10}; do echo ${i}; done   I got:  08 09 10   But on server to which I have access, which runs CentOS 5.6, running both commands results in the same output:  8 9 10   Why there are no zeroes in front of 8 and 9? Is it because of bash version, or just environment configuration? Can I change it per session or permanently, so my server will put that zero in front of numbers smaller than 10?


I got a 1TB HDD, is it possible to partition it in say 128GB sections and install a different Linux in each (i.e 8 different flavors on 1 hard drive) and be able to carry it around?   If so, what are the steps?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I have newly installed ParrotOS on my computer. Previously it was Windows 10. The hard drive had 3 pratitions. One partion now has Linux the other two are data partitions(important files). The problem is that i am not able to write to those partitions as they open only as read only from Linux. I tried remounting the partitions but no effect i also searched on internet and saw that turning of fast boot was the solution but in my case it is not possible as windows is no more there. The data is huge (70 GB in each partition) thus backup and format is not very convinient. Can anyone help with this? I tried : sudo mount -t ntfs-3g -o remove_hiberfile /dev/sdb5 /mnt/windows  [sudo] password for jaysmito:  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sdb5': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

I have a computer with both Windows 10 and Ubuntu 17.04 installed on it. I can't log in to Windows, and think it's a problem with the registry. Luckily, there is a way to restore the registry from backup from Ubuntu, but you have to be able to modify files on the Windows partition. Right now, I can't write to the NTFS partition because Windows didn't do a full shutdown.  How can I force windows 10 to do a full shutdown without being able to log in?


I'm trying to turn on the app store for a site but keep getting the message "Apps are turned off. If you know who runs the server tell them to enable apps"  I've looked everywhere in central admin and site features and everything looks like it should be enabled but still get this message. What am I doing wrong?

I am getting this message when I want to add a app:     Sorry, apps are turned off. If you know who runs the server, tell them   to enable apps.


Hey all!  I can't get rid of the 10:2 base at the x axis. I tried changing the precision, defining the ticks manually via xticks={...}. Everything works well on the y axis, I just can't figure out why this won't work on the x axis. Any help or input would be greatly appreciated!   Thanks!  \begin{tikzpicture} \begin{axis}[% width=\textwidth-\widthof{100}, height=8cm, xmin=0, xmax=0.04, xlabel={[S]=$\frac{\text{mol}}{\text{L}}$}, xmajorgrids, x tick label style={ /pgf/number format/.cd, fixed, precision=3,     /tikz/.cd }, ymin=0, ymax=0.23, ylabel={[V\textsubscript{0}]=$\frac{\text{mol}}{\text{L} \cdot \text{s}}$}, ymajorgrids, y tick label style={ /pgf/number format/.cd, fixed, precision=2,     /tikz/.cd }, legend style={at={(0,1)},anchor=north west} ] \addplot [ color=mycolor1, mark size=2pt, only marks, mark=diamond*, mark options={solid,fill=mycolor1} ] table[row sep=crcr]{ 0.001198562 0.0344717664736108 \\ 0.002394254 0.0365895792303057 \\ 0.003984064 0.0563386501133353 \\ 0.011857708 0.111166458313178 \\ 0.019607843 0.164120742512085 \\ 0.031007752 0.220381981506325 \\ 0.038461538 0.22523224268105 \\ }; %\addlegendentry{}; \end{axis} \end{tikzpicture}

A chart with data in the range of 200,000 and small difference between max and min values, will be assigned a 10^5 multiplier to the entire axis. This results in the ticks becoming meaningless, since all become 2.   Example:-  \begin{tikzpicture} \begin{axis}   \addplot coordinates {   (100,200001)   (200,200003)   (300,200005)   };     \end{axis} \end{tikzpicture}   When this is plotted the y-axis has 5 ticks, all of which are 2. The y-axis has a multiplier of 10^5. This has effectively removed all information from the graph.  I may use the below to set the explicit value of the tick values but this does not implement change in the display "style" of the axis ticks.  ytick = {200000, 200005, 200010}   I have also tried increasing the precision of the tick label to 5. However this only results in the graph showing labels such as 2.00000, 2.00005, 2.00010 with a 10^5 axis multiplier.  yticklabel style={precision = 5,}   My question is "How do I remove/change this 10^5 multiplier, such that the y-axis ticks are displayed in the form 200000, 200005, 200010.


On Mine craft pocket edition I found Red stone ore deep down in the earth world thing. I can't mine it. I tried using a stone pickax on it , and it took around one minute to break and when it did I couldn't collect it BTW it's Minecraft pocket edition on kindle fire and it's version 7.00.

I found redstone ore in Survival Mode (Minecraft Pocket Edition) and tried to use all five tools to collect it. It took about a minute or two to break, but I couldn't collect anything from it once broken.  How do I mine redstone ore?


What is the difference between  and ? I read in my book about this, but I couldn't understand the difference between conduction and convection.

Okay, so everywhere I've read, I hear the main difference is the requirement of a medium. But for example, if you take the case of heat 'radiating' from  a red-hot iron, isn't that actually  and not ? I mean, isn't the temperature difference between the surrounding air and the iron causing the air to gain heat?


$2^1+3^1=5^1$  $2^4+3^2=5^2$  In these cases a power of $2$ plus a power of $3$ is a power of $5$. If I understand the abc conjecture correctly, this is only finitely often the case.  Question 1: Is there an easy proof for this?  Question 2: Are there other known solutions of $2^k+3^m=5^n$?

Find all integers $x,y,z$ such that $5^x+7^y=2^z$.   This one comes from an online contest that I arranged some years ago, and I can assure that a completely elementary solution exists.


Let there be an integrable, non-negative function $f$ in a range $[a,b]$. If the integral $\int_a^b f(x) \, dx$ equals $0$, prove that $f(x)=0$ for every $x$ for which $f$ is continuous.  I have already tried to solve this problem, but i'd like some usefull input.  My solution: Let there be a number $c$ in the range $[a,b]$, for which $f(c)>0$. $f$ is continuous, so there should be a positive $d>0$ near $c$, so that $f(x)>0$ for every $x$ within $(c-d,c+d)$. Now let there be a partition $P=\{x_{0},x_{1},....,x_{n}\}$ of the interval $[c-d/2 , c+d/2]$ with $x_{0}=c-d/2$ and $x_{n}=c+d/2$.   Let be $m_{i}=\inf \{ f(x): x_{i-1}\leq x\leq x_{i}\}$ for $i=1,2,...,n$.  Therefore, $$L_{f,P}=\sum_{i=1}^{n} m_{i}(x_{i}-x_{i-1})>0\text{.}$$  However, we know that $\int_a^b f(x) \, dx=L_{f,P}=U_{f,P}=0$ and we have a contradiction.  As such, there is no $c$ in $[a,b]$ so that $f(c)>0$, and so $f(x)=0$ for every $x \in [a,b]$.  Was my assumption of using the interval $(c-d,c+d)$ correct?

Prove that $\int_a^b f(x)\,dx  \gt 0$ if $f \geq 0$ for all $x \in [a,b]$ and $f$ is continuous at $x_0 \in [a,b]$ and $f(x_0) \gt 0$  EDIT. Please ignore below. It is very confusing actually -.-    Note: After typing this all out, I think I realized that my proof is complete, but I'll just post it to make sure :)  Attempt:   Find a partition $P = \{t_0,\ldots,t_n\}$ of $[a,b]$ s.t. $f(x)\gt f(x_0)/2$ for any $x \in [t_{i-1},t_i]$  Thus, the lower sum, $L(f,P)\geq x_0 (t_{i}-t_{i-1})/2 > 0$  [Basic Idea: since f is continuous at $x_0$, in the worst case scenario (i.e. $f=0$ at all points except in a nbhd of $x_0$) there must be some "bump" at $x_0$, which prevents the integral from actually equaling $0$. If we can find just one lower sum of a partition to be $> 0$, we will be done (I think...)]


I have used different bibliography styles (bibtex) but I keep on getting the output (attached) where each detail of a reference begins on a new line. Is there a way to have the references in running text?

I'm using:  \documentclass[oneside,article,openbib,12pt,titlepage]{memoir} \usepackage[authoryear,round]{natbib} % Better bibliography support \bibpunct{(}{)}{,}{a}{,}{,}   in the preamble of my document and  \backmatter \renewcommand{\bibname}{References} \bibliographystyle{chicago}    \bibliography{listb,mybib}   in the body of the file. But a typical formatted reference is:     Freely, I. (1997).   A small paper.   The journal of small papers -1. to appear.   I've tried other non-natbib styles (e.g., regstud), and the reference flows and wraps as it should. So how does one get natbib to do the same?  Also, how does one get natbib to include the authors' entire first names?


It seems to be quite a common question to ask "what is the universe expanding into?" However I want to ask "where is the universe expanding from?"   Is there a "centre of expansion" of our universe and if so do we know where it is? To me it would seem that there must be a "centre of expansion" - the point from which the big bang occurred. However I have never heard any mention of it so maybe my reasoning is wrong.

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


list = ["a", "b", "c", "d"] print(list[3]) # Number 3 is "d"  print(list[-4]) # Number -4 is "a"

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


I made some code that looks like this:  int foo, bar1 = 4, bar2 = 7;  foo = bar1, bar2; // Look at this expression.  printf("%d", foo);   Compiled it with GCC, with -Wall and -Wextra. The output was 4.  Apart from being ugly, is this expression undefined behaviour, or is foo always set to bar1?

How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  <-  Note comma typo! c = d;


I need to add another IP address and I need the server to be able to know see it.  On the client: curl using the second IP/interface On the server: netstat or tcpdump  I want to be able to see the second IP address in the server.  Tried ip link add, ip address add, ifconfig. Nothing works. On the server there is always the "main" address of the client.  Everything is on the LAN, no need for DNS, etc..

I'm doing some computer network homework and I'm supposed to develop some sort of Peer to Peer file sharing software, and when I wanna test it I need to run a few (5) instances on my linux/Ubuntu 11.10 . which means each one need to has a unique IP address. I heard I can do that but I dunno how. how can I have many IP addresses on a single computer? thanks


I am travelling through Dubia and staying there for two days before travelling onto Brisbane I have a British subject passport do I need a different visa from my husband who is a British citizen

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


I was writing about the  when i wrote the following line      both these terms talk about the right and wrong conduct of people      both these terms talk about the wrong and right conduct of people   I would think both these sentence would convey the same meaning , as it is like saying You are fat and tall against You are tall and fat.  I just need a confirmation that these two sentences convey the same meaning. Am i missing anything?

Is there a word or phrase for two nouns or adjectives joined by a conjunction (usually "and") in a fixed sequence?        alive and well           fast and furious   hat and gloves   pen and pencil   law and order   wit and wisdom   salt and pepper   bacon and eggs   horse and carriage   Adam and Eve   ladies and gentlemen   loud and clear   heads or tails   yes or no   dead or alive


I want to prepare for hardmode and I am wonder what I can do to protect my world from the spread of corruption and hallow. I've heard that you have to dig around your house and kind of build a barrier but both the corruption and hallow are on one side of my world, so does that mean I just build a wall?

After the Wall of Flesh, the Hallow appears and Corruption/Crimson spreads even faster.   Corruption/Crimson spreads through everything   Except Hallow  Hallow spreads through everything   Except mud (jungle) Except synthetic blocks like gray-brick  The results of Hallow and Corruption meeting are unpredictable   How can I stop them both permanently and effectively from taking over the world, considering both the top layer and underground?  (Eg, simply placing gray brick on top of the surface won't stop the underground spread?)  And, is it worth the effort?


I just wrote a tiny method to count the number of pages for cell phone SMS. I didn't have the option to round up using Math.ceil, and honestly it seems to be very ugly.  Here is my code:  public class Main {  /**  * @param args the command line arguments  */ public static void main(String[] args) {    String message = "today we stumbled upon a huge performance leak while optimizing a raycasting algorithm. Much to our surprise, the Math.floor() method took almost half of the calculation time: 3 floor operations took the same amount of time as one trilinear interpolation. Since we could not belive that the floor-method could produce such a enourmous overhead, we wrote a small test program that reproduce";     System.out.printf("COunt is %d ",(int)messagePageCount(message));    }  public static double messagePageCount(String message){     if(message.trim().isEmpty() || message.trim().length() == 0){         return 0;     } else{         if(message.length() <= 160){             return 1;         } else {             return Math.ceil((double)message.length()/153);         }     } }   I don't really like this piece of code and I'm looking for a more elegant way of doing this. With this, I'm expecting 3 and not 3.0000000. Any ideas?

I'm thinking in particular of how to display pagination controls, when using a language such as C# or Java.  If I have x items which I want to display in chunks of y per page, how many pages will be needed?


Screenshot below but the gist is that I'm seeing the flag but no edits seem to be pending.

So far, I thought that the number shown in the orange box in the top-bar was the number of items available for review. However, when I acually visit /review, the numbers don't match:    Note that top-bar shows 15 items (?) but the queues only add up to 8.  Since I can't think of a reason for this being by design (which, as experience shows, is not a good indicator for "this is not an SE feature) I'm tentatively labelling this a (UI) bug.


I have been given a series: $$\lfloor(N/2^2)\rfloor*2^2+\lfloor(N/3^2)\rfloor*3^2+\lfloor(N/4^2)\rfloor*4^2+....+\lfloor(N/\lfloor\sqrt(N)\rfloor^2)\rfloor*\lfloor\sqrt(N)\rfloor^2$$  Where N is a natural number. I know it can be solved in $O({\sqrt N})$ time complexity, but can there be any other way to solve this.

I have tried to find a closed form but did not succeed but is there an efficient way to calculate the following expression  $\sum_{i=1}^{i=\left \lfloor {\sqrt{N}} \right \rfloor}\left \lfloor \frac{N}{i^{2}} \right \rfloor$  So Far I have noticed the following  $\sum_{i=1}^{i=\left \lfloor {\sqrt{N}} \right \rfloor}\left \lfloor \frac{N}{i^{2}} \right \rfloor = \sum_{i=1}^{i=\left \lfloor {\sqrt{N}} \right \rfloor}\left \lfloor \frac{N-N \mod i^{2}}{i^{2}} \right \rfloor = N *\left \lfloor {\sqrt{N}} \right \rfloor - \sum_{i=1}^{i=\left \lfloor {\sqrt{N}} \right \rfloor} N \mod i^{2}$  I want to solve it in either log(N) or as a closed form


For many IM programs, especially text apps for phones, you can see a conversation with a specific person. To quickly distinguish between messages sent and received, they are pushed to each side, like in this example.    I want to use this for what i'm making. I showed it to someone and found out we didn't agree on which messages should be left and which should be right.  I'm wondering which way I should put it now. which one is better, more used, and/or more intuitive

I'm building a small chat. Now I see but in other chats (whatsapp, facebook mobile chat, sms ...) that the arrangement is always the same:  Left: the chat partner. right: myself      Why is that?


I've recently started to write a Calculus material, topic "Area Between Curves". I'm trying to fill the area between those graphs as shown in the picture, but I haven't had success:      \begin{tikzpicture}     \draw[step=0.5, help lines, color=gray!30, dashed] (-1.5,-1.5) grid (4,4);     \draw[->,ultra thick] (-1.5,0) -- (4,0) node[right] {$x$};     \draw[->,ultra thick] (0,-1.5) -- (0,4) node[above] {$y$};     \draw[dashed,scale=3,domain=-0.4:0,smooth,variable=\x,red, thick] plot ({\x},{\x*\x});     \draw[name path=F, scale=3,domain=0:1,smooth,variable=\x,red, thick] plot ({\x},{\x*\x});     \draw[dashed,scale=3,domain=1:1.1,smooth,variable=\x,red, thick] plot ({\x},{\x*\x});     \draw[dashed,scale=3,domain=-0.4:0,smooth,variable=\x,blue, thick] plot ({\x},{\x});     \draw[name path=F, scale=3,domain=0:1,smooth,variable=\x,blue, thick] plot ({\x},{\x});     \draw[dashed,scale=3,domain=1:1.2,smooth,variable=\x,blue, thick] plot ({\x},{\x});     \end{tikzpicture}   Is using tikz the best approach? How can I make those three variations of filling the areas?    Thank you.

I want to draw the region bounded by y=x^2 and y=x. Any ideas? I was hoping this would be somewhat simple. I've tried used a similar, with \begin{axis}..\end{axis}, but it doesn't like that. Did I not declare a package or something?   Also, if I wanted to show the solid this region creates by rotating it about the x-axis, is there a way to did this in latex? (If you had cal 2, think volume of a solid rotated about ...).


Is there a holomorphic function $f \in Hol(\Bbb C)$ such that $|f(z)|=|z|+1$ for every $|z|\geq2017$ ?  I tried defining $g(z)=\frac{1}{f(z)}$. Such $g$ is clearly holomorphic and bounded for $|z| \geq 2017$. I want to show that $g$ is holomorphic in $|z| \leq 2017$ and then conclude that $g$ is constant. For that I want to show that $f$ has no zeros in $|z| \leq 2017$. I tried to prove it by Rouche theorem, but didn't succeed. Any ideas?  Edit: the post similar to mine doesn't solve my problem, because the ending of the proof is not clear. Where is the contradiction?

Does there exists an entire function such that for each $|z|>C$ for some constant $C$, $|f(z)|=|z|+1$?  Can I assume that since $f$ has a pole in infinity, $Imf$ or $Ref$ must have a pole at infinity too? If so, I can use this fact to define an exponent function of $Imf$ or $Ref$ (the one that goes to infinity) or their minus, and show that function is a bounded entire function, and therefore constant. Which gives a contradiction to the conditions about $f$.


Want to Gzip my all the .csv files into a gzip file.  I am using this command.  gzip *.csv;   Problem File contains '//' in its name that's why command is giving error.  Error : - '//File.csv' is not a directory or file.  So please suggest me what ways i can do this successfully.  one solution i thought.  gzip '//File1.csv' '//File2.csv' '//File3.csv'   Please suggest me if this is the right way to perform the same.


This is how my self-hosted blog network's sidebar started to look, starting from yesterday:    Can someone tell me, what is going on or what am I missing?  Tested on Chrome on two different computers after completely purging cache and cookies. Zoom in browser is 100% (switched off). It happens in every blog that belongs to my blog network, including blog network dashboard.  It started to happen yesterday, event though there was no update to my Wordpress, neither manual nor automatic. I have the newest publicly available, stable version of Wordpress behind my network (4.3).  This isn't very annoying, though makes my life a little bit more miserable! :> However, I'd like to know, if this is a know bug or issue, that happens on other computers or if this is limited to my computers only?

I'm having an issue with my admin menu in WordPress. As you can see in the image below the formatting of the menu is out of order. This happens whenever I first land on one of the admin pages but if I refresh the page the menu looks fine. I tried disabling my plugins but none of them seem to be causing the issue.


I am having no idea how I can solve this problem.  I need help!  Here's the problem  $2x^4+x^3-11x^2+x+2 = 0$  I am learning Quadratic Expressions and this is what I need to solve, and I can't understand how :C

I would appreciate any help with this problem: $ x^8+2x^7+2x^6+5x^5+3x^4+5x^3+2x^2+2x^1+1x^0=0 $  I know that when $x$ isn't zero $x^0=1$ so the equation could be re-written as $ x^8+2x^7+2x^6+5x^5+3x^4+5x^3+2x^2+2x+1=0 $. I am not sure what to do from here. I have tried using wolframalpha to get the solutions so I know real ones exist (2 of them, actually), but I have no idea how to get them.


Table Name: Order  Columns: ID & NAME & DATE  With the following records :  1 | starone | 2016 1 | starone | 2016 2 | mogaone | 2017 9 | starone | 2016      And am looking to only select data without getting duplicates :   Expected OUTPUT  1 | starone | 2016 2 | mogaone | 2017 9 | starone | 2016   So which query shall i use?

Can you get the distinct combination of 2 different fields in a database table?  if so, can you provide the SQL example.


Does there exist a dense set of reals which is uncountable in every interval, whose complement is also dense and uncountable in every interval? So, for example, the union of positive rationals and negative irrationals would not work for my question.

If you have an uncountable subset of $\mathbb{R}$, which is dense in $\mathbb{R}$, is its complement countable?   I'm trying to see if you can take the set of irrationals, remove a countable amount, and still have a dense subset in $\mathbb{R}$.If this is the case, this sets complement would still be countable.  My goal is to determine if you can have an uncountable subset of $\mathbb{R}$, which is dense in $\mathbb{R}$, yet its complement is uncountable.  If somebody could just let me know if this is possible or not I would appreciate it. Thanks.


For electron with large kinetic energy, one needs to introduce Dirac equation for relativistic correction. In what type of systems these relativistic effects is non-negligible?

For many applications with heavy metals, pseudopotentials can be used to include some amount of relativistic effects. But for what sort of systems does it become necessary to actually use a relativistic method (e.g Dirac Hartree Fock)? Is this there active research into material modeling with a relativistic formalism?


I came across the following problem  Let matrix A be a $n\times n$ square matrix such that $a_{ij}$ = max{ i , j }. Prove that det(A) = $(-1)^{n-1}n$  I have read the post  and understood all the answers adressing the same problem. I just wanted to see an alternative method which does not use row subtractions. As, the determinant fromulla $n(-1)^{n-1}$ is reminiscent of $\frac{d}{dx}(x^{n})$ Is there some way we could use differentiation of determinant technique? How would it be if one goes by the formulla of determinant in terms of permutations?

If $A$ is an $n \times n$ real matrix and       $$a_{ij}=\max(i,j)$$       for $i,j = 1,2,\dots,n$, calculate the determinant of $A$.   So, we know that   $$A=\begin{pmatrix} 1 & 2 & 3 & \dots & n\\  2 & 2 & 3 & \dots & n\\  3 & 3 & 3 & \dots & n\\  \vdots & \vdots & \vdots & \ddots  & \vdots\\   n& n & n & \dots & n \end{pmatrix}$$  but what do I do after?


I am running the following command line: myuser@server:/var/www/html/folder/htdocs$ php remove.php myuser is not in the sudoers file.  This incident will be reported.  Within remove.php I run: exec('sudo -u myuser /usr/bin/wipe '.$main_path.$base.' -f -c -s'); And I've set my sudoers file: www-data ALL=(myuser) NOPASSWD: ALL And I've set sudoers to 0440: -r--r-----   1 root root        838 Sep 18 11:07 sudoers Why am I told that myuser isn't in the sudoers file when it is?

I want to grant a newly created user sudo privileges in Ubuntu.  I tried  sudo adduser hduser admin   but it says no admin group exists. How can I do it?


Does Stack Exchange support user blogs for specific topics or is this currently in development? Users with expertise in specific areas may have the desire to write a blog post teaching a particular topic. This would create a more stable foundation for user learning in established areas, pushing questions to be more focused on the cutting-edge where consensus hasn't been established, promoting discussion, development, and progress in the relevant areas.

Many users are experts in areas which they don't need to ask questions on, yet there knowledge is only spread in the stackexchange world through the answering of questions.  It would be fantastic if users had the option of blogging about certain areas, integrated into their user profiles, which are also searchable, allowing them to blog about their areas of expertise, and still be integrated into stackexchange.  This could even be a status symbol if you only allow users with a certain reputation in an area, to blog on that topic.  EDIT following replies:   I believe not all blog posts can be covered by raising a question and then answering it, some topics do not lend themselves to that paradigm.  Linking to a blog is not the same as having it's content in the stackexchange network. The content is not searchable in stack, is not associated with tags, voted on, or commented on in the same way. A blog post does fit into a Q&A paradigm, in that it is a sharing of knowledge, however typically on a more complicated scenario, like how to configure something, how to best approach a particular problem, etc. This functionality doesn't have to be used by everyone, but would add to the scope of the stackexchange set of websites, and would have a beneficial impact on their use on the internet.    So I still see this as being worthwhile, and in the stackexchange set of sites interests to introduce.  Edit 2: This would also help to ensure, that blog posts which are linked from stack answers, will be available instead of vanishing at some point in the future. (Some answers need comprehensive replies, which need detail which it's better to link to someone's blog post, then to copy and past the content from it.)


I am working in Ubuntu Shell, but i want it to work for UNIX also. Here is my code:    #!/bin/bash  func() {     x=42 }  x=9 func echo $x    Why is global x changed to 42 when i changed only local variable x Is in unix different rule for variable scopes? Is there a method how to set return value from func to global variable, which can be used later in code?   Thank you!

Please explain to me why the very last echo statement is blank? I expect that XCODE is incremented in the while loop to a value of 1:  #!/bin/bash OUTPUT="name1 ip ip status" # normally output of another command with multi line output  if [ -z "$OUTPUT" ] then         echo "Status WARN: No messages from SMcli"         exit $STATE_WARNING else         echo "$OUTPUT"|while read NAME IP1 IP2 STATUS         do                 if [ "$STATUS" != "Optimal" ]                 then                         echo "CRIT: $NAME - $STATUS"                         echo $((++XCODE))                 else                         echo "OK: $NAME - $STATUS"                 fi         done fi  echo $XCODE   I've tried using the following statement instead of the ++XCODE method  XCODE=`expr $XCODE + 1`   and it too won't print outside of the while statement. I think I'm missing something about variable scope here, but the ol' man page isn't showing it to me.


I am a US citizen and I will be flying New York → Guangzhou → Seoul. The only thing I plan to do in Guangzhou is get off one plane and get on to another. Will I need a visa for this?

I'm hoping to get a flight which requires me to be in China for 28 hours before the connecting flight out.  I'm happy to sit in transit if I have to.  However, I've read one site that said 12 hours is the maximum transit permitted.  Can anyone find either:   Definitive information saying how long transit in Beijing/Shanghai airports are for Or can I get a transit visa on arrival, in which case I'll go check out the city for a day ;)   I'm on a New Zealand passport if it makes a difference.  Failing all that I'll pick up a visa in Mongolia en-route, I'd just rather not have to waste a few days doing so if I don't have to!


If $n>3$ is not prime, show that we can find positive integers $a,b,c$ such that $n=ab+bc+ca+1$.   When $n=4$, pick $a=b=c=1$. When $n=6,$ pick $a=2$ and $b=c=1$. When $n=8$, pick $a=b=c=2$. I don't get the pattern here. I know that if $n>3$ is not prime, then $n=xy,$ where $1<x<n$ and $1<y<n$. But how do I proceed from here?

Is every sufficiently large positive integer $A$ of the form $ab + ac + bc + 1$   where $a,b,c$ are some positive integers larger than some given positive integer $d$ ?  How large is sufficiently large , in other words how do we know our number $A$ is sufficiently large ( as a function of $d$ ) ?    Update :  I read the following about positive integers that are not of the form $ ab + ac + bc $:    And I quote about that sequence above : " Note that for n in this sequence, n+1 is either a prime, twice a prime, the square of a prime, 8 or 16 "  This is why I considered the weird +1 in $ab + ac + bc + 1$  So composites larger than 16 not a prime , twice a prime or the square of a prime are of the form $ab + ac + bc + 1$.  And I wonder why !  I guess that relates strongly to the Original posted problem. Maybe I should have mentioned that before , sorry.  Will Jagy's answer gave the same OEIS link which I already knew. This also explains some of the comments.  Im no expert in genus theory or Galois theory but I assume this has a simple answer.


I have a question regarding printing images side by side on the same piece of paper at different times.   I will first print an image on the paper at an exact location using photoshop, i will then take the same piece of paper align it correctly in the printer and then print the second image right beside it but when the printing is done there is a very small "offset" between the two images. Sometimes the second image has been shifted to the right by 1 mm or up by 1mm ect. If I were to print images of just colour there would sometimes be visible white lines between them or the ink would overlap and create darker lines. This problem doesn't always arise, sometimes it DOES align perfectly to the eye.  I am wondering what this problem is called, is it fixable(with my current printer) and what type of printer is best for reducing this effect(I have seen HP DesignJets but I'm not sure that they don't have this problem)?  Many thanks!

Note: I'm not a graphic designer, but this seemed like the most relevant place to post. Feel free to send me off somewhere else if I'm not in the right place.  I would like to make some notebooks with double-sided grid paper that I've already designed, but my printer seems like it doesn't allow for absolutely exact alignment. Even if one side prints nice and straight, the other side will be slightly skewed left to right by one to two millimeters, which I read from an earlier post is a pretty reasonable variance for a home printer. So I suspect it's not possible to get both sides completely aligned on this printer – but if I'm wrong, please let me know how.  What kind of printer would allow for absolutely exact alignment? Is there any difference between inkjet and laser in this regard, or a more expensive printer versus a cheaper one?


Given positive sequence $a_n$ where $\lim _{n\to \infty} a_n = L, L >0$, prove using the  that $$\displaystyle{\lim _{n\to \infty}}\frac{1}{a_n} = \frac{1}{L}.$$     My thoughts:  How can I do this if I don't know how $a_n$ is defined? I can use the given limit to get the range of $a_n$ in terms of $L$, but I lack the direction to complete the proof.

How to formally prove that if $\lim \limits_{n \to \infty}a_n=\infty$, then  $\lim \limits_{n \to \infty}\frac{1}{a_n}=0$.  I got confused for how to mix between convergence to infinity and having finite limit. how do I write a proof to link between two things? ( by using $\epsilon $) and not just giving an example.  my proof:   let $M= \frac{1}{\epsilon}$. there exists such a $N\in\mathbb N$ s.t for every $n>N$, it is true that: $$a_n>\frac{1}{\epsilon}$$  we should prove that for every $\epsilon>0$ there exists such a  $N\in\mathbb N$, s.t for every $n>N$ $$\left|\frac1{a_n}\right|<\epsilon$$  so we take the N that satisfies the first conclusion, and that will mean for every $n>N$$$\left|\frac1{a_n}\right|<\epsilon$$


Why is the doctor at every point he visits, the last and only timelord?  Shouldn't he be able to travel to the Gallifrey from before the timewar? Or meet some timelords for who the timewar has not happened yet?

According to , it’s just the Time War that is time locked. So why does Eccelston's Doctor tell Rose:     My whole planet is gone. My people, my family, all gone. Don't you think I want to go back and save them?   Why hasn't he ever gone back to before the war?   All the other Doctors basically see Gallifrey as gone from them, and when you say the Doctor cannot go back on his own timeline, there will have been plenty of time periods he could go to; maybe to a time before they could regenerate, or maybe when Time Lords were using Tardises — as in "The Doctor's Wife" she says to Matt Smith:     I was already a museum piece when I stole you


I applied for a UK visa (visitor) from India to attend an academic competition in London. The organizer provided the participants with an invitation letter. For my visa application, I used my father's bank statement.  My first visa application was denied due to inconsistent bank history, the reason why it was inconsistent wasn't explained. On my second try, I attached airlines tickets (both ways), accommodation details (it had been present in the first attempt, but was conveniently ignored) and two other bank statements from my father's different accounts along with the account that was used previously. Like in the first application, I attached copies of his Income Tax details (current).  However, even after making these changes my application was again denied. On further frivolous grounds:   That my studies would be ongoing when my visa expires - while accepting that my university has confirmed that I am a bona fide student they felt my studies would not extend to 6 months, which was the duration of the visa. That the new accounts presented showed deposits entering my parents' accounts that had not appeared on the Income Tax ledger. It is important to note that the said Tax details were for 2014-15, 2015-16, 2016-17, the most current tax details going back three years had been provided. The transaction so pointed out was for December 2017, the assessment year for which would be 2017-18, which has not yet come to pass. Furthermore, the amount mentioned was for arrears, which is very common for government employees, who receive lump-sum payments.   Both my attempts have not only affected me financially (the cost of the application was around INR 8,000 and INR 9,000 approximately), it has also affected me mentally as my participation in the International Rounds was crucial for my team (who have interestingly all received a positive response, even when I had cited their application as well). I wanted to know steps if any that can be taken to:   Ensure that this matter be rectified, without incurring any financial cost. Make changes for my future application. Ask for a financial statement of my dad that has not been delivered to me, which has been kept back without any statement as to the reason.   I have attached my rejection letters along with my question.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I'll explain a bit of my project so you can get a notion of what I'm trying to accomplish. I'm making a "translator" of an invented language to english and vice versa. It consists on replacing all letters for new ones, for example:  English string: Hello world. Invented language string: Ajuuq lqyue.  I've tried a lot of options in order to get my task done, but nothing seems to work at all, and I haven't found a proper solution to my problem. I'll leave in here the options that I've already used.  string = string.replace("l", "u")   This one only worked with one case, and I've thought of assigning a different variable for each letter in order to get it, but I think it won't really work.  I used for, a dictionary but nothing seems to do what I really want.  Thanks beforehand.

Is there a way to do character translation / transliteration (kind of like the tr command) using Python?  Some examples in Perl would be:  my $string = "some fields"; $string =~ tr/dies/eaid/; print $string;  # domi failed  $string = 'the cat sat on the mat.'; $string =~ tr/a-z/b/d; print "$string\n";  # b b   b.  (because option "d" is used to delete characters not replaced)


I use linguex and I don't want my examples to be separated from their interlinear gloss and translation by a page break. Currently I have to check the PDF output and use the package needspace, but obviously this is a chore/bore.  \needspace{4\baselineskip}   Keeps the next 3 lines together.   Is there any way of telling LaTeX not to split linguex examples across two pages, ever?  Clarification: I don't want it to keep sub-examples a. b. c. together.   Edit: adding a new command such as in the response to  is not a solution to this question - I have already stated that the solution should not involve returning to each example environment manually. The solution for gb4e is undesirable as it would involve finding each already written example, but also because it changes line spacing slightly to the old gb4e style. It also involves the addition of a command to each linguex example, making it a less than elegant solution to a global problem within the document's style. There might be a solution in adding the \nobreak command to the package somehow, but as of now, there is no solution.  What I mean is that a linguex example looks like this:  \documentclass{article} \usepackage{linguex} \usepackage{leipzig} \usepackage{lipsum} \def\glt{\nobreak}  \begin{document}  \lipsum[1-5]   \exg. y cath-od\\ {\Art} cat-{\Pl}\\ `the cats'  Some text about cats.  \end{document}     whereas the solution proposed would be this:  \exg. y cath-od\\ {\Art} cat-{\Pl}\\ \glt `the cats'     and I want my examples to stay as they were because 1) don't want to edit them all by hand 2) inelegant solution to a straightforward issue.

I am using gb4e for several hundred interlinear glosses in my dissertation. Several of the examples span more than one page, that is, the vernacular and gloss will be on one page, while the free translation appears at the top of the next page.   How can I keep all three elements together on the same page? I often have subexamples (a, b, c) that don't need to stay together. That is, 1a can be on one page, and 1b on the next, as long as vernacular-gloss-free translation for each subpart stay together.  In the MWE below, the free translation is at the top of page 2, while the vernacular and gloss are at the bottom of page 1.  \documentclass[11pt,letterpaper]{article} \usepackage{lipsum} \usepackage{gb4e} \noautomath \begin{document} \lipsum[1-4] \begin{exe}     \ex \gll wuz x̃ũch it-ak xohish-em\\              1\textsc{sg.prn} bread eat-\textsc{inf} want.\textsc{prs}-1\textsc{sg}\\         \glt `I want to eat bread.'  \end{exe} \end{document}   A solution was proposed to a similar question (), but it requires me to manually look for what could be dozens of orphans throughout my dissertation (and doesn't work when applied to my example, since it still strands the FT). I would prefer a more elegant solution that takes care of the problem automatically.


I need to forward a zip file to Yahoo Mail, but Yahoo is returning the email because of its size. The compressed file is 45 MB. How can I compress via the command line so that each file has a maximum of 10 MB?

I need to split a .zip file in Ubuntu as .z01, .z02 etc... so that I would join them back in Windows.  I don't have access to command prompt in Windows. How would I unzip files now?


"& Help is available in the Library, ".match(/(i)/)   This should be returning all the matches for "i".  Instead it's returning only 2.    Two questions    It should be returning all the matches as that is suggested by mdn  What does index=7 mean in the array(in the picture)   For reference, Here is the definition that found on mdn     (x)   Matches x and remembers the match. These are called capturing   groups.      For example, /(foo)/ matches and remembers "foo" in "foo bar".       The capturing groups are numbered according to the order of left   parentheses of capturing groups, starting from 1. The matched   substring can be recalled from the resulting array's elements ,   ..., [n] or from the predefined RegExp object's properties $1, ...,   $9.      Capturing groups have a performance penalty. If you don't need the   matched substring to be recalled, prefer non-capturing parentheses   (see below).

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I was washing the dishes and came across a situation that was counterintuitive (at least from my perspective). The situation consisted of a bowl of water and a filled bottle of water. When I dip only the tip (opening) of the water bottle into the bowl of water, the water from the bottle does not flow out into the bowl. On the other hand, once the bottle is raised just enough so that the opening in the bottle is above the bowl of water, the water then obviously flows out into the bowl.   Below is a picture demonstrating the situation.     My Question  Would this phenomena change depending upon which liquid(other then water) is used?  Or more specifically could the surface tension properties of another liquid differ so much from water where a observable difference would occur in this situation?

When you invert a water-bottle in a container, the water rises and then stops at a particular level --- as soon as it touches the hole of the inverted bottle. This will happen no matter how long your water-bottle is. I understand this happens, because once the water level touches the hole, air from outside cant go inside and therefore there is nothing to displace the water that falls out of the container.  Now according to the laws of pressure ---- the pressure at the water level must be same everywhere --- whether it's inside the water bottle or outside. And that must be equal to the atmospheric pressure. Therefore the pressure of the water column + air column inside the inverted bottle must be equal to the atmospheric pressure.  What I dont understand is, no matter how long a bottle you take, the water level will always stop at the hole. So that means that no matter how long a bottle you take, the pressure of the water column + air column inside the water bottle will be equal to the atmospheric pressure. How could this be possible?  Also I'd like to let you know that, if you pierce the upper part of the bottle with a small pin, then the water level rises and overflows out of the container. I'm assuming air from outside rushes in and pushes the water out.


AFAIK, cat is an external command and it forks off a new process when executed, just like sh -c or executing a script. With that said I expect cat to  use its command environment as it is used by other external command, like    f=test.txt sh -c 'cat "$f"'   Shouldn't this display the content of the file   f=test.txt cat $f       ?    Note: I am not asking what is  someVariable=someValue command. I am asking why first example uses its command variable but not the second one. The way variable expansion is happening in second example it should happen in first example.

One of my coworkers has provided me with a Bash syntax that I am unfamiliar with.  My Google foo has failed me on figuring out what it does and why/when I should use it.    The command that he sent me was of this form:  someVariable=something command   Initially, I thought that this was equivalent to the following:   someVariable=something ; command   Or  someVariable=something  command   But this doesn't appear to the be case.  Examples:   [Jan-03 11:26][~]$ # Look at the environment variable BAZ. It is currently empty [Jan-03 11:26][~]$ echo $BAZ  [Jan-03 11:27][~]$ # Try running a command of the same format     [Jan-03 11:27][~]$ BAZ=jake echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:27][~]$ # Now, echo BAZ again. It is still empty:     [Jan-03 11:27][~]$ echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:28][~]$     [Jan-03 11:28][~]$ # If we add a semi-colon to the command, we get dramatically different results: [Jan-03 11:28][~]$ BAZ=jake ; echo $BAZ jake [Jan-03 11:28][~]$ [Jan-03 11:28][~]$ # And we can see that the variable is actually set: [Jan-03 11:29][~]$ echo $BAZ jake [Jan-03 11:29][~]$   What does this syntax do?  What happens to the variable that has been set?  Why does this work?


So I've never proved anything like this before, as this is my first time working with big O notation. Upon being presented with it, I decided to use induction. From what I understand of this, the equation means that $\exists k \mid \forall x \sum_{x\le{n}}\frac{1}{\varphi{(x)}} \le k\cdot\ln{}n$. So, I was going to show that this is true for $n = 2$, the base case here, and then assume its true for all $n$, then prove for $n+1$. My work was as follows for the inductive step.  $$\sum_{x\le{n+1}}\frac{1}{\varphi{(x)}} \le k\cdot\ln{}(n+1)$$ $$\sum_{x\le{n}}\frac{1}{\varphi{(x)}}+\frac{1}{\varphi{(n+1})} \le k\cdot\ln{}(n+1)$$ $$k*\ln{}(n+1)+\frac{1}{\varphi{(n+1})} \le k\cdot\ln{}(n+1)$$  At this point, we note that $\varphi{(n)}$ has a lower bound of $\frac{n}{\ln{}\ln{}(n)}$. Hence, our left hand side will maximize with this value, so we can write  $$k\cdot\ln{}(n+1)+\frac{\ln{}\ln{}(n+1)}{n+1} \le k\cdot\ln{}(n+1)$$  Raising e to each side of the equation and simplifying yields  $$\sqrt[n+1]{\ln{}(n+1)} \le \left(\frac{n+1}{n}\right)^k$$  At this point, I don't know what to do. Am I going about this right, or am I completely off base?  Edit: While the initial question is the same as the one this was tagged as a duplicate of, the question being asked here is whether induction is a valid approach to solving this problem without using the methods discussed in the other post.

If $x \geq 2$ prove that $\sum_{ n \leq x} \frac{1}{\phi(n)} = \mathcal{O}(\log(x))$.   This problem is from Apostol's analytic number theory book in the chapter 3 exercises. I am stuck on this problem as I am simply not sure how to do it.  I know from the previous chapters that the following relation exists  $$\phi(n) = \sum_{d \mid n}\mu(d) \frac{n}{d}$$  So I have $\sum_{n \leq x} \phi(n) = \sum_{n \leq x} \sum_{d \mid n}\mu(d) \frac{n}{d}$, where $\mu(d)$ is the Möbius function.  Can anyone offer some information on how to proceed or use this relation?


Is there any method to convert date from "dd Mon yyyy" to "yyyy-mm-ddTHH:MM:SSZ" format in python? For Example: Convert "17 Jan 2020" to "2020-01-17T00:00:00.000Z" format. I have tried datetime.strftime() but I am not able to handle the input date format.

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I have one physical server which runs two Hyper-V Servers. One is for SQL Server and the other is Domain Controller.  I want to install Antivirus on these servers with exclusions added.  Is it advisable to run antivirus on these three machines?  All machines are sharing same NIC. Will it affect network performance when network is monitored by both Host and Guest Machine's Antivirus ?

Does the Virtual PC XP-Mode (or any other virtualized mode) require safety measures, such as antivirus or a firewall?  I'm just wondering if the XP-Mode would be a large security loophole, since it's so much more integrated into Windows 7. Actually I'm wondering the same for Portable Ubuntu, are their any safety measures I should undertake, so that I don't open a backdoor on my computer.


Some definitions: Definition of equinumerous sets Two sets are equinumerous if there exists a bijection $f: A \rightarrow B$. We write $A \sim B $ if $A$ is equinumerous to $B$ Definition of finite set and cardinality A set $A$ is said finite if $A \sim I_n$  where $I_n=\{k \in \mathbb{N} | k \leq n\}$ and $\mathbb{N}=\{1,2...\}$ If $A$ is finite the unique number $n$ such that $A \sim I_n$ is called the cardinality of $A$ Now the question: Prove the cardinality of A is well-defined (that is if $A \sim I_n$  and $A \sim I_m$  then $n=m$ ) Suggestion: prove first that if $n \neq m$ then there exist no bijection between $I_n$ and $I_m$. So, if I assume by absurd that $m \neq n$, let's say $m < n$ There exists an injective but not surjective mapping  $i:I_m \rightarrow I_n$. Now since this is so obvious I am having trouble going forward. Actually, I don't know if the previous statement, provided it is needed, is too far a step into the proof, given that what I want to prove is as much as obvious. Can someone enlighten me?

I am trying to improve my proof-writing skills.  Would the following proof be correct for the $ f:I_n \rightarrow I_m \Rightarrow n = m$ bit?  Problem:  Prove that the notion of number of elements of a nonempty finite set is a well defined concept. More precisely, prove that there exists a bijection $ f:I_n \rightarrow I_m $ if and only if $n = m$.  Attempt:  First prove $ f:I_n \rightarrow I_m \Rightarrow n = m$.  Assume that $ f $ is a bijective function such that $ f:I_n \rightarrow I_m $  By definition, since $f$ is injective, $ \forall a, b \in I_n, f(a) = f(b) \Rightarrow a = b $, where $ f(a), f(b) \in I_m $. Therefore every element in $I_m$ corresponds to at most one element in $I_n$. $\quad (1)$  Also by definition, since $f$ is surjective, $ \forall b \in I_m, \exists a \in I_n $. That is every element in $I_m$ corresponds to at least one element in $I_n$. $ \quad (2)$  Now if $ n > m$, then by $(2)$ some element in $I_n$ corresponds to an element in $I_m$ which is already mapped to. This cannot be true.  Likewise, if $ n < m$ then by $(1)$ some element in $I_n$ corresponds to more than one element in $I_m$. Again, this cannot be true.  Therefore $n = m$.  EDIT:   $I_n = \{  j \in \mathbb{N} ; 1 \leq j \leq n \}$  EDIT 2:  Going into more detail as per the guidance in the comments. I have only proven statement $(1)$ as the proof for statement $(2)$ is similar.     By definition, since $f$ is injective, $ \forall a, b \in I_n, f(a) = f(b) \Rightarrow a = b $, where $ f(a), f(b) \in I_m $.       Therefore every element in $I_m$ corresponds to at most one element in   $I_n$. $\quad (1)$   Proof of this statement:  Select an arbitrary element $b \in I_m$. Assume that $f(a_1) = b$ and $f(a_2) = b$ where $a_1 \neq a_2$. But since $f$ is injective we know that $f(a_1) = f(a_2) \Rightarrow a_1 = a_2$. Therefore every element in $I_m$ corresponds at most to a single element in $I_n$.


I am looking for the author and title for a Science Fiction novel depicting a society where people are paid to obtain necessities and pay to work. It may be a Heinlein, Asimov, or Clark title. Does anyone remember that subplot?

I'm looking for a story I read in the late 1960s or early 70s about a future in which so much stuff is produced (by machines?) that people are obligated to work very hard to wear it all out.   The main character attends a group therapy session which consists of half a dozen analysts and himself. I think he eventually figures out that he can get robots to do his job of using up stuff.


As we all know, we can achieve an Epic and Legendary badges when we hit the daily reputation cap of 200 points per day for 50/150 times.  The question is - which points count here? Just the upvotes for our questions (+5) / answers (+10)? Or accepted answers (+15) as well?  Just a few minutes ago I got 200 points in total (counting accepted answers) and my  badge progress was increased from 56 to 57:    The thing is, when I click the badge details in my profile details, I can see that I scored today just 140/200 points (so only +5 and +10 were counted):    Is it a bug in UI or counting mechanism?

I spotted an inconsistency in the Epic badge tracker:    It says I earned 30 rep today, except my rep tab says:    So the today's rep bar should have been filled. Looks like it doesn't take bounties into account.  I can certainly  for the missing accept, but the bounty was actually awarded before the upvotes.  Update: Well, actually caching isn't to blame, as accepts don't seem to count either.    For the record, I counted 33 qualifying days in my reputation graph, so today was correctly counted in the days earned bar, even though my /reputation page says:  earned at least 200 reputation on 32 days   (but I'm aware there are inconsistencies between the two already).


I began reading through much of the Meta.SO posts on the subject, notably .  On a daily basis, questions such as the ones below are asked on StackOverflow, many of which are are (for good reason) flagged as "too broad" or "off topic".          These are only a handful of thousands like this. Several of these 'broad' questions may be better suited to be asked on , while others are still too ("immature"?) for P.SE. So much so, that .  Question 1   Is there a more suitable forum for new programmers to get generic or beginner help? I have scoured  for any mention of such a SO site, but to no avail.   Question 2  While many of the aforementioned questions may belong on programmers, the community there is prohibitive to intentionally subjective questions, despite being intended for "conceptual questions about software development".    Do SO's policies support helping the OP re-word their question properly so it can be migrated to it to P.SE? Usually subjective questions are flagged and put on hold before this can even be suggested.   Question 3   It has been debated (endlessly) why or why not some subjective questions are allowed to pass through. Can anyone reference specific posts/conversations that discuss establishing a SE site for subjective and/or beginner programming questions?

I'm on SO pretty much every day researching something to do with programming, and over the last month or two, I find I'm growing frustrated and a little disgusted at how many interesting questions have been closed as "not a good fit" or "too subjective".  I think there is a confusion between "subjective" and "calls for judgement". To me one of the most valuable things about SO is the tremendous breadth and depth of experience of the members, and experience translates into smart decisions and advice, and that advice cannot always be asked for, or expressed in terms of, bald facts and data.  It's going to be 'subjective'.  I don't think SO should be Wikipedia. I think that if I could ask a question to a group of skilled programmers sitting around a table at lunch, and get interesting, valuable answers, then I don't care whether the question or the answers are 'subjective', I think that question should equally well be fair game for Stack Overflow.  I would like to see a mechanism whereby people who vote to close a question lose reputation when somebody expresses interest in that question or its responses.  How can I, or can I, influence this aspect of SO?


In llvm-3.4\include\llvm\ADT\STLExtras.h, i see this function:  /// Find the length of an array. template<class T, std::size_t N> inline size_t array_lengthof(T (&)[N]) {   return N; }   This function returns the array length:  int main(){   const char spaces[] = "dededesdf sdf sdfs fdsf"                         "dadsds jsdfdfs ffjsdklfj dsfds";   std::cout << array_lengthof(spaces); //prints 54   return 0; }   Can someone explain how the function works and also what the parameter T (&)[N] means? Are there any scenarios in which this function will not work?

template<typename T, size_t n> size_t array_size(const T (&)[n]) {     return n; }   The part that I don't get is the parameters for this template function. What happens with the array when I pass it through there that gives n as the number of elements in the array?


Define $ f:\mathbb C\rightarrow \mathbb C$ by  $$f(z)=\begin{cases}0 & \text{if } Re(z)=0\text{ or }Im(z)=0\\z & \text{otherwise}.\end{cases}$$ Then the set of points where $f$ is analytic is:     (a) $\{z:Re(z)\neq 0$ and $Im(z)\neq 0\}$,   (b) $\{z:Re(z)\neq 0$ or $Im(z)\neq 0\}$,   (c) $\{z:Re(z)\neq 0\}$,   (d) $\{z:Im(z)\neq 0\}$.   my think all the options are correct. because if consider option a) then the function $f$ will be $f(z)=z$ and it is a polynomial function. hence analytic. but for option b) if let $Re(z)\neq 0\}$ but $\{z:Im(z)= 0\}$ then the function $f$ will be $f(z)=0$ and it is also analytic. similarly we can say every option is correct. Am I right? please help me.

I was thinking about the following problem :  Define $ f:\mathbb C\rightarrow \mathbb C$ by   $$f(z)=\begin{cases}0 & \text{if } Re(z)=0\text{ or }Im(z)=0\\z & \text{otherwise}.\end{cases}$$  Then the set of points where $f$ is analytic is:     (a) $\{z:Re(z)\neq 0$ and $Im(z)\neq 0\}$,   (b) $\{z:Re(z)\neq 0$ or $Im(z)\neq 0\}$,   (c) $\{z:Re(z)\neq 0\}$,   (d) $\{z:Im(z)\neq 0\}$.   I think $f(z)=z$ if $f$ is defined on the set $\{z:Re(z)\neq 0$ and $Im(z)\neq 0\}$ and in that case $f$ is analytic. But I am not sure about the other options. So, choice (a) is right. Am I going in the right direction? Please help. Thanks in advance for your time.


Suppose $f$ is an indefinitely differentiable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\, dx=0$ for $k=\{0,1,2,3,.. .\}$, prove $f=0$ . My attempt : To prove this assertion , it suffice to prove $$\int_0^1 f^2 (x) \,dx=0$$  Then by approximation theorem , we can find a polynomial such that for every $\epsilon \gt 0$ $$\int_0^1 f^2 (x) \,dx= \int_0^1 (f(x)-\sum_{n=0}^N a_n x^n)f(x) ,dx+\int_0^1 \sum_{n=0}^N f(x) a_n x^n\,dx \le \epsilon M$$ where $M=\sup_{x \in [0,1]}|f(x)|$ . It seems that we do not need the condition that $f$ is indefinitely differentiable , if $f$ is continuous then the conclution may hold . My question : a) Suppose $f$ is a Lebesgue integrable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\ dx=0$ for $k=\{0,1,2,3,.. .\}$, can we prove $f=0$ except on a set of measure $0$ ?       b) If a) is not true , suppose $f$ is a Riemann integrable real valued function on$[0,1]$ which satisfies $\int_0^1 x^k f(x)\ dx=0$ for $k=\{0,1,2,3,.. .\}$, can we prove $f=0$ except on a set of measure $0$ ?    EDIT: To prove $f=0 \text{  a.e.}$ , it suffice to prove all the fourier coefficient of $f$ equal to $0$ , then  $$\int_0^1 f(x) \cos(2 \pi nx) \,dx \le \int_0^1 |f(x)||\cos(2 \pi nx)-\sum_{n=0}^{N}a_n x^n| \le \epsilon||f||_{L^1}$$ and the proof is complete.

As the title says, I'm wondering if there is a continuous function such that $f$ is nonzero on $[0, 1]$, and for which $\int_0^1 f(x)x^n dx = 0$ for all $n \geq 1$. I am trying to solve a problem proving that if (on $C([0, 1])$) $\int_0^1 f(x)x^n dx = 0$ for all $n \geq 0$, then $f$ must be identically zero. I presume then we do require the $n=0$ case to hold too, otherwise it wouldn't be part of the statement. Is there ay function which is not identically zero which satisfies $\int_0^1 f(x)x^n dx = 0$ for all $n \geq 1$?  The statement I am attempting to prove is homework, but this is just idle curiosity (though I will tag it as homework anyway since it is related). Thank you!


Prove: 133 | $11^{k+1}$ + $12^{2k-1}$ , $\forall$ k > 0  Basis: Let k = 1  133 | $11^{2}$ + $12^{1}$ $\implies$ 133 | 133, True  Hypo: Assume true for k = n  133 | $11^{n+1}$ + $12^{2n-1}$  Need to Prove: k = (n+1)  133 | $11^{(n+1)+1}$ + $12^{2(n+1)-1}$  $\implies$ 133 | $11^{n+2}$ + $12^{2n+2-1}$  $\implies$ 133 | $11$($11^{n+1}$) + $12^2$($12^{2n-1}$)  ???  I know that by the hypothesis, 133 divides what is in the parenthesis, and that $11+12^2$ is also divisible by 133, but how can I manipulate the equation to make it so? If you guys can refer me to where I can read about this, or explain to me how and why, I would appreciate it. Thank you.

Problem taken from a  on mathematical induction by Gerardo Con Diaz. Although it doesn't look like anything special, I have spent a considerable amount of time trying to crack this, with no luck. Most likely, due to the late hour, I am missing something very trivial here.     Prove that for any integer $n$, the number $11^{n+1}+12^{2n-1}$ is divisible by $133$.   I have tried multiplying through by $12$ and rearranging, but like I said with meager results. I arrived at $11^{n+2}+12^{2n+1}$ which satisfies the induction hypothesis for LHS, but for the RHS I got stuck at $12 \times 133m-11^{n+1}-11^{n+3}$ or $12^2 \times 133m-12 \times11^{n+1}-11^{n+3}$ and several other combinations none of which would let me factor out $133$.


In C++, suppose I write a template function  template<typename T> void func(T obj){     obj.print(); }   But for some class, there might be not print() member function defined, which causes compilation errors. However, obj.print() may be not so important. Instead of add print() to the class, I prefer to make print() not called.  This may be a weird question. But just wondering if anyone ever saw such question.

Is it possible to write a template that changes behavior depending on if a certain member function is defined on a class?  Here's a simple example of what I would want to write:  template<class T> std::string optionalToString(T* obj) {     if (FUNCTION_EXISTS(T->toString))         return obj->toString();     else         return "toString not defined"; }   So, if class T has toString() defined, then it uses it; otherwise, it doesn't. The magical part that I don't know how to do is the "FUNCTION_EXISTS" part.


I just have A REALLY BIG PROBLEM. I've made a pdf file, and on my pc is readeable, and on others pc (I've send link to download to others) but, when i put it on my USB flashdrive it's not readeable anymore.  Please, what`s the matter...?  Thank you!

Today I went to somebody with a PDF file, I've made it with LibreOffice Writer, but, when he tried to open the file, it said that it was a corrupt file, my PDF.   I've put the file on my usb stick, and from there he opened it.  What can I do to open that file on that pc? I have to say that other files (PDF) can be opened on that pc. My file can't be corrupt because some of my friends can open it.  Thank you.