I apologise if this seems like an elementary and silly question, but I am confused about the integral $$I=\int^{\infty}_{-\infty}\frac{\cos{x}}{1+x^2}dx=\frac{\pi}{e}$$ If I consider a semicircular contour with infinite radius in the upper half on the plane, I can write $$I=\Re\oint_C \frac{e^{iz}}{1+z^2}dz=\Re\left[2\pi i\lim_{z \to i}\frac{e^{iz}}{z+i}\right]=\frac{\pi}{e}$$ since the integral over the arc vanishes as the radius approaches infinity. However, I get an incorrect result if I instead use the integral $$I=\oint_C\frac{\cos{z}}{1+z^2}dz=\pi i\lim_{z \to i}\frac{e^{iz}+e^{-iz}}{z+i}=\frac{\pi}{2}(e+e^{-1})\neq \frac{\pi}{e}$$ May I know where I have made a mistake? Why are we not allowed to use (or are we?) $\cos{z}$ directly in the complex integrand but have to use $e^{iz}$ instead and extract the real part? And why is it that the 2 answers turn out to be different? Help offered to clarify my doubts will be appreciated. Thank you.

In my book I have a theorem that goes something like the following     Let $P(x)$ be $Q(x)$ polynomials such that $\deg(Q) \geq \deg(P) + 2$.   Then \begin{align*}  \int_{-\infty}^{\infty} \frac{P(x)}{Q(x)}  e^{iax} \,\mathrm{d}x  = 2 \pi i \frac{a}{|a|} \sum_{k=1}^{m} \mathrm{Res}\left[  \frac{P(x)}{Q(x)} , z_k \right] \end{align*} where $a$ is a real   constant and $z_1,\,\ldots\,,z_m$ are the singularities to $P(x)/Q(x)$ in   the upper halfplane if $a>0$ and the lower halfplane if $a<0$.   I am having a bit of problems understanding this. I know the reason why we have to switch contour is that $e^{iz}$ blows up. But I really can not see why or how it blows up.   Take the canonical example for why this theorem is useful  $$   J = \int_{-\infty}^\infty \frac{e^{iz}}{z^2+1} $$    Now the clue here is to show that the integral along the curve tends to zero, and then use the residue theorem. To show that the integral tends to zero I did this \begin{align*}  \left| \int_{C_1} \frac{e^{iz}}{1+z^2} \,\mathrm{d}z\right|  \leq \int_{C_1} \left| \frac{e^{iz}}{1+z^2} \right| \,\mathrm{d}z   \leq \sup_{z = R e^{i \theta}} \left( \frac{1}{\left|1+z^2\right|} \right)       \int_{C_1} |e^{iz}| \,\mathrm{d}z \end{align*} where the $ML$-inequality was used in the last inequality  On the circle with radius $R$ we have $|e^{iz}|=R$, and we can use the inequality $|a+b|\leq|a|-|b|$ to simplify further \begin{align*}  \left|\int_{D_R} \frac{e^{iz}}{1+z^2}\,\mathrm{d}z \right|  \leq \sup_{z = R e^{i \theta}} \left( \frac{1}{|z|^2-1}\right)  \int_{D_R} R \,\mathrm{d}z  \leq \pi \frac{R}{R^2-1} \end{align*} which tends to zero as $R \to \infty$ as wanted. but if one instead had $e^{-iz}$ then the theorem states that one has to use the lower half plane. But I do not see where my calculations err if one persists in using the contour in the upper half plane? What goes wrong, and why does it go wrong? $|e^{-iz}|$ should still be $R$ on the semi-circle.   How can one formally show that the integral diverges when picking the contour as a semi circle in the lower half plane?


I'm wondering what is the best practice of designing select / drop down lists. In some projects I've worked in the select on a form was filled with first value from the list. In other project we had always "-- select --" option chosen before user selected something else. I can imagine also empty field.  Is there any guideline about it? What is state of art in this matter?

Given that there is no logically default animal from the list of animals below, what should be the "Default Value" below, according to best practice?  <label for="animal">Animal (required):</label> <select name="animal">   <option value="">Default Value</option>   <option value="0">Cat</option>   <option value="1">Dog</option>   <option value="2">Horse</option>   <option value="3">Pig</option>   <option value="4">Sheep</option> </select>   A blank value, <option value=""></option>?  Something visually irritating, <option value="">***CHOOSE ANIMAL***</option>?  Something which blends in but provides instruction, <option value="">Select an Animal</option>?  Something else entirely?


Sometimes chemists want to signify that something is attached to a C-ring without specifying the exact position to which it is bound, for example because it's random. Instead they to something like  (see the R^1). This could also be attached to the center of the ring or the "aromatic circle" in the bottom left. Can this be done in chemfig?

I've read all the questions regarding chemical structure rendering that I could find on this website. I've decided to use chemfig to render the structures.  One certain type of bond, illustrated below, is missing from every chemical structure rendering package. How would I make the following type of bond?


I am getting this warning after updating to PHP 7.2 can anyone help me resolve it?     Warning: Declaration of foundation_navigation::start_lvl(&$output,   $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output,   $depth = 0, $args = Array) in   /nas/content/staging/arnoldhill/wp-content/themes/arnoldhill/functions.php   on line 121   The function is currently written like this  // Add class to navigation sub-menu class foundation_navigation extends Walker_Nav_Menu {  function start_lvl(&$output, $depth) {     $indent = str_repeat("\t", $depth);     $output .= "\n$indent<ul class=\"flyout\">\n"; }  function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {     $id_field = $this->db_fields['id'];     if ( !empty( $children_elements[ $element->$id_field ] ) ) {         $element->classes[] = 'has-flyout';     }         Walker_Nav_Menu::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );     } }   Thanks  Henry

I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error:     ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203   It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine.  What would be the best way to remedy this problem?


In recent years Emoji (Images which are treated as text by computers, represented in the extended unicode range) have entered the common parlance of the English language.  But now I'm confused 😕  According to  it's a Japanese word, appropriated into English, so it doesn't follow the typical pluralisation rules of Latin-rooted words (for instance, the plural of radius is radii), so we can't use 'emojus' as a singular.  Is 'Emoji' singular, plural or both? If it's only one, what is the other form?

In all of the descriptive dictionary definitions of “emoji” I've encountered thus far (e.g. ), the plural of emoji is given an optional “s.”     plural emoji or emo·jis   In the responses to , the term is described as a Latinized version of its Japanese progenitor.   Though it doesn't follow the Latin pattern exactly (there is no emojus of which I am aware), does its Latinization lend any credence to an argument in favor of using emoji for both the singular and plural form of the noun (i.e. as a )?


I'm using  in drupal7.26 with WEBFORM module and is working fine when I click  a link the form opens in new modal.  What I want is to open the same WEBFORM with out clicking any link instead it should be open on page/body load event.  I'm using  with CTOOLS and WEBFORM modules.  Any help would be appreciated.  Cheers -Zafar

What's the sanest way to present a Ctools modal to the user while bypassing the normal AJAX workflow? For example, how could I show a completely JavaScript-generated "Are you sure you want to log out?" confirmation prompt to the user in a Ctools modal after the user clicks the "log out" link?  I know I can probably fake a box which would get the same styling as the Ctools modal, but I'd rather avoid silly hacks if not strictly necessary.


By following  I started using command instead of which when checking for the existence of a program.  But man command returns:  No manual entry for command   Why there is no manual for it by default? And how can I install it? I'm using Ubuntu 16.04.5 LTS.

I often see things like     read man xyz   For more information read xyz's man page.   see info xyz    so I wonder:   How can I get help on terminal commands generally? What exactly are these man and info pages?   How can I find and view them?


Prove that if $\{u_1, u_2, u_3\}$ is an orthogonal set of nonzero vectors in $\mathbb{R}^n$ and we have scalars $c_1, c_2, c_3$ such that $c_1u_1+ c_2u_2+c_3u_3 = 0$, then each of the scalars is equal to zero.  I'm having trouble finding a way to prove that the scalars must be zero.   I started by showing that for the set to be orthogonal you must have   $u_1 \cdot u_2 = 0$  $u_1 \cdot u_3 = 0$  $u_2 \cdot u_3 = 0$  and that the above stated condition also says while $u1, u2, u3 \not = 0$.  then I wrote the hypothesis and expanded it:  if $c_1u_1 + c_2u_2 + c_3u_3 = 0$, then  $c_1(u_{11}, u_{12}, \ldots ,u_{1n}) + c_2(u_{21}, u_{22}, \ldots, u_{2n}) + c_3(u_{31}, u_{32}, \ldots , u_{3n}) = (0, 0, \ldots , 0)$  I can show that each of scalars being $= 0$ would give me the result, but I'm stuck finding out how to show its the only way. I've looked everywhere for help. help?  edit:  also, if I expanded each $c_1u_{1n}$ vector, then set the sum of each first element to $0$, and solve for $c_1,c_2,c_3$ simultaniously by plugging one into another, would it come out to an end result yielding $0$?  and since we haven't been taught linear independence yet in this class I believe I am supposed to write the proof without referencing it. so it's not a duplicate....

A set of orthonormal vectors  is linearly independent.   Since I wouldn't memorize any such facts that is mentioned in my course book, what is the reason behind it and why are they linearly independent?


How does one prove that an orbit of a satellite around a planet of significantly greater mass than the satellite is a conic section (i.e. an ellipse, circle, hyperbola, or parabola)?   Also, there is also the case of a degenerate orbit, which we have for example when the satellite starts at rest with respect to the planet, and the satellite moves along a straight line towards the center of the planet.   By the way, I realize this may be an extremely tough question, because I have seen once before the derivation with vector calculus that bounded orbits are ellipses, and it is definitely quite involved. As such, you may wish to provide an outline of how might this be done (does one have to consider bounded and open orbits separately, for example?) and omit the math.  Also note that I assume the satellite is small compared to the planet because I don't want to add the complexity of a two body-system orbiting around the center of mass just yet!

How can analytically be  the ?   I found some extremely synthetic equations which from the  (in particular $\mathbf{F} = m \mathbf{a}$) tried to obtain the Kepler's laws, but even if it seemed to be a nice procedure they were too much incomplete.


I'm looking for a word that describes a person who destroys the momentum of something being planned, or of a currently running plan. Like it could be something they say or do, or just their presence. I know the word buzzkill exists but I don't it fits to describe a person who says they can't make it to an event because of work or something, and this causes all planning to stop.(maybe it does? If so I guess I'm looking for a synonym for buzzkill?(which in that case I don't know why I posted this, instead of using google))

You know, the kind of person who you tell stuff like "I really want to go to this thing" and they point out everything wrong with it.


We have got nearly 700 plus stored procedures with nearly 50% uses #tmp tables in their queries.   Need to write query to search through all procedures, and list procedures which uses tmp tables.  Can this be done by querying some system tables where procedure information is stored.

I've just inherited a database with a number of tables and stored procedures.  I use Microsoft SQL Server Management Studio.  One, or possibly more, stored procedures update a specific table.  I'd like to do a textual search through all the stored procedures to look for the procedure that updates the table.  If the raw SQL was in our code, I'd just grep the code base, but with stored procedures I'm not sure how to search through all the stored procedures.  I'd also like to rename a few things and do a find/replace throughout the stored procedures.  Is it possible to search and replace in stored procedures using Microsoft SQL Server Management Studio?


What is this process and how can I get rid of it? I ran antivirus etc but without any success. Terminating it in the activity monitor won't change anything.   Sampling process 416 for 3 seconds with 1 millisecond of run time between samples Sampling completed, processing symbols... Analysis of sampling usernoted (pid 416) every 1 millisecond Process:         usernoted [416] Path:            /usr/sbin/usernoted Load Address:    0x10ef1f000 Identifier:      usernoted Version:         845.40.3 Code Type:       X86-64 Parent Process:  ??? [1]  Date/Time:       2020-11-02 14:29:16.852 +0100 Launch Time:     2020-11-02 14:24:15.500 +0100 OS Version:      Mac OS X 10.15.7 (19H2) Report Version:  7 Analysis Tool:   /usr/bin/sample  Physical footprint:         11.4M Physical footprint (peak):  11.7M ----  Call graph:     2702 Thread_4148   DispatchQueue_1: com.apple.main-thread  (serial)     + 2702 start  (in libdyld.dylib) + 1  [0x7fff6eaa8cc9]     +   2702 ???  (in usernoted)  load address 0x10ef1f000 + 0x2cd5  [0x10ef21cd5]     +     2702 autoreleasepool<A>(invoking:)  (in libswiftObjectiveC.dylib) + 46  [0x7fff6e75cd8e]     +       2702 ???  (in usernoted)  load address 0x10ef1f000 + 0x3cce  [0x10ef22cce]     +         2702 CFRunLoopRun  (in CoreFoundation) + 40  [0x7fff34c58489]     +           2702 CFRunLoopRunSpecific  (in CoreFoundation) + 462  [0x7fff34bcfe3e]     +             2702 __CFRunLoopRun  (in CoreFoundation) + 1319  [0x7fff34bd09c2]     +               2702 __CFRunLoopServiceMachPort  (in CoreFoundation) + 247  [0x7fff34bd1ef5]     +                 2702 mach_msg  (in libsystem_kernel.dylib) + 60  [0x7fff6ebea170]     +                   2702 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff6ebe9dfa]     2702 Thread_4198   DispatchQueue_20: usernoted_server  (serial)     + 2592 start_wqthread  (in libsystem_pthread.dylib) + 15  [0x7fff6eca8b77]     + ! 2592 _pthread_wqthread  (in libsystem_pthread.dylib) + 290  [0x7fff6eca9a3d]     + !   2592 _dispatch_workloop_worker_thread  (in libdispatch.dylib) + 596  [0x7fff6ea5ec09]     + !     2592 _dispatch_lane_invoke  (in libdispatch.dylib) + 363  [0x7fff6ea555d6]     + !       2571 _dispatch_lane_serial_drain  (in libdispatch.dylib) + 597  [0x7fff6ea54c44]     + !       : 2571 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x7fff6ea4f658]     + !       :   2542 _dispatch_call_block_and_release  (in libdispatch.dylib) + 12  [0x7fff6ea4e6c4]     + !       :   | 2534 ???  (in usernoted)  load address 0x10ef1f000 + 0x3829  [0x10ef22829]     + !       :   | + 2532 ???  (in usernoted)  load address 0x10ef1f000 + 0xf6c5a  [0x10f015c5a]     + !       :   | + ! 1427 ???  (in usernoted)  load address 0x10ef1f000 +  Sample analysis of process 416 written to file /dev/stdout

For the past couple of weeks, a process identified as usernoted appeared to "take over" my machine after a few hours of use, eating over 99% of available CPU.  Force quitting the process doesn't help; only a system restart puts usernoted to sleep for a while.  What is this process and how do I get it under control?  I am running OS X 10.10.5 (build 14F1021).


Query on a Solution to problem: If a is odd, then gcd(3a,3a+2)=1. I tried to put a=2k+1 to be an odd number. But it does not solved.

I would like to know why $\gcd(3n,3n+ 2) = 1$ when $n$ is odd.  I tried to use the Euclidean Algorithm, but I got confused: $$ 3n+2 = 3n + 2$$ $$3n = \ ? $$ Thanks!


I don't know if Ghost Adventures is scripted or not. A lot of things have happened to me that are paranormal, it just seems like most of the time in the show, they seem off. I know that there is a lot of energy there at most of the places they go to but, I'm just not too sure if Ghost Adventures is scripted.

I recently started watching Ghost Adventures and they seem real to me. But then I checked it on the web and found that it is a fake show. Some say it is fake, while others say it is real.   Still, I decided to check Wikipedia. I found that the show has "script" written by some crew member.  So, is this TV Series real or fake? If this is real, why it has "script"?


Let the relation in $\mathbb{R}: x \equiv y \ \mbox{mod} \ \mathbb{Z}$, when $x-y \in \mathbb{Z}$. For each $n \in \mathbb{N}$, let $x_n \in [0,1)$ such that $x_n \equiv \sqrt{n} \ \mbox{mod} \ \mathbb{Z}$. Prove $X = \{x_n : n \in \mathbb{N} \}$ is dense in $[0,1]$. I don't know where to start, but I have doubts about using the greatest integer.

Let $x_n \in[0,1)$ s.t $x_n - \sqrt{n}\in \mathbb{Z}$. Prove that $X=\{x_n | n\in \mathbb{N}\}$ is dense in $[0,1]$.  It it suffices to prove that $\overline{X}=[0,1].$ I was trying to use the fact that $p+q\sqrt{2}$ $(p,q \in \mathbb{N})$ is dense in $\mathbb{R}$. So I can choose $n=2q^2$ and $x_n=p+q\sqrt{2}$ close enought of $1$. Hence, $x_n=p+q\sqrt{2} - q\sqrt{2} = p \in \mathbb{Z}$. I am pretty sure that this argument is invalid but I feel that the idea can be useful somehow.


Is there any difference between  \DeclareMathOperator{\erf}{erf}   and  \def{\erfc}{\mathop{\mathrm{erfc}}}   apart of the fact that \DeclareMathOperator is defined in amsmath package?

One sees all kind of versions in source files for defining something like a limit etc. So my question is which one serves what purpose. Is there any "best practice" in chosing one over the other?


I had previously ubuntu 14.04 LTS installed and I have so many projects on laravel 5.0. After the release of Ubuntu 16.04 I installed it on my machine and I am facing a lot of difficulties to get laravel 5.0 working in it. I installed Xampp 7.0.5 / PHP 7.0.5. There were errors about mbstring and mcrypt I got rid of those errors by installing them from terminal. Now when I try to run php artisan serve it throws [PDOException] Driver not found error. In my phpinfo I can see PDOdrivers for mysql, pgsql, sqlite are enabled.  The requirement of laravel.5.0 says PHP >= 5.4, PHP < 7, so I also tried installing Xampp 5.6.20 / PHP 5.6.20 and downgrading the php version of 16.04 to php5.  Is there any way I can get my laravel 5.0 projects working on Ubuntu 16.04?  I am wondering if laravel 5.0 has worked in 16.04 for other people. Thank you in advance.

I am trying to revert my PHP version to 5.6 from 7 and though I removed PHP 7 and then installed PHP 5.6 I still seem to be running version 7.  Is there a simple method for moving through PHP versions where apache, phpMyAdmin and co are configured appropriately?  A simple way to change the current version of PHP on the fly and even site by site would be great.


This  (and connected links) give good advice on the sorts of things to do.  But they do not say what the criteria for lifting of an answer ban is.  I'm assuming there is some algorithm involving rep, time maybe, maybe certain activities?   It also doesn't say whether one is notified or one just has to use trial and error.  I have no idea of the effort involved in getting ban lifted and whether it is worth while or not.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I am new in ML so excuse me if this is a bit basic. I noticed many times that the requirement for some methods in ML is that the instances are IID(e.g. Stochastic Gradient Descent). I don't exactly understand this. Does this means that all features must have the same distribution and must be independent? Or does this mean that chosen instances must be independent and have the same distribution (I don't know how better to write this, not sure it is clear). And to assure IID random selection of instances from training set is enough (Because every feature has some distribution and with random selection you provide independent instance)?

The i.i.d. assumption states:  We are given a data set, $\{(x_i,y_i)\}_{i = 1, \ldots, n}$, each data $(x_i,y_i)$ is generated in an independent and identically distributed fashion.   To me, physically this means that we can imagine that the generation of $(x_i,y_i)$ has no affect on $(x_j,y_j)$, $j \neq i$ and vice versa.  But does this hold true in practice?  For example, the most basic machine learning task is prediction on MNIST dataset. Is there a way to know whether MNIST was generated in an i.i.d. fashion? Similarly for thousands of other data sets. How do we "any practitioner" know how the data set is generated?  Sometimes I also see people mentioning shuffling your data to make the distribution more independent or random. Does shuffling tangibly create benefit as compared to a non-shuffled data set?   For example, suppose we create a "sequential" MNIST dataset contained digits arranged in an increasing sequence 1,2,3,4,5,6,..obviously, the data set was not generated in an independent fashion. If you generate 1, the next one must be 2. But does training a classifier on this data set has any difference as compared to a shuffled dataset?  Just some basic questions.


We have been led to believe that in the theory of universe expansion, the farthest object is moving faster away from us than the nearest object, attributing the difference to red shift.   Question: is it possible, due to the decay of light towards red, that the farthest object appears or is measured to have higher redshift?

I'm interested if any of the following explanations have enough predictive capability to explain the observations we see today. The claim is that the Universe is not expanding, and that red-shift of light is caused by:    Though a couple of these are simply ridiculous, I'm still interested. Keep in mind that I am not a creationist, but am looking for reasons to see if any of these are valid or invalid.


I am trying to source a shell script from python.  I have tried to do that in several ways.  One of which:  def source(script, update=1):     pipe = Popen(f". {script}; env", stdout=PIPE, shell=True)     data = pipe.communicate()[0]     env = dict(str(line).split("=", 1) for line in data.splitlines())     if update:         environ.update(env)     return env   I have also tried exec(file) and os.system. None of which seems to give me the ability to keep the environment variables on the shell from which I run the python script. Does anyone of you have any idea how I can do that?

In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following:  import os os.environ["FOO"] = "A_Value"   When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (or any child process) to modify the environment of its parent process?  I know you typically solve this problem using something like  source script_name.sh   But this conflicts with other requirements I have.


I know there's been pretty substantial discussion regarding Moderators being able to accept unaccepted answers, but the obvious issue with that is Moderator workload, purpose, and expertise.  For an example just check out   I'd propose that another direction be taken, after a period of say 6 months, the question is then opened up to users with a particular reputation level (you pick), and that after a certain number of these super-users vote to accept a particular answer, that the question be closed off as accepted.    This would address the workload issue by distributing it, it would address the expertise issue but requiring essentially peer review, and it would attack the growing problem of unanswered questions.  I believe an incentive could be awarded to those super-users for being part of an accepted answer to encourage the gradual cleanup of unanswered questions, maybe even a new badge of some sort.  Thoughts?    EDIT: As I've mentioned in response to comments below, sometimes, the most upvoted answer isn't the best practice, as a user, I'd like to know what the pro's do more than what the masses do, and so in limiting this particular ability to those with higher rep would tend to lean in favour of a best-practice rather than popularity.    EDIT 2: I see that some have already decided that this is a duplicate simply because the question was asked, but my contention is that none of the others have proposed viable methods, I think this does, and it does it differently.    EDIT 3: The question of what if the OP still wants it open came up below, I would propose that the OP then have the ability to reverse the community selected answer, and lock it from further community closing's.    EDIT 4: Based on the discussion below, it's clear that this isn't just a repeat of past questions and that there are some good ideas here, I BEG those who marked this question as a duplicate to read on and reconsider so that we can continue to have a conversation on the merits, or at the very least point out why you don't believe it deserves to be heard out.  I don't believe you gave it a fair shake.    Final Edit: Long live the popularity contest!

Recently, I have answered a few questions that were upvoted by factors more than the accepted answer, but not accepted. , at the time of my writing, has an accepted answer that the asker said was not what he wanted. I don't know why. In the future, when people view this, people might only look at the accepted answer and move on. Would it be possible to have a "community accepted" feature? Maybe only the people at the top can vote to accept it or something. How much rep, if any, should go to that person?


I'm currently carrying out a differential attack on the FEAL-4 algorithm, however I have hit a bit of a wall.   Basically I attacked the final round first ($K3$) using the differential characteristic of 0x80800000 which yields a differential of 0x02000000 with a probability of $1$.  I have found four possibilities for the round 4 subkey. To advance the attack to the next round (round 3) and verify which key is the correct one, I need to choose a new differential characteristic (other than 0x80800000) to attack round 3.   I know the difference in the input to round 2 should be 0x02000000, so I can begin my attack on round 3 — but how do I go about finding my differential characteristic so I can generate my plaintext/ciphertext pairs?

I have read a lot of summaries of block ciphers particularly with regards to the NIST competitions stating that reduced-round block ciphers are – for example – vulnerable to differential cryptanalysis.  I have a general idea that the application of differential cryptanalysis is to look at the difference between inputs;  makes that fairly clear. However, I could take any two inputs for any given block cipher and I am pretty certain I'd be staring at random differences.    I am aware this is the idea of a well written block cipher; however, assuming a broken or vulnerable cipher (feel free to provide simple examples) how do I go about choosing differences to try?  Are there any clues in algorithm design that would inform a decision on which values to choose?  How does being vulnerable to differential cryptanalysis impact a cipher in the wild?  If all I have are differences between known plain-texts and known keys as my analysis and a captured ciphertext as my data to exploit, what can I actually deduce?


To determine this for $13^{33} \pmod{64}$ is easy since $\phi(64)=32$ and $\gcd(64,33)=1$, we have $13^{\phi(64)}=13^{32}\equiv1 \pmod{64}$. This means that  $$13^{33}=13^{31}\cdot13\equiv 13 \equiv1 \pmod{64}$$  But this method don't apply to $3^{18} \pmod{37}$ since $\phi(37)=36>18.$ How can I do this?

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


App Version: 1.6.2.5 Device: iPhone 5s (Global) OS Version: Version 10.2.1 (Build 14D15)

The link to the recommended job in the app brings you to a page with the text: Not Found    Looking at the link it seems like after changing the URL structure in Stack Overflow Jobs they have not been updated in the apps.  For the job in the screenshot this is the used URL in the app:    The correct URL is:


A few days ago, I accidentally replaced my desktop in Mint 18 with a virtual console with an errant keystroke. Not having an obvious way to reverse the changes, I logged in and typed exit to exit the console and go back to the desktop. Instead, the computer rebooted, and I lost God-only-knows-how-much unsaved work.  After showing the Mint logo and flashing a message underneath it far too quickly to read, the computer now boots only to a black screen. By pressing esc during reboot, I can get to a Startup Menu. I ran disk checks and memory checks using it, and they all came up clean. None of the other options in this menu help. I have no idea what to do.  The screen is clearly receiving power, and the black screen that it boots to shows a dash or underscore in the top right corner.  How do I get my computer back? It's an HP Pavilion laptop.


An html file with above form structure is given to you.   or      A html file with above form structure is given to you.

I've seen many people who say:     This is a HTML page.   Yet I've also seen many people who say:     This is an HTML page.   Are both usages equally correct?  Or, which is the grammatically correct one?       Possible Duplicates:


Can someone explain why the inverse trig functions are trapped between those particular numbers.

Why does the calculator do a cc (counterclockwise) rotation for positive trig ratios instead of clockwise,  and a clockwise rotation for negative sine & tan instead of cc and a counterclockwise rotation for negative cos ratios instead of a clockwise   ie. in degree mode  $\cos^{-1}(-5/12)=114.62$  $\sin^{-1}(-5/12)=-24.62$  $\tan^{-1}(-5/12)=-22.61$  Is it maybe picking the value that involves the least amount of computing power? or is it a matter of convention? or am I overlooking something?


I just followed directions on how to get ubuntu onto a USB thumbdrive using OSX.  I can restart my macbook air and hold down the alt/option key and boot into Ubuntu fine.. BUT.. Ubuntu says it want's to run an INSTALLER.. I am afraid if I do that it's going to overwrite my internal harddrive and brick my macbook air... or at least overwrite my OSX filesystem - ... Is it safe to run the installer?  will it complete installation in some way on the USB thumbdrive and make it so if I want to run ubuntu I just boot into the thumbdrive and I'm off to the races?  After doing some more reading here it looks like I need to get a second USB THumbdrive and use the installer on the first drive to install Ubuntu 'for real' onto the second drive so that I'm not always in 'live' mode?  Is that correct?  Thanks!  I hope my question is clear.

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


The number 328 is written on the board.  Two players alternate writing positive divisors of 328 on  the board, subject to the following rules:   No divisor of a previously written number may be written; The player who write 328 loses.   Who has a winning strategy, the first or the second player?  The divisors of 328 are 1,2, 4, 8, 41, 82, 164.  How to think the winning strategy?

Game of divisors: We have number N. On board we write down all divisiors of N. Players choose one of divisors. Lets say d. We erase d and all divisors of d. The player, who erase N, loose.   It was told me that player 2 have winnig strategy. Could you tell me how to show it? Any tips?


Let $E^{\circ}$ denote the set of all interior points of a set $E$ Prove that $E^{\circ}$ is always open. Important definitions:  An interior point of a set E, is a point $p$ in which there exists a nbhd $N_{\delta}(p)$ such that $N_{\delta}(p) \subset E$. A set is said to be open if every point of $E$ is an interior point  My Solution: I would've just said that the set $E^{\circ}$ is open by this definition. But another solution I found was: If $x\in E^{\circ} \rightarrow x\in U \subset E^{\circ}$ where $U$ is open. Therefore any point $x\in U$ has a nbhd $N_{\delta}(p) \subset E$. This implies $E^{\circ} = \bigcup _{U \subset E}U$. And from this it is concluded that $E^{\circ}$ is open. My question is why is this extended argument necessary? This happens to me often where I encounter a question which appears to be asking something simple, but the actual proof is more complicated than initially anticipated.

Prove: The set of interior points of any set $A$, written int($A$), is an open set.  Let $p\in$ int($A$), then by definition $p$ must belong to some open interval $S_{p}\subset A$. Now since we know that the real line itself is open then $S_{p}\subset \mathbb{R}$. Now suppose we pick some $q\in A$. I want $q\in$ int($A$).   I am stuck here I am not sure if my logic is correct, any suggestions would be greatly appreciated.    Definition of interior: Let $A$ be a set of real numbers. A point $p\in A$ is an interior point iff $p$ belongs to some open interval $S_{p}$ which is contained in A: $p\in S_{p}\subset A$  Definition of open: A set $A$ is open iff each of its points is an interior point


I have two script.  First:  a = 0; for (var i = 1000000000 - 1; i >= 0; i--) {     a += i; }; console.log(a);   Secend:  setInterval(function(){     if (l.data('pos') == 0) {         l.css('margin-left', '10px');         l.data('pos', '1');     }else{         l.css('margin-left', '0');         l.data('pos', '0');     } }, 100);     As you see, browser run second section after finishing first section.  Can I run first section in background and second section runs from document ready?

I have JavaScript which performs a whole lot of calculations as well as reading/writing values from/to the DOM. The page is huge so this often ends up locking the browser for up to a minute (sometimes longer with IE) with 100% CPU usage.  Are there any resources on optimising JavaScript to prevent this from happening (all I can find is how to turn off Firefox's long running script warning)?


It seems like cleric in PF can use unlimited times of 0-level spell a day.  By a simple calculation, a level 1 cleric working for 8 hours a day can create 9600 gallons of water a day, by using the  spell.  Am I misunderstanding the rules or is that how the Pathfinder rules work?  If a cleric can provide water for a whole town of people in a desert, this will surely bring a huge effect on desert civilizations. I am not very familiar with the worlds and settings of Pathfinder, did the designers consider these types of things when making the setting?

Playing Skull & Shackles and we got shipwrecked. My character has  as a cantrip. According to the books, cantrips are so inconsequential that they can be cast "without limit".  Mathematically, a character could cast Mending every 6 seconds healing a hole in a ship an average of 1200 HP in an hour. The question is - are there any rules that prevent a character from casting Mending 600 times in a row for an hour?  My DM didn't let me get away with it, which is fine. I'm just curious if there are any rules out there that might apply.  :Edit: My purpose in asking the question is less about how to repair the ship and more about the casting limitations for a spellcaster. My DM and I agreed that between the two of us, we could find a way to make mending work. Our question was about whether or not my character could keep it up long enough for it to work. As someone pointed out, mending has a 10 minute casting time, so the math actually works out to an average of 12 HP in an hour, which would take several days to repair a hole in the hull of a ship. Several days of constant casting. At what point does a character become exhausted from casting cantrips? That is the question I intended to ask and it might apply to other situations in the future, beyond mending a ship.


I have a script that takes filenames as positional parameters.  I perform a few operations on these and then tar them.  Currently my script is not working.  The echo line is there for debugging purposes.     Please clarify this statement      But when I try to tar with in the script if can file the file I want to tar.   SNIPPET  while [[ $# > 0 ]]; do     key="$1"     shift     files=$files" "\"${key}\"  done  echo tar -cvf backup.tar $files tar -cvf backup.tar $files   OUTPUT:  tar -cvf backup.tar "test.txt" tar: "test.txt": Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors   I am using the double quotes around the filename (test.txt) as I want to handle files with spaces.  If I were to remove the quotes in the script (\"), it will work but then I can’t handle filenames with spaces.  Any ideas?

If you've been following unix.stackexchange.com for a while, you should hopefully know by now that leaving a variable unquoted in list context (as in echo $var) in Bourne/POSIX shells (zsh being the exception) has a very special meaning and shouldn't be done unless you have a very good reason to.  It's discussed at length in a number of Q&A here (Examples: , , , )  That has been the case since the initial release of the Bourne shell in the late 70s and hasn't been changed by the Korn shell (one of ) or bash which mostly copied the Korn shell, and that's how that has been specified by POSIX/Unix.  Now, we're still seeing a number of answers here and even occasionally publicly released shell code where variables are not quoted. You'd have thought people would have learnt by now.  In my experience, there are mainly 3 types of people who omit to quote their variables:   beginners. Those can be excused as admittedly it's a completely unintuitive syntax. And it's our role on this site to educate them. forgetful people. people who are not convinced even after repeated hammering, who think that surely the Bourne shell author did not intend us to quote all our variables.   Maybe we can convince them if we expose the risk associated with this kind of behaviours.  What's the worst thing than can possibly happen if you forget to quote your variables. Is it really that bad?  What kind of vulnerability are we talking of here?  In what contexts can it be a problem?


Should Stack Exchanges sites with top-level domains have *.stackexchange.com redirects? For example:   stackoverflow.stackexchange.com serverfault.stackexchange.com superuser.stackexchange.com askubuntu.stackexchange.com seasonedadvice.stackexchange.com   (And also the meta.*.stackexchange.com versions of those too.)  It just seems like if someone hears about this Stack Exchange site Example that might help, they might try typing example.stackexchange.com instead of example.com.

I have a Chrome search engine of the form http://%s.stackexchange.com/ that I use to quickly move between various SE sites (I find this more efficient than bumbling my way through the multicollider).  It would be nice if we could get aliases (like e.g. http://so.stackexchange.com/ or http://stackoverflow.stackexchange.com/ as a redirect to ) for all the sites that have their own domain names. I believe that's just the Trilogy (SO, pt/ja/ru.SO, SU, SF) and Stack Apps (plus corresponding metas where they exist, plus Meta MathOverflow).  Note that Ubuntu already has  redirecting to .  EDIT: Either I forgot to check MathOverflow when I originally posted this, or it's been added since then -  redirects to  now. However,  does not go anywhere.


Show that the random variable $U=\frac{X}{X+Y}$ has a uniform distribution on the range [0,1] when X and Y are independent random variables with the same exponential distribution. I'm stuck at $F_U\left(u\right)=P\left(U\le u\right)=P\left(\frac{X}{X+Y}\le u\right)$ Even if I assume that X=1 I get a divergent integral in the end And If I assume that $P\left(0\le \frac{X}{X+Y}\le 1\right)=P\left(0\le \:X\le \:X+Y\right)=P\left(-X\le Y\right)=1-P\left(Y\le X\right)$ Then I still get an divergent integral So what should I do?

Been crushing my head with this exercise. I know how to get the distribution of a ratio of exponential variables and of the sum of them, but i can't piece everything together.  The exercise goes as this:  If X,Y are independent exponentially distributed with beta = 1 (parameter of the exponential distribution = 1) then what is the distribution of X/(X+Y)  Any ideas?  Thanks a lot.


Uni lab tutorial asks us to create an abstract class Student and extend that class into 2 more classes UnderGraduate and PostGraduate. After that create another class called Conference that stores a list of students. The issue is we then need to use functions specific to the UnderGraduate & PostGraduate classes as well as inherited functions from the virtual functions in class Student. Instead of that, it uses the virtual functions (returns 0 instead of other definitions of it), and it gives an error when trying to dynamically cast in order to use the specifically needed functions.     int countUnderGraduate(int years){     int total = 0;     list <Student> :: iterator i;          for(i = students.begin(); i != students.end(); i++){         if(i->getYears() < years){             total++;         }     }          return total; }  int countPostGraduate(int projects){     int total = 0;     list <Student> :: iterator i;          for(i = students.begin(); i != students.end(); i++){         PostGraduate *pg = dynamic_cast<PostGraduate*>(*i);         if(pg){             if(pg->getProjects() > projects){                 total++;             }         }     }          return total; }  gives 2 errors:  In the countUnderGraduate function: error: ‘class Student’ has no member named ‘getYears'. In the latter function (tried dynamic cast): cannot dynamic_cast ‘i.std::_List_iterator<  >::operator*()’ (of type ‘class Student’) to type ‘class PostGraduate*’ (source is not a pointer)  Both functions work with this list:     Conference(list <Student> students){     list <Student> :: iterator i;          for(i = students.begin(); i != students.end(); i++){         this->students.push_back(*i);     } }  Are there any workarounds?

Someone mentioned it in the IRC as the slicing problem.


I have an SQL Database with a lot of unused space. However when I run  Tasks | Shrink | Database  And Tasks | Shrink | Files from Management studio it isn't freeing up any space. Unfortunately the machine that it is running on is running out of hard disk space. Any ideas on why this space isn't freeing up.  Also recovery mode on DB is set to simple.   Here is the unused dialog that comes up when I go to shrink files:   I've also tried doing this via T-SQL     DBCC SHRINKDATABASE (myDatabase, 5);   I get following response:  DBCC SHRINKDATABASE: File ID 1 of database ID 6 was skipped because the file does not have enough free space to reclaim. DBCC SHRINKDATABASE: File ID 2 of database ID 6 was skipped because the file does not have enough free space to reclaim. DBCC execution completed. If DBCC printed error messages, contact your system administrator.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


I have a custom content type where when loaded, I want to HIDE (no show) a regions block. Been looking around trying to find the answer and have come up short. Ideally, I'd want to do it in a preprocess or something, not within a template. Tried accomplishing it with Context, but appears that only allows you to add blocks to regions, not remove them. Fairly new to Drupal, so bare with me.

In some of my nodes I need to show only "body" part of node. I don't want to show blocks etc. in those nodes. How can I do this ?   Create a new "content type" and put the data from existing nodes to that type of node. And excluding that "content type" from each of the blocks. By using javascript/jquery like: $('div'.block).remove()   Any more elegant answers?


I'm using Matlab Neural Network Toolbox. I want learn feed forward net for my classification problem. But network doesn't learn anything useful, so I start checking network setting.  I choose xor problem. I find that network doesn't learn xor if the output transfer function is set to logsig (log-sigmoid function)! Sample code:  x = [0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1; 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1]; y =[0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0]; net = feedforwardnet([2 2]); net = configure(net,x,y); net.layers{3}.transferFcn = 'logsig'; %problem is here [net,tr] = train(net,x,y); net(x)   The output is: 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000  I try few times and I never got any value smaller then 0.5. If I comment 6th line which set transfer function to logsig the net learn perfect.  Does anyone know why network with logsig doesn't work?  P.S My matlab version MATLAB 7.12.0 (R2011a).

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


So I had this school assignment with this question: $\int (\cos x - \sin x)^2 \ dx$ And through computations I came up with this: $\int \cos x + \sin x \ dx - \int 2 \cos x \sin x$ And this is where I got stuck, that when I integrate $2 \cos x \sin x$ right away, I would actually get $x - \sin^2 x + C$, which is different if I applied the double angle trigonometric identities in $2 \cos x \sin x$ , rewrite it to $\sin 2x$ , and it will give me a different answer. $x + \cos(2x)/2 + C$ I went to Symbolab, a math solver app, and it really shows the difference, whether I integrate it right away or apply the trig identity first before integrating:   I tried to plot the points in Desmos, two answers seems close enough that it's just one constant away (particularly 0.5), but still mathematically not equal  So, does this mean that this trig identity changes the actual answer that I should avoid using it as much as possible. Or this is just an exception? Which one is right? Is it both of the two answers? I already passed my answer to the teacher, but what I actually did before passing it is integrating right away. But this problem haunts me in sleep that I actually opened my pc to ask this question here. Still learning integration techniques that I got introduced to this kind of problem, that overall it's pretty fun and stressing.

$$ \int \sin \theta\cos \theta~d \theta= \int \frac {1} 2  \sin 2\theta~ d \theta=-\frac {1} 4  \cos 2\theta$$ But, if I let  $$ u=\sin \theta , \text{ then }du=\cos \theta~d\theta $$ Then $$ \int \sin \theta\cos \theta~d \theta= \int u ~ du =\frac { u^2 } 2 =\frac {1} 2 \sin^2 \theta $$ Since $$ \sin^2 \theta =\frac {1} 2 - \frac {1} 2 \cos 2\theta$$ The above can be written as $$ \int \sin \theta\cos \theta~d \theta= \frac {1} 2 \sin^2 \theta =\frac {1} 2 \left( \frac {1} 2 - \frac {1} 2 \cos 2\theta \right)=\frac {1} 4-\frac {1} 4 \cos 2\theta   $$ Why are the two results differ by the constant $1/4$? Thank you.


I'm playing around with 2-Dimensional arrays in Java a bit and i just cant seem to find a difference between those two ways of initializing a 2-Dimensional Array.  //Option one int field[][] = new int[n][n];  //Option two int[][] field = new int[n][n];

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


It's been a long time using an unmaintained iOS app. Does anybody know when will we (for example all iPhone X users) get the update?

The Stack Exchange app doesn’t look very good on Apple’s brand new flagship phone yet.    Also the app can’t identify the device model either. (Says Unknown (iPhone 10,3))   App Version: 1.6.6.2 Device: iPhone X (iPhone10,3) OS Version: Version 11.1 (Build 15B93)


I would like to get a date from a text and convert it in seconds. The pattern of the date is Day Month Year Hour . I'm using regex to match the pattern but The regex is long and not readable. So I created a variable for each regex. Now I would like to how can I create another matching pattern using those variables. I'm using javascript and here is my code  ```javascript  / detect the day let day = /(lundi|mardi|mercredi|jeudi|vendredi|samedi|dimanche)/i;  // detect the num of the day let numDay = /(0[1-9]|1[0-9]|2[0-9]|3[0-1])/; //detect the month let month = /(janvier|fevrier|mars|avril|mai|juin|juillet|aout|septembre|octobre|novembre|decembre)/i; // detecter the year let year = /(197[0-9]|20[0-9][0-9])/; // detecter the hours in min and sec let hour = /([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/;  let validFormat = `${day} ${numDay} ${month} ${year} ${hour}`;  let expression = "Mardi 12 Novembre 2013 12:02:21";  let found = expression.match(validFormat);  console.log(found);   ```

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


I have been trying to install 16.04 for two long days now. I need help. I dont really know what im doing since 9.04 is unsupported. I want to install 16.04 however I tried mounting the ISO and nothing happens.   EDIT: I installed rufus 2.9 and an error occured while loading the archive. I have a USB I could use, but I can't get a software to work properly.   EDIT #2: "Disk Image Writer" does not come up. I tried other options that seemed similar but all had an "error". If it helps I installed this ubuntu 9.04 from a CD. I do not have any other blank CDs but I do have a 64GB flash drive.

I would like to see a full how-to guide on how to install Ubuntu.


I know that the size of union in c is the size of the largest member of the union. If I define this union: union Test1 {    char C; // 1 byte    uint32_t uTest; // 4 bytes };  The size of such union "Test1" is 4 bytes. However, if i define union Test2 union Test2 {   char C; // 1 byte   struct    {     char arr[5]; // 5 bytes       }sTest;   uint32_t uT1; // 4 bytes   uint32_t uT2; // 4 bytes   };  here the largest member of union "Test2" is the structure "sTest" which is 5 bytes, then the size of the union "Test2" should be 5 bytes, but the compiler tells that it is 8 bytes !!! Can someone please explain what the size of union "Test2" should be?? Thanks

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I am given that $f(x)$ is continous on $[0,2\pi]$ and and $f''(x)\ge 0$ on the prescribed interval, I have to show $$\int_{0}^{2\pi}f(x)\cos x \; dx \ge 0;$$ well $\cos x\ge 0$ on $[0,\pi/2]$ and $\cos x\le 0$ on $[\pi/2,3\pi/2]$ and again $\cos x\ge 0$ on $[3\pi/2,2\pi]$, what I did, multiplied with $f''(x) \cos x$ and took the integration by parts, but nothing fruitful I came across; please give hint.

Let $f(x)$ be a continuous function, whose first and second derivatives are continuous on $[0,2π]$ and $f''(x)≥0\:\:∀\:x∈[0,2π]$. Show that$$ \int _0^{2\pi} f(x) \cos x dx \ge 0$$


I think it is solved with double counting. I tried to write unfolded, but I failed to solve the exercise. Can you help me?

How do I see that$$\sum_{k \ge 0} \binom{n}{3k} = (1 + 1)^n + (\omega + 1)^n + (\omega^2 + 1)^n,$$where $\omega = \text{exp}\left({2\over3}\pi i\right)$? What is the underlying intuition behind this equality?


I am confused between the texts below. Please help me with the correct one.        Tasks for John and I have been created     Tasks for John and me have been created     Tasks for John and myself have been created

I'm currently using Cambridge English Advanced 1. It's a book that contains past examination papers, and includes numerous samples of authentic writing. This material helps, candidates and teachers, understand what the examiners are ‘testing’ and how these papers are marked. The assessment covers four categories: content, communicative achievement, organisation and language. Each category is awarded a mark between 1 and 5, so the maximum score is 20, and each mark has a brief note attached by the examiner. Any errors of punctuation, orthography, grammar, appropriacy, and vocabulary are left intact. In fact, there are no corrections because the  ‘examiner’ does not specify where the errors lie. This can be frustrating, even though spelling mistakes are rare at the advanced level, and errors in style, collocation or register are still relatively easy to identify, sometimes I'll read a phrase that forces me to ponder.  Dear Director, [ TEXT ] To conclude, this letter is a polite request to cover the costs of a 2 month language course for my colleagues and me. We would be very pleased if the company would do us this favour. Yours sincerely John Smith  The following marks were awarded Content                    5    blah, blah, … Communicative Achievement  2    blah, blah, …     Organisation               3    blah, blah, … Language                   3    blah, blah, …  I am able to pick out six minor errors in that brief extract, maybe some users will identify more, maybe some will identify fewer, and maybe some will say that the language used is perfectly acceptable. But if I can help a candidate attain that elusive B,  I would be delighted. I am interested in (what could be) the 7th error, emphasised in bold. Because the letter of proposal is formal, I feel the phrase, for my colleagues and me, is jarring. I want to change it to for my colleagues and I, but the antecedent requires an object. You would not say: “This is a request to cover the cost […] for I”. So, why use the subject pronoun I in the expression “my colleagues and…”?  Could I use instead, myself?  Which of the following is preferable in a formal written proposal?    …for my colleagues and me …for my colleagues and I …for my colleagues and myself  EDITED: I found a   of the writing sample (11/11) if anyone is interested.  I've looked at the following question,  Some answers appear to be contradictory, the accepted answer says using  I and me are both grammatical, which in my example is not true. Moreover, there's no mention of myself, as a possible solution, in the question.


I have a CentOS server (release 6.7). In order to do tmux shortcuts more quickly (ctrl-b), I thought of mapping the caps lock key as another ctrl key. How do I go about doing this?  I have looked up this up on Google and have tried adding XKBOPTIONS="ctrl:nocaps" to /etc/sysconfig/keyboard to no avail.

I am running the latest version of Linux Mint with Cinnamon. I'm trying to map Caps Lock to Ctrl, but I cannot figure out how to do it. All web searches I've done have led me to older versions of Linux Mint (there is no keyboard layout option in my settings). How can I do this?


If I get an  USA -J1 visa on my Indian passport and after that I decide to apply for the new passport (due to insufficient pages), is J1 visa in my old passport is valid ??

I have a valid B1/B2 US visa expiring about a year from now. The passport it's in expired a few years ago, and I recently got a new one.   The passport number does not match, but the national ID number, mentioned in both, does (it used to be the same as your national ID, but not anymore)  Can I travel to the US carrying both passports? Or is it asking for trouble? (I read a few years ago that it was possible, but that might have changed)  Should I just get a new visa to avoid potential complications?


Rendered an image, rendered an animation (without Suzanne), now when I add Suzanne to my scene, she is not visible in any render.  I must be doing something wrong by can't figure out what. See image, as you can see Suzanne shows up in my layout and in layout render mode but NOT in the render.  I can't figure out why.

Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check?  Ok added link:


I am aware that ${n\choose 0} + {n\choose 2} + {n\choose 4}+\cdots =2^{n-1}= {n\choose 1} + {n\choose 3} + {n\choose 5}+\cdots$ but that's pretty much all I know about binomial coefficients.. Thanks in advance!

How to find the tight bound for the binomial series $\binom{n}{2}\cdot2^2+\binom{n}{4}\cdot2^4+\binom{n}{6}\cdot2^6\ldots,+ \binom{n}{n}\cdot2^n$ I have found $3^n$ for series $(1+2)^n=1+\binom{n}{1}\cdot2^1+\binom{n}{2}\cdot2^2+\binom{n}{3}\cdot2^3+\cdots+ \binom{n}{n}\cdot2^n$ Is there any way to prove the bound of above series.


I have the following grep  grep -r --color -L "class public interface" * | grep "authenticate"   I want it to bring back files that don't contain "class public interface" anywhere in the file, but contain "authenticate".  But what I have is not working as expected.There is a file that I know should come up as it does not contain "class public interface" but contains "authenticate"  Is there something wrong in my command?

I have a tree of source code and I am looking to find all files that contain a certain word and must not contain a second word. This, because I need to update older files to include some newer code.  I know I can use find, but I feel like if I try to chain grep statements it won't work because the second grep statement is going to be searching the results of the first and then I got lost.  I tried:  find . -type f -name "*.c" -exec grep -Hl "ABC" {} \; | grep -L "123"   And this totally did not work. Any help would be appreciated.


Before posting this, I looked at 24 different duplicate questions including: . I couldn't find a single question that dealt with this. So, please don't mark duplicate unless there truly is another question asking this...  Now that I've followed the , and it works flawlessly, how do I make it permanent, rather than a trial/installer?     I believe this will help Windows users too. My ultimate goal is to have a single USB stick that I can use on Mac or PC, but in the end may have to carry 2   The directions I linked above are excellent! It worked perfectly. I'm not one of those people who can't follow directions. The problem is that the directions ended too soon.  Here is what I mean by "make it permanent"   When I boot off the USB stick, I get GRUB menu offering "Try Ubuntu without installing", "Install Ubuntu", "OEM install (for manufactures)", and "Check disk for defects"   I want this to boot straight into a full Ubuntu Install.  When I boot into "Try Ubuntu", the drive is very small.   I want to make the full space of my 32GB USB stick available I don't want to waste my precious little space on tools for installing Ubuntu on another drive. (This is my drive!)  The drive seems to be in a Guest/Read-only-ish mode.   I tried to remove the media files in the Examples directory linked on the Desktop and got an error I tried to downloaded the , but...   the Ubuntu GUI installer doesn't even seem to try to open it. dpkg -i won't install it because of 3 dependencies. apt can't locate any of the 3 dependencies. none of the answers on  work for me.  [ I fully realize that the Chrome issue may be a  ]    Let me clarify my criteria   EDIT: I can't believe I'm doing this again, but here we go... Let me take the big bold question at the top, and break it down phrase by phrase...   Now that I've followed the ,   If you are calling this question a duplicate of another and the other does not specifically address following those directions, it is a different question  and it works flawlessly,   If you are calling this question a duplicate of another and the other is about failing to follow those directions, it is a different question  how do I make it permanent,   The key word there is it. What does that pronoun refer too? A USB drive that was created in about 2 minutes by dding an ISO on to it. What does it NOT refer too? A USB drive that created over the course of hours by using it as the target of the GUI Ubuntu installer. If you are calling this question a duplicate of another and the other does not populate the USB drive via dd or , it is a different question  rather than a trial/installer?   If you are calling this question a duplicate of another and the other produces the Live CD/trial/installer, it is a different question   I want my hard drive to be untouched. I don't want to make an Ubuntu USB "install disk". I do want to Ubuntu installed on a USB disk. The answer may very well be that it's not possible to do.   REMINDER: My question is in bold at the top The answer may be that I have to try something else  This question is not a duplicate.   If the answer turns out that I have to try something else, that's okay. But marking the question as a duplicate prevents smart people from considering the question.    Please don't be nasty  Before you vote to close this, put it on hold, mark it duplicate, or kill my dog, post a comment and lets see if we can improve the question to your satisfaction. I'm doing this for posterity. Please don't be nasty.

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


There is a formula for cubic equations and quadratic equations. Is there a formula for the equations in the form $ax^4+bx^3+cx^2+dx+f=0$ I also skipped $e$ because of Euler's constant.

There is a general formula for solving quadratic equations, namely the Quadratic Formula:  $$ x = \frac{ -b \pm \sqrt{ b^2 - 4ac } }{ 2a } $$  For third degree equations of the form $ax^3+bx^2+cx+d=0$, there is a set of three equations: one for each root. Is there a general formula for solving equations of the following form? $$ ax^4 + bx^3 + cx^2 + dx + e = 0 $$ How about for higher degrees? If not, why not?


In .net we are having strong name for assembly. what is the actual use of this? how this internally used? if possible please explain the scenario

I am currently thinking about open-sourcing a project of mine and am in the process of preparing the source code and project structure to be released to the public. Now I got one question: how should I handle the signature key for my assemblies? Should I create a new key for the open-source version and publish it along with the other files to the SVN repository? Should I leave the key out and everyone who wants to compile the code should generate his own key?  How do you handle this? I feel a little bit uncomfortable with releasing a signature key to the public.


I have 10 points that represent the centres of countries. I want to show with arrows the flow (some kind of trade) from one country to another.   The way that my table of attributes is constructed is the following:  From country      X Y       To country    X_to  Y_to            Value  1                 X Y       2             X_to  Y_to            10   I want the arrows to be proportional to the value and not to be straight lines but curved as it may be the case that 2 countries exchange trade, i.e. country 1 sends to country 2 and country 2 sends to country 1.  ARCGIS 10.2

I am trying to represent trade flows on a world map where the size and direction of arrows indicate the exports/imports of a given country.  This type of map is commonly found in magazines and newspapers. However, I find it extremely difficult to make.   Is there any function in ArcGIS for Desktop or any free software that would help me in making it?


I have a requirement to build a circuit which can identify 3 states at the input and the output is given to ADC of uC. I have the below circuit for 12 V systems:  The input can be connected to gnd, battery(T87) or left open. I am trying to use the same circuit for 24V system but since the ISO pulses(have to consider ISO pulses since input can be connected to battery) would go up to +- 600V in the 24V system, what are the changes that I will have to make. I have to probably change the resistor values and packages. What about the diode ? what are the parameters that I have to consider for diode selection ? and what would be the worst case for the diode, for example like Jump start, load dump , ISO pulses, reverse polarity ? the switching diode BAW56W was chosen for 12V system because it was already available in the BOM of our product. Here is the link to my other related question, I was not too clear while asking that question. My main requirement is that my circuit differentiate between 3 states

Automotive Circuit requirement:   If input pin is connected to Battery(T87 line), the output of the circuit shall provide a output voltage of 5V to ADC pin of microcontroller, if the input pin is connected to GND, the output of the circuit shall provide a output voltage of 0V to ADC pin of microcontroller and if the input pin is left floating, the output of the circuit shall provide a output voltage of 2.5V to ADC pin of microcontroller.   The battery voltage in load dump condition could be up to 60V, but in normal operation without any fault condition, it would be up to 32V.  Would a simple voltage divider (with a pull-up to 5V) with a blocking diode be enough? Any other ideas? What parameters of the ADC of the microcontroller should be considered? Injection current into the uC- ADC pin would be critical, right? How do I find out the voltage thresholds? Also, what are the parameters of the Schottky diode that I should look to select? The diode would decouple the input pin from the centre tap of the voltage divider, because in case the input pin is connected to battery, the injection current into the uC ADC pin would be too high.  I have used a switching diode, since it was already available in the Bill of Materials.


Let $D$ be the set of tuples $(w_1,\ldots,w_{10})$, where $w_i\in\{1,2,3\}, 1\leq i\leq 10$ and $w_i+w_{i+1}$ is an even number for each $i$ with $1\leq i\leq 9$. Then the number of elements in $D$ is ? I tried with combinatorics but unable to hit a conclusion. This kind of questions are often asked in competitive exams so there might be a simple way to determine. Isn't it?

Let , $D$ be the set of tuples $(w_1,w_2,\cdots,w_{10})$ , where $w_i \in \{1,2,3\},1\le i\le10$ and $w_i+w_{i+1}$ is an even number for each $i$ with $1\le i\le 9$.   Then find the cardinality of $D$.   As , $w_i+w_{i+1}$ is an even number so either both even OR both odd. Again $w_i\in \{1,2,3\}$. So , both even possibility is exactly $1$ which is $(2,2,\cdots,2)$.  But I am unable to find the both odd possibility..


Is it possible to create a URL that will open a new Google Drive document, so that I can save as a bookmark and then will have essentially a short cut my bookmarks bar to be able to open a new doc?

What is the current URL to create a new Google Document please? Since Google last updated their Docs the old URL does not work.


I have a range of dates and a measurement on each of those dates.  I'd like to calculate an exponential moving average for each of the dates.  Does anybody know how to do this?  I'm new to python.  It doesn't appear that averages are built into the standard python library, which strikes me as a little odd.  Maybe I'm not looking in the right place.  So, given the following code, how could I calculate the moving weighted average of IQ points for calendar dates?  from datetime import date days = [date(2008,1,1), date(2008,1,2), date(2008,1,7)] IQ = [110, 105, 90]   (there's probably a better way to structure the data, any advice would be appreciated)


The keyboard switcher no longer works for me; I used to switch between keyboard layouts (from English to other languages) the same way as I do on Windows, using Alt-Shift.   It no longer seems to accept this combination, and I can't figure out how to set this up.  Is this a known bug?

I recently upgraded to Ubuntu 13.10, with the new keyboard handling system. The little "switch keyboard" option does not let me set it to Alt+Shift. How can I get this keyboard binding, as I have absolutely no interest in using the Mac-esque Super+Space combo?


Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


simple my question is different because i need to merge the files into one too then remove the duplicates lines from the that file which will be over 50GB txt i have large .txt from 10GB+ files   i want to merge them into 1 .txt file  then remove all the duplicates lines from that 1 large .txt file combined which will be around 50GB txt file or 100GB txt file   so what can handle that kind of large file and remove the duplicates from it smoothly ?  i need the fastest way because i tryied bouth notepad++ and emeditor they work  super heavy with them for merge or duplicates removing and take forever  i have 12GB RAM

I am looking for an open source (possibly 64 bit) windows text editor that will allow me to remove duplicate lines from an extremely large (4GB+) text file.  What do you use to remove duplicate lines from your large text files?


Saw the ending for this in the early 80's. His soul is trapped in a box or placed there making him unable to die. Ends with him walking into the street and being messed up by a car hitting him but doesn't die. Can't seem to figure out what it was.

I remember very little of this, I was quite young -  It was on television in the mid 90's, but seemed older. My wife was telling me about the 21 grams experiment and the memory clicked into place. Setting Inside of a mad scientist sort of lab, with the plasma balls and everything else, a character (Who in my mind resembles Gene Wilder in Young Frankenstein) is conducting an experiment. The room is hazy, lots of hues of purple and red. He has an assistant present. They were conducting some sort of experiment to try to figure out the secrets of immortality (or possibly reanimation). I remember them "trapping" a human soul in a glass vessel to see what it weighed or what kind of volume it took up - I believe they shot someone in this vessel, and because their soul could not "escape", they did not die.


Hi, I want to open Firefox from the terminal with SOCKS proxy setting enabled. I would like to define it in terminal while opening.   Can this be done? and obviously if it can does anyone know how?   Cant find info on this anywhere thanks

I'm looking for a way to tell Firefox to use a proxy in Ubuntu Ludid (10.04.1 LTS).   I'm installing Ubuntu semi-automatically on several identical machines. For this, I use a script that, amongst other things, sets system-wide proxy settings:  echo "export http_proxy=http://myproxy:3128/" > /etc/profile.d/proxy.sh echo "export HTTP_PROXY=http://myproxy:3128/" >> /etc/profile.d/proxy.sh chmod a+x /etc/profile.d/proxy.sh   I can confirm that the variables are set correctly when checking in a shell. Most programs respect this setting and use my proxy. Firefox, however, does not. When I open its network connection settings dialog, however, it is pre-set to "use system settings" for the proxy.   What does Firefox expect here? A differently-named variable? Can I set something in FF's prefs.js?


Latent heat of water phase changes  - at critical point it's zero. At atmospheric pressure, it's given by countless tables all over the net. I can read the pressure and temperature of the phase change for a range of pressure values from the diagram too. But I never found any resource that would show how the latent heat value changes.  Could someone provide some table, equation, graph that gives these values? I would prefer an answer in joules if possible. If you can provide values for a range of pressures, that would be even more welcome, but I specifically want the latent heat of fusion and vaporization of water at 620Pa?  And if that was to be too hard, maybe provide just the values right at the edge of the triple point - if liquid water at just above 0 Celsius degrees is depressurized from 620 to 610Pa, how much of it will evaporate and how much will freeze?  I'm aware of a previous question , which asks about the general effect of pressure on latent heats and the mechanisms behind said changes. Here I'm asking for a specific reference to the values for water as a function of pressure, and particularly for pressures as low as 620 Pa (which is too low for most obvious search results).

What is latent heat of vaporization ($L_v$) in the first place?  seems to indicate that it is the energy used in overcoming intermolecular interactions, without taking into account at all any work done to push back the atmosphere to allow for an increase in volume when a liquid boils.  If that is so, then would it be correct that $L_v$ decreases as boiling point rises, because at the higher boiling point, less energy is required to overcome the weaker intermolecular interactions?  Otherwise, would it then be correct to say that $L_v$ increases as boiling point rises, assuming constant-volume?  Let's say there is a beaker containing 1 kg of liquid water at the boiling point, and an identical beaker, containing an identical amount of water at the same temperature. However, this second beaker is perfectly sealed such that the volume of its contents, both liquid and gaseous, will not change.  Since both liquids are at the boiling point, applying heat should cause boiling to occur. Compared to the first beaker, then, would the second beaker (in theory) require more or less heat for its 1 kg of liquid water to completely boil?  Thanks!


I want to write an equation like this:  I know how to achieve this  by using l_j(x) = \prod_{i = 0, i \neq j}^{N}\frac{x- x_i}{x_j - x_i}.  But as you can see the two equations under the symbol \prod are not stacked up vertically. I tried to use \underset to put one under another l_j(x) = \prod_{\underset{i \neq j}{i = 0}}^{N}\frac{x- x_i}{x_j - x_i}.  Then I got:  The second equation is smaller than the first one. Does anyone know how to stack them vertically and maintain the same size? And also, I am not sure how to generate the curly "l" in the first figure I showed. I tried \mathit{l}, but it does not work.

I want some advice about how to format it better if I have to write a long text below a $\sum$ or a $\prod$ sign. Basically I want to explain the restriction over which the sum or the product is being taken.   For example how can I improve the looks of these equations,  $N_i (\rho) = \sum _ {B \in \rho s.t n_{\delta_j}(B) = 0    \forall j \neq i} n_{\delta_i} (B)$  $\sum _{ \rho s.t N_i(\rho) = a_i and M_i(\rho) = b_i}    \prod _{B \in \rho} \langle \prod_{i=1}^{n} \delta_i ^{n_{\delta_i}(B)}    y_i ^{n_{y_i}(B)} \rangle_c$


Let $(x_n)$ be a sequence that converges to a number x.  Define a new sequence $(s_n)$ by $s_n= \frac{1}{n}\sum\limits_{k=1}^n x_k$  Show that $s_n$ converges to $x$ as well.

Original Title: Tauberian theorems and Cesàro sum  Theorem (Landau-Hardy, From Rudin's Principle of Mathematical Analysis Exercise 3.14)  $\newcommand\abs[1]{\left\lvert#1\right\rvert}$ If $\{s_n\}$ is a complex sequence, define its arithmetic means $\sigma_n$ by $$\sigma_n=\frac{s_0+s_1+\dotsb+s_n}{n+1}\qquad(n=0,1,2,\dotsc)$$ Put $a_n=s_n-s_{n-1}$ for $n\ge1$. Assume $M<+\infty$ and $\abs{na_n}\le M$ for all $n$, and $\lim_{n\to\infty}\sigma_n=\sigma$, then $\lim_{n\to\infty}s_n=\sigma$.  The outline of the proof  If $m<n$, then $$s_n-\sigma_n=\frac{m+1}{n-m}(\sigma_n-\sigma_m)+\frac1{n-m}\sum_{k=m+1}^n(s_n-s_k)\tag{*}$$ Notice that $\abs{s_n-s_k}\le(n-m-1)M\,/\,(m+2)$, fix $\epsilon>0$ and associate with each $n$ the integer $m$ that satisfies $$m\le\frac{n-\epsilon}{1+\epsilon}<m+1$$ Then $(m+1)\,/\,(n-m)\le1/\epsilon$ and $\abs{s_n-s_k}<M\epsilon$. Hence $$\limsup_{n\to\infty}\,\abs{s_n-\sigma}\le M\epsilon$$  Questions and thoughts  It seems that the equation (*) comes out strangely. I wonder how to discover such kind of strange identities. So is there any observation, even deeper, to look through that equation?  Thanks!


I'm currently working on a proof, but didn't get the right idea, a hint would be appreciated:  Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to $\mathbb{Z}/n \times \mathbb{Z}/n$  So, lets assume there is an isomorphism between these groups, my first idea to was to construct a contradiction with the homomorphism property. But I don't know how, there should be an element in  $\mathbb{Z}/n \times \mathbb{Z}/n$ which is not in $\mathbb{Z}/n^2$ to reach this kind of contradiction. Of course there is $n \in \mathbb{Z}/n^2$ which is not in the other group but I don't know if this helps.  Thanks

Given that $C_n$ is a cyclic group of order $n$, what conditions must integers $n$ and $m$ satisfy such that the group $C_n \times C_m$ is isomorphic to C$_{mn}$?   So I attempted to investigate a few lower-order cyclic groups to find a pattern. In particular, I looked at $C_2 \times C_3$ and compared it to $C_6$. Here are a couple of diagrams:  $C_2 \times C_3$ -   $C_6$ -   They Cayley tables look pretty different (identity elements are all over the place for $C_2 \times C_3$) so I concluded that they are not isomorphic.  I did the same for $C_2 \times C_4$ and $C_8$:  $C_2 \times C_4$ -   $C_8$ -   Again, I arrived at the conclusion that the 2 groups are not isomorphic due to their Cayley table structure.  It seems I'm stuck now. Are my conclusions wrong for the examples I examined? If so, how do I find the conditions for the general case of comparing $C_m \times C_n$ with $C_{mn}$?


Why is $(-1) \times  (-1)=+1$ ?  What is the intuitive concept ?  My second question :  How can I show that no triangular number can be of the form $3n-1$ ?

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


What was the first science fiction series?  Did any series predate the 1936 series of Flash Gordon?  I don't really know a sensible way to search IMDb for the answer.  , erroneously, suggests:     The first popular science-fiction program on American television was the DuMont Television Network children's adventure serial Captain Video and His Video Rangers, which ran from June 1949 to April 1955.   Regarding Karel Capek's R.U.R. in the  - that was only a TV short, until 1948, when a  movie was made.

Is the BBC's pre-war live adaptation of Karel Capek's R.U.R., broadcast on February 11, 1938, the first science fiction television show? Originally, I would have thought that the American series Captain Video starting in 1949 was the first, and it may have been the first series.  But in doing my research before asking the question, I came up with the BBC broadcast. It was a 35 minute extract from the novel. It's so early that I'm tempted to call it the first, but there might be something even older.


App.component.html  <form [formGroup]="exampleForm">
          First Name        <input type="text" formControlName="phoneNumber" class="form-control" >
   </form>   App.component.ts  exampleForm: FormGroup;    number_pattern=' ^[0-9_-]*$ ';      constructor(private formBuilder: FormBuilder) { }      ngOnInit() {         this.exampleForm = this.formBuilder.group({             phoneNumber: ['', Validators.required, Validators.pattern(number_pattern)]         });     }   I need regex for phone with following rules, I tried regex code but its not working.   Field must not be empty. Hyphens and space will accept in between the number not the starting and ending. Must not contain anything other than numbers or blank spaces or hyphens Field must not contain only blank space Field must not contain only hyphens Field must not contain only hyphens and blank space.   Thanks in advance.

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Is the following statement about Java true of false?    In Java, when an instance of a class, or object, is specified as a parameter to a method, a copy of that object is being made  I know that functions in Java are pass-by-value, which would mean that a copy of the object is being made?  But at the same time, if java objects are references and you pass a reference, this is different to a copy of the actual data isn't it?  And if your passing a reference, when the reference is reassigned the object would be reassigned, making Java pass-by-reference not pass-by-value?  As you can see I am VERY confused about this

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


We know sample space (S), elementary outcomes and events.  And axiomatically define probability of these events or assign probabilities to these events.  Now event space (F) and the triplet probability space (S,F,P) are defined.  What is the use of probability space and event space - when we are completely done when we define the sample space and and probabilities of the events in it?

We have a random experiment with different outcomes forming the sample space $\Omega,$ on which we look with interest at certain patterns, called events $\mathscr{F}.$ Sigma-algebras (or sigma-fields) are made up of events to which a probability measure $\mathbb{P}$ can be assigned. Certain properties are fulfilled, including the inclusion of the null set $\varnothing$ and the entire sample space, and an algebra that describes unions and intersections with Venn diagrams.  Probability is defined as a function between the $\sigma$-algebra and the interval $[0,1]$.  Altogether, the triple $(\Omega, \mathscr{F}, \mathbb{P})$ forms a probability space.  Could someone explain in plain English why the probability edifice would collapse if we didn't have a $\sigma$-algebra? They are just wedged in the middle with that impossibly calligraphic "F". I trust they are necessary; I see that an event is different from an outcome, but what would go awry without a $\sigma$-algebras?     The question is: In what type of probability problems the definition of a probability space including a $\sigma$-algebra becomes a necessity?       provides a plain English accessible explanation. The idea is a spinning pointer rotating counterclockwise on a circle of unit perimeter:       We begin by constructing a spinner, which consists of a circle of unit   circumference and a pointer as shown in [the] Figure. We pick a point   on the circle and label it $0$, and then label every other point on the   circle with the distance, say $x$, from $0$ to that point, measured   counterclockwise. The  experiment  consists  of spinning the pointer and    recording the label of the point at the tip of the pointer. We let the random   variable $X$ denote the value of this outcome.  The sample space is   clearly the interval $[0,1)$.  We would like to construct a   probability model in which each outcome is equally likely to occur. If   we proceed as we did [...] for experiments with a finite number of   possible outcomes,  then we must assign the probability $0$ to each   outcome,  since otherwise,  the  sum  of  the  probabilities,  over    all  of  the  possible  outcomes,  would not equal 1.  (In fact,   summing an uncountable number of real numbers is a tricky business;    in  particular,  in  order  for  such  a  sum  to  have  any  meaning,   at  most countably many of the summands can be different than $0$.)    However, if all of the assigned probabilities are $0$, then the sum is   $0$, not $1$, as it should be.   So if we assigned to each point any probability, and given that there is an (uncountably) infinity number of points, their sum would add up to $> 1$.


I have 2 monitors on a Mac Mini (El Capitan) both plugged via HDMI.  Whenever I move the mouse from one monitor to the other, I cannot directly interact with the applications on the screen where the mouse is. I must first click on the mouse.  Weirder still, this does not apply for right-clicks. If I move the mouse to another monitor, I can for instance right-click on a Finder window and create a new folder. But I will not be able to type the folder name.  I would like to be able to use both monitors seamlessly: is it possible?  Edit  This question was incorrectly flagged as a duplicate of .  I am not trying to "bring a window topmost" when I move the mouse over it.  I would like to be able to interact with any graphical interface on any of my monitors in a normal fashion, without the extraneous click currently required when moving the mouse to a different monitor.  Doing the following has no effect (as far as I can tell)  defaults write com.apple.Terminal FocusFollowsMouse -string YES defaults write com.apple.x11 wm_ffm true   Note  I am currently using El Capitan but I am able to upgrade to Sierra. I could also install a third-party app, though I would prefer a native solution.

I will often click on a button expecting it to be clicked but instead all that happens is the application it is in becomes active, and I have to click again to actually click the button.  It would be nice if this second click wasn't needed, which leads me to my question:     How can I make it so that when I move the mouse cursor over an inactive window, it becomes active?


Is it proper to say "Bob wants Joe and I to stop speaking," OR "Bob wants Joe and me to stop speaking"? I know the answer has to do with a gap in my subject/object knowledge, but please direct me to the rule. The suggested questions do not address an example like the one above, wherein the object of the sentence is performing an action.

From some comments in the answers for  (now deleted, 10k only), there's confusion around the usage of I vs. me:  While the sentence, "the other attendees are myself and Steve," is agreed to be incorrect, there's confusion about whether the correct form is "the other attendees are me and Steve" or "the other attendees are Steve and I."  (I've always used the heuristic of removing the other people from the sentence, so I always thought "the other attendee is me" would be correct, instead of "the other attendee is I." Is this true, or am I using a flawed heuristic?)


I am writing a program to validate log-in which cannot work. Not occurring any error but it does not generate toast text for incorrect log-in. I consider it goes wrong on condition state. If the log-in is wrong, it will response a 'null' as it display in the log.  But I can't find where the fault is, can somebody help?          HttpClient client = new DefaultHttpClient();          try {             ArrayList<NameValuePair> parameters = new ArrayList<NameValuePair>();             parameters.add(new BasicNameValuePair("login", loginText));             parameters.add(new BasicNameValuePair("password", pwText));              String url = controller.bniRootUrl+                     controller.folderUser+                     controller.fileLogin+                     "?";              url += URLEncodedUtils.format(parameters, "utf-8");              HttpGet get = new HttpGet(url);             HttpResponse response = client.execute(get);              loginResponse = EntityUtils.toString(response.getEntity());          } catch (UnsupportedEncodingException e) {             e.printStackTrace();         } catch (ClientProtocolException e) {             // TODO Auto-generated catch block             e.printStackTrace();         } catch (IOException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }          Log.d(TAG, "response: "+loginResponse);         if (loginResponse == null || loginResponse == "null" || loginResponse.isEmpty()){             Toast.makeText(Login.this, "invalid login", Toast.LENGTH_SHORT).show();         }

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


i´ve got a wrapper dll for C# and a dll compiled from cpp which is called from the wrapper. Now there is an issue System.BadImageFormatException which is mostly caused by x64 and x86 compiling. Now I tried x64 and x86 for my project but neither worked. Now I think may the cpp-dll is x86 but the wrapper x64 or the other way. After checking the wrapper dll (for PE  L) the wrapper is x86 now I don´t know whether the cpp-dll is x64. So someone can tell me how to check this?

I want to determine if a native assembly is complied as x64 or x86 from a managed code application ().  I think it must be somewhere in the PE header since the OS loader needs to know this information, but I couldn't find it. Of course I prefer to do it in managed code, but if it necessary, I can use native C++.


I have been using LaTeX forever, but strangely just realized I've never had to plot a graph in it. The graph is seen here:  and the equations are here  I want to use \usepackage{pgfplots}  However I am open to using other packages if you recommend any? Thanks

Which is the best way to put function plots into a LaTeX document?


Prove that if $\lim_{n\to \infty}a_n=c$ then $\lim_{n\to \infty}A_n=c$ where $A_n$ is the arithmetic mean of the first $n$ of $a_n$. I was only able to prove that is true for a sequence of $1$.

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


In my website, if a user accesses an invalid URL, they are shown a custom 404 page. But now I'm questioning the value of this? It would be very easy for me to (instead of showing a 404 page) redirect them back to the home page and display an error message saying something like:     the page you requested could not be found   is this a better approach from the POV of usability?

We have two pages. One is a landing page, given by the route /region. The other is a detail page for a particular region, given by the route /region/summary/{id}. The landing page is the normal way by which a user would navigate to a detail page.  Suppose a user visits the intermediate route region/summary. Should he be redirected to a 404 page, since technically it's not a valid route, or redirected to the region page, since the main problem is that he didn't provide an id in the route, and he'd find valid links everywhere on the landing page?


My terminal shows this error. I can't add any applications. Please help someone  ashwin@ash:~$ sudo add-apt-repository ppa:tualatrix/ppa [sudo] password for ashwin:   The official Ubuntu Tweak stable repository  More info: https://launchpad.net/~tualatrix/+archive/ppa  Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmpwj1dey/secring.gpg' created gpg: keyring `/tmp/tmpwj1dey/pubring.gpg' created gpg: requesting key 0624A220 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpwj1dey/trustdb.gpg: trustdb created gpg: key 0624A220: public key "Launchpad PPA for TualatriX" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg:               imported: 1  (RSA: 1)  OK  ashwin@ash:~$ sudo apt-get update E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)  E: Unable to lock directory /var/lib/apt/lists/

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


I am asked to find the Fisher information function for double exponential distribution with mean $\mu$ and variance 1.  Here's my approach: $l(\mu) = -\frac{1}{2}e^{|x-\mu|}$, so $\log l(\mu) = constant  + |x-\mu| $, $\frac{d\log l(\mu)}{d\mu} = -1$ if $x>\mu$ $\frac{d\log l(\mu)}{d\mu} = 1$ if $x<\mu$  Then $I(\mu) = Var(\frac{d\log l(\mu)}{d\mu}) = 0$  I suspect that this approach is wrong, please advise.

Say we have $f(x , \theta) = \frac{1}{2}e^{-|x-\theta|}$ Lets assume for simplicity, we only have 1 sample. We find that the log-likelihood for this distribution is:  $$ l(\theta , x) = -log(2) + (\theta - x) I_{(x < \theta)}+(x-\theta)I_{(x \geq \theta)}. $$  Now in general, Call the score function:  $$ S(\theta , X) = Dl = \frac{Dg_{\theta}}{g_{\theta}} $$ by noticing the log-likelihood is expressed as :  $$ l(\theta, X) = log (g_{\theta}) $$  Where g is the likelihood and assume $g$ is 3 times differentiable. Furthermore, we find :  $$ DS = \frac{D^2g_\theta}{g_\theta}- SS'. $$ Which finally allows us to obtain that :  $$ var_\theta S = -E_\theta DS $$ by noticing that $E_\theta S = 0$  Now in this case:  $$ Dl = \frac{dl}{d\theta} = I_{(x < \theta)} - I_{(x \geq \theta)} $$  So indeed  $$ E_\theta S = P{(x < \theta)} - P{(x \geq \theta)} = 0 $$ And then $\frac{dS}{d\theta} = 0$ so $-E_\theta \frac{dS}{d\theta} = 0$  Now computing  $$ ES^2 = E( [I_{(x < \theta)} - I_{(x \geq \theta)}]^2) = E(I_{(x < \theta)} + I_{(x \geq \theta)}) = 1. $$ This does not match the case above, however here do not have differentiability. Is what I did correct, or plain fiction?